/* ==========================================================================
   NULLIFIER — THE HOMEPAGE
   Loaded on the front page only. Markup from inc/home.php.
   ========================================================================== */

/* The sections meet edge to edge: no block gap between them. */
.nf-home-hero,
.nf-home-pieces,
.nf-home-worlds,
.nf-home-statement,
.nf-home-worlds + .nf-community {
	margin-block: 0;
}

.nf-home__wrap {
	box-sizing: border-box;
	width: 100%;
	max-width: 1400px;
	margin-inline: auto;
	padding-inline: var(--nf-gutter, clamp(1.25rem, 4vw, 3rem));
}

.nf-home__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.nf-home__kicker {
	margin: 0 0 0.9rem;
	font-size: 0.72rem;
	font-weight: 400;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	opacity: 0.62;
}

.nf-home__title {
	margin: 0 !important;
	font-size: clamp(2.25rem, 5vw, 3.75rem) !important;
	font-weight: 500 !important;
	line-height: 1 !important;
	letter-spacing: -0.035em !important;
}

.nf-home-arrow {
	flex: 0 0 auto;
	transition: transform 0.25s var(--nf-ease, ease);
}

a:hover > .nf-home-arrow,
a:focus-visible > .nf-home-arrow,
a:hover .nf-home-world__go .nf-home-arrow {
	transform: translate(2px, -2px);
}

.nf-home-btn--line:hover .nf-home-arrow {
	transform: translateX(3px);
}

/* A link with a line under it that stays; the arrow moves on hover. */
.nf-home-link {
	display: inline-flex;
	align-items: center;
	gap: 0.9rem;
	padding-bottom: 0.45rem;
	border-bottom: 1px solid currentColor;
	color: inherit;
	font-size: 0.95rem;
	text-decoration: none;
	background-image: none !important;
}

/* --- The hero ------------------------------------------------------------ */

.nf-home-hero {
	position: relative;
	display: flex;
	flex-direction: column;
	/*
	 * Exactly the first screen: less the ticker, the header and, when you are
	 * signed in, WordPress's black admin bar (32px, 46px on phones). Without
	 * that last one a signed-in view pushes the tabs 32px off the bottom.
	 */
	min-height: max(28rem, calc(100svh - var(--nf-header-h, 69px) - var(--nf-ticker-h, 28px) - var(--wp-admin--admin-bar--height, 0px)));
	overflow: hidden;
	background: #050508;
	color: #fff;
	isolation: isolate;
}

.nf-home-hero__worlds,
.nf-home-hero__world,
.nf-home-hero__scrim {
	position: absolute;
	inset: 0;
}

.nf-home-hero__worlds {
	z-index: -2;
}

.nf-home-hero__world {
	opacity: 0;
	transition: opacity 1.4s ease;
}

.nf-home-hero__world.is-active {
	opacity: 1;
}

.nf-home-hero__world img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transform: scale(1.06);
	transition: transform 9s cubic-bezier(0.15, 0.6, 0.25, 1);
}

/* A slow settle as each world arrives. */
.nf-home-hero__world.is-active img {
	transform: scale(1);
}

/* Dark where the words are, clear where the picture is. */
.nf-home-hero__scrim {
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(4, 4, 8, 0.82) 0%, rgba(4, 4, 8, 0.55) 34%, rgba(4, 4, 8, 0.12) 68%, rgba(4, 4, 8, 0.05) 100%),
		linear-gradient(to bottom, rgba(4, 4, 8, 0.35) 0%, transparent 22%, transparent 62%, rgba(4, 4, 8, 0.85) 100%);
}

.nf-home-hero__inner {
	box-sizing: border-box;
	width: 100%;
	max-width: 1400px;
	margin: auto auto 0;
	padding: clamp(1.25rem, 4svh, 5rem) var(--nf-gutter, 3rem) clamp(1rem, 3svh, 2.5rem);
}

.nf-home-hero__kicker {
	margin: 0 0 clamp(0.75rem, 2.5svh, 2.25rem);
	font-size: 0.72rem;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.82);
}

