/* ==========================================================================
   Flambient Labs — "Darkroom Editorial"
   ==========================================================================
   0.  Reset & base
   1.  Typography
   2.  Layout primitives
   3.  Editorial furniture (eyebrow, rule, numerals, crop marks)
   4.  Buttons & links
   5.  Navigation
   6.  Footer
   7.  Media: frames, parallax, comparison slider
   8.  Histogram / levels motif
   9.  Cards, lists, stats, callouts, badges
   10. Page sections
   11. Forms
   12. Commerce & member surfaces
   13. Motion
   14. Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  font-weight: 350;
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-variant-numeric: proportional-nums;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

/* <picture> is only ever an AVIF/WebP wrapper here. Taking it out of layout
   keeps the absolutely-positioned images inside sliders and the hero behaving
   exactly as they did before the wrapper existed. */
picture { display: contents; }

input,
button,
textarea,
select { font: inherit; color: inherit; }

button { background: none; border: 0; padding: 0; cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

/* Author `display` rules (.stack, .btn, .card…) otherwise beat the UA
   [hidden] rule, leaving hidden states visible. */
[hidden] { display: none !important; }

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

::selection {
  background: var(--terracotta-500);
  color: #1A0E08;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 999;
  background: var(--paper-100);
  color: var(--ink-800);
  padding: 0.75rem 1.25rem;
  font-size: var(--t-sm);
  font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   1. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;                       /* Petrona Light — as specified */
  color: var(--text);
  letter-spacing: -0.022em;
  line-height: var(--lh-snug);
  text-wrap: balance;
}

.t-hero {
  font-size: var(--t-hero);
  line-height: var(--lh-tight);
  letter-spacing: -0.038em;
}
.t-display { font-size: var(--t-display); line-height: 1.06; letter-spacing: -0.032em; }
.t-title   { font-size: var(--t-title);   line-height: 1.08; letter-spacing: -0.028em; }
.t-section { font-size: var(--t-section); line-height: 1.12; }
h3, .t-h3  { font-size: var(--t-h3); letter-spacing: -0.016em; line-height: 1.24; }
h4, .t-h4  { font-size: var(--t-h4); letter-spacing: 0.01em; }

/* The italic accent — Petrona italic is the signature editorial move */
em, .accent-italic {
  font-style: italic;
  color: var(--gold-300);
}
.band--paper em,
.band--paper .accent-italic { color: var(--terracotta-700); }

p { text-wrap: pretty; }

.lead {
  font-size: var(--t-lead);
  line-height: 1.55;
  font-weight: 300;
  color: var(--text-body);
  max-width: 62ch;
}

.body-sm { font-size: var(--t-sm); }
.body-xs { font-size: var(--t-xs); }

.muted { color: var(--text-body); }
.meta  { color: var(--text-meta); }

.measure    { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

a { color: inherit; }

.link {
  color: var(--accent-text);
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 1px;
  transition: color var(--dur) var(--ease-out), background-size var(--dur) var(--ease-out);
}
.link:hover { color: var(--gold-500); }

.band--paper .link { color: var(--on-paper-link); }
.band--paper .link:hover { color: var(--terracotta-500); }

/* --------------------------------------------------------------------------
   2. Layout primitives
   -------------------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--max-xl);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--lg { max-width: var(--max-lg); }
.shell--md { max-width: var(--max-md); }
.shell--sm { max-width: var(--max-sm); }

.band {
  position: relative;
  padding-block: var(--band-y);
}
.band--sm { padding-block: var(--band-y-sm); }
.band--flush-top { padding-top: 0; }

/* Light band — flips every semantic token */
.band--paper {
  background: var(--paper-100);
  --text: var(--on-paper-text);
  --text-body: var(--on-paper-body);
  --text-meta: var(--on-paper-meta);
  --accent-text: var(--on-paper-link);
  --hairline: var(--on-paper-rule);
  --hairline-warm: rgba(172, 85, 58, 0.28);
  --surface: rgba(32, 30, 29, 0.035);
  --surface-hi: rgba(32, 30, 29, 0.06);
  --danger: #B23A2E;   /* the dark-band red only reaches 2.9:1 on paper */
  color: var(--on-paper-body);
}
.band--paper h1, .band--paper h2,
.band--paper h3, .band--paper h4 { color: var(--on-paper-text); }

.band--deep  { background: var(--bg-deep); }
.band--slate { background: var(--slate-900); }

.stack       { display: flex; flex-direction: column; }
.stack-3     { gap: var(--sp-3); }
.stack-4     { gap: var(--sp-4); }
.stack-5     { gap: var(--sp-5); }
.stack-6     { gap: var(--sp-6); }
.stack-7     { gap: var(--sp-7); }

.row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}
.row--wrap  { flex-wrap: wrap; }
.row--start { align-items: flex-start; }
.row--top   { align-items: flex-start; }
.row--between { justify-content: space-between; }
.row--center  { justify-content: center; }

.grid { display: grid; gap: var(--sp-6); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-editorial { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); }
.grid-editorial--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.center { text-align: center; }
.center-x { margin-inline: auto; }

.mt-2 { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.mt-6 { margin-top: var(--sp-6); }
.mt-7 { margin-top: var(--sp-7); }
.mt-8 { margin-top: var(--sp-8); }

/* --------------------------------------------------------------------------
   3. Editorial furniture
   -------------------------------------------------------------------------- */

/* Eyebrow — a tracked micro-label preceded by a hairline tick */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-sans);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--text-meta);
}
.eyebrow::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: var(--terracotta-500);
  flex: none;
}
.eyebrow--slate::before { background: var(--slate-400); }
.eyebrow--gold::before  { background: var(--gold-500); }
.eyebrow--center { justify-content: center; }

