/* ==========================================================================
   hx/system.css — Caviar of Switzerland design system (homepage rebuild, 14 Oct 2026)
   Owner: system agent. Section stylesheets (hero … closing) load AFTER this file.

   HOW TO USE (read this before styling a section)
   ------------------------------------------------
   • Loaded on EVERY page since 16 Oct 2026 (inc/hx-system.php); header/footer in hx/chrome.css.
   • Every token is a custom property on :root (and body.cos-h26), prefix --hx-. Use the tokens,
     never raw hex/px, so the whole page keeps one voice.
   • Utilities (prefix .hx-) are opt-in classes. They never touch legacy .h26-* markup.
   • Light grounds are the default. Put .hx-on-dark on a dark/photo-shadow container and
     every utility inside (type colours, links, buttons, focus ring) flips automatically
     via --hx-fg / --hx-fg-2 / --hx-fg-3 / --hx-line / --hx-focus-color.
   • Fonts: Cormorant Garamond (variable 300–700 upright + 300 italic, self-hosted, loaded
     by home-2026.css + style.css) for the display voice; Inter (variable 300–600,
     self-hosted, style.css) for text. No other faces. Italic exists ONLY at weight 300.

   ── COLOUR ─────────────────────────────────────────────────────────────────────
   Grounds (light → deeper)                  Ink contrast (measured, WCAG 2.x)
   --hx-white       #F8F8F8  unified light surface
   --hx-pearl       #F8F8F8  site canvas      ink 15.0 · text 10.0 · muted 6.0 · accent 6.4
                             (= header/--cos-pearl; cool, owner-approved)
   --hx-ivory       #F8F8F8  unified light surface
   --hx-champagne   #E8E0D2  soft champagne   ink 12.9 · text  8.6 · muted 5.1 · accent 5.5
   --hx-stone       #DDD8CF  stone            ink 11.9 · text  7.9 · muted 4.7 · accent 5.0
   --hx-ground      = --hx-white #F8F8F8 — THE homepage section ground (one ground, no bands)
   --hx-ground-stone #EDE9E1 Provenance only (ink 13.9:1, muted 5.5:1, accent 5.9:1)
   --hx-silver      #D4D7DA  silver ground    ink 11.7 · text  7.8 · muted 4.6 · accent 4.9
   Metals (DECORATIVE ONLY — hairlines, rules, numerals ≥40px; never body text)
   --hx-chrome      #A7ACB2  chrome           --hx-chrome-2 #C6CACE light chrome
   --hx-champagne-2 #CDBFA8  deeper champagne (rules / swatches)
   Inks
   --hx-ink         #1C1D1F  graphite ink — headings, buttons, numerals
   --hx-text        #3A3B3D  body copy
   --hx-muted       #5C5C5A  secondary copy, captions, meta (≥4.5:1 on every light ground)
   --hx-graphite    #2A2B2D  logo lettering + header/nav ink (17 Oct 2026)
   --hx-accent      #625646  warm bronze-graphite — the ONE warm text accent (labels,
                             step numbers). ≥4.5:1 on every light ground. Use sparingly.
   Restrained dark (only where a photo or the closing needs it)
   --hx-night       #17181A  near-black graphite (never pure #000)
   --hx-night-2     #232427  raised dark surface
   --hx-on-dark     #F2EFE8  text on dark (15.5:1 on night)
   --hx-on-dark-2   #BDB8AE  secondary on dark (9.0:1 on night, 7.2 on night-2)
   Lines
   --hx-line        hairline on light (ink @14%) · --hx-line-strong (ink @28%)
   --hx-line-dark   hairline on dark (ivory @20%) · --hx-line-hair (ink @9%, header)
   Semantic (flip under .hx-on-dark)
   --hx-fg / --hx-fg-2 / --hx-fg-3   headline / body / muted colour of the current context
   --hx-bg                            current ground (for buttons that knock out)
   Focus: --hx-focus-color, --hx-focus-width (2px), --hx-focus-offset (4px)

   ── TYPE ───────────────────────────────────────────────────────────────────────
   Families: --hx-serif (Cormorant Garamond), --hx-sans (Inter)
   Role        token(size)          390px → 1440px   face / weight / lh / tracking
   display     --hx-fs-display      44 → 88px        serif 300 · 1.0  · -0.018em   (hero, closing)
   heading     --hx-fs-heading      34 → 60px        serif 300 · 1.06 · -0.012em   (section titles)
   title       --hx-fs-title        24 → 30px        serif 400 · 1.18 · -0.004em   (product names, cards)
   lead        --hx-fs-lead         17 → 19px        sans  300 · 1.6  · 0          (intro paragraph)
   body        --hx-fs-body         16px             sans  400 · 1.7  · 0          (reading copy)
   detail      --hx-fs-detail       15px phones / 14px ≥768           sans  400 · 1.55 · 0.005em    (captions, meta, price)
   label       --hx-fs-label        12px             sans  500 · 1.4  · 0.2em UPPER (eyebrows; ≤1 per section)
   numeral     --hx-fs-numeral      56 → 104px       serif 300 · 0.9  · -0.02em lnum (figures: +47%)
   step        --hx-fs-step         18px             serif 400 · 1    · 0.06em lnum (step "01")
   Line-height / tracking tokens: --hx-lh-*, --hx-tr-* (same role names).

   ── SPACE & LAYOUT ─────────────────────────────────────────────────────────────
   --hx-s-1 … --hx-s-10   4 8 12 16 24 32 48 64 96 128 px (fixed rhythm steps)
   --hx-margin            page side margin: 24px (phone) → 80px (≥1540px); shared by all sections
   --hx-gap               grid gutter: 16px → 32px
   --hx-section           section block padding: 96px (phone) → 192px (desktop)
   --hx-section-sm        tighter section padding: 72px → 128px
   --hx-section-y         STANDARD section rhythm (17 Oct 2026): 88px @390 → 130px @1440. Use it for
                          every homepage section's padding-block unless the design needs otherwise.
   --hx-stack             title→copy gap: 20px → 28px
   --hx-max               content max width 1440px · --hx-max-wide 1760px (full-bleed frames)
   --hx-measure           reading measure 34em · --hx-measure-narrow 24em
   --hx-radius            0 (Swiss precision) · --hx-radius-hair 1px (only for focus/tiny tags)

   ── MOTION ─────────────────────────────────────────────────────────────────────
   --hx-ease          cubic-bezier(.19,1,.22,1)   long, silky deceleration (reveals)
   --hx-ease-soft     cubic-bezier(.33,.0,.2,1)   UI hover / colour
   --hx-ease-inout    cubic-bezier(.65,0,.35,1)   symmetric (curtains, crossfades)
   --hx-dur-ui 320ms · --hx-dur-reveal 700ms · --hx-dur-image 900ms · --hx-stagger 50ms (delay capped at 150ms)
   --hx-rise 14px (fade-rise distance)

   ── UTILITIES ──────────────────────────────────────────────────────────────────
   .hx-display .hx-heading .hx-title .hx-lead .hx-body .hx-detail .hx-label
   .hx-numeral .hx-step       — type roles above (colour from context)
     <h2 class="hx-heading">Four formulas. <em>One ritual.</em></h2>   (<em> = italic 300)
   .hx-muted .hx-accent       — colour modifiers
   .hx-wrap                   — centred container: max --hx-max, side padding --hx-margin
   .hx-section                — block padding --hx-section (add .hx-section--sm for tighter)
   .hx-measure                — caps a text block at the reading measure
   .hx-rule                   — 1px hairline (<hr class="hx-rule"> or a div)
   .hx-on-dark                — flips context colours to the dark set (does NOT paint a bg)
   .hx-link                   — refined text link: resting hairline, hover draws a full
                                 ink hairline left→right (no jump); ≥44px tap height
     <a class="hx-link" href="…">Discover the science<span class="hx-arrow" aria-hidden="true"></span></a>
   .hx-btn                    — THE primary button: graphite, ivory label, 52px tall,
                                 inner champagne frame drawn on hover. .hx-btn--ivory for
                                 dark/photo grounds. .hx-btn--block = full width (phones).
     <a class="hx-btn" href="/products/the-complete-ritual/">Shop the Complete Ritual<span class="hx-arrow" aria-hidden="true"></span></a>
   .hx-arrow                  — 18px hairline arrow drawn in CSS; slides 4px on hover
   .hx-sr                     — visually hidden, available to screen readers
   .hx-frame                  — image frame: overflow clip + block img/picture (use with
                                 data-hx-reveal="mask"/"settle" and data-hx-drift)
   Load-time motion (CSS only, no JS, for content visible at first paint e.g. the hero):
   .hx-load-fade .hx-load-rise .hx-load-settle (+ style="--hx-i:2" for stagger)

   Scroll reveals & drift live in assets/js/hx-motion.js — see its header for the API.
   ========================================================================== */

