/* ==========================================================================
   SEREIN — brand, demand and design for hospitality
   Single stylesheet. Tokens → base → components → sections → pages → media.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Core */
  --paper:      #EBEBDF;
  --paper-deep: #E3E2D3;
  --ink:        #201D18;
  --ink-soft:   #55514A;

  /* Brand colors (one accent detail per viewport) */
  --steel:      #A8C2E0;
  --carrot:     #EA631B;
  --pistachio:  #AEC17F;
  --olive:      #6B7444;

  /* The glow */
  --gold:       #E9C88F;
  --bloom:      #F6E3B8;

  /* Theme tokens (tweened by JS between light/dusk sections) */
  --bg: var(--paper);
  --fg: var(--ink);

  /* Type scale */
  --type-hero:  clamp(3.2rem, 10vw, 12rem);
  --type-h1:    clamp(2.8rem, 7vw, 7.5rem);
  --type-h2:    clamp(2rem, 4.5vw, 4.2rem);
  --type-h3:    clamp(1.4rem, 2.2vw, 2rem);
  --type-body:  clamp(1.06rem, 1.25vw, 1.25rem);
  --type-label: 0.78rem;

  /* Layout */
  --margin: clamp(20px, 6vw, 96px);
  --maxw: 1600px;
  --hairline: color-mix(in srgb, var(--fg) 15%, transparent);
  --hairline-strong: color-mix(in srgb, var(--fg) 20%, transparent);
  --fg-soft: color-mix(in srgb, var(--fg) 65%, transparent);
}

/* Home opens on a dusk hero: start the melt from dusk so the header reads. */
html.page-home { --bg: #201D18; --fg: #EBEBDF; }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: clip; scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: var(--type-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { max-width: 100%; display: block; }

::selection { background: color-mix(in srgb, var(--gold) 60%, transparent); color: var(--ink); }

:focus-visible { outline: 2px solid var(--carrot); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 2000;
  padding: 0.6em 1.2em; background: var(--ink); color: var(--paper);
  font-size: var(--type-label); text-transform: uppercase; letter-spacing: 0.16em;
  transform: translateY(-300%); transition: transform 0.25s ease;
}
.skip-link:focus-visible { transform: none; }

/* Serif display utility */
.serif {
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.t-hero { font-size: var(--type-hero); font-weight: 340; line-height: 1.02; }
.t-h1   { font-size: var(--type-h1);   font-weight: 360; line-height: 1.04; }
.t-h2   { font-size: var(--type-h2);   font-weight: 380; line-height: 1.08; }
.t-h3   { font-size: var(--type-h3);   font-weight: 400; }

.label {
  font-family: "Archivo", sans-serif;
  font-size: var(--type-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 1.5;
}

p.measure, .measure { max-width: 34em; }
.soft { color: var(--fg-soft); }

/* ---------- 3. Layout primitives ---------- */
.container { max-width: var(--maxw); margin-inline: auto; }

.section { position: relative; padding: clamp(110px, 22vh, 280px) var(--margin); }
.section--tall { padding-block: clamp(160px, 30vh, 360px); }
.section--tight { padding-block: clamp(70px, 12vh, 140px); }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 32px); }

.section-head {
  display: flex; align-items: baseline; gap: 1.5em;
  padding-top: 1.2em;
  border-top: 1px solid var(--hairline-strong);
  margin-bottom: clamp(48px, 8vh, 110px);
}
.section-head .label { color: var(--fg-soft); }

.rule { border: 0; border-top: 1px solid var(--hairline); margin: 0; }

/* ---------- 4. Links, CTAs, pills ---------- */
.cta {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: "Archivo", sans-serif;
  font-size: var(--type-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  padding-bottom: 3px;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: left bottom;
  transition: background-size 0.35s ease;
}
.cta:hover, .cta:focus-visible { background-size: 100% 1px; }
.cta .arrow { transition: transform 0.35s ease; }
.cta:hover .arrow, .cta:focus-visible .arrow { transform: translateX(4px); }

[data-theme="light"] .cta { color: var(--carrot); }
[data-theme="dusk"] .cta { color: var(--paper); }

.pill {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: "Archivo", sans-serif;
  font-size: var(--type-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  border: 1px solid currentColor; border-radius: 999px;
  padding: 1em 2em;
  position: relative; isolation: isolate; overflow: hidden;
  transition: color 0.4s ease, border-color 0.4s ease;
}
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--carrot);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.6, 0, 0.2, 1);
}
.pill:hover, .pill:focus-visible { color: var(--paper); border-color: var(--carrot); }
.pill:hover::before, .pill:focus-visible::before { transform: none; }
.pill .arrow { transition: transform 0.35s ease; }
.pill:hover .arrow, .pill:focus-visible .arrow { transform: translateX(4px); }
[data-theme="light"] .pill { color: var(--fg); }
[data-theme="dusk"] .pill { color: var(--paper); }