/* Hairline rules */
.rule {
  height: 1px;
  border: 0;
  background: var(--hairline);
  width: 100%;
}
.rule--warm { background: var(--hairline-warm); }

/* Section index numeral — oversized, ghosted Petrona */
.idx {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--hairline-warm);
  display: block;
}

/* Small counter label: 01 / 06 */
.tick {
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--text-meta);
  font-variant-numeric: tabular-nums;
}

/* Section head */
.head { max-width: 74ch; }
.head--center { margin-inline: auto; text-align: center; }
.head--center .eyebrow { justify-content: center; }
.head--center .lead { margin-inline: auto; }
.head h2 { margin-top: var(--sp-5); }
.head .lead { margin-top: var(--sp-5); }

/* --------------------------------------------------------------------------
   4. Buttons & links
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--hairline);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 48px;
  padding: 0.9rem 1.6rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  transition:
    background-color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
  will-change: transform;
}
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn svg { flex: none; }

/* Primary — terracotta that warms to gold on hover, like a rising exposure */
.btn--primary {
  --btn-bg: var(--terracotta-500);
  --btn-fg: #1A0E08;              /* 4.98:1 on terracotta */
  --btn-bd: var(--terracotta-500);
  font-weight: 600;
}
.btn--primary:hover:not(:disabled) {
  --btn-bg: var(--gold-500);
  --btn-bd: var(--gold-500);
}

/* Ghost — hairline on any background */
.btn--ghost { --btn-bd: color-mix(in srgb, currentColor 30%, transparent); }
.btn--ghost:hover:not(:disabled) {
  --btn-bd: currentColor;
  background: var(--surface-hi);
}

/* Solid paper — max contrast on dark */
.btn--paper {
  --btn-bg: var(--paper-100);
  --btn-fg: var(--ink-800);
  --btn-bd: var(--paper-100);
  font-weight: 600;
}
.btn--paper:hover:not(:disabled) { --btn-bg: var(--gold-200); --btn-bd: var(--gold-200); }

.btn--lg { min-height: 56px; padding: 1.05rem 2rem; font-size: var(--t-body); }
.btn--sm { min-height: 44px; padding: 0.6rem 1.15rem; font-size: var(--t-xs); }
.btn--block { width: 100%; }

/* Arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  color: var(--accent-text);
  text-decoration: none;
  min-height: 44px;
  padding-block: 0.75rem;
  transition: color var(--dur) var(--ease-out), gap var(--dur) var(--ease-out);
}
.arrow-link svg { transition: transform var(--dur) var(--ease-out); }
.arrow-link:hover { color: var(--gold-500); gap: 0.95rem; }
.arrow-link:hover svg { transform: translateX(3px); }
.band--paper .arrow-link:hover { color: var(--terracotta-500); }

/* --------------------------------------------------------------------------
   5. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  padding-block: 1.1rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color 500ms var(--ease-out),
    border-color 500ms var(--ease-out),
    padding 400ms var(--ease-out),
    backdrop-filter 500ms var(--ease-out);
}
/* Before it sticks, the nav floats over full-bleed photography. This scrim
   keeps the links legible over a bright ceiling without reading as a bar. */
.nav::before {
  content: '';
  position: absolute;
  inset: -1px 0 auto 0;
  height: 190%;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(12, 11, 10, 0.72) 0%, rgba(12, 11, 10, 0.34) 45%, rgba(12, 11, 10, 0) 100%);
  transition: opacity 400ms var(--ease-out);
}
.nav.is-stuck::before { opacity: 0; }
.nav.is-stuck {
  background: rgba(20, 18, 17, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  backdrop-filter: saturate(140%) blur(16px);
  border-bottom-color: var(--hairline);
  padding-block: 0.7rem;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

/* Lockup: the brand mark + wordmark artwork from the official SVG */
.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--paper-100);
}
/* The official lockup artwork. Its wordmark and rule are drawn in
   currentColor, so the black-on-paper original inverts to paper-on-ink here
   while terracotta "LABS" and the mark keep their brand colors. */
.lockup__art {
  height: 48px;
  width: auto;
  flex: none;
  overflow: visible;
  color: var(--paper-100);
}
.lockup__art .lm-bar {
  transform-box: fill-box;
  transform-origin: bottom center;
}

/* Footer carries the full lockup, strapline and all */
.lockup--footer .lockup__art { height: 58px; }

@media (max-width: 620px) {
  .lockup__art { height: 36px; }
  .lockup--footer .lockup__art { height: 46px; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.4vw, 2.5rem);
}
.nav__link {
  position: relative;
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-meta);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  transition: color var(--dur) var(--ease-out);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--terracotta-500);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-slow) var(--ease-out);
}
.nav__link:hover { color: var(--paper-100); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--paper-100); }
.nav__link.is-active::after { transform: scaleX(1); }

