/* ==========================================================================
   hx/hero.css — 01 Hero (14 Oct 2026 rebuild). Prefix hxh-. Owner: hero agent.
   Markup: template-parts/home-2026/hero.php. Images: wc-hero-set-* since 6 Nov 2026 (four-formula lineup, build_wc_hero_lineup.py); before that wc-hero-* (build_wc_hero.py, 19 Oct:
   the owner's jar + lid photograph, pixel-identical, in a built ivory studio set; replaces
   the champagne-silk hxh-* set).

   Art direction: one object, one light. The 24h Regeneration Cream sits right of
   centre in a wide ivory field (landscape) or centred under the headline
   (portrait), never cropped, never crowded. Type is graphite on the set's own
   light; one headline, one line, one action.

   Header: transparent over the hero at the top of the page on every size (handled
   in the shared header code); the copy is inset by the nav height.
   ========================================================================== */

/* the legacy hook class carries old section styles — neutralise them */
body.cos-h26 .hxh.h26-hero--pearl{background:#DCDCE2}

.hxh{
	--hxh-nav:var(--cos-nav-h,80px);
	--hxh-pos-x:50%;
	position:relative;
	isolation:isolate;
	box-sizing:border-box;
	display:flex;
	min-height:max(560px,100svh);
	overflow:clip;
	background:#DCDCE2; /* the lineup set's mean tone (6 Nov 2026): no flash before the photograph paints */
	color:var(--hx-text);
}

/* ─── Photograph ─────────────────────────────────────────────────── */
.hxh__media{position:absolute;inset:0;z-index:-1;overflow:clip}
.hxh__drift{position:absolute;inset:0}
.hxh__picture,.hxh__picture img{display:block;width:100%;height:100%}
.hxh__picture img{object-fit:cover;object-position:var(--hxh-pos-x) 50%;transform-origin:62% 62%}
.hxh__veil{position:absolute;inset:0;background:var(--hx-ivory);opacity:0;pointer-events:none}

/* ─── Copy ───────────────────────────────────────────────────────── */
.hxh__inner{
	position:relative;
	box-sizing:border-box;
	display:flex;
	flex-direction:column;
	align-items:center;
	width:100%;
	padding:calc(var(--hxh-nav) + clamp(28px,4.5svh,48px)) var(--hx-margin) clamp(28px,4.2svh,44px);
	text-align:center;
}
.hxh__title{
	margin:0;
	font-size:2rem;                /* 32px phones (19 Oct 2026, owner: Clé de Peau-scale hero type) */
	line-height:1.04;
	color:var(--hx-ink);
}
.hxh__line{display:block}
/* 19 Oct 2026 (owner): headline set in capitals, lightly tracked so the serif caps breathe */
.hxh__title,.hxh__title em{text-transform:uppercase;letter-spacing:.04em}
.hxh__title em{font-style:italic;font-weight:300}
/* Cadence: headline, then one supporting line (--hx-stack), then the action set well apart. */
.hxh__lead{
	margin:var(--hx-stack) 0 0;
	font-family:var(--hx-sans);
	font-size:.9375rem;           /* 15px (19 Oct 2026, owner: quieter than the 17–19px lead role) */
	font-weight:400;              /* not the system lead's 300: hairline Inter breaks up over the photograph */
	line-height:1.5;
	letter-spacing:.01em;
	color:var(--hx-text,#3A3B3D); /* softer than ink, still 10:1+ on the pearl hero */
	text-wrap:balance;
}

/* The action: a slim graphite outline, sized to its words (19 Oct 2026, owner: a solid black
   slab was the darkest mass in the frame and competed with the chrome lid). It fills graphite
   on hover/focus. DESIGN.md action role: 15px sentence case (purchase actions never below 15px
   for this audience), 52px tall on phones, 54px on landscape desktop; no inset frame. */
.hxh__action{margin-top:auto;display:flex;justify-content:center}
.hxh__cta{
	--hx-btn-bg:transparent;
	--hx-btn-bg-hover:var(--hx-ink);
	--hx-btn-fg:var(--hx-ink);
	min-height:52px;
	padding-inline:24px;
	box-shadow:inset 0 0 0 1px var(--hx-ink); /* hairline inside the box: no size change against the filled state */
	/* label: the action role (12.5px tracked capitals) from hx/typeset.css */
}
.hxh__cta:is(:hover,:focus-visible){--hx-btn-fg:var(--hx-white);background:var(--hx-btn-bg-hover)} /* fill on keyboard focus too, not only hover */
.hxh__cta::after{content:none}
.hxh__cta .hx-arrow{width:16px;margin-left:14px}

/* 320px phones: keep the action on one line */
@media (max-width:359.98px){
	.hxh__cta{padding-inline:20px}
	.hxh__cta .hx-arrow{margin-left:12px}
}
/* ≥700px: about Clé de Peau's hero size (cap height ~22px): 34px at 1440, 38px at 1920, max 40px */
@media (min-width:700px){.hxh__title{font-size:clamp(2rem,1.2rem + 1vw,2.5rem)}}

/* ─── Landscape layout: headline left, object right of centre ─────── */
@media (min-width:768px) and (min-aspect-ratio:1/1){
	.hxh{--hxh-pos-x:58%;min-height:max(600px,100svh)}
	.hxh__inner{
		display:grid;
		grid-template-columns:minmax(0,1fr);
		align-content:center; /* copy block centred on the jar's own centre line */
		justify-items:start;
		max-width:calc(var(--hx-max) + 2 * var(--hx-margin));
		margin-inline:auto;
		padding-top:var(--hxh-nav);
		padding-bottom:0;
		text-align:left;
	}
	.hxh__copy{max-width:min(42vw,640px)} /* "Refined to the Essential." stays on one line (~515px at 60px, ~618px at 72px) */
	.hxh__lead{margin-top:var(--hx-stack);line-height:1.55}
	.hxh__action{margin-top:clamp(40px,6svh,64px);justify-content:flex-start}
	.hxh__cta{min-height:54px;padding-inline:28px}
}
@media (min-width:1100px) and (min-aspect-ratio:1/1){
	.hxh{--hxh-pos-x:63%}
	/* 6 Nov 2026: the jar-era picture zoom (scale 1.08–1.18) is gone; the four-formula lineup is
	   sized in the frame itself (build_wc_hero_lineup.py) so all four stay whole beside the copy. */
}
/* Narrow landscape (768–1099px): covering the full screen height makes the jar about half
   the screen wide, so no crop clears both the copy and the right edge. The frame covers 80%
   of the height instead (jar 20% smaller, lid ~50px clear of the copy), and the set's own
   edge rows (sampled from wc-hero-set-wide, 6 Nov 2026) continue into the thin bands above and below; they
   are smooth side-to-side gradients that barely change vertically, so the join does not show. */
@media (min-width:768px) and (max-width:1099.98px) and (min-aspect-ratio:1/1){
	/* The bands are laid out exactly like the photograph (same rendered width, the larger of the
	   box width and 74% height × 1.969, and the same --hxh-pos-x offset), so each sampled edge
	   colour sits directly above or below the pixel it came from. */
	.hxh__media{
		container-type:size;
		background-image:
			linear-gradient(90deg,#C8C9D1 0%,#C7C8D0 10%,#C9CAD2 25%,#D8D8DE 50%,#DCDCE3 75%,#E1E0E7 90%,#E2E1E8 100%),
			linear-gradient(90deg,#DFDEE6 0%,#DFDEE6 10%,#E0DFE7 25%,#E4E3E8 50%,#D7D6DC 75%,#DEDDE5 90%,#DCDAE2 100%);
		background-repeat:no-repeat;
		background-size:max(100cqw,74cqh * 1.969) 50%;
		background-position:var(--hxh-pos-x) top,var(--hxh-pos-x) bottom;
	}
	.hxh__picture{display:flex;align-items:center}
	.hxh__picture img{height:74%}
	.hxh__copy{max-width:46vw}
}
/* Tracked italic capitals run ~13.3x the font size for "REFINED TO THE ESSENTIAL.": scale with
   the phone so each line stays one line (25px at 390, 20.5px at 320). */
@media (max-width:699.98px){.hxh__title{font-size:min(2rem,6.4vw)}}
/* Phones (29 Oct 2026, critique: at 390×844 the action sat on the floor, at or past the fold once
   the browser toolbar is up): the action follows the copy, above the jar, so it is in reach on
   first paint on every phone. Portrait tablets keep it on the floor. */
@media (max-width:599.98px) and (max-aspect-ratio:999/1000){
	.hxh__action{margin-top:clamp(24px,3.6svh,32px)}
}
/* Squat portrait phones (iPhone SE 375×667, 360×640, 320×568): the tall frame is cropped top
   and bottom here, and a centred crop lifts the jar into the copy. Anchor the crop near the
   top of the frame so the jar sits lower, under the copy. */
@media (max-width:599.98px) and (min-aspect-ratio:1/2) and (max-aspect-ratio:999/1000){
	.hxh__picture img{object-position:50% 8%}
}
/* bleed for the scroll drift (hx-motion.js drives it from 900px) */
@media (min-width:900px){.hxh__drift{inset:-56px 0}}

/* ─── Entrance (20 Oct 2026): focus pull, then light writes the line ──
   The one authored moment on the page. The light comes up and the lens racks onto the
   chrome lid (bounded blur on the photograph only, 1.7s); then a soft band of light runs
   across each headline line in turn, the way it runs over polished silver; the supporting
   line and the action follow (hx-load-rise, --hx-i in hero.php). The same light reveals the
   section headings further down (data-hx-reveal="light", home-staging/system.css), and the
   closing line repeats it. CSS only: no script holds the hero back. The photograph is the
   LCP element and paints at once; only its focus changes. */
@media (prefers-reduced-motion:no-preference){
	.hxh__veil{animation:hxh-veil 1200ms var(--hx-ease-soft) 40ms both}
	.hxh__picture img{animation:hxh-focus 1700ms var(--hx-ease) both}
	.hxh__line{
		-webkit-mask-image:linear-gradient(100deg,#000 44%,transparent 56%);
		mask-image:linear-gradient(100deg,#000 44%,transparent 56%);
		-webkit-mask-size:260% 100%;mask-size:260% 100%;
		-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
		animation:hxh-light 1400ms var(--hx-ease) both;
		animation-delay:calc(120ms + var(--hxh-i,0) * 160ms);
	}
}
@keyframes hxh-veil{from{opacity:.45}to{opacity:0}}
@keyframes hxh-focus{from{transform:scale(1.035);filter:blur(10px)}to{transform:none;filter:blur(0)}}
@keyframes hxh-light{from{-webkit-mask-position:60% 0;mask-position:60% 0}to{-webkit-mask-position:0 0;mask-position:0 0}}
@media print{.hxh__line{-webkit-mask:none;mask:none}}

/* "Shop the Complete Ritual" (1 Nov 2026) is longer than the old label: on the narrowest phones
   the tracking closes up so it stays on one line, clear of the jar's lid */
@media (max-width:379.98px){
	html body.cos-h26 #cos-main-content#cos-main-content .hxh__cta{padding-inline:16px;letter-spacing:.06em;white-space:nowrap}
	html body.cos-h26 #cos-main-content#cos-main-content .hxh__cta .hx-arrow{margin-left:10px}
}