/* Inline text links inside copy */
.link {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-size: 100% 1px; background-position: left bottom;
}

/* ---------- 5. The glow (image placeholders) ---------- */
.glow {
  position: relative; overflow: hidden; border-radius: 2px;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse 55% 40% at var(--gx, 60%) var(--gy, 38%),
      var(--bloom) 0%, color-mix(in srgb, var(--gold) 75%, transparent) 34%, transparent 68%),
    linear-gradient(178deg,
      var(--steel) 0%, color-mix(in srgb, var(--steel) 55%, var(--gold)) 34%,
      var(--gold) 58%, color-mix(in srgb, var(--gold) 45%, var(--ink)) 100%);
}
.glow::before { /* horizon haze */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--ink) 32%, transparent), transparent 45%);
  mix-blend-mode: multiply;
}
.glow::after { /* grain */
  content: ""; position: absolute; inset: 0; opacity: 0.14;
  background: url(../assets/noise.svg); background-size: 280px;
  mix-blend-mode: overlay; pointer-events: none;
}

.glow--sea     { --gx: 42%; --gy: 72%; filter: hue-rotate(-6deg) saturate(1.05); }
.glow--terrace { --gx: 64%; --gy: 22%; filter: hue-rotate(8deg) brightness(1.04); }
.glow--linen   { --gx: 50%; --gy: 40%; filter: brightness(1.12) saturate(0.7); }
.glow--dusk    { --gx: 58%; --gy: 46%; filter: brightness(0.62) saturate(1.1); }

/* Framed placeholder with caption; inner glow oversized for parallax depth */
.glow-frame { position: relative; overflow: hidden; border-radius: 2px; }
.glow-frame > .glow { position: absolute; left: 0; right: 0; top: -7.5%; height: 115%; }
.glow-caption {
  margin-top: 0.9em;
  color: var(--fg-soft);
}
figure.placeholder { display: block; }

/* ---------- 6. Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(16px, 2.4vh, 26px) var(--margin);
  color: var(--fg);
  transition: transform 0.5s cubic-bezier(0.5, 0, 0.2, 1), background-color 0.45s ease, border-color 0.45s ease;
  border-bottom: 1px solid transparent;
  background: transparent;
}
.site-header.is-solid {
  background: var(--bg);
  border-bottom-color: var(--hairline);
}
.site-header.is-hidden { transform: translateY(-105%); }

.wordmark {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 0;
  font-weight: 380;
  font-size: 1.4rem; line-height: 1;
  letter-spacing: -0.01em;
}
.wordmark .dot { color: var(--carrot); }

.site-nav { display: flex; gap: clamp(18px, 2.2vw, 36px); }
.site-nav a {
  font-size: var(--type-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-size: 0% 1px; background-position: left bottom;
  padding-bottom: 3px;
  transition: background-size 0.35s ease;
}
.site-nav a:hover, .site-nav a:focus-visible { background-size: 100% 1px; }

/* Current page marker (header markup stays identical across pages) */
html.page-brand .site-nav a[href="/brand"],
html.page-demand .site-nav a[href="/demand"],
html.page-design .site-nav a[href="/design"],
html.page-how .site-nav a[href="/how-we-work"],
html.page-about .site-nav a[href="/about"],
html.page-contact .site-nav a[href="/contact"] { background-size: 100% 1px; }

.nav-toggle { display: none; }

/* Mobile menu overlay */
.menu-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--margin);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}
.menu-overlay.is-open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transition: opacity 0.4s ease;
}
.menu-overlay nav { display: flex; flex-direction: column; gap: 0.4em; }
.menu-overlay nav a {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144;
  font-weight: 360;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  line-height: 1.25;
  transform: translateY(16px); opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}
.menu-overlay.is-open nav a { transform: none; opacity: 1; }
.menu-overlay .menu-foot { margin-top: 8vh; color: color-mix(in srgb, var(--paper) 60%, transparent); }