.nav__actions { display: flex; align-items: center; gap: var(--sp-4); }

.cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  color: var(--text-meta);
  border: 1px solid transparent;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.cart-link:hover { color: var(--paper-100); border-color: var(--hairline); }
.cart-count {
  position: absolute;
  top: 4px; right: 2px;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--terracotta-500);
  color: #1A0E08;
  border-radius: var(--radius-pill);
  font-size: 0.625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cart-count.is-visible { display: inline-flex; }

/* Mobile menu */
.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--paper-100);
}
.nav__toggle span {
  display: block;
  position: relative;
  width: 20px; height: 1px;
  background: currentColor;
  transition: background-color var(--dur) var(--ease-out);
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 20px; height: 1px;
  background: currentColor;
  transition: transform var(--dur) var(--ease-out);
}
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after  { top: 6px; }
.nav__toggle[aria-expanded='true'] span { background: transparent; }
.nav__toggle[aria-expanded='true'] span::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded='true'] span::after  { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--ink-900);
  padding: 6rem var(--gutter) 3rem;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 560ms var(--ease-out), visibility 560ms;
}
.mobile-menu.is-open { transform: translateY(0); visibility: visible; }
.mobile-menu a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 8vw, 3rem);
  letter-spacing: -0.03em;
  color: var(--paper-100);
  text-decoration: none;
  padding-block: 0.4rem;
  border-bottom: 1px solid var(--hairline);
}
.mobile-menu a:hover { color: var(--gold-500); }

/* --------------------------------------------------------------------------
   6. Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--void);
  padding-block: var(--sp-9) var(--sp-6);
  border-top: 1px solid var(--hairline);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: var(--sp-7);
}
.footer__col h4 {
  font-family: var(--font-sans);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--text-meta);
  margin-bottom: var(--sp-4);
}
.footer__col a:not(.lockup) {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--t-sm);
  color: var(--text-body);
  text-decoration: none;
  transition: color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.footer__col a:not(.lockup):hover { color: var(--gold-500); transform: translateX(3px); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--hairline);
  font-size: var(--t-xs);
  color: var(--text-meta);
}
/* Legal links still need a proper tap target despite the small type. */
.footer__bottom a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.15rem;
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease-out);
}
.footer__bottom a:hover { color: var(--gold-500); }

/* --------------------------------------------------------------------------
   7. Media: frames, parallax, comparison slider
   -------------------------------------------------------------------------- */

/* Crop-mark frame — the photographer's tick marks */
.frame {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  border-radius: var(--radius);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }

.crop {
  position: relative;
  padding: 14px;
}
.crop::before,
.crop::after {
  content: '';
  position: absolute;
  width: 26px; height: 26px;
  border: 1px solid var(--hairline-warm);
  pointer-events: none;
}
.crop::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.crop::after  { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.crop > .crop__b1,
.crop > .crop__b2 {
  position: absolute;
  width: 26px; height: 26px;
  border: 1px solid var(--hairline-warm);
  pointer-events: none;
}
.crop > .crop__b1 { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.crop > .crop__b2 { bottom: 0; left: 0; border-right: 0; border-top: 0; }

/* Parallax: image is oversized inside the frame and translated on scroll */
.parallax { position: relative; overflow: hidden; }
.parallax > img,
.parallax > .parallax__layer {
  width: 100%;
  height: 118%;
  object-fit: cover;
  will-change: transform;
  transform: translate3d(0, var(--py, 0px), 0);
}

/* --- Full-bleed portfolio band ------------------------------------------- */
.plate-band {
  position: relative;
  height: clamp(380px, 72vh, 780px);
  overflow: hidden;
  background: var(--ink-900);
  isolation: isolate;
}
/* The image is oversized and centred so the parallax shift has headroom at
   both ends — top-anchoring lets a positive offset expose the band behind. */
.plate-band img {
  position: absolute;
  left: 0;
  right: 0;
  top: -15%;
  width: 100%;
  height: 130%;
  object-fit: cover;
  object-position: center bottom;   /* keep the floor, drop the ceiling */
  will-change: transform;
  transform: translate3d(0, var(--py, 0px), 0);
}
/* Top-only scrim. Nothing darkens the bottom of the photograph. */
.plate-band::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(18, 16, 15, 0.42) 0%, rgba(18, 16, 15, 0) 24%);
}
.plate-band__meta {
  position: absolute;
  z-index: 2;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(1.5rem, 4vw, 3rem);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-5);
  color: var(--paper-100);
}
/* Without a scrim the caption carries its own chip — same pill language as the
   comparison-slider tags, so it reads on any part of any photograph. */
.plate-band__label {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.95rem;
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--paper-100);
  background: rgba(12, 11, 10, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 241, 238, 0.2);
  border-radius: var(--radius-pill);
}
.plate-band__label::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: var(--terracotta-500);
  flex: none;
}
.plate-band__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.25rem;
  padding: 0.35rem 0.75rem 0.5rem;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper-100);
  background: rgba(12, 11, 10, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 241, 238, 0.2);
  border-radius: var(--radius-pill);
  font-variant-numeric: tabular-nums;
}

