/**
 * Homepage. Loaded only on the front page (see includes/class-assets.php).
 * Section-level rhythm follows the design reference: full-bleed dark
 * sections by default, occasional light "paper" sections for contrast.
 */

.k-home {
	overflow-x: clip;
}

/* Shared building blocks (.k-section, .k-heading-*, .k-btn*, .k-reveal, …)
   now live in base/components.css — Shop needs them too, so they're no
   longer homepage-only. */

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

.k-hero {
	position: relative;
	height: 100svh;
	min-height: 600px;
	overflow: hidden;
	/* Fixed-light, not --k-color-text: the poster + scrim below are always
	   dark regardless of the active page theme, so the heading/eyebrow/
	   wordmark that inherit this must stay ivory rather than flipping to
	   near-black in light mode (see tokens.css "Fixed-LIGHT ink"). */
	color: var(--k-color-fixed-ink-light);
}

.k-hero__poster,
.k-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 60% 50%;
}

.k-hero__video {
	opacity: 0;
	transition: opacity 500ms ease;
	background: transparent;
}

.k-hero__video.is-ready {
	opacity: 1;
}

/* Belt-and-suspenders: even though the <video> tag is only rendered
   server-side for non-mobile user agents, hide it defensively at narrow
   viewport widths too (a resized desktop window, an undetected UA). */
@media (max-width: 699px) {
	.k-hero__video {
		display: none;
	}
}

.k-hero__scrim {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(10, 10, 9, 0.72) 0%, rgba(10, 10, 9, 0.24) 30%, rgba(10, 10, 9, 0.58) 62%, rgba(10, 10, 9, 0.93) 100%),
		linear-gradient(100deg, rgba(10, 10, 9, 0.72) 0%, rgba(10, 10, 9, 0.34) 42%, rgba(10, 10, 9, 0) 72%);
}

.k-hero__content {
	position: absolute;
	left: var(--k-gutter);
	right: var(--k-gutter);
	bottom: clamp(68px, 9vh, 110px);
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
	flex-wrap: wrap;
}

.k-hero__copy {
	max-width: min(880px, 72vw);
}

.k-hero__copy .k-eyebrow {
	color: var(--k-color-fixed-ink-light);
	margin-bottom: clamp(14px, 2vw, 26px);
	text-shadow: 0 1px 20px rgba(10, 10, 9, 0.85);
}

.k-hero__heading,
.k-hero__wordmark {
	font-size: var(--k-text-hero);
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 0;
	text-wrap: balance;
}

.k-hero__heading em {
	font-style: italic;
	padding-left: clamp(30px, 7vw, 150px);
}

.k-hero__support {
	max-width: 430px;
	margin: clamp(24px, 3.2vw, 36px) 0 0;
	font-size: var(--k-text-body);
	line-height: 1.6;
	/* Fixed-light muted tone (not --k-color-muted-1): same reasoning as
	   .k-hero's own color above — this sits on the always-dark poster. */
	color: var(--k-color-fixed-muted-light);
}

/* The hero's own CTA is a .k-btn--outline (see hero.php), which normally
   reacts to the page theme (--k-color-text/--k-border-cta) — wrong here
   for the same "always a dark photo" reason as the rest of the hero.
   Scoped override, same pattern as .k-section--light .k-btn--outline in
   base/components.css. */
.k-hero .k-btn--outline {
	border-color: var(--k-color-fixed-ink-light-a50);
	color: var(--k-color-fixed-ink-light);
}

.k-hero .k-btn--outline:hover,
.k-hero .k-btn--outline:focus-visible {
	background: var(--k-color-fixed-ink-light);
	color: var(--k-color-fixed-ink);
	border-color: var(--k-color-fixed-ink-light);
}

/* -- marquee -------------------------------------------------------------*/

.k-marquee {
	border-top: 1px solid var(--k-border-hairline);
	border-bottom: 1px solid var(--k-border-hairline);
	overflow: hidden;
	padding: 15px 0;
}