.nf-home-hero__title {
	display: flex;
	flex-direction: column;
	margin: 0 !important;
	/* Sized to the screen's height as well as its width, so the tabs stay in the first view. */
	font-size: clamp(2.75rem, min(8vw, 10.5svh), 8.25rem) !important;
	font-weight: 600 !important;
	line-height: 0.9 !important;
	letter-spacing: -0.035em !important;
	text-transform: uppercase;
	color: #fff;
	text-wrap: balance;
}

/*
 * The logo lockup in the hero. Its width is capped by the screen's height as
 * well as its width (the SVG is 1000 × 230), so the tabs stay on the first
 * screen on a short laptop.
 */
.nf-home-hero .nf-home-hero__lockup {
	width: 100%;
	max-width: min(100%, 62rem, calc(28svh * 1000 / 230));
	margin: 0 !important;
}

.nf-home-hero__dot {
	color: var(--nf-blue-lit, #6b8aff);
}

.nf-home-hero__lede {
	margin: clamp(0.75rem, 2.5svh, 2rem) 0 0;
	font-size: clamp(1rem, 1.3vw, 1.15rem);
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.82);
}

.nf-home-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: clamp(1rem, 3svh, 2.5rem) 0 0;
}

.nf-home-btn {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 2.5rem;
	min-width: 11rem;
	padding: 1rem 1.2rem;
	border: 1px solid #fff;
	font-size: 0.92rem;
	font-weight: 500;
	text-decoration: none;
	background-image: none !important;
	transition: background-color 0.25s var(--nf-ease, ease), color 0.25s var(--nf-ease, ease), border-color 0.25s var(--nf-ease, ease);
}

.nf-home-hero a.nf-home-btn--solid,
.nf-home-hero a.nf-home-btn--solid:visited {
	border-color: #f1f0ec;
	background-color: #f1f0ec;
	color: #0a0a0a;
}

.nf-home-hero a.nf-home-btn--solid:hover,
.nf-home-hero a.nf-home-btn--solid:focus-visible {
	border-color: #fff;
	background-color: #fff;
	color: #0a0a0a;
}

.nf-home-hero a.nf-home-btn--line,
.nf-home-hero a.nf-home-btn--line:visited {
	border-color: rgba(255, 255, 255, 0.75);
	background-color: rgba(0, 0, 0, 0.15);
	color: #fff;
}

.nf-home-hero a.nf-home-btn--line:hover,
.nf-home-hero a.nf-home-btn--line:focus-visible {
	border-color: var(--nf-blue-lit, #6b8aff);
	background-color: rgba(0, 0, 254, 0.28);
	color: #fff;
}

/* Short screens (a laptop with its browser bars): tighter buttons. */
@media (max-height: 760px) and (min-width: 601px) {
	.nf-home-btn {
		padding-block: 0.8rem;
	}

	.nf-home-hero__lede {
		font-size: 1rem;
		line-height: 1.4;
	}
}

/* --- The tabs ------------------------------------------------------------ */

.nf-home-hero__foot {
	box-sizing: border-box;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1.5rem 3rem;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 var(--nf-gutter, 3rem) clamp(1rem, 3svh, 2.5rem);
}

.nf-home-hero__tabs {
	display: flex;
	gap: clamp(1rem, 2vw, 1.75rem);
	min-width: 0;
}

.nf-home-hero .nf-home-tab {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.8rem;
	width: clamp(9.5rem, 13vw, 12.5rem);
	margin: 0;
	padding: 0 0 0.25rem;
	border: 0;
	border-radius: 0;
	background: none;
	color: rgba(255, 255, 255, 0.58);
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
	text-align: left;
	cursor: pointer;
	transition: color 0.25s ease;
}

.nf-home-hero .nf-home-tab:hover,
.nf-home-hero .nf-home-tab.is-active {
	color: #fff;
}

.nf-home-tab__bar {
	position: relative;
	display: block;
	flex: 0 0 100%;
	height: 1px;
	margin-bottom: 0.9rem;
	background: rgba(255, 255, 255, 0.28);
	overflow: hidden;
}

.nf-home-tab__bar i {
	position: absolute;
	inset: 0 auto 0 0;
	width: 0;
	background: #fff;
}

.nf-home-tab.is-active .nf-home-tab__bar i {
	width: 100%;
}

/* While turning, the active bar fills over the interval; its end moves the world on. */
.nf-home-hero.is-turning .nf-home-tab.is-active .nf-home-tab__bar i {
	animation: nf-home-fill var(--nf-home-interval, 7s) linear forwards;
}

.nf-home-hero.is-paused .nf-home-tab.is-active .nf-home-tab__bar i {
	animation-play-state: paused;
}

@keyframes nf-home-fill {
	from {
		width: 0;
	}

	to {
		width: 100%;
	}
}

.nf-home-tab__name {
	flex: 1 1 0;
	min-width: 0;
}

.nf-home-tab__no {
	font-size: 0.72rem;
	font-variant-numeric: tabular-nums;
	opacity: 0.8;
}

.nf-home-tab.is-active .nf-home-tab__no {
	color: var(--nf-blue-lit, #6b8aff);
	opacity: 1;
}

.nf-home-hero__corner {
	margin: 0;
	font-size: 0.72rem;
	line-height: 1.8;
	letter-spacing: 0.24em;
	text-align: right;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.78);
}

/* --- The pieces ---------------------------------------------------------- */

.nf-home-pieces {
	padding-block: clamp(4rem, 9vw, 7rem);
	background: #efeeea;
	color: #0e0e10;
}

.nf-home-pieces .nf-home__title {
	color: #0e0e10 !important;
}

/* Links here are dark on light; the theme's own link colour is for dark pages. */
.nf-home-pieces a.nf-home-link,
.nf-home-pieces a.nf-home-link:visited,
.nf-home-pieces a.nf-home-link:hover,
.nf-home-pieces a.nf-home-piece__link,
.nf-home-pieces a.nf-home-piece__link:visited,
.nf-home-pieces a.nf-home-piece__link:hover {
	color: #0e0e10;
}

.nf-home-pieces__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 2.5vw, 2rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.nf-home-piece {
	margin: 0;
}

.nf-home-piece__link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
	background-image: none !important;
}