/* Hairline crop ticks in the top corners — the photographer's register marks */
.plate-band__ticks {
  position: absolute;
  z-index: 2;
  inset: clamp(1.25rem, 3vw, 2.5rem);
  pointer-events: none;
}
.plate-band__ticks::before,
.plate-band__ticks::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(242, 241, 238, 0.42);
}
.plate-band__ticks::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.plate-band__ticks::after  { top: 0; right: 0; border-left: 0; border-bottom: 0; }

/* --- Portfolio mosaic ----------------------------------------------------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.5rem, 1vw, 1rem);
}
.mosaic__cell {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
  border-radius: var(--radius);
  grid-column: span 2;
  aspect-ratio: 16 / 9;
}
.mosaic__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;   /* any further crop comes off the top */
  transition: transform 1200ms var(--ease-out), filter 700ms var(--ease-out);
}
.mosaic__cell:hover img { transform: scale(1.045); }

/* A deliberately uneven rhythm — full-width, then thirds, then a 2/4 split.
   Ratios sit close to the post-crop source aspect so CSS barely re-crops on top
   of the ceiling already trimmed out of the files. */
.mosaic__cell--wide  { grid-column: span 6; aspect-ratio: 2 / 1; }
.mosaic__cell--half  { grid-column: span 3; aspect-ratio: 16 / 9; }
.mosaic__cell--third { grid-column: span 2; aspect-ratio: 4 / 5; }
.mosaic__cell--four  { grid-column: span 4; aspect-ratio: 16 / 9; }

/* A chip, not a gradient wash — the bottom of every photograph stays clean. */
.mosaic__cap {
  position: absolute;
  left: clamp(0.6rem, 1.4vw, 1rem);
  bottom: clamp(0.6rem, 1.4vw, 1rem);
  z-index: 2;
  padding: 0.45rem 0.85rem;
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--paper-100);
  background: rgba(12, 11, 10, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 241, 238, 0.2);
  border-radius: var(--radius-pill);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.mosaic__cell:hover .mosaic__cap,
.mosaic__cell:focus-within .mosaic__cap { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mosaic__cell,
  .mosaic__cell--wide,
  .mosaic__cell--half,
  .mosaic__cell--third,
  .mosaic__cell--four { grid-column: span 2; aspect-ratio: 3 / 2; }
  .mosaic__cap { opacity: 1; transform: none; }
}

.figcap {
  margin-top: var(--sp-4);
  font-size: var(--t-xs);
  color: var(--text-meta);
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.figcap::before {
  content: '';
  width: 1.25rem;
  height: 1px;
  background: var(--hairline-warm);
  flex: none;
  transform: translateY(-0.35em);
}

/* --- Comparison slider ---------------------------------------------------- */
.cmp {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--ink-900);
  border-radius: var(--radius);
  cursor: ew-resize;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  box-shadow: var(--shadow-img);
}
.cmp__pane {
  position: absolute;
  inset: 0;
}
.cmp__pane img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}
.cmp__pane--before {
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  will-change: clip-path;
}

.cmp__tag {
  position: absolute;
  top: 1rem;
  z-index: 3;
  padding: 0.4rem 0.75rem;
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--paper-100);
  background: rgba(12, 11, 10, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(242, 241, 238, 0.18);
  border-radius: var(--radius-pill);
  pointer-events: none;
}
.cmp__tag--l { left: 1rem; }
.cmp__tag--r { right: 1rem; border-color: rgba(214, 178, 94, 0.5); color: var(--gold-200); }

.cmp__divider {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 1px;
  background: rgba(242, 241, 238, 0.9);
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 22px rgba(0, 0, 0, 0.55);
}
.cmp__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(12, 11, 10, 0.55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(242, 241, 238, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--paper-100);
  cursor: ew-resize;
  pointer-events: auto;
  transition: transform var(--dur) var(--ease-spring), background-color var(--dur) var(--ease-out);
}
.cmp:hover .cmp__grip { transform: translate(-50%, -50%) scale(1.07); }
.cmp__grip:active { transform: translate(-50%, -50%) scale(0.96); }
.cmp__grip:focus-visible { outline-offset: 5px; }

.cmp__hint {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  z-index: 5;
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: rgba(242, 241, 238, 0.75);
  background: rgba(12, 11, 10, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  pointer-events: none;
  opacity: 0;
  transition: opacity 500ms var(--ease-out);
}
.cmp-wrap.is-idle .cmp__hint { opacity: 1; }

/* --- Full-bleed comparison ------------------------------------------------
   Edge to edge, no frame. Sits directly under the hero so the HDR/flambient
   difference is the first thing the page argues. */
/* Inset from both edges — 80% of the viewport, centred. */
.cmp-wrap--bleed {
  width: 80%;
  margin-inline: auto;
}
/* Matches the source frame exactly (2000x1333), so the whole photograph is
   shown — object-fit has nothing to crop. Height therefore follows the
   viewport width: on very wide displays this band gets tall by design. */
.cmp-wrap--bleed .cmp {
  aspect-ratio: 2000 / 1333;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}
.cmp-wrap--bleed .cmp__tag {
  top: auto;
  bottom: clamp(1.25rem, 3vw, 2.25rem);
}
.cmp-wrap--bleed .cmp__tag--l { left: clamp(1rem, 2.5vw, 2rem); }
.cmp-wrap--bleed .cmp__tag--r { right: clamp(1rem, 2.5vw, 2rem); }

@media (max-width: 860px) {
  /* Below tablet the inset costs more than it gives */
  .cmp-wrap--bleed { width: 100%; }
}
.cmp-wrap--bleed .cmp__hint { bottom: auto; top: clamp(1.25rem, 3vw, 2.25rem); }


.cmp__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--hairline);
}
.cmp__title h3 { font-size: var(--t-h4); font-family: var(--font-sans); font-weight: 500; letter-spacing: var(--track-wide); text-transform: uppercase; }