/* Keep the header (and its Close toggle) usable above the open menu */
html.menu-is-open .site-header {
  z-index: 990;
  color: var(--paper);
  background: transparent;
  border-bottom-color: transparent;
  transform: none;
}

/* ---------- 7. Footer (sticky reveal) ---------- */
main { position: relative; z-index: 2; background: var(--bg); }

.site-footer {
  position: sticky; bottom: 0; z-index: 1;
  background: var(--bg); color: var(--fg);
  border-top: 1px solid var(--hairline);
  padding: clamp(56px, 9vh, 110px) var(--margin) clamp(28px, 4vh, 48px);
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  max-width: var(--maxw); margin-inline: auto;
}
.footer-brand .wordmark { font-size: 1.9rem; }
.footer-brand .label { display: block; margin-top: 1em; color: var(--fg-soft); }
.footer-nav { display: flex; flex-direction: column; gap: 0.55em; align-items: flex-start; }
.footer-nav a, .footer-contact a, .footer-contact span {
  font-size: var(--type-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
}
.footer-nav a, .footer-contact a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-size: 0% 1px; background-position: left bottom;
  padding-bottom: 3px; transition: background-size 0.35s ease;
}
.footer-nav a:hover, .footer-contact a:hover,
.footer-nav a:focus-visible, .footer-contact a:focus-visible { background-size: 100% 1px; }
.footer-contact { display: flex; flex-direction: column; gap: 0.55em; align-items: flex-start; color: var(--fg-soft); }
.footer-line {
  max-width: var(--maxw); margin: clamp(48px, 8vh, 90px) auto 0;
  padding-top: 1.2em; border-top: 1px solid var(--hairline);
  font-size: var(--type-label); letter-spacing: 0.08em; color: var(--fg-soft);
}

/* ---------- 8. Wipe transition + loader ---------- */
.wipe {
  position: fixed; inset: 0; z-index: 1100;
  background: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transform: translateY(100%);
  pointer-events: none;
}
.wipe .wipe-mark {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144;
  font-weight: 380; font-size: 1.6rem; color: var(--paper);
}
.wipe .dot { color: var(--carrot); }
/* With JS: page loads covered, then main.js wipes it away. Safety bail if animation never runs. */
.js .wipe { transform: none; animation: wipe-bail 0.4s ease 2.8s forwards; }
.js.show-loader .wipe { transform: translateY(100%); animation: none; }
@keyframes wipe-bail { to { visibility: hidden; opacity: 0; } }

.loader {
  position: fixed; inset: 0; z-index: 1200;
  background: var(--paper); color: var(--ink);
  display: none; align-items: center; justify-content: center;
}
.js.show-loader .loader { display: flex; }
.loader .t-h2 { font-weight: 380; }
.loader .dot { color: var(--carrot); }

/* ---------- 9. Masked lines + reveals (initial states gated on .js) ----------
   .line gets bottom padding (pulled back with a negative margin) so Fraunces
   descenders (g, p, y) are not clipped by the overflow mask; the hidden
   position is 120% so the inner clears the padding zone too. */
.line { display: block; overflow: hidden; padding-bottom: 0.15em; margin-bottom: -0.15em; }
.line-inner { display: block; will-change: transform; }
.js [data-masked] .line-inner { transform: translateY(120%); }
.js [data-reveal] { opacity: 0; }

/* Safety valve: if the motion engine never takes over (main.js adds .gsap-live
   or .rm when it does), force all hidden content visible after ~3s. */
.js:not(.gsap-live):not(.rm) [data-reveal] { animation: content-bail 0.5s ease 3.2s forwards; }
.js:not(.gsap-live):not(.rm) [data-masked] .line-inner { animation: content-bail-lines 0.5s ease 3.2s forwards; }
@keyframes content-bail { to { opacity: 1; filter: none; } }
@keyframes content-bail-lines { to { transform: none; } }