.nf-home-piece__shot {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	margin-bottom: 1.25rem;
	border-bottom: 1px solid rgba(14, 14, 16, 0.16);
}

.nf-home-piece__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
	/* The white of the photo drops out; the garment sits on the page. */
	mix-blend-mode: multiply;
	transition: opacity 0.45s ease, transform 0.6s var(--nf-ease, ease);
}

.nf-home-piece__img--back {
	opacity: 0;
}

.nf-home-piece__link:hover .nf-home-piece__img {
	transform: scale(1.03);
}

.nf-home-piece__link:hover .has-back .nf-home-piece__img:not(.nf-home-piece__img--back) {
	opacity: 0;
}

.nf-home-piece__link:hover .nf-home-piece__img--back {
	opacity: 1;
}

.nf-home-piece__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.nf-home-piece__name {
	font-size: 1rem;
	font-weight: 500;
}

.nf-home-piece__price {
	flex: 0 0 auto;
	font-size: 0.95rem;
	font-variant-numeric: tabular-nums;
}

.nf-home-piece__price del {
	margin-right: 0.35rem;
	opacity: 0.5;
}

.nf-home-piece__price ins {
	text-decoration: none;
}

.nf-home-piece__from {
	margin-top: 0.3rem;
	font-size: 0.82rem;
	color: rgba(14, 14, 16, 0.55);
}

.nf-home-piece__link:hover .nf-home-piece__name {
	text-decoration: underline;
	text-decoration-color: var(--nf-blue, #0000fe);
	text-underline-offset: 0.25em;
}

/* --- The worlds ---------------------------------------------------------- */

.nf-home-worlds {
	padding-block: clamp(4rem, 9vw, 7rem);
	background: #0b0b0e;
	color: #fff;
}

.nf-home-worlds__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(1rem, 1.5vw, 1.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* An odd one out takes the whole last row, not half of it. */
.nf-home-worlds__grid.is-odd .nf-home-world:last-child {
	grid-column: 1 / -1;
}

.nf-home-world {
	margin: 0;
}

.nf-home-world__link {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	aspect-ratio: 16 / 11;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	overflow: hidden;
	background: #141418;
	color: #fff;
	text-decoration: none;
	background-image: none !important;
	isolation: isolate;
}

.nf-home-worlds__grid.is-odd .nf-home-world:last-child .nf-home-world__link {
	aspect-ratio: 32 / 11;
}

.nf-home-world__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 1.2s cubic-bezier(0.15, 0.6, 0.25, 1);
}

.nf-home-world__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, transparent 30%, transparent 45%, rgba(0, 0, 0, 0.78) 100%);
}