/* --------------------------------------------------------------------------
   8. Histogram / levels motif  (drawn from the brand mark)
   -------------------------------------------------------------------------- */
.histo {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
}
.histo__bar {
  flex: 1;
  height: var(--h, 50%);
  min-width: 2px;
  border-radius: 1px 1px 0 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 720ms var(--ease-out);
}
.histo.is-in .histo__bar { transform: scaleY(1); }
.histo__cap {
  margin-top: var(--sp-3);
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--text-meta);
  display: flex;
  justify-content: space-between;
}

/* --------------------------------------------------------------------------
   9. Cards, lists, stats, callouts, badges
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.6vw, 2.5rem);
  transition: border-color var(--dur-slow) var(--ease-out), background-color var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.card--hover:hover {
  border-color: var(--hairline-warm);
  background: var(--surface-hi);
  transform: translateY(-3px);
}
.card--feature {
  background: linear-gradient(160deg, rgba(197, 106, 75, 0.09), rgba(242, 241, 238, 0.02) 55%);
  border-color: var(--hairline-warm);
}
.band--paper .card--feature {
  background: linear-gradient(160deg, rgba(197, 106, 75, 0.1), rgba(32, 30, 29, 0.015) 55%);
}
.card--flush { padding: 0; background: none; border: 0; }
.card--stretch { display: flex; flex-direction: column; }
.card__foot { margin-top: auto; padding-top: var(--sp-5); }

/* Icon plate */
.plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  flex: none;
  border-radius: var(--radius);
  border: 1px solid var(--hairline-warm);
  color: var(--accent-text);
  background: var(--surface);
}
.plate--slate { color: var(--slate-300); border-color: rgba(140, 166, 188, 0.3); }
.band--paper .plate--slate { color: var(--slate-600); border-color: rgba(74, 109, 140, 0.3); }
.plate--lg { width: 60px; height: 60px; }

/* Numbered step marker */
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px; height: 54px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--hairline-warm);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.375rem;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--hairline-warm);
  border-radius: var(--radius-pill);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--accent-text);
  white-space: nowrap;
}
.badge--slate { color: var(--slate-300); border-color: rgba(140, 166, 188, 0.34); }
.band--paper .badge--slate { color: var(--slate-600); border-color: rgba(74, 109, 140, 0.34); }
.badge--neutral { color: var(--text-meta); border-color: var(--hairline); }
.badge--success { color: var(--success); border-color: rgba(127, 168, 120, 0.4); }

/* Check list */
.checks { display: flex; flex-direction: column; gap: var(--sp-3); }
.checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--text-body);
}
.checks li > svg {
  flex: none;
  margin-top: 0.2em;
  color: var(--terracotta-500);
}
.checks--slate li > svg { color: var(--slate-400); }

/* Stat */
.stat__value {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat__value .unit {
  display: inline-block;
  font-size: 0.22em;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  vertical-align: 0.9em;
  margin-left: 0.28em;
  color: var(--text-meta);
}
.stat__label {
  margin-top: var(--sp-3);
  font-size: var(--t-xs);
  color: var(--text-meta);
  letter-spacing: 0.04em;
  max-width: 22ch;
}
.stat--accent .stat__value { color: var(--gold-300); }
.band--paper .stat--accent .stat__value { color: var(--terracotta-700); }

/* Callout */
.callout {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  border: 1px solid var(--hairline);
  border-left: 2px solid var(--terracotta-500);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--t-sm);
}
.callout--info    { border-left-color: var(--slate-400); }
.callout--success { border-left-color: var(--success); }
.callout--warning { border-left-color: var(--gold-500); }
.callout__title {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--t-sm);
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

/* --------------------------------------------------------------------------
   10. Page sections
   -------------------------------------------------------------------------- */

/* --- Home hero: slatted portfolio wall ------------------------------------
   Six vertical slats, each showing the full height of its photograph. The
   image is far wider than its slat, so it can pan horizontally on scroll —
   every slat moves independently, alternating direction. */
.hero-slats {
  position: relative;
  height: 100svh;
  min-height: 540px;
  max-height: 1100px;
  overflow: hidden;
  background: var(--ink-900);
  isolation: isolate;
}
.hero-slats__row {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}
.hero-slats__col {
  position: relative;
  overflow: hidden;
  background: var(--ink-900);
}
.hero-slats__col img {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  max-width: none;          /* the overflow is the point */
  object-fit: cover;
  will-change: transform;
  transform: translate3d(calc(-50% + var(--px, 0px)), 0, 0);
}