.k-marquee__track {
	display: flex;
	width: 200%;
	animation: k-marquee-scroll 38s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
	.k-marquee__track {
		animation: none;
	}
}

@keyframes k-marquee-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

.k-marquee__set {
	display: flex;
	gap: 56px;
	width: 50%;
	flex: none;
	font-size: var(--k-text-label);
	letter-spacing: .3em;
	text-transform: uppercase;
	color: var(--k-color-muted-2);
	padding-right: 56px;
}

.k-marquee__dot {
	color: var(--k-color-accent);
}

/* Mobile: the message spans have no explicit nowrap, so at narrow widths
   the flex track shrinks them and each message wraps word-by-word instead
   of running as one continuous line. Below 900px, keep every message
   intact — the loop itself (duplicated .k-marquee__set, -50% translate)
   is unchanged and already seamless. */
@media (max-width: 899px) {
	.k-marquee {
		padding: 12px 0;
	}

	/* Once messages can no longer shrink or wrap, the old 200%/50% split
	   (sized off the viewport) no longer matches their real content width
	   — sets overflowed their 50% box and overlapped each other. Size the
	   track and each set off their own content instead; translateX(-50%)
	   still lands on exactly one (of two identical) sets either way, so
	   the loop stays seamless. */
	.k-marquee__track {
		width: max-content;
	}

	.k-marquee__set {
		width: max-content;
	}

	.k-marquee__set > span {
		white-space: nowrap;
		flex-shrink: 0;
	}
}

/* Reduced motion (mobile only): the global rule above stops the
   animation, which would otherwise freeze the track mid-scroll with only
   half its (duplicated) content visible behind overflow:hidden. Let the
   row scroll natively instead, and drop the now-redundant duplicate set
   so a manual scroll doesn't repeat the same messages. */
@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
	.k-marquee {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.k-marquee::-webkit-scrollbar {
		display: none;
	}

	.k-marquee__track,
	.k-marquee__set {
		width: auto;
	}

	.k-marquee__set:nth-of-type(2) {
		display: none;
	}
}

/* -- campaign ------------------------------------------------------------*/

.k-campaign__intro {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(14px, 2vw, 28px);
	align-items: end;
}

.k-campaign__heading-col {
	grid-column: span 12;
}

.k-campaign__copy-col {
	grid-column: span 12;
	padding-bottom: 12px;
}

.k-campaign__copy-col p {
	margin: 0;
	font-size: var(--k-text-body);
	line-height: 1.65;
	color: var(--k-color-muted-1);
	max-width: 400px;
}

.k-campaign__grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(14px, 2vw, 28px);
	margin-top: clamp(36px, 5vw, 80px);
	align-items: start;
}

.k-campaign__figure {
	margin: 0;
	background: var(--k-color-surface-light);
	overflow: hidden;
}

.k-campaign__figure img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.k-campaign__figure--main {
	grid-column: span 12;
	aspect-ratio: 16 / 11;
}

.k-campaign__figure--secondary {
	grid-column: span 12;
	aspect-ratio: 3 / 4;
}

.k-campaign__figure--tertiary {
	grid-column: span 12;
	aspect-ratio: 3 / 4;
}

.k-campaign__figure figcaption {
	margin-top: 16px;
	font-size: var(--k-text-body-sm);
	line-height: 1.6;
	color: var(--k-color-muted-1);
}

@media (min-width: 900px) {
	.k-campaign__heading-col {
		grid-column: span 7;
	}

	.k-campaign__copy-col {
		grid-column: span 5;
	}

	.k-campaign__figure--main {
		grid-column: span 7;
	}

	.k-campaign__figure--secondary {
		grid-column: 4 / span 4;
		grid-row: 2;
		margin-top: clamp(-40px, -4vw, 0px);
	}

	.k-campaign__figure--tertiary {
		grid-column: 9 / span 4;
		padding-top: clamp(30px, 6vw, 110px);
	}
}

/* -- discover (Ways in) ---------------------------------------------------*/