/* Upright Cormorant (variable 300–700). The homepage also declares it in home-2026.css (same
   file, so one download); declared here so every page that loads the system has it. */
@font-face{font-family:'Cormorant Garamond';font-style:normal;font-weight:300 700;font-display:swap;src:url('../../fonts/cormorant-garamond-var-latin.woff2') format('woff2')}

/* ─── Homepage base (carried over 17 Oct 2026 from home-2026.css + home-2026-nocturne.css,
   which are no longer loaded on the homepage: inc/home-2026.php). Only what the live page
   still used, verified by a computed-style diff (zero differences) and screenshot diff.
   Resets stay at zero specificity (:where) so section classes always win. ─────────────── */
body.cos-h26{font-family:var(--cos-body,'Inter',system-ui,-apple-system,'Segoe UI',Arial,sans-serif);font-weight:400;letter-spacing:0;color:#3A3A3A;color-scheme:light}
body.cos-h26 .h26{display:block;background:var(--hx-ground,#F8F8F8);color:#1C1C1C;font-family:var(--cos-body,'Inter',system-ui,sans-serif);font-size:1rem;font-weight:400;letter-spacing:0;line-height:1.65;-webkit-font-smoothing:antialiased;overflow-x:clip}
.h26 *,.h26 *::before,.h26 *::after{box-sizing:border-box}
.h26 :where(h1,h2,h3,p,ul,ol,li,figure){margin:0;padding:0}
.h26 :where(ul,ol){list-style:none}
.h26 :where(img){display:block;max-width:100%;height:auto}
.h26 :where(picture){display:block}
.h26 :where(a){color:inherit;text-decoration:none}
@media (prefers-reduced-motion:no-preference){html:has(.h26){scroll-behavior:smooth}}

/* Tokens: sitewide on :root since 16 Oct 2026 (loaded on every page by inc/hx-system.php);
   body.cos-h26 kept so the homepage resolves exactly as before. */
:root,body.cos-h26{
	/* colour — grounds */
	--hx-white:#F8F8F8;
	--hx-pearl:#F8F8F8;
	--hx-ivory:#F8F8F8;
	--hx-champagne:#E8E0D2;
	--hx-stone:#DDD8CF;
	--hx-silver:#D4D7DA;
	/* colour — the homepage ground (17 Oct 2026 round 2): ONE ground for every section,
	   stone only for Provenance; the graphite footer is the single dark band. */
	--hx-ground:var(--hx-white);
	--hx-ground-stone:#EDE9E1;
	/* colour — metals (decorative only) */
	--hx-chrome:#A7ACB2;
	--hx-chrome-2:#C6CACE;
	--hx-champagne-2:#CDBFA8;
	/* colour — inks */
	--hx-ink:#1C1D1F;
	--hx-text:#3A3B3D;
	--hx-muted:#5C5C5A;
	--hx-accent:#625646;
	--hx-graphite:#2A2B2D;   /* logo lettering, header/nav ink (12.6:1 on pearl, 13.6 on white) */
	/* colour — restrained dark */
	--hx-night:#17181A;
	--hx-night-2:#232427;
	--hx-on-dark:#F2EFE8;
	--hx-on-dark-2:#BDB8AE;
	/* lines */
	--hx-line:rgba(28,29,31,.14);
	--hx-line-strong:rgba(28,29,31,.28);
	--hx-line-dark:rgba(242,239,232,.2);
	--hx-line-hair:rgba(28,29,31,.09);   /* header / quiet dividers */
	/* semantic (light context) */
	--hx-bg:var(--hx-pearl);
	--hx-fg:var(--hx-ink);
	--hx-fg-2:var(--hx-text);
	--hx-fg-3:var(--hx-muted);
	--hx-fg-accent:var(--hx-accent);
	--hx-rule:var(--hx-line);
	--hx-focus-color:var(--hx-ink);
	--hx-focus-width:2px;
	--hx-focus-offset:4px;
	--hx-selection-bg:#E3D8C5;
	--hx-selection-fg:var(--hx-ink);

	/* type — families */
	--hx-serif:'Cormorant Garamond','EB Garamond',Georgia,'Times New Roman',serif;
	--hx-sans:'Inter',system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
	/* type — sizes (fluid between 390px and 1440px) */
	--hx-fs-display:clamp(2.75rem,1.73rem + 4.19vw,5.5rem);
	--hx-fs-heading:clamp(2.125rem,1.52rem + 2.48vw,3.75rem);
	--hx-fs-title:clamp(1.5rem,1.36rem + .57vw,1.875rem);
	--hx-fs-lead:clamp(1.0625rem,1.016rem + .19vw,1.1875rem);
	--hx-fs-body:1rem;
	--hx-fs-detail:.875rem;
	--hx-fs-label:.75rem;   /* 12px floor for uppercase labels (17 Oct 2026 audit) */
	--hx-fs-numeral:clamp(3.5rem,2.38rem + 4.57vw,6.5rem);
	--hx-fs-step:1.125rem;
	/* type — line-heights */
	--hx-lh-display:1;
	--hx-lh-heading:1.06;
	--hx-lh-title:1.18;
	--hx-lh-lead:1.6;
	--hx-lh-body:1.7;
	--hx-lh-detail:1.55;
	--hx-lh-label:1.4;
	--hx-lh-numeral:.9;
	/* type — tracking */
	--hx-tr-display:-.018em;
	--hx-tr-heading:-.012em;
	--hx-tr-title:-.004em;
	--hx-tr-detail:.005em;
	--hx-tr-label:.2em;
	--hx-tr-numeral:-.02em;
	--hx-tr-step:.06em;
	--hx-tr-btn:.16em;
	--hx-fs-nav:.71875rem;   /* header nav: Inter 450, 11.5px */
	--hx-tr-nav:.13em;

	/* space */
	--hx-s-1:4px;
	--hx-s-2:8px;
	--hx-s-3:12px;
	--hx-s-4:16px;
	--hx-s-5:24px;
	--hx-s-6:32px;
	--hx-s-7:48px;
	--hx-s-8:64px;
	--hx-s-9:96px;
	--hx-s-10:128px;
	--hx-margin:clamp(24px,5.2vw,80px);
	--hx-gap:clamp(16px,2.2vw,32px);
	--hx-section:clamp(96px,6.2rem + 6.5vw,192px);
	--hx-section-sm:clamp(72px,4rem + 4vw,128px);
	--hx-section-y:clamp(88px,72.4px + 4vw,130px);   /* standard section top/bottom: 88 @390 → 130 @1440 */
	--hx-stack:clamp(20px,1.1rem + .6vw,28px);
	/* layout */
	--hx-max:1440px;
	--hx-max-wide:1760px;
	--hx-measure:34em;
	--hx-measure-narrow:24em;
	--hx-radius:0;
	--hx-radius-hair:1px;

	/* motion */
	--hx-ease:cubic-bezier(.19,1,.22,1);
	--hx-ease-soft:cubic-bezier(.33,0,.2,1);
	--hx-ease-inout:cubic-bezier(.65,0,.35,1);
	--hx-dur-ui:320ms;
	--hx-dur-reveal:700ms;   /* 25 Oct 2026: the homepage's values on every page (one motion language) */
	--hx-dur-image:900ms;
	--hx-stagger:50ms;
	--hx-rise:14px;
	--hx-delay-max:150ms;    /* no reveal waits longer than this after it intersects */
}

/* Phones: reading text never below 15px (45–65 audience; 17 Oct 2026 audit P1-1). */
@media (max-width:767.98px){:root,body.cos-h26{--hx-fs-detail:.9375rem}}

/* Dark context: flips the semantic tokens; paint the background yourself. */
body .hx-on-dark{
	--hx-bg:var(--hx-night);
	--hx-fg:var(--hx-on-dark);
	--hx-fg-2:var(--hx-on-dark);
	--hx-fg-3:var(--hx-on-dark-2);
	--hx-fg-accent:var(--hx-on-dark-2);
	--hx-rule:var(--hx-line-dark);
	--hx-focus-color:var(--hx-on-dark);
	--hx-selection-bg:#5A5246;
	--hx-selection-fg:var(--hx-on-dark);
	color:var(--hx-fg-2);
}

body.cos-h26 .h26 ::selection{background:var(--hx-selection-bg);color:var(--hx-selection-fg)}

/* ─── Type roles ─────────────────────────────────────────────────── */
.hx-display,.hx-heading,.hx-title,.hx-numeral,.hx-step{
	font-family:var(--hx-serif);
	color:var(--hx-fg);
	font-style:normal;
	font-optical-sizing:auto;
	font-kerning:normal;
	text-rendering:optimizeLegibility;
	-webkit-font-smoothing:antialiased;
	-moz-osx-font-smoothing:grayscale;
}
.hx-display{font-size:var(--hx-fs-display);font-weight:300;line-height:var(--hx-lh-display);letter-spacing:var(--hx-tr-display);text-wrap:balance}
.hx-heading{font-size:var(--hx-fs-heading);font-weight:300;line-height:var(--hx-lh-heading);letter-spacing:var(--hx-tr-heading);text-wrap:balance}
.hx-title{font-size:var(--hx-fs-title);font-weight:400;line-height:var(--hx-lh-title);letter-spacing:var(--hx-tr-title);text-wrap:balance}
/* <em> inside serif roles = the house italic (only weight 300 exists in italic) */
:is(.hx-display,.hx-heading,.hx-title) em{font-style:italic;font-weight:300;letter-spacing:-.005em}

.hx-numeral{font-size:var(--hx-fs-numeral);font-weight:300;line-height:var(--hx-lh-numeral);letter-spacing:var(--hx-tr-numeral);font-variant-numeric:lining-nums proportional-nums;font-feature-settings:"lnum" 1,"pnum" 1}
.hx-numeral sup,.hx-numeral small{font-size:.42em;letter-spacing:0;vertical-align:.95em;margin-left:.06em;font-weight:400}
.hx-step{display:inline-block;font-size:var(--hx-fs-step);font-weight:400;line-height:1;letter-spacing:var(--hx-tr-step);font-variant-numeric:lining-nums tabular-nums;font-feature-settings:"lnum" 1,"tnum" 1;color:var(--hx-fg-accent)}

.hx-lead,.hx-body,.hx-detail,.hx-label{font-family:var(--hx-sans);font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
.hx-lead{font-size:var(--hx-fs-lead);font-weight:300;line-height:var(--hx-lh-lead);letter-spacing:0;color:var(--hx-fg-2);text-wrap:pretty}
.hx-body{font-size:var(--hx-fs-body);font-weight:400;line-height:var(--hx-lh-body);letter-spacing:0;color:var(--hx-fg-2);text-wrap:pretty}
.hx-detail{font-size:var(--hx-fs-detail);font-weight:400;line-height:var(--hx-lh-detail);letter-spacing:var(--hx-tr-detail);color:var(--hx-fg-3);font-variant-numeric:tabular-nums}
.hx-label{display:block;font-size:var(--hx-fs-label);font-weight:500;line-height:var(--hx-lh-label);letter-spacing:var(--hx-tr-label);text-transform:uppercase;color:var(--hx-fg-accent)}
.hx-label + .hx-display,.hx-label + .hx-heading{margin-top:var(--hx-stack)}

.hx-muted{color:var(--hx-fg-3)}
.hx-accent{color:var(--hx-fg-accent)}
.hx-measure{max-width:var(--hx-measure)}
.hx-measure--narrow{max-width:var(--hx-measure-narrow)}

/* ─── Layout ─────────────────────────────────────────────────────── */
.hx-wrap{box-sizing:border-box;width:100%;max-width:calc(var(--hx-max) + 2 * var(--hx-margin));margin-inline:auto;padding-inline:var(--hx-margin)}
.hx-section{padding-block:var(--hx-section)}
.hx-section--sm{padding-block:var(--hx-section-sm)}
.hx-rule{display:block;width:100%;height:0;margin:0;border:0;border-top:1px solid var(--hx-rule)}
.hx-frame{position:relative;overflow:clip;display:block}
.hx-frame :where(picture,img){display:block;width:100%;height:100%}
.hx-frame :where(img){object-fit:cover}

/* ─── Arrow (CSS-drawn, inherits colour) ─────────────────────────── */
.hx-arrow{position:relative;display:inline-block;flex:none;width:18px;height:9px;margin-left:14px;transition:transform var(--hx-dur-ui) var(--hx-ease-soft)}
.hx-arrow::before{content:"";position:absolute;left:0;right:1px;top:50%;height:1px;margin-top:-.5px;background:currentColor}
.hx-arrow::after{content:"";position:absolute;right:1px;top:50%;width:6px;height:6px;border-top:1px solid currentColor;border-right:1px solid currentColor;transform:translateY(-50%) rotate(45deg);transform-origin:center}

/* ─── Link: resting hairline + drawn ink hairline on hover ───────── */
.hx-link{
	position:relative;
	display:inline-flex;
	align-items:center;
	min-height:44px;
	font-family:var(--hx-sans);
	font-size:var(--hx-fs-detail);
	font-weight:500;
	line-height:1.4;
	letter-spacing:.02em;
	color:var(--hx-fg);
	text-decoration:none;
	/* two stacked 1px lines at the same baseline: faint rest line + drawn line */
	background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--hx-rule),var(--hx-rule));
	background-repeat:no-repeat;
	background-position:0 calc(50% + .95em),0 calc(50% + .95em);
	background-size:0 1px,100% 1px;
	padding-bottom:0;
	transition:background-size 700ms var(--hx-ease),color var(--hx-dur-ui) var(--hx-ease-soft);
}
.hx-link:hover{background-size:100% 1px,100% 1px}
.hx-link:hover .hx-arrow,.hx-btn:hover .hx-arrow{transform:translateX(4px)}
.hx-link:visited{color:var(--hx-fg)}

/* ─── Button: the one primary button ─────────────────────────────── */
.hx-btn{
	--hx-btn-bg:var(--hx-ink);
	--hx-btn-bg-hover:#2B2C2F;
	--hx-btn-fg:var(--hx-white);
	--hx-btn-frame:rgba(205,191,168,.55);
	position:relative;
	isolation:isolate;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	box-sizing:border-box;
	min-height:52px;
	padding:0 34px;
	margin:0;
	border:0;
	border-radius:var(--hx-radius);
	background:var(--hx-btn-bg);
	color:var(--hx-btn-fg);
	font-family:var(--hx-sans);
	font-size:.75rem;
	font-weight:500;
	line-height:1.3;
	letter-spacing:var(--hx-tr-btn);
	text-transform:uppercase;
	text-align:center;
	text-decoration:none;
	white-space:nowrap;
	cursor:pointer;
	-webkit-tap-highlight-color:transparent;
	transition:background-color var(--hx-dur-ui) var(--hx-ease-soft),color var(--hx-dur-ui) var(--hx-ease-soft);
}
/* jewel-box detail: a fine inner frame that settles in on hover */
.hx-btn::after{content:"";position:absolute;inset:5px;border:1px solid var(--hx-btn-frame);opacity:0;transform:scale(1.025);transition:opacity 600ms var(--hx-ease),transform 600ms var(--hx-ease);pointer-events:none;z-index:-1}
.hx-btn:hover{background:var(--hx-btn-bg-hover);color:var(--hx-btn-fg)}
.hx-btn:hover::after{opacity:1;transform:scale(1)}
.hx-btn:active{transform:translateY(1px)}
.hx-btn:visited{color:var(--hx-btn-fg)}
.hx-btn--ivory,.hx-on-dark .hx-btn:not(.hx-btn--ink){--hx-btn-bg:var(--hx-white);--hx-btn-bg-hover:var(--hx-ivory);--hx-btn-fg:var(--hx-ink);--hx-btn-frame:rgba(98,86,70,.4)}
.hx-btn--block{display:flex;width:100%;white-space:normal}
@media (max-width:359.98px){.hx-btn{padding-inline:20px;letter-spacing:.12em;white-space:normal}}

/* ─── Focus ──────────────────────────────────────────────────────── */
:is(.hx-link,.hx-btn):focus{outline:none}
:is(.hx-link,.hx-btn,[class*="hx"] a,[class*="hx"] button,[class*="hx"] [tabindex]):focus-visible{outline:var(--hx-focus-width) solid var(--hx-focus-color);outline-offset:var(--hx-focus-offset);border-radius:0}
.hx-btn:focus-visible{outline-offset:3px}

/* ─── Screen-reader only ─────────────────────────────────────────── */
.hx-sr{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;text-transform:none!important;letter-spacing:normal!important}

/* ─── Scroll reveals (state classes are set by hx-motion.js) ─────────
   25 Oct 2026: identical to home-staging/system.css, so every page moves the same way.
   Content is hidden ONLY when html.hx-motion is present, i.e. JS ran, motion is
   allowed, and the element was below the fold at start. Anything that fails stays visible.

   20 Oct 2026 (animate pass): below the fold, every reveal finishes in 600–900ms and starts
   at most --hx-delay-max (150ms) after it intersects, so text is readable almost at once.
   Photographs are never hidden by this layer: no opacity, clip or brightness gate on an
   image, so what you see depends only on the browser having painted it, never on the reveal
   having fired or on load timing. Image reveals (mask, mask-x, blind, settle) are a scale
   settle of the <img> inside its own clipped frame. Text reveals (rise, fade, light) still
   start hidden, for 600–800ms. Jumps (deep links, End, scrollbar drags, find-in-page),
   content entering from above and keyboard focus show instantly (hx-motion.js). */
html.hx-motion [data-hx-reveal]{
	transition-property:opacity,transform;
	transition-duration:var(--hx-dur-reveal);
	transition-timing-function:var(--hx-ease);
	transition-delay:min(calc(var(--hx-i,0) * var(--hx-stagger) + var(--hx-delay,0ms)),var(--hx-delay-max));
}
html.hx-motion :is([data-hx-reveal=""],[data-hx-reveal="rise"],[data-hx-reveal="fade"]):not(.is-in){opacity:0}
html.hx-motion :is([data-hx-reveal=""],[data-hx-reveal="rise"]):not(.is-in){transform:translate3d(0,var(--hx-rise),0)}
html.hx-motion [data-hx-reveal="fade"]{transition-duration:600ms;transition-timing-function:var(--hx-ease-soft)}
/* image reveals: the frame and the photograph stay visible; the photograph settles 1.04 → 1
   inside its frame (every host frame clips: .hxv__frame, .hxm__photo, .hxp__photo, .hxr__shot) */
html.hx-motion :is([data-hx-reveal="mask"],[data-hx-reveal="mask-x"],[data-hx-reveal="blind"],[data-hx-reveal="settle"]){transition-property:none}
html.hx-motion :is([data-hx-reveal="mask"],[data-hx-reveal="mask-x"],[data-hx-reveal="settle"]) img{transition:transform var(--hx-dur-image) var(--hx-ease);transition-delay:min(calc(var(--hx-i,0) * var(--hx-stagger) + var(--hx-delay,0ms)),var(--hx-delay-max))}
html.hx-motion :is([data-hx-reveal="mask"],[data-hx-reveal="mask-x"],[data-hx-reveal="settle"]):not(.is-in) img{transform:scale(1.04)}
html.hx-motion img[data-hx-reveal="settle"]{transition:transform var(--hx-dur-image) var(--hx-ease)}
html.hx-motion img[data-hx-reveal="settle"]:not(.is-in){transform:scale(1.04)}
/* blind (The Ritual's four panels): their photographs carry their own filters and hover
   transforms, so the group only rises 14px into place; nothing is clipped or faded */
html.hx-motion [data-hx-reveal="blind"]{transition-property:transform;transition-duration:800ms}
html.hx-motion [data-hx-reveal="blind"]:not(.is-in){transform:translate3d(0,var(--hx-rise),0)}
/* light (20 Oct 2026): the homepage's one motion idea. A soft band of light travels across
   a heading, left to right, the way light runs over the polished silver of the packs. The
   mask is twice-plus the element's width; sliding it from its clear half to its opaque half
   writes the words in. Headings only; never body copy or prices. Starts 70% lit, so the
   heading reads the moment it arrives, and finishes in 800ms. */
html.hx-motion [data-hx-reveal="light"]{
	-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;
	-webkit-mask-position:0 0;mask-position:0 0;
	transition-property:-webkit-mask-position,mask-position;
	transition-duration:800ms;
	transition-timing-function:var(--hx-ease);
}
html.hx-motion [data-hx-reveal="light"]:not(.is-in){opacity:1;-webkit-mask-position:45% 0;mask-position:45% 0} /* 45% of the travel left: most of the heading already lit */
/* no transition for elements revealed at start (already in view), by a jump, or by focus.
   .hx-snap lasts two frames (hx-motion.js); .hx-instant stays, so entrance animations keyed
   on :not(.hx-instant) never replay, while hover transitions inside work again. */
html.hx-motion [data-hx-reveal].hx-snap,html.hx-motion [data-hx-reveal].hx-snap img{transition:none!important}

/* Drift (parallax) uses the independent `translate` property, so it composes with any
   reveal transform. JS writes --hx-dy only ≥900px and without reduced motion. */
[data-hx-drift]{translate:0 var(--hx-dy,0px)}

/* ─── Load-time motion (CSS only; for above-the-fold content) ────── */
@media (prefers-reduced-motion:no-preference){
	.hx-load-fade,.hx-load-rise,.hx-load-settle{animation-duration:850ms;animation-timing-function:var(--hx-ease);animation-fill-mode:both;animation-delay:calc(80ms + var(--hx-i,0) * 45ms)}
	.hx-load-fade{animation-name:hx-fade;animation-timing-function:var(--hx-ease-soft)}
	.hx-load-rise{animation-name:hx-rise}
	.hx-load-settle{animation-name:hx-settle;animation-duration:1100ms;animation-delay:calc(var(--hx-i,0) * 45ms)}
}
@keyframes hx-fade{from{opacity:.86}to{opacity:1}}
@keyframes hx-rise{from{opacity:.86;transform:translate3d(0,12px,0)}to{opacity:1;transform:none}}
@keyframes hx-settle{from{opacity:.92;transform:scale(1.02)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
	html.hx-motion [data-hx-reveal]{opacity:1!important;transform:none!important;clip-path:none!important;-webkit-mask:none!important;mask:none!important;transition:none!important}
	[data-hx-drift]{translate:none!important}
	.hx-btn,.hx-btn::after,.hx-link,.hx-arrow{transition:none}
}
@media print{
	html.hx-motion [data-hx-reveal]{opacity:1!important;transform:none!important;clip-path:none!important;-webkit-mask:none!important;mask:none!important}
}

/* Hairline draw (opt-in decoration). */
.hx-line{display:block;height:1px;background:var(--hx-rule);transform-origin:left center}
html.hx-motion :is(.hx-line,[data-hx-line]){transition:transform 1400ms var(--hx-ease)}
html.hx-motion :is(.hx-line,[data-hx-line]):not(.is-drawn){transform:scaleX(0)}
@media (prefers-reduced-motion:reduce){.hx-line,[data-hx-line]{transform:none!important}}

/* ─── Opening (25 Oct 2026: one entrance on every page) ──────────────
   The homepage hero's entrance (hero.css), carried to every other page's opening: the section
   that holds the page's h1. Its photograph (or video) racks into focus, the h1 is written by a
   band of light, and the lines around it rise in after. CSS only, so nothing waits for a script
   and the photograph paints at once (only its focus changes). fill-mode "backwards" hands every
   element its own transform back when the entrance ends. The light needs the heading's own
   mask, so it is set here; the hand-authored heroes' own fade-ups (opacity:0 + animation) are
   replaced, and their text is made visible explicitly. Not on task pages or the homepage. */
@media (prefers-reduced-motion:no-preference){
	:root body:not(.cos-h26):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) #cos-main-content :is(section,header):has(h1) :is(img,video):not([width="1"]){
		animation:hx-open-focus 1700ms var(--hx-ease) backwards;
	}
	:root body:not(.cos-h26):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) #cos-main-content :is(section,header):has(h1) h1{
		opacity:1;
		-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;
		-webkit-mask-position:0 0;mask-position:0 0;
		animation:hx-open-light 1400ms var(--hx-ease) 120ms backwards;
	}
	:root body:not(.cos-h26):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) #cos-main-content :is(section,header):has(h1) :is(:has(~ h1),h1 ~ *){
		opacity:1;
		animation:hx-rise 850ms var(--hx-ease) 560ms backwards;
	}
	:root body:not(.cos-h26):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) #cos-main-content :is(section,header):has(h1) :has(~ h1){animation-delay:80ms}
	:root body:not(.cos-h26):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) #cos-main-content :is(section,header):has(h1) h1 + * ~ *{animation-delay:680ms}
	/* an h1 outside any section/header (the 404): the same light, and the lines after it rise */
	:root body:not(.cos-h26):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) #cos-main-content h1:not(section h1):not(header h1){
		-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:hx-open-light 1400ms var(--hx-ease) 120ms backwards;
	}
	:root body:not(.cos-h26):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account) #cos-main-content h1:not(section h1):not(header h1) ~ *{animation:hx-rise 850ms var(--hx-ease) 560ms backwards}
}
/* the hand-authored heroes start their text at opacity 0 for their own fade-ups: always visible here */
@media (prefers-reduced-motion:reduce){
	:root body:not(.cos-h26) #cos-main-content :is(section,header):has(h1) :is(h1,:has(~ h1),h1 ~ *){opacity:1;animation:none}
}
@keyframes hx-open-focus{from{transform:scale(1.035);filter:blur(10px)}to{transform:none;filter:blur(0)}}
@keyframes hx-open-light{from{-webkit-mask-position:60% 0;mask-position:60% 0}to{-webkit-mask-position:0 0;mask-position:0 0}}
@media print{#cos-main-content h1{-webkit-mask:none!important;mask:none!important}}

/* ═══ Orchestrator additions (round 3) ═════════════════════════════ */

/* Homepage footer: same container as the sections (shared max width + page margin). */
body.cos-h26 #cos-footer :is(.cos-nl-wrap,.cos-footer-cols,.cos-footer-bottom){box-sizing:border-box;max-width:calc(var(--hx-max) + 2 * var(--hx-margin));padding-left:var(--hx-margin);padding-right:var(--hx-margin)}

/* Homepage header (transparent over the hero until scrolled): see hx/chrome.css, 17 Oct 2026. */

/* One ground under the whole homepage (sections that paint their own ground should use
   var(--hx-ground), or var(--hx-ground-stone) for Provenance). */
body.cos-h26{background-color:var(--hx-ground)}

/* In-page anchors land clear of the fixed header (60px bar below 1280px, 80px above). */
body.cos-h26 :is(#collection,#caviar,#evidence,#heritage,#ritual,#closing){scroll-margin-top:calc(var(--cos-nav-h,80px) + 40px)}

.hx-btn{font-size:15px;letter-spacing:.01em;text-transform:none;white-space:normal}
.hx-btn::after{display:none}
.hx-link{font-size:15px}

/* ── Section bar (hx-bar), 31 Oct 2026 ────────────────────────────────────────────
   The one sub-navigation on every page that has one (template-parts/hx/section-bar.php,
   script assets/js/hx-section-bar.js): The Ritual, Swiss science hub + chapters, Swiss
   heritage hub, Shop, product pages. Left-aligned on the page container, sticky under the
   header, current part underlined. Was five different navs (owner: "uniform on all pages").
   On narrow screens the row scrolls sideways instead of wrapping. */
:root{--hx-bar-h:52px}
html:has(.hx-bar){scroll-padding-top:calc(var(--cos-nav-h,80px) + var(--hx-bar-h))}
.hx-bar{
	position:sticky;
	top:var(--cos-nav-h,80px);
	z-index:20;
	background:var(--hx-white);
	border-bottom:1px solid var(--hx-line);
	font-family:var(--hx-sans);
}
.hx-bar__in{display:flex;align-items:center;justify-content:space-between;gap:var(--hx-s-5);min-height:var(--hx-bar-h)}
.hx-bar .hx-bar__list{display:flex;gap:clamp(24px,2.4vw,40px);min-width:0;margin:0;padding:0;list-style:none;overflow-x:auto;scrollbar-width:none}
.hx-bar__list::-webkit-scrollbar{display:none}
.hx-bar__list li{flex:none;margin:0;padding:0}
.hx-bar .hx-bar__link{
	position:relative;display:inline-flex;align-items:center;min-height:44px;
	font-size:.8125rem;font-weight:400;letter-spacing:.01em;text-transform:none;line-height:1.3;
	color:var(--hx-muted);text-decoration:none;white-space:nowrap;
	transition:color var(--hx-dur-ui) var(--hx-ease-soft);
}
.hx-bar .hx-bar__link::after{content:"";position:absolute;left:0;right:0;bottom:8px;height:1px;background:var(--hx-ink);transform:scaleX(0);transform-origin:left;transition:transform 520ms var(--hx-ease)}
.hx-bar .hx-bar__link:hover,.hx-bar .hx-bar__link[aria-current]{color:var(--hx-ink)}
.hx-bar .hx-bar__link:hover::after,.hx-bar .hx-bar__link[aria-current]::after{transform:scaleX(1)}
.hx-bar .hx-bar__link:focus-visible{outline:var(--hx-focus-width) solid var(--hx-focus-color);outline-offset:-2px}
.hx-bar__aside{flex:none;margin:0;font-size:.8125rem;color:var(--hx-ink);white-space:nowrap;font-variant-numeric:lining-nums tabular-nums}
.hx-bar__aside[hidden]{display:none}
@media (max-width:719.98px){
	.hx-bar__aside{display:none}
	/* a short index (product pages, 1 Nov 2026): the four chapters spread edge to edge, so every
	   one is on screen from 360px; narrower phones fall back to the scrolling row below */
	.hx-bar--fit .hx-bar__in{display:block}
	.hx-bar--fit .hx-bar__list{justify-content:space-between;gap:8px}
	.hx-bar--fit .hx-bar__link{letter-spacing:0}
}
/* a row that still scrolls fades on the side with more links behind it (class set by hx-section-bar.js) */
.hx-bar.is-more-end .hx-bar__list{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 48px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 48px),transparent)}
.hx-bar.is-more-start .hx-bar__list{-webkit-mask-image:linear-gradient(90deg,transparent,#000 48px);mask-image:linear-gradient(90deg,transparent,#000 48px)}
.hx-bar.is-more-start.is-more-end .hx-bar__list{-webkit-mask-image:linear-gradient(90deg,transparent,#000 48px,#000 calc(100% - 48px),transparent);mask-image:linear-gradient(90deg,transparent,#000 48px,#000 calc(100% - 48px),transparent)}
@media (prefers-reduced-motion:reduce){.hx-bar .hx-bar__link,.hx-bar .hx-bar__link::after{transition:none}}
@media print{.hx-bar{display:none}}