/* Slats read as one wall, so the veil sits over the whole row rather than
   per-image — no seams, and the logo stays legible across all six. */
.hero-slats::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(14, 12, 11, 0.6) 0%, rgba(14, 12, 11, 0.14) 26%, rgba(14, 12, 11, 0.14) 74%, rgba(14, 12, 11, 0.5) 100%),
    radial-gradient(ellipse 66% 40% at 50% 46%, rgba(14, 12, 11, 0.78) 0%, rgba(14, 12, 11, 0.34) 55%, rgba(14, 12, 11, 0) 100%);
}

.hero-slats__brand {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  width: min(70vw, 800px);
  pointer-events: none;
}
.hero-slats__brand svg {
  width: 100%;
  height: auto;
  color: var(--paper-100);
  filter: drop-shadow(0 4px 34px rgba(10, 9, 8, 0.75));
}

@media (max-width: 1080px) {
  /* Six slats get too narrow to read — drop to four, then three */
  .hero-slats__row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hero-slats__col[data-slat="5"],
  .hero-slats__col[data-slat="6"] { display: none; }
}
@media (max-width: 700px) {
  .hero-slats__row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .hero-slats__col[data-slat="4"] { display: none; }
  .hero-slats__brand { width: min(86vw, 460px); }
  /* At this size the strapline is a few pixels tall — noise, not information */
  .hero-slats__brand .lockup__strap { display: none; }
}

/* The hero already carries the brand at full size. Holding the nav lockup back
   until the nav sticks avoids showing the logo twice, inches apart. */
.nav.has-hero-brand:not(.is-stuck) .lockup {
  opacity: 0;
  pointer-events: none;
}
.nav .lockup { transition: opacity 400ms var(--ease-out); }

/* --- Home hero: diagonal split ------------------------------------------- */
.hero-split {
  position: relative;
  height: min(92vh, 900px);
  min-height: 520px;
  overflow: hidden;
  background: var(--ink-900);
}
.hero-split__base,
.hero-split__top {
  position: absolute;
  left: 0;
  right: 0;
  top: -9%;
  width: 100%;
  height: 118%;
  object-fit: cover;
  will-change: transform;
  transform: translate3d(0, var(--py, 0px), 0);
}
/* The angled reveal: flambient occupies the left of the diagonal */
.hero-split__top {
  clip-path: polygon(0 0, 62% 0, 50% 100%, 0 100%);
}
.hero-split__line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.hero-split__line line {
  stroke: rgba(242, 241, 238, 0.92);
  stroke-width: 1.5;
}
/* Top-only scrim, for nav legibility. The bottom of the hero photograph runs
   clean into the section below — no fade. */
.hero-split::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(12, 11, 10, 0.5) 0%, rgba(12, 11, 10, 0) 32%);
  pointer-events: none;
}
.hero-split__tag {
  position: absolute;
  bottom: clamp(2rem, 6vh, 4.5rem);
  z-index: 3;
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--paper-100);
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(242, 241, 238, 0.28);
  border-radius: var(--radius-pill);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: rgba(12, 11, 10, 0.4);
}
.hero-split__tag--l { left: var(--gutter); border-color: rgba(214, 178, 94, 0.55); color: var(--gold-200); }
.hero-split__tag--r { right: var(--gutter); }

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(2rem, 6vh, 4.5rem);
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  /* No scrim under it any more — carry its own shadow instead */
  color: var(--paper-100);
  text-shadow: 0 1px 10px rgba(12, 11, 10, 0.85);
  filter: drop-shadow(0 1px 6px rgba(12, 11, 10, 0.6));
}
.hero-scroll__line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(242, 241, 238, 0.9), transparent);
  animation: scroll-cue 2.4s var(--ease-in-out) infinite;
  transform-origin: top;
}
@keyframes scroll-cue {
  0%, 100% { transform: scaleY(0.35); opacity: 0.4; }
  50%      { transform: scaleY(1);    opacity: 1; }
}

.hero-below { padding-block: clamp(4rem, 9vw, 8rem) clamp(4rem, 8vw, 7rem); }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--sp-5);
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  color: var(--text-meta);
}
.hero-trust span { display: inline-flex; align-items: center; gap: 0.55rem; }
.hero-trust svg { color: var(--terracotta-500); }
.dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--hairline-warm);
  flex: none;
}

/* Inner page hero */
.page-hero {
  padding-block: clamp(9rem, 16vw, 14rem) clamp(3rem, 6vw, 5rem);
  position: relative;
}

/* Split variant — a portrait plate on the left, copy on the right.
   The copy stays first in the source (so the h1 leads for assistive tech and
   stacks first on mobile); `order` does the visual swap. */
/* Shorter lead-in than the text-only heroes — the plate is tall, and this keeps
   the whole composition inside a 900px-high viewport. */
.page-hero--split { padding-block: clamp(7rem, 11vw, 9.5rem) clamp(4rem, 8vw, 7rem); }
.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}
.page-hero__grid > *:first-child { order: 2; }   /* copy — right */
.page-hero__figure { order: 1; }                 /* image — left */