.k-discover__header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 24px;
	flex-wrap: wrap;
	border-bottom: 1px solid rgba(10, 10, 9, 0.18);
	padding-bottom: 20px;
}

.k-discover__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: clamp(14px, 2vw, 26px);
	margin-top: clamp(26px, 3.4vw, 46px);
}

.k-discover__card {
	display: block;
}

.k-discover__card--offset {
	padding-top: clamp(0px, 3vw, 54px);
}

.k-discover__media {
	display: block;
	position: relative;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--k-color-surface-light-alt);
}

.k-discover__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1000ms var(--k-ease);
}

.k-discover__card:hover .k-discover__media img,
.k-discover__card:focus-visible .k-discover__media img {
	transform: scale(1.05);
}

.k-discover__label {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-top: 14px;
}

.k-discover__name {
	font-size: clamp(20px, 1.7vw, 27px);
}

.k-discover__cta {
	font-size: 11px;
	color: var(--k-color-fixed-muted);
}

/* Mobile: the desktop auto-fit grid stacks every card full-width and
   contributes a lot of page length. Below 900px it becomes a compact,
   native horizontal scroll-snap strip instead — same markup, same
   cards, same links, just a different flow direction. */
@media (max-width: 899px) {
	.k-discover__grid {
		display: flex;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
		scroll-padding-inline: var(--k-gutter);
		margin-inline: calc(-1 * var(--k-gutter));
		padding-inline: var(--k-gutter);
		scrollbar-width: none;
	}

	.k-discover__grid::-webkit-scrollbar {
		display: none;
	}

	.k-discover__card {
		flex: none;
		width: 150px;
		scroll-snap-align: start;
	}

	.k-discover__card--offset {
		padding-top: 0;
	}

	.k-discover__name {
		font-size: 18px;
	}

	.k-discover__cta {
		display: none;
	}
}

/* -- lookbook --------------------------------------------------------------*/

.k-lookbook__header {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(14px, 2vw, 28px);
}

.k-lookbook__heading-col {
	grid-column: span 12;
}

.k-lookbook__copy-col {
	grid-column: span 12;
	margin: 0;
	font-size: var(--k-text-body);
	line-height: 1.65;
	color: var(--k-color-muted-1);
}

@media (min-width: 900px) {
	.k-lookbook__heading-col {
		grid-column: span 4;
	}

	.k-lookbook__copy-col {
		grid-column: 9 / span 4;
		align-self: end;
	}
}

.k-lookbook__hero {
	position: relative;
	margin: clamp(24px, 3vw, 48px) 0 0;
	height: clamp(360px, 58vw, 700px);
	overflow: hidden;
}

.k-lookbook__hero img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.k-lookbook__hero figcaption {
	position: absolute;
	left: var(--k-gutter);
	bottom: clamp(18px, 3vw, 40px);
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.k-lookbook__hero figcaption .k-label {
	color: var(--k-color-text);
	text-shadow: 0 1px 18px rgba(0, 0, 0, 0.7);
}

.k-lookbook__grid {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(14px, 2vw, 28px);
	margin-top: clamp(20px, 3vw, 40px);
}

.k-lookbook__item {
	grid-column: span 12;
}

@media (min-width: 700px) {
	.k-lookbook__item {
		grid-column: span 5;
	}

	.k-lookbook__item--offset {
		grid-column: 8 / span 5;
		padding-top: clamp(20px, 6vw, 120px);
	}
}

.k-lookbook__item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	aspect-ratio: 4 / 5;
	background: var(--k-color-surface-light);
}

.k-lookbook__item-meta {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	font-size: var(--k-text-label);
	letter-spacing: var(--k-tracking-label);
	text-transform: uppercase;
	color: var(--k-color-muted-2);
}

.k-lookbook__item-meta a {
	color: var(--k-color-accent);
}

/* -- story (sticky featured product) ---------------------------------------*/

.k-story {
	border-top: 1px solid var(--k-border-hairline);
}