/* ---------- 10. Ghost titles ---------- */
.has-ghosts { overflow: hidden; }
.ghost-wrap {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.ghost {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144;
  font-weight: 360; font-size: 22vw; line-height: 1;
  white-space: nowrap; user-select: none;
  color: var(--fg);
}
.ghost--far  { opacity: 0.05; }
.ghost--near { opacity: 0.09; }
.ghost--accent { color: var(--accent, var(--fg)); }

/* Pillar accent mapping (echoes the moodboard coaster colorways) */
html.page-brand  { --accent: var(--carrot); }
html.page-demand { --accent: var(--steel); }
html.page-design { --accent: var(--pistachio); }

/* ---------- 11. Custom cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 1300;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--carrot);
  pointer-events: none;
  display: none;
  align-items: center; justify-content: center;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
  border: 1px solid transparent;
}
.cursor .cursor-label {
  font-family: "Archivo", sans-serif; font-size: 0.62rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--carrot); opacity: 0; transition: opacity 0.25s ease;
  white-space: nowrap;
}
.cursor.is-grown {
  width: 72px; height: 72px;
  background: transparent;
  border-color: var(--carrot);
}
.cursor.is-grown .cursor-label { opacity: 1; }
@media (pointer: fine) { .js .cursor { display: flex; } }

/* ---------- 12. Marquee ---------- */
.marquee { overflow: hidden; white-space: nowrap; padding-block: 0.15em; }
.marquee-track {
  display: inline-flex;
  animation: marquee 28s linear infinite;
  will-change: transform;
}
.marquee-chunk {
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144;
  font-style: italic; font-weight: 360;
  font-size: clamp(2rem, 5vw, 4.6rem); line-height: 1.3;
  color: color-mix(in srgb, var(--paper) 65%, transparent);
  padding-right: 0.5em;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 13. Hero (home) ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--margin) clamp(48px, 9vh, 110px);
  color: var(--paper);
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg .glow { border-radius: 0; }
.hero-content { position: relative; z-index: 1; max-width: var(--maxw); width: 100%; margin-inline: auto; }
.hero-label { color: color-mix(in srgb, var(--paper) 70%, transparent); margin-bottom: clamp(20px, 4vh, 44px); }
.hero-sub { color: color-mix(in srgb, var(--paper) 80%, transparent); margin-top: clamp(20px, 4vh, 40px); }
.hero-foot {
  position: relative; z-index: 1;
  max-width: var(--maxw); width: 100%; margin: clamp(36px, 7vh, 80px) auto 0;
  display: flex; justify-content: space-between; align-items: flex-end;
}
.scroll-cue { width: 1px; height: 48px; background: color-mix(in srgb, var(--paper) 70%, transparent); overflow: hidden; position: relative; }
.scroll-cue::after {
  content: ""; position: absolute; inset: 0;
  background: var(--paper);
  animation: cue 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
  transform-origin: top;
}
@keyframes cue {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.hero-definition { color: color-mix(in srgb, var(--paper) 50%, transparent); }

/* ---------- 14. Home: the word / positioning ---------- */
.statement-pair { align-items: end; }
.statement-pair .g-statement { grid-column: 1 / 8; }
.statement-pair .g-side { grid-column: 9 / 13; display: flex; flex-direction: column; gap: 1.6em; align-items: flex-start; }

/* ---------- 15. Home: floating collage ---------- */
.collage { position: relative; height: 220vh; }
.collage-frame { position: absolute; }
.collage-frame .placeholder { width: 100%; }
.collage-frame .glow-frame { width: 100%; }
.f-34 .glow-frame { aspect-ratio: 3 / 4; }
.f-43 .glow-frame { aspect-ratio: 4 / 3; }
.collage-note {
  /* Bottom-left pocket — outside every frame's parallax sweep */
  position: absolute; left: 4%; top: 78%; z-index: 2;
  font-family: "Fraunces", Georgia, serif;
  font-variation-settings: "opsz" 144;
  font-style: italic; font-weight: 380;
  font-size: var(--type-h3); line-height: 1.45;
  max-width: 12em;
  color: var(--fg);
  /* Soft paper halo keeps the line legible if a drifting frame passes near it */
  background: var(--bg);
  box-shadow: 0 0 48px 36px var(--bg);
  border-radius: 2px;
  transition: background-color 0.7s ease, box-shadow 0.7s ease;
}
.c1 { left: 0;    top: 2%;   width: 30vw; }
.c2 { left: 44%;  top: 12%;  width: 24vw; }
.c3 { right: 0;   top: 30%;  width: 34vw; }
.c4 { left: 8%;   top: 52%;  width: 26vw; }
.c5 { right: 14%; top: 74%;  width: 18vw; }

/* ---------- 16. Pinned scroll-tabs ---------- */
.tabs-section { transition: background-color 0.6s ease; }
.tabs-stage { position: relative; }
.tabs-progress {
  position: absolute; left: calc(-1 * clamp(12px, 2vw, 32px)); top: 0; bottom: 0; width: 1px;
  background: var(--hairline);
  display: none;
}
.tabs-progress span {
  display: block; width: 100%; height: 100%;
  background: var(--fg);
  transform: scaleY(0); transform-origin: top;
}
.tabs-nav { display: none; gap: clamp(20px, 3vw, 48px); margin-bottom: clamp(30px, 5vh, 60px); }
.tabs-nav button {
  display: inline-flex; gap: 0.7em; align-items: baseline;
  font-size: var(--type-label); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--fg-soft);
  transition: color 0.35s ease;
}
.tabs-nav button:hover { color: var(--fg); }
.tabs-nav button.is-active { color: var(--fg); }
.tabs-nav .num { font-size: 0.85em; }

.tab { position: relative; }
.tab-num { color: var(--fg-soft); margin-bottom: 1.2em; }
.tab-title { font-size: clamp(2.6rem, 5.5vw, 5.4rem); font-weight: 360; }
.tab-body { max-width: 34em; }
.tab-body::before {
  content: ""; display: block; width: 64px; height: 1px;
  background: var(--tab-accent, var(--hairline-strong)); margin-bottom: 1.6em;
  transition: background-color 0.4s ease;
}
.tab-desc { margin-bottom: 1.6em; }
.tab-tasks { margin-bottom: 2em; }
.tab-tasks li {
  padding: 0.55em 0;
  border-top: 1px solid var(--hairline);
  color: var(--fg-soft);
  font-size: 0.95em;
}
.tab-for { margin-bottom: 1.6em; color: var(--fg-soft); }
.tab-card { position: relative; }
.tab-card .glow-frame { aspect-ratio: 3 / 4; max-height: 52vh; }

/* Stacked (mobile / reduced-motion / no-JS) layout */
.tab { padding: clamp(40px, 8vh, 80px) 0; border-top: 1px solid var(--hairline); }
.tab:first-child { border-top: 0; padding-top: 0; }
.tab .tab-card { margin-top: 2em; max-width: 420px; }

/* Pinned desktop layout — only with JS and full motion */
@media (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  .js .tabs-section[data-tabs] { height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-block: clamp(60px, 9vh, 120px); }
  .js .tabs-section[data-tabs] > .container { width: 100%; }
  .js .tabs-section[data-tabs] .section-head { margin-bottom: clamp(28px, 5vh, 60px); }
  .js .tabs-section[data-tabs] .tabs-nav { display: flex; }
  .js .tabs-section[data-tabs] .tabs-progress { display: block; }
  .js .tabs-section[data-tabs] .tabs-list { position: relative; min-height: min(58vh, 620px); }
  .js .tabs-section[data-tabs] .tab {
    position: absolute; inset: 0;
    display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(16px, 2vw, 32px);
    align-content: start;
    border-top: 0; padding: 0;
    visibility: hidden; opacity: 0;
  }
  .js .tabs-section[data-tabs] .tab-head { grid-column: 1 / 6; grid-row: 1; }
  .js .tabs-section[data-tabs] .tab-body { grid-column: 6 / 10; grid-row: 1; }
  .js .tabs-section[data-tabs] .tab-card { grid-column: 10 / 13; grid-row: 1; margin-top: 0; max-width: none; }
}

/* ---------- 17. Horizontal strip (engagement models) ---------- */
.strip { position: relative; }
.strip-viewport {
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.strip-viewport::-webkit-scrollbar { display: none; }
.strip-track { display: flex; gap: clamp(16px, 2vw, 32px); width: max-content; }
.model-card {
  scroll-snap-align: start;
  width: min(78vw, 560px);
  min-height: min(58vh, 520px);
  background: var(--paper-deep);
  border-radius: 2px;
  padding: clamp(28px, 3.5vw, 56px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2.5em;
  color: var(--ink);
}
.model-card .label { color: var(--ink-soft); }
.model-card h3 { font-size: clamp(2rem, 3.4vw, 3.4rem); font-weight: 380; margin: 0.4em 0 0.5em; }
.model-card p { color: var(--ink-soft); max-width: 26em; }
.model-card--accent { background: color-mix(in srgb, var(--carrot) 10%, var(--paper-deep)); }

@media (min-width: 821px) and (prefers-reduced-motion: no-preference) {
  .js .strip[data-strip] { height: 100vh; display: flex; flex-direction: column; justify-content: center; }
  .js .strip-viewport { overflow: visible; scroll-snap-type: none; }
  .js .strip-track { will-change: transform; }
  .js .model-card { width: 44vw; min-height: 60vh; }
}

/* ---------- 18. Dusk band moments ---------- */
.band-dot { color: var(--carrot); }
.purpose-glow {
  position: absolute; left: 10%; right: 10%; bottom: -30%; height: 60%;
  background: radial-gradient(ellipse 50% 50% at 50% 50%,
    color-mix(in srgb, var(--gold) 30%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- 19. Pillar pages ---------- */
.pillar-hero {
  position: relative; min-height: 88svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(140px, 20vh, 240px) var(--margin) clamp(80px, 12vh, 140px);
  overflow: hidden;
}
.pillar-hero .container { position: relative; z-index: 1; width: 100%; }
.pillar-def { margin-top: clamp(24px, 4vh, 48px); font-size: clamp(1.2rem, 1.6vw, 1.55rem); }

.tasks-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(32px, 4vw, 72px); }
.tasks-list li {
  display: flex; gap: 1.4em; align-items: baseline;
  border-top: 1px solid var(--hairline-strong);
  padding: 1.1em 0 1.3em;
  font-size: var(--type-h3); font-weight: 400; line-height: 1.35;
  transition: border-color 0.35s ease;
}
.tasks-list li > span:last-child { transition: transform 0.35s ease; }
.tasks-list li:hover { border-top-color: var(--task-accent, var(--carrot)); }
.tasks-list li:hover > span:last-child { transform: translateX(8px); }
.tasks-list .num { font-size: var(--type-label); font-weight: 500; letter-spacing: 0.16em; color: var(--fg-soft); flex: 0 0 2.2em; }

.interlude { position: relative; padding: 0; }
.interlude .glow-frame { aspect-ratio: 21 / 9; min-height: 50vh; border-radius: 0; }
.interlude .glow-caption { padding: 1em var(--margin) 0; }

.next-band { display: block; padding: clamp(70px, 14vh, 160px) var(--margin); border-top: 1px solid var(--hairline); transition: background-color 0.5s ease; }
.next-band:hover { background: color-mix(in srgb, var(--next-accent, var(--carrot)) 8%, transparent); }
.next-band .label { color: var(--fg-soft); display: block; margin-bottom: 0.9em; }
.next-band .t-h1 { display: inline-flex; align-items: center; gap: 0.3em; }
.next-band .arrow { transition: transform 0.4s ease; font-size: 0.8em; }
.next-band:hover .arrow { transform: translateX(12px); }

/* ---------- 20. How we work: journey ---------- */
.journey-wrap { position: relative; margin-top: clamp(48px, 8vh, 100px); }
.journey-svg { display: block; width: 100%; height: auto; }
.journey-svg path { stroke: var(--fg); stroke-width: 1.5; fill: none; opacity: 0.65; }
.journey-svg circle { fill: var(--carrot); }
.journey-stage { position: absolute; max-width: 240px; }
.journey-stage h3 { font-size: var(--type-h3); font-weight: 400; margin-bottom: 0.3em; }
.journey-stage .label { color: var(--fg-soft); }
.journey-start { display: block; color: var(--carrot); margin-top: 0.5em; }
.j1 { left: 4%;  top: 1%; }
.j2 { left: 60%; top: 15%; }
.j3 { left: 10%; top: 38%; }
.j4 { left: 64%; top: 58%; }
.j5 { left: 22%; top: 84%; }
.journey-note { margin-top: clamp(40px, 7vh, 80px); }

/* Stacked journey fallback (mobile / reduced / no-JS handled by media below) */
.journey-list { display: none; }
.journey-list li { position: relative; padding: 0 0 2.2em 2em; border-left: 1px solid var(--hairline-strong); }
.journey-list li::before {
  content: ""; position: absolute; left: -5px; top: 0.45em;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--carrot);
}
.journey-list li:last-child { border-left-color: transparent; }

/* ---------- 21. Contact ---------- */
.contact-grid { align-items: start; }
.contact-left { grid-column: 1 / 7; }
.contact-form { display: flex; flex-direction: column; gap: 2.4em; }
.contact-aside { grid-column: 8 / 12; display: flex; flex-direction: column; gap: 1.4em; color: var(--fg-soft); }
.contact-aside a { color: var(--carrot); }

.field { display: flex; flex-direction: column; gap: 0.7em; }
.field label { font-size: var(--type-label); font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; color: var(--fg-soft); }
.field input, .field textarea, .field select {
  font-family: "Archivo", sans-serif; font-size: var(--type-body);
  color: var(--fg);
  background: transparent; border: 0;
  border-bottom: 1px solid var(--hairline-strong);
  border-radius: 0;
  padding: 0.5em 0;
  transition: border-color 0.3s ease;
}
.field textarea { min-height: 7em; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-bottom-color: var(--carrot);
}
.field select { appearance: none; cursor: pointer; }
.field-select { position: relative; }
.field-select::after {
  content: "↓"; position: absolute; right: 0; bottom: 0.6em;
  font-size: 0.9em; color: var(--fg-soft); pointer-events: none;
}
.form-confirm { display: none; }
.form-confirm.is-shown { display: block; }

/* ---------- 22. Utility / performance ---------- */
.cv-auto { content-visibility: auto; contain-intrinsic-size: auto 900px; }
[aria-hidden="true"] { user-select: none; }
.center { text-align: center; }

/* ---------- 23. Responsive ---------- */
@media (max-width: 1024px) {
  .statement-pair .g-statement { grid-column: 1 / 13; }
  .statement-pair .g-side { grid-column: 1 / 10; margin-top: 2em; }
}

.mt-s { margin-top: 1.2em; }
.mt-m { margin-top: 2em; }
.mt-l { margin-top: 3em; }

@media (max-width: 820px) {
  .site-nav { display: none; }
  .nav-toggle {
    display: inline-block;
    font-size: var(--type-label); font-weight: 500;
    text-transform: uppercase; letter-spacing: 0.16em;
  }

  .footer-grid { grid-template-columns: 1fr; }

  .collage { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 5vw, 40px); align-items: start; }
  .collage-frame { position: static; width: 100% !important; }
  .collage-frame:nth-child(even) { margin-top: 14%; }
  .collage-note {
    position: static; grid-column: 1 / -1;
    padding: 1.8em 0; max-width: 16em;
    background: none; box-shadow: none;
  }

  .tasks-list { grid-template-columns: 1fr; }
  .tasks-list li { font-size: 1.1rem; }

  .contact-left { grid-column: 1 / 13; }
  .contact-aside { grid-column: 1 / 13; margin-top: 3em; }

  .journey-wrap, .journey-note-desktop { display: none; }
  .journey-list { display: block; margin-top: clamp(40px, 7vh, 70px); }

  .interlude .glow-frame { aspect-ratio: 4 / 3; min-height: 0; }

  .hero { padding-bottom: 15vh; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 2em; }
}

/* Journey: show drawn SVG only with JS + full motion on desktop */
@media (min-width: 821px) {
  html:not(.js) .journey-wrap { display: none; }
  html:not(.js) .journey-list { display: block; }
}

/* ---------- 24. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .js [data-masked] .line-inner { transform: none; }
  .js [data-reveal] { opacity: 1; }

  /* Simple 0.4s fades driven by IntersectionObserver in main.js */
  .js.rm [data-reveal], .js.rm [data-masked], .js.rm figure.placeholder { opacity: 0; transition: opacity 0.4s ease; }
  .js.rm [data-reveal].rm-in, .js.rm [data-masked].rm-in, .js.rm figure.placeholder.rm-in { opacity: 1; }

  .marquee-track { animation: none; }
  .scroll-cue::after { animation: none; transform: none; }
  .js .wipe { transform: translateY(100%); animation: none; }
  .js.show-loader .loader { display: none; }
  .cursor { display: none !important; }
  .pill::before { transition: none; }
  .journey-wrap { display: none; }
  .journey-list { display: block; margin-top: clamp(40px, 7vh, 70px); }
  .journey-note-desktop { display: none; }

  /* Dusk sections hard-switch instead of melting */
  html.page-home { --bg: var(--paper); --fg: var(--ink); }
  [data-theme="dusk"] { background: var(--ink); color: var(--paper); --fg: var(--paper); --bg: var(--ink); }
}

/* No-JS fallback: same hard-switch so dusk copy stays legible */
html:not(.js) [data-theme="dusk"] { background: var(--ink); color: var(--paper); --fg: var(--paper); --bg: var(--ink); }
html:not(.js).page-home { --bg: var(--paper); --fg: var(--ink); }