.page-hero--split h1 { font-size: clamp(2.125rem, 3.9vw, 3.5rem); }
/* Left-justified regardless of which side it sits on */
.page-hero--split .page-hero__grid > *:first-child { text-align: left; }
.page-hero--split .lead { margin-inline: 0; }

.page-hero__figure {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-img);
}
.page-hero__figure img { width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }

@media (max-width: 900px) {
  .page-hero__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-7); }
  .page-hero__grid > *:first-child { order: 1; }   /* copy leads when stacked */
  .page-hero__figure { order: 2; aspect-ratio: 3 / 2; }
}
.page-hero::after {
  content: '';
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  bottom: 0;
  height: 1px;
  background: var(--hairline);
}

/* --- Stat band ------------------------------------------------------------ */
.statband__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-6);
  margin-bottom: var(--sp-8);
}
.statband__histo { flex: 1; min-width: 280px; max-width: 520px; }
.sb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hairline);
}
.sb-item {
  padding: var(--sp-6) var(--sp-5) var(--sp-5) 0;
  border-right: 1px solid var(--hairline);
}
.sb-item:last-child { border-right: 0; }
.sb-item:not(:first-child) { padding-left: var(--sp-5); }

/* --- Big compare ---------------------------------------------------------- */
.bigcmp__grid {
  display: grid;
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

/* --- Steps ---------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 3.5rem); }
.step { display: flex; gap: var(--sp-5); align-items: flex-start; }

/* --- Pillars (what-is) ---------------------------------------------------- */
.pillar__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

/* --- Comparison table (vs-hdr) -------------------------------------------- */
.vstable {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
/* The HDR side reads heavier and cooler — a pale blue field with darker,
   fully-weighted text, so the two columns argue against each other visually. */
.vstable__col--hdr { background: var(--slate-100); }
.vstable__col--fl  { background: rgba(197, 106, 75, 0.07); }
.vstable__head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
/* --accent-text, not gold: this table renders on a paper band, where gold-300
   falls to ~1.5:1. --accent-text flips per band and clears AA on both. */
.vstable__col--fl .vstable__head { color: var(--accent-text); border-bottom-color: var(--hairline-warm); }
.vstable__row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--hairline);
  font-size: var(--t-sm);
  line-height: 1.5;
}
.vstable__row:last-child { border-bottom: 0; }
.vstable__row svg { flex: none; margin-top: 0.2em; }
.vstable__col--hdr .vstable__head { color: var(--slate-800); border-bottom-color: rgba(33, 48, 62, 0.18); }
.vstable__col--hdr .vstable__row { color: var(--slate-800); border-bottom-color: rgba(33, 48, 62, 0.14); }
.vstable__col--hdr .vstable__row svg { color: var(--danger); }
.vstable__col--fl .vstable__row { color: var(--text); border-bottom-color: var(--hairline-warm); }
.vstable__col--fl .vstable__row svg { color: var(--accent-text); }

/* --- Pricing -------------------------------------------------------------- */
.price {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.price--sm { font-size: 1.375rem; letter-spacing: -0.02em; }
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-6);
  align-items: stretch;
}
.pricing__grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-5); }
@media (max-width: 1080px) {
  .pricing__grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pricing__grid > .card { display: flex; flex-direction: column; }

.faq__item {
  border-top: 1px solid var(--hairline);
  padding-block: var(--sp-5);
}
.faq__q {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
}
.faq__q .tick { flex: none; }

/* --- Tabs ----------------------------------------------------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  border-bottom: 1px solid var(--hairline);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  min-height: 44px;
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-meta);
  border-bottom: 1px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); border-bottom-color: var(--terracotta-500); }

/* --------------------------------------------------------------------------
   11. Forms
   -------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field label {
  font-size: var(--t-meta);
  letter-spacing: var(--track-meta);
  text-transform: uppercase;
  font-weight: 500;
  color: var(--text-meta);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--text);
  font-size: var(--t-body);
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2398938C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-meta); opacity: 0.7; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--terracotta-500);
  background: var(--surface-hi);
  outline: none;
}
.field__hint { font-size: var(--t-xs); color: var(--text-meta); }

.stepper { display: inline-flex; align-items: center; gap: var(--sp-2); }
.stepper button {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}
.stepper button:hover { border-color: var(--hairline-warm); background: var(--surface-hi); }
.stepper input {
  width: 60px;
  min-height: 44px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: var(--t-xs);
  color: var(--text-meta);
  min-height: 44px;
}
.checkbox input {
  appearance: none;
  width: 18px; height: 18px;
  flex: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--surface);
  display: grid;
  place-content: center;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.checkbox input::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 1.5px solid #1A0E08;
  border-bottom: 1.5px solid #1A0E08;
  transform: rotate(-45deg) scale(0);
  transition: transform var(--dur) var(--ease-spring);
}
.checkbox input:checked {
  background: var(--terracotta-500);
  border-color: var(--terracotta-500);
}
.checkbox input:checked::after { transform: rotate(-45deg) scale(1); }

/* --------------------------------------------------------------------------
   12. Commerce & member surfaces
   -------------------------------------------------------------------------- */
.line-item {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: flex-start;
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--hairline);
}
.line-item:last-child { border-bottom: 0; }