.k-story__layout {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(14px, 2vw, 40px);
	margin-top: clamp(24px, 3vw, 50px);
}

.k-story__gallery-col {
	grid-column: span 12;
}

.k-story__steps-col {
	grid-column: span 12;
	display: flex;
	flex-direction: column;
}

@media (min-width: 900px) {
	.k-story__gallery-col {
		grid-column: span 6;
	}

	.k-story__steps-col {
		grid-column: 8 / span 5;
	}
}

.k-story__gallery {
	position: sticky;
	top: calc(var(--k-header-height) + 23px);
	aspect-ratio: 4 / 5;
	overflow: hidden;
	background: var(--k-color-surface-light);
}

.k-story__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 700ms ease;
}

@media (prefers-reduced-motion: reduce) {
	.k-story__frame {
		transition: none;
	}
}

.k-story__step {
	min-height: min(62vh, 520px);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.k-story__step p {
	margin: 22px 0 0;
	font-size: var(--k-text-body);
	line-height: 1.7;
	color: var(--k-color-muted-1);
	max-width: 400px;
}

.k-story__step-copy {
	font-size: clamp(17px, 1.5vw, 22px) !important;
	line-height: 1.55 !important;
	max-width: 420px;
	color: var(--k-color-text) !important;
}

.k-story__price {
	margin-top: 26px;
	font-size: 26px;
}

.k-story__actions {
	display: flex;
	gap: 12px;
	margin-top: 30px;
	flex-wrap: wrap;
	align-items: center;
}

.k-story__actions .button {
	padding: 16px 34px;
	background: var(--k-color-text);
	color: var(--k-color-bg);
	font-size: 11px;
	letter-spacing: var(--k-tracking-eyebrow);
	text-transform: uppercase;
	border: none;
	cursor: pointer;
}

.k-story__actions .button:hover,
.k-story__actions .button:focus-visible {
	background: var(--k-color-accent);
}

/* -- most worn / product grid ----------------------------------------------*/

.k-most-worn__header {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 20px;
	flex-wrap: wrap;
	border-top: 1px solid var(--k-border-hairline);
	padding-top: 26px;
}

.k-most-worn__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: clamp(14px, 2vw, 28px);
	margin-top: clamp(24px, 3vw, 44px);
}

/* .k-product-card* rules now live in components/product-card.css — Shop
   grids use the same card and that file is not homepage-only. */

/* -- house -------------------------------------------------------------- */

.k-house {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: clamp(14px, 2vw, 28px);
	align-items: center;
}

.k-house__mark {
	grid-column: span 12;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--k-color-surface-light-alt);
	display: flex;
	align-items: center;
	justify-content: center;
}

.k-house__mark img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.k-house__mark .k-serif {
	font-size: clamp(40px, 5vw, 70px);
	letter-spacing: .28em;
	text-indent: .28em;
}

.k-house__copy {
	grid-column: span 12;
}

.k-house__statement {
	font-size: clamp(22px, 2.6vw, 42px);
	line-height: 1.28;
	margin: 22px 0 0;
	letter-spacing: -0.01em;
}

.k-house__copy .k-link-underline {
	margin-top: 28px;
}

@media (min-width: 900px) {
	.k-house__mark {
		grid-column: span 5;
	}

	.k-house__copy {
		grid-column: 7 / span 6;
	}
}

/* -- newsletter ----------------------------------------------------------- */

.k-newsletter {
	position: relative;
	text-align: center;
}

.k-newsletter__inner {
	max-width: 520px;
	margin: 0 auto;
}

.k-newsletter__inner h2 {
	font-size: clamp(32px, 5.4vw, 64px);
	line-height: 1;
	margin: 24px 0 0;
}

.k-newsletter__support,
.k-newsletter__status {
	margin: 18px 0 0;
	font-size: var(--k-text-body);
	color: var(--k-color-muted-1);
}

/* Homepage/Footer Content Migration: privacy note under the support copy,
   small and muted like a footer disclosure rather than body copy. */