.nf-home-worlds a.nf-home-world__link,
.nf-home-worlds a.nf-home-world__link:visited,
.nf-home-worlds a.nf-home-world__link:hover {
	color: #fff;
}

.nf-home-world__link:hover .nf-home-world__img,
.nf-home-world__link:focus-visible .nf-home-world__img {
	transform: scale(1.04);
}

.nf-home-world__no {
	font-size: 0.72rem;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}

.nf-home-world__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 1.1rem;
}

.nf-home-world__name {
	max-width: 12ch;
	font-size: clamp(1.75rem, 3.2vw, 2.6rem);
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.nf-home-world__go {
	display: inline-flex;
	align-items: center;
	gap: 0.9rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.85);
	font-size: 0.9rem;
}

.nf-home-world__link:hover .nf-home-world__go {
	border-bottom-color: var(--nf-blue-lit, #6b8aff);
}

/* --- The closing line ---------------------------------------------------- */

.nf-home-statement {
	padding-block: clamp(3rem, 6vw, 4.5rem);
	border-top: 1px solid var(--nf-line, #262626);
	background: #0b0b0e;
	color: #fff;
}

.nf-home-statement .nf-home__wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem 3rem;
}

.nf-home-statement__big {
	margin: 0;
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 400;
	line-height: 1.25;
	letter-spacing: -0.02em;
}

.nf-home-statement__small {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.6;
	color: var(--nf-muted, #a1a1a1);
}

/* --- The list (email signup) ------------------------------------------------
 *
 * Words on the left, the form on the right, over a dimmed picture. About
 * 340–380px tall on a desktop: enough to be seen, not a screen of nothing.
 */
.nf-home-join {
	position: relative;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	min-height: clamp(20rem, 26vw, 23.75rem);
	padding-block: clamp(3.5rem, 6vw, 4.5rem);
	overflow: hidden;
	border-top: 1px solid var(--nf-line, #262626);
	background: #0b0b0e;
	color: #fff;
	isolation: isolate;
	margin-block: 0;
}

.nf-home-join__bg {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

/* The darkness is set in Appearance → Homepage; deepest behind the words. */
.nf-home-join.has-picture::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background:
		linear-gradient(90deg, rgba(5, 5, 8, 0.35) 0%, transparent 60%),
		rgba(5, 5, 8, var(--nf-join-dim, 0.72));
}

.nf-home-join__wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
	align-items: center;
	gap: 2rem clamp(2rem, 6vw, 6rem);
}

.nf-home-join .nf-home__kicker {
	opacity: 0.8;
}

.nf-home-join .nf-home-join__title {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	font-size: clamp(2rem, 3.6vw, 3rem) !important;
	font-weight: 500 !important;
	line-height: 1.05 !important;
	letter-spacing: -0.035em !important;
	color: #fff !important;
}

.nf-home-join .nf-home-join__text {
	margin: 1.25rem 0 0;
	font-size: 1rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.78);
}

/* The form, boxed, with a solid cobalt button. */
.nf-home-join .nf-signup {
	max-width: none;
	margin: 0;
}

.nf-home-join .nf-signup.has-label .nf-signup__row {
	flex-wrap: wrap;
	border: 0;
}

.nf-home-join .nf-signup.has-label .nf-signup__label {
	position: static;
	flex: 0 0 100%;
	width: auto;
	height: auto;
	margin: 0 0 0.65rem;
	overflow: visible;
	clip: auto;
	clip-path: none;
	font-size: 0.9rem;
	font-weight: 500;
	color: #fff;
}

.nf-home-join .nf-signup__input {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	padding: 1rem 1.1rem !important;
	border: 1px solid rgba(255, 255, 255, 0.28) !important;
	border-right: 0 !important;
	background: rgba(8, 8, 12, 0.6) !important;
	font-size: 1rem;
	transition: border-color 0.2s var(--nf-ease, ease);
}

.nf-home-join .nf-signup__input::placeholder {
	color: rgba(255, 255, 255, 0.45);
}

.nf-home-join .nf-signup__input:focus,
.nf-home-join .nf-signup__input:focus-visible {
	border-color: var(--nf-blue-lit, #6b8aff) !important;
	border-right: 0 !important;
}

.nf-home-join .nf-signup__button {
	flex: 0 0 auto;
	align-self: stretch;
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0 1.4rem;
	border: 1px solid var(--nf-blue, #0000fe);
	background: var(--nf-blue, #0000fe);
	color: #fff;
	font-size: 0.9rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	transition: background-color 0.2s var(--nf-ease, ease), border-color 0.2s var(--nf-ease, ease);
}

.nf-home-join .nf-signup__button:hover,
.nf-home-join .nf-signup__button:focus-visible {
	border-color: #1a1aff;
	background: #1a1aff;
	color: #fff;
}

.nf-home-join .nf-signup__arrow {
	transition: transform 0.25s var(--nf-ease, ease);
}

.nf-home-join .nf-signup__button:hover .nf-signup__arrow {
	transform: translate(2px, -2px);
}

.nf-home-join .nf-signup__fine {
	margin-top: 0.85rem;
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.72);
}

.nf-home-join .nf-signup__fine a {
	color: rgba(255, 255, 255, 0.92) !important;
}

.nf-home-join .nf-signup__fine a:hover {
	color: var(--nf-blue-lit, #6b8aff) !important;
}

@media (max-width: 781px) {
	.nf-home-join__wrap {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 420px) {
	.nf-home-join .nf-signup__button {
		padding: 0 1rem;
	}
}

/* --- Smaller screens ----------------------------------------------------- */

@media (max-width: 900px) {
	.nf-home-pieces__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nf-home-pieces__grid .nf-home-piece:nth-child(3) {
		display: none;
	}
}

@media (max-width: 781px) {
	.nf-home-hero__scrim {
		background:
			linear-gradient(to bottom, rgba(4, 4, 8, 0.45) 0%, rgba(4, 4, 8, 0.3) 30%, rgba(4, 4, 8, 0.65) 62%, rgba(4, 4, 8, 0.92) 100%);
	}

	.nf-home-hero__corner {
		display: none;
	}

	.nf-home-hero__tabs {
		width: 100%;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.nf-home-hero__tabs::-webkit-scrollbar {
		display: none;
	}

	.nf-home-tab {
		flex: 1 0 7.5rem;
		width: auto;
	}

	.nf-home-worlds__grid {
		grid-template-columns: 1fr;
	}

	.nf-home-worlds__grid.is-odd .nf-home-world:last-child .nf-home-world__link {
		aspect-ratio: 16 / 11;
	}
}

@media (max-width: 600px) {
	.nf-home-hero__title {
		font-size: clamp(2.6rem, min(14vw, 8.5svh), 4.75rem) !important;
	}

	/* Two buttons side by side, so the tabs stay on the first screen. */
	.nf-home-hero__cta {
		flex-wrap: nowrap;
		gap: 0.5rem;
	}

	.nf-home-btn {
		flex: 1 1 0;
		gap: 0.5rem;
		min-width: 0;
		padding: 0.85rem 0.8rem;
		font-size: 0.85rem;
	}

	.nf-home-pieces__grid {
		grid-template-columns: 1fr;
	}

	.nf-home-pieces__grid .nf-home-piece:nth-child(3) {
		display: block;
	}

	.nf-home-piece__shot {
		aspect-ratio: 5 / 4;
	}
}

@media (prefers-reduced-motion: reduce) {
	.nf-home-hero__world,
	.nf-home-hero__world img,
	.nf-home-world__img,
	.nf-home-piece__img,
	.nf-home-arrow {
		transition: none;
	}

	.nf-home-hero__world img {
		transform: none;
	}
}

/*
 * The signup band is the last thing before the footer: its picture runs
 * right down to the footer's line, with no gap of plain page between.
 */
body.home .wp-site-blocks > main {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

body.home .wp-site-blocks > main + footer,
body.home .wp-site-blocks > footer {
	margin-top: 0 !important;
	margin-block-start: 0 !important;
}