.cart__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--sp-6);
  align-items: start;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: var(--t-sm);
}

.auth-wrap { max-width: 480px; margin-inline: auto; }

.lesson {
  display: flex;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-4);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color var(--dur) var(--ease-out);
}
.lesson:hover { border-color: var(--hairline-warm); }
.lesson__thumb {
  position: relative;
  width: 148px;
  flex: none;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(140deg, var(--slate-800), var(--ink-900));
  display: grid;
  place-items: center;
  color: var(--paper-100);
}
.lesson__thumb .play {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(242, 241, 238, 0.5);
  display: grid;
  place-items: center;
  transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-spring);
}
.lesson:hover .lesson__thumb .play { background: var(--terracotta-500); transform: scale(1.08); border-color: var(--terracotta-500); color: #1A0E08; }
.lesson__dur {
  position: absolute;
  right: 6px; bottom: 6px;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  background: rgba(12, 11, 10, 0.7);
  padding: 2px 5px;
  border-radius: 2px;
}

.progress {
  height: 3px;
  background: var(--surface-hi);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
/* The width is always correct in the markup; the sweep is a CSS animation so it
   never depends on rAF firing (which a background tab suppresses). */
.progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--terracotta-500), var(--gold-500));
  transform-origin: left center;
  animation: bar-in 900ms var(--ease-out) both;
}
@keyframes bar-in {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.dl-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--hairline);
}
.dl-token {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  color: var(--text-meta);
  word-break: break-all;
  margin-top: 0.35rem;
}

/* --------------------------------------------------------------------------
   13. Motion
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

[data-reveal='fade'] { transform: none; }
[data-reveal='left']  { transform: translateX(-28px); }
[data-reveal='right'] { transform: translateX(28px); }
[data-reveal='scale'] { transform: scale(0.96); }

/* Line-by-line headline reveal */
.split-line {
  display: block;
  overflow: hidden;
}
.split-line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1050ms var(--ease-out);
  transition-delay: var(--line-delay, 0ms);
}
.is-in .split-line > span,
.split-line.is-in > span { transform: none; }

/* Image mask reveal */
.mask-reveal { clip-path: inset(0 0 100% 0); transition: clip-path 1200ms var(--ease-out); }
.mask-reveal.is-in { clip-path: inset(0 0 0 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .split-line > span { transform: none !important; }
  .mask-reveal { clip-path: none !important; }
  .parallax > img,
  .parallax > .parallax__layer,
  .plate-band img,
  .hero-split__base,
  .hero-split__top { transform: none !important; height: 100%; top: 0; }
  .mosaic__cell:hover img { transform: none !important; }
  .histo__bar { transform: scaleY(1) !important; }
  .hero-scroll__line { animation: none; }
}

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bigcmp__grid { grid-template-columns: minmax(0, 1fr); }
  .grid-editorial,
  .grid-editorial--flip { grid-template-columns: minmax(0, 1fr); }
  .cart__grid { grid-template-columns: minmax(0, 1fr); }
  .pillar__grid { grid-template-columns: minmax(0, 1fr); }
  .sb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sb-item:nth-child(2) { border-right: 0; }
  .sb-item:nth-child(3) { border-top: 1px solid var(--hairline); }
  .sb-item:nth-child(4) { border-top: 1px solid var(--hairline); }
  .sb-item:nth-child(3) { padding-left: 0; }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__toggle { display: inline-flex; }
  /* Sign in lives in the mobile menu — the nav row has no room for it */
  .nav__actions [data-auth-action] { display: none; }
  .nav__actions { gap: var(--sp-2); }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .pricing__grid { grid-template-columns: minmax(0, 1fr); }
  .vstable { grid-template-columns: minmax(0, 1fr); }
  .vstable__col--hdr { border-bottom: 1px solid var(--hairline); }
  .lesson { flex-wrap: wrap; }
  .lesson__thumb { width: 110px; }
  .hero-split { height: min(78vh, 680px); }
  .cmp { aspect-ratio: 4 / 3; }
}

@media (max-width: 620px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .sb-grid { grid-template-columns: minmax(0, 1fr); }
  .sb-item { border-right: 0; border-top: 1px solid var(--hairline); padding-left: 0 !important; }
  .sb-item:first-child { border-top: 0; }
  /* Stacked, the separators dangle at the end of each line */
  .hero-trust { flex-direction: column; align-items: flex-start; gap: var(--sp-3); }
  .hero-trust .dot { display: none; }
  .cmp__grip { width: 46px; height: 46px; }
  .hero-scroll { display: none; }
  .lesson__thumb { width: 100%; }
  .cmp__tag, .hero-split__tag { font-size: 0.625rem; padding: 0.35rem 0.65rem; }
}

/* Last-resort guard: nothing may create a horizontal scrollbar */
html { overflow-x: hidden; }

/* --------------------------------------------------------------------------
   Long-form legal copy
   -------------------------------------------------------------------------- */
.legal { max-width: 44rem; }
.legal p { max-width: 62ch; }
.legal h2 { scroll-margin-top: 6rem; }
.legal .checks li { align-items: flex-start; }
.legal .checks li > svg { color: var(--accent-text); }