.k-newsletter__privacy {
	margin: 10px 0 0;
	font-size: var(--k-text-body-sm);
	color: var(--k-color-muted-2);
}

.k-newsletter__privacy a {
	color: var(--k-color-muted-2);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color var(--k-duration-base);
}

.k-newsletter__privacy a:hover,
.k-newsletter__privacy a:focus-visible {
	color: var(--k-color-accent);
}

.k-newsletter__form {
	display: flex;
	gap: 0;
	margin-top: clamp(32px, 4.4vw, 56px);
	border-bottom: 1px solid var(--k-border-emphasis);
	transition: border-color var(--k-duration-base);
}

.k-newsletter__form:focus-within {
	border-color: var(--k-color-accent);
}

.k-newsletter__form input[type="email"] {
	flex: 1;
	min-width: 0;
	background: transparent;
	border: 0;
	outline: none;
	padding: 16px 2px;
	font-size: 15px;
	color: var(--k-color-text);
}

.k-newsletter__form button {
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 16px 6px;
	font-size: 11px;
	letter-spacing: var(--k-tracking-eyebrow);
	text-transform: uppercase;
	color: var(--k-color-accent);
	transition: opacity var(--k-duration-base);
}

.k-newsletter__form button:not(:disabled):hover,
.k-newsletter__form button:not(:disabled):focus-visible {
	opacity: 0.7;
}

/* -- trust info (Homepage/Footer Content Migration) ----------------------- */

/* Delivery/Warranty/Payment/Privacy — verified copy carried over from the
   live site's own footer-adjacent info strip, restyled as plain text
   grouped by a hairline rather than the old site's bordered icon boxes
   (see KARATAKI_MASTER.md/design-taste: no icon cards where a divider and
   whitespace already do the job). This is now the last homepage section
   before footer.php's <footer>, so it carries the extra bottom breathing
   room + border-emphasis weight that used to sit on .k-newsletter
   (Visual Polish 4's original reasoning, just moved one section down).
   .k-container (front-page/trust-info.php) matches the footer's own
   max-width so both read as one continuous column below. */
.k-trust-info {
	/* padding-block only — .k-container (on this same element, in
	   trust-info.php) already sets the inline gutter; a padding shorthand
	   here would zero it back out and bleed the section edge-to-edge. */
	padding-block: clamp(28px, 4vw, 48px) clamp(88px, 11vw, 160px);
	border-top: 1px solid var(--k-border-hairline);
}

.k-trust-info__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(24px, 3vw, 40px);
}

.k-trust-info__item {
	padding-left: clamp(24px, 3vw, 40px);
	border-left: 1px solid var(--k-border-hairline);
}

.k-trust-info__item:first-child {
	padding-left: 0;
	border-left: 0;
}

.k-trust-info__title {
	font-size: var(--k-text-label);
	letter-spacing: var(--k-tracking-label);
	text-transform: uppercase;
	color: var(--k-color-muted-3);
	margin-bottom: 10px;
}

.k-trust-info__body {
	font-size: var(--k-text-body-sm);
	line-height: 1.55;
	color: var(--k-color-muted-1);
}

.k-trust-info__body a {
	display: inline-block;
	margin-left: 4px;
	color: var(--k-color-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}

@media (max-width: 899px) {
	.k-trust-info__grid {
		grid-template-columns: 1fr 1fr;
		row-gap: clamp(28px, 5vw, 40px);
	}

	.k-trust-info__item:nth-child(2n+1) {
		padding-left: 0;
		border-left: 0;
	}
}

@media (max-width: 599px) {
	.k-trust-info__grid {
		grid-template-columns: 1fr;
		row-gap: 24px;
	}

	.k-trust-info__item {
		padding-left: 0;
		border-left: 0;
		padding-top: 20px;
		border-top: 1px solid var(--k-border-hairline);
	}

	.k-trust-info__item:first-child {
		padding-top: 0;
		border-top: 0;
	}
}
