/* ==========================================================================
   Advatar — design system
   Near-black canvas, warm amber light, hairline architectural grid,
   liquid-glass panels, film grain.
   ========================================================================== */

/* --------------------------------------------------------------- Tokens --- */

/*
  Two themes. Dark is the base declaration; `:root[data-theme="light"]` swaps the
  same token names. An inline script in <head> stamps the attribute from
  localStorage before first paint, so there is no flash of the wrong theme.
  Light is the default when nothing is stored.
*/
:root {
  /* Palette — dark */
  --bg:            #0A0908;
  --bg-elevated:   #131110;
  --gold-1:        #F2A93B;
  --gold-2:        #C97A2E;
  --text-hi:       #F5F1E8;
  --text-lo:       #A79E90;
  --glass-fill:    rgba(255, 255, 255, 0.05);
  --glass-border:  rgba(255, 255, 255, 0.10);

  /* Derived */
  --hairline:      rgba(255, 255, 255, 0.07);
  --hairline-soft: rgba(255, 255, 255, 0.045);
  /* Solid, not a low alpha: 5.3:1 on --bg, so 11px labels still clear AA. */
  --text-faint:    #8B8377;
  --gold-glow:     rgba(242, 169, 59, 0.30);
  /* --gold-1 is the accent; --gold-text is the accent that is safe on TEXT.
     They are identical on dark, where --gold-1 already reaches ~10:1. */
  --gold-text:     #F2A93B;

  /* Grain reads stronger on dark, so each theme sets its own weight + blend. */
  --grain-opacity: 0.30;
  --grain-blend:   overlay;

  /* Ambient texture strength behind sections. */
  --ambient-a:     0.30;
  --texture-a:     0.16;
  --glow-scale:    1;

  --scrim:         rgba(10, 9, 8, 0.85);
  --nav-scrim:     rgba(10, 9, 8, 0.72);
  --surface-1:     rgba(19, 17, 16, 0.92);
  --overlay:       rgba(6, 5, 4, 0.75);
  --shadow-card:   0 18px 50px -30px rgba(0, 0, 0, 0.9);

  /* ---- Theme-independent below: type, rhythm, motion, layers ------------- */

  /* Type */
  --font-display: 'General Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-ui:      'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Rhythm */
  --gutter: clamp(1.25rem, 5vw, 5.5rem);
  --section-y: clamp(5rem, 12vw, 11rem);
  --max-w: 1440px;

  /* Motion — 150–300ms for state changes; 400–600ms for scroll reveals */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 150ms;
  --mid:  220ms;
  --slow: 300ms;
  --reveal: 560ms;

  /* Layers */
  --z-grid: -1;
  --z-grain: -2;
  --z-nav: 60;
  --z-modal: 100;
  --z-toast: 120;

  color-scheme: dark;
}

:root[data-theme='light'] {
  color-scheme: light;

  --bg:            #FAF7F1;
  --bg-elevated:   #F1EBDE;
  --gold-1:        #C97A2E;
  --gold-2:        #8F5620;
  --text-hi:       #1B1712;
  --text-lo:       #6E6558;
  --glass-fill:    rgba(20, 16, 10, 0.045);
  --glass-border:  rgba(20, 16, 10, 0.09);

  --hairline:      rgba(20, 16, 10, 0.10);
  --hairline-soft: rgba(20, 16, 10, 0.06);
  /* 4.6:1 on --bg. */
  --text-faint:    #767061;
  --gold-glow:     rgba(201, 122, 46, 0.22);
  /* #C97A2E is only 3.1:1 here — fine for large display text and accents,
     but small text needs the deeper tone (5.6:1). */
  --gold-text:     #8F5620;

  /* Soft-light + lower opacity, or grain reads as dirt on a warm near-white. */
  --grain-opacity: 0.075;
  --grain-blend:   multiply;

  --ambient-a:     0.55;
  --texture-a:     0.10;
  /* Warmth rather than a glow effect. */
  --glow-scale:    0.42;

  --scrim:         rgba(250, 247, 241, 0.85);
  --nav-scrim:     rgba(250, 247, 241, 0.78);
  --surface-1:     rgba(252, 250, 246, 0.95);
  --overlay:       rgba(38, 29, 18, 0.38);
  --shadow-card:   0 18px 40px -32px rgba(60, 40, 15, 0.45);
}

/* ----------------------------------------------------------------- Base --- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: clip; }

/* Decorative glows extend past the section; clip them so no page can scroll
   sideways. `clip` rather than `hidden`, which would break position: sticky. */
.section { overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-hi);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip, not hidden. `hidden` makes the body a scroll container once <html>
     isn't overflow:visible — a container that never scrolls — and every
     position: sticky inside it silently stops sticking. */
  overflow-x: clip;
}

img, video, iframe { max-width: 100%; display: block; }
img, video { height: auto; }

/* figure/blockquote carry a 40px UA inline margin that breaks the grid. */
figure, blockquote { margin: 0; }

a { color: inherit; text-decoration: none; }

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

/* Visible focus everywhere — never removed, only restyled. */
:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--gold-1);
  color: #17120A;
  font-weight: 600;
  border-radius: 999px;
  transform: translateY(-160%);
  transition: transform var(--mid) var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

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

.noscript { padding: 4rem var(--gutter); }

/* ----------------------------------------------------------- Typography --- */

.display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

/* Hero-scale */
.display--xl { font-size: clamp(2.6rem, 7.2vw, 6rem); }
/* Section-scale */
.display--lg { font-size: clamp(2rem, 4.6vw, 3.75rem); }
.display--md { font-size: clamp(1.5rem, 2.8vw, 2.25rem); letter-spacing: -0.025em; }

/* The small uppercase label used for nav items, eyebrows, tags. */
.micro {
  font-family: var(--font-ui);
  font-size: 0.75rem;   /* 11px — labels only, never body copy */
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-lo);
}

/* Section eyebrow: monoline glyph + label, as in the reference. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 clamp(1.75rem, 4vw, 3rem);
}
.eyebrow .icon { color: var(--text-lo); flex: none; }
.eyebrow span {
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--text-hi);
  font-weight: 500;
}

/*
  Two-tone lede — the reference fades a sentence from bright into muted
  mid-way through. Wrap the trailing half in <span class="dim">.
*/
.lede {
  font-size: clamp(0.9375rem, 1.15vw, 1.0625rem);
  line-height: 1.55;
  color: var(--text-hi);
  max-width: 46ch;
  margin: 0;
}
.lede .dim { color: var(--text-lo); }

.muted { color: var(--text-lo); }
.tiny { font-size: 0.8125rem; line-height: 1.5; color: var(--text-lo); }

/* Inline link inside a sentence — underlined so it doesn't rely on colour. */
.text-link {
  color: var(--gold-text);
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  transition: color var(--mid) var(--ease);
}
.text-link:hover { color: var(--gold-2); }

/* The Arabic word set inline, sized up so it stays prominent in the sentence. */
.ihsan-inline {
  font-size: 1.5em;
  line-height: 1;
  vertical-align: -0.12em;
  color: var(--gold-1);
  margin-inline: 0.12em;
}

/* ------------------------------------------------------- Grain + grid ----- */

.grain-defs { position: absolute; width: 0; height: 0; }

/*
  Real scanned film grain (Texture Fabrik), tiled at 1:1 so the grain keeps its
  native size rather than being stretched. Fixed to the viewport, so it sits over
  every pixel of every page and doesn't scroll with content — that's what makes
  it read as film rather than as a background pattern.
*/
/*
  Film grain.

  Two things make it read as baked-in film rather than a texture laid on top:

  1. It sits BELOW everything in .app (z-index -2), so it grains the page and the
     ambient wash but never the photos, Drive embeds or video. Media stays clean,
     which is what you want — grain over a video looks like a dirty screen.
  2. It jumps position on every "frame". Real grain is re-exposed each frame; a
     motionless tile is the thing that reads as a static picture. steps(1) makes
     each position hold rather than slide, which is what film actually does.

  The element is oversized so the jumps never expose an edge.
*/
.grain {
  position: fixed;
  top: -60%; left: -60%;
  width: 220%; height: 220%;
  z-index: var(--z-grain);
  pointer-events: none;
  background-image: url('/assets/grain.png');
  background-repeat: repeat;
  background-size: 512px 512px;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  animation: grain-flicker 0.7s steps(1) infinite;
  will-change: transform;
}

@keyframes grain-flicker {
  0%   { transform: translate3d(0, 0, 0); }
  12%  { transform: translate3d(-7%, 4%, 0); }
  25%  { transform: translate3d(5%, -8%, 0); }
  37%  { transform: translate3d(-4%, -6%, 0); }
  50%  { transform: translate3d(8%, 3%, 0); }
  62%  { transform: translate3d(-6%, 7%, 0); }
  75%  { transform: translate3d(3%, -5%, 0); }
  87%  { transform: translate3d(-8%, -3%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/*
  Ambient texture. Nothing on the site sits on flat colour — this fixed layer
  carries a soft warm gradient mesh across the whole page, behind everything.
  When settings.textureUrl is set, a blurred, dimmed still from real work is
  layered over the mesh instead.
*/
.ambient {
  position: fixed;
  inset: -10%;
  z-index: -3;
  pointer-events: none;
  opacity: var(--ambient-a);
  background:
    radial-gradient(38% 44% at 12% 18%, rgba(242, 169, 59, 0.18), transparent 70%),
    radial-gradient(44% 40% at 86% 30%, rgba(201, 122, 46, 0.20), transparent 72%),
    radial-gradient(50% 46% at 62% 82%, rgba(180, 104, 40, 0.16), transparent 74%),
    radial-gradient(36% 38% at 26% 70%, rgba(242, 169, 59, 0.12), transparent 72%);
  filter: blur(70px);
}

.ambient-still {
  position: fixed;
  inset: -8%;
  z-index: -4;
  pointer-events: none;
  width: auto;
  height: auto;
  min-width: 116%;
  min-height: 116%;
  object-fit: cover;
  opacity: var(--texture-a);
  filter: blur(48px) saturate(120%);
}

.grid-rules {
  position: fixed;
  inset: 0;
  z-index: var(--z-grid);
  pointer-events: none;
}

/* A hairline vertical rule with a small × marker near each end. */
.grid-rule {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--rule-x);
  width: 1px;
  background: var(--hairline-soft);
}
.grid-rule::before,
.grid-rule::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 9px; height: 9px;
  transform: translateX(-50%);
  background:
    linear-gradient(to right, transparent 4px, var(--hairline) 4px 5px, transparent 5px),
    linear-gradient(to bottom, transparent 4px, var(--hairline) 4px 5px, transparent 5px);
}
.grid-rule::before { top: 18vh; }
.grid-rule::after  { bottom: 12vh; }

@media (max-width: 900px) { .grid-rules { display: none; } }

/* --------------------------------------------------------------- Layout --- */

.app { position: relative; z-index: 1; }

.shell {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section + .section { padding-top: 0; }

/* Inner pages: clear the fixed nav, then tighten the first section so the page
   doesn't open on a screenful of nothing. */
.page { padding-top: 7.5rem; }
.page > .section:first-of-type { padding-top: clamp(1.5rem, 4vw, 3rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.section-head .lede { text-align: right; margin-left: auto; }

@media (max-width: 720px) {
  .section-head .lede { text-align: left; margin-left: 0; }
}

.stack   { display: grid; gap: 1rem; }
.stack-2 { display: grid; gap: 2rem; }

/* ------------------------------------------------------------ Glow ------- */

/*
  The warm light source. Absolutely positioned, heavily blurred, sits behind
  content. Position/size set inline per use via the custom properties.
*/
.glow {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: var(--glow-w, 40rem);
  height: var(--glow-h, 40rem);
  /* --glow-scale tones the whole effect down in light mode, where it should
     read as warmth rather than as a dark-mode glow. */
  background: radial-gradient(
    circle at center,
    rgba(242, 169, 59, calc(var(--glow-a, 0.45) * var(--glow-scale))) 0%,
    rgba(201, 122, 46, calc(var(--glow-a, 0.45) * var(--glow-scale) * 0.5)) 38%,
    transparent 70%
  );
  filter: blur(80px);
  border-radius: 50%;
  /* Continuous slow drift so the page is never completely static (R10). */
  animation: glow-drift 19s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  from { transform: translate3d(-2%, -1.5%, 0) scale(1); }
  to   { transform: translate3d(2.5%, 2%, 0) scale(1.08); }
}

/* --------------------------------------------------------------- Icons --- */

.icon {
  width: 1em;
  height: 1em;
  stroke: currentColor;
  stroke-width: 1.25;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.icon--lg { width: 1.25em; height: 1.25em; }

/* -------------------------------------------------------------- Buttons --- */

.btn {
  --btn-bg: var(--glass-fill);
  --btn-fg: var(--text-hi);
  --btn-border: var(--glass-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;                 /* touch target floor */
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  transition: background var(--mid) var(--ease),
              border-color var(--mid) var(--ease),
              color var(--mid) var(--ease),
              transform var(--fast) var(--ease);
}
.btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.btn--gold {
  --btn-bg: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  --btn-fg: #17120A;
  --btn-border: transparent;
  font-weight: 600;
  box-shadow: 0 0 40px -8px var(--gold-glow);
}
.btn--gold:hover {
  --btn-bg: linear-gradient(135deg, #F7B855, var(--gold-1));
  border-color: transparent;
}

.btn--ghost { --btn-bg: transparent; --btn-border: rgba(255, 255, 255, 0.14); }

.btn--sm { min-height: 40px; padding: 0.5rem 1.1rem; font-size: 0.75rem; }

/* Text link with a trailing arrow that nudges on hover.
   Also used on <button>, so the native button chrome has to be reset here. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  text-align: left;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--text-lo);
  transition: color var(--mid) var(--ease);
}
.link-arrow .icon { transition: transform var(--mid) var(--ease); }
.link-arrow:hover { color: var(--gold-text); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Small square icon-only control (disclosure arrows, close buttons). */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  color: var(--text-lo);
  cursor: pointer;
  transition: color var(--mid) var(--ease), border-color var(--mid) var(--ease);
}
.icon-btn:hover { color: var(--gold-text); border-color: rgba(242, 169, 59, 0.35); }
.icon-btn[aria-expanded='true'] { color: var(--gold-text); }
.icon-btn[aria-expanded='true'] .icon { transform: rotate(90deg); }
.icon-btn .icon { transition: transform var(--mid) var(--ease); }

/* ---------------------------------------------------------- Glass panel --- */

.glass-card {
  position: relative;
  background: var(--glass-fill);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  overflow: hidden;
  transition: border-color var(--mid) var(--ease), background var(--mid) var(--ease);
}
a.glass-card:hover,
.glass-card--interactive:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}

/* Card header: monoline glyph + "01 Function"-style index label. */
.card-index {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-lo);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  margin-bottom: auto;
}

.card-body { margin-top: clamp(2.5rem, 6vw, 5rem); }
.card-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.125rem, 1.7vw, 1.375rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.card-body p { margin: 0; font-size: 0.8125rem; line-height: 1.55; color: var(--text-lo); }

/*
  Section that mimics the reference's blurred warm backdrop behind a row of
  glass cards.
*/
.backdrop-warm { position: relative; isolation: isolate; }
.backdrop-warm::before {
  content: '';
  position: absolute;
  inset: -10% -5%;
  z-index: -1;
  background:
    radial-gradient(60% 55% at 30% 40%, rgba(201, 122, 46, 0.20), transparent 70%),
    radial-gradient(45% 60% at 68% 55%, rgba(242, 169, 59, 0.16), transparent 72%);
  filter: blur(60px);
}

/* --------------------------------------------------------------- Media --- */

/* 9:16 for reels, 16:9 for landscape. Drive iframes get a glass frame. */
.media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--hairline);
}
.media--reel  { aspect-ratio: 9 / 16; }
.media--wide  { aspect-ratio: 16 / 9; }
.media--square{ aspect-ratio: 1 / 1; }
.media iframe,
.media img,
.media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Shown wherever an asset hasn't been supplied yet. */
.media--empty {
  display: grid;
  place-items: center;
  gap: 0.5rem;
  background:
    linear-gradient(150deg, rgba(242, 169, 59, 0.07), transparent 60%),
    var(--bg-elevated);
  /* --text-lo, not --text-faint: this label sits on --bg-elevated, where the
     fainter tone drops to 4.15:1. */
  color: var(--text-lo);
  text-align: center;
  padding: 1rem;
}
.media--empty .icon { width: 1.5rem; height: 1.5rem; opacity: 0.75; }
.media--empty span { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* --------------------------------------------------------- Empty states --- */

.empty-state {
  border: 1px dashed var(--glass-border);
  border-radius: 20px;
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  color: var(--text-lo);
}
.empty-state h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--text-hi);
  margin: 0 0 0.5rem;
}
.empty-state p { margin: 0; font-size: 0.875rem; max-width: 42ch; margin-inline: auto; }

/* ============================================================= Nav ======== */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  transition: background var(--slow) var(--ease), border-color var(--slow) var(--ease);
  border-bottom: 1px solid transparent;
}
.nav[data-scrolled='true'] {
  background: var(--nav-scrim);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: var(--hairline);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1.1rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
}

/* The Advatar wordmark (cropped, transparent), sized by height. */
.brand-logo {
  display: block;
  height: clamp(26px, 2.3vw, 34px);
  width: auto;
}
.footer .brand-logo { height: 36px; }

/* Reference nav: small uppercase items separated by commas. */
.nav-links {
  display: none;
  align-items: center;
  gap: 0;
  margin: 0; padding: 0;
  list-style: none;
}
@media (min-width: 900px) { .nav-links { display: flex; } }

.nav-links li:not(:last-child)::after {
  content: ',';
  color: var(--text-lo);
  margin-right: 0.5rem;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-lo);
  transition: color var(--mid) var(--ease);
}
.nav-links a:hover { color: var(--text-hi); }
.nav-links a[aria-current='page'] { color: var(--gold-text); }

.nav-actions { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }

/*
  LOGIN BUTTON — DO NOT BUILD UNTIL EXPLICITLY ASKED.
  This slot is reserved for the Phase 9 "Login" pill that will link to the CRM.
  Left empty on purpose; see the matching comment in app.js.
*/
.nav-login-slot { display: contents; }

/* The menu panel is reachable at every width (R3), not only on mobile. */
.nav-toggle { display: inline-flex; }

/* Nav menu overlay lives in the 'Nav menu (R3)' section below. */

/* ============================================================= Hero ======= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 7rem;
  padding-bottom: 2.5rem;
  overflow: hidden;
  isolation: isolate;
}

.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img,
.hero-media video { width: 100%; height: 100%; object-fit: cover; }

/*
  The amber light shaft. This is the CSS-only fallback AND the lighting that
  sits over any supplied footage — the reference's dark-left / burning-right
  composition. Works with no assets at all.
*/
/*
  Layer order matters: in the `background` shorthand the FIRST layer paints on
  top. The dark mask therefore has to lead, or the amber washes bleed across the
  headline and grey the whole left side out.
*/
.hero-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* 1. holds the left half genuinely black, so the headline sits on ink */
    linear-gradient(90deg,
      var(--bg) 0%,
      var(--bg) 34%,
      rgba(10, 9, 8, 0.92) 44%,
      rgba(10, 9, 8, 0.55) 52%,
      transparent 60%),
    /* 2. the hot vertical shaft — narrow core, bright centre */
    linear-gradient(90deg,
      transparent 55%,
      rgba(255, 178, 74, 0.18) 60%,
      rgba(255, 214, 150, 0.62) 63.5%,
      rgba(255, 240, 214, 0.95) 65%,
      rgba(255, 214, 150, 0.62) 66.5%,
      rgba(255, 178, 74, 0.20) 71%,
      transparent 80%),
    /* 3. saturated orange bloom either side of the shaft */
    radial-gradient(38% 78% at 65% 50%, rgba(255, 150, 40, 0.55), transparent 72%),
    /* 4. the deeper amber falling away to the right edge */
    radial-gradient(58% 96% at 84% 52%, rgba(214, 112, 28, 0.62), transparent 74%),
    /* 5. faintest spill back across the centre */
    radial-gradient(70% 90% at 58% 50%, rgba(150, 78, 24, 0.34), transparent 70%),
    var(--bg);
}

/*
  Light-mode hero. Same composition — dark-to-light on the left, a shaft and
  amber falloff on the right — but the "dark" side becomes the warm near-white
  and the shaft is a saturated gold rather than a white-hot core, so it reads as
  daylight through a gap instead of a glow effect.
*/
:root[data-theme='light'] .hero-light {
  background:
    linear-gradient(90deg,
      var(--bg) 0%,
      var(--bg) 32%,
      rgba(250, 247, 241, 0.94) 43%,
      rgba(250, 247, 241, 0.55) 52%,
      transparent 62%),
    linear-gradient(90deg,
      transparent 55%,
      rgba(230, 150, 55, 0.16) 60%,
      rgba(255, 206, 130, 0.52) 63.5%,
      rgba(255, 238, 205, 0.92) 65%,
      rgba(255, 206, 130, 0.52) 66.5%,
      rgba(230, 150, 55, 0.18) 71%,
      transparent 80%),
    radial-gradient(38% 78% at 65% 50%, rgba(233, 150, 48, 0.42), transparent 72%),
    radial-gradient(58% 96% at 84% 52%, rgba(201, 122, 46, 0.40), transparent 74%),
    radial-gradient(70% 90% at 58% 50%, rgba(214, 158, 96, 0.26), transparent 70%),
    var(--bg);
}

:root[data-theme='light'] .hero::after {
  background: linear-gradient(to bottom,
    rgba(250, 247, 241, 0.5) 0%, transparent 22%,
    transparent 72%, rgba(250, 247, 241, 0.8) 100%);
}

@media (max-width: 768px) {
  :root[data-theme='light'] .hero-light {
    background:
      linear-gradient(180deg,
        var(--bg) 0%, var(--bg) 42%,
        rgba(250, 247, 241, 0.95) 54%,
        rgba(250, 247, 241, 0.6) 64%,
        transparent 76%),
      linear-gradient(90deg,
        transparent 58%,
        rgba(230, 150, 55, 0.16) 64%,
        rgba(255, 206, 130, 0.5) 69%,
        rgba(255, 238, 205, 0.9) 71%,
        rgba(255, 206, 130, 0.5) 73%,
        rgba(230, 150, 55, 0.18) 80%,
        transparent 92%),
      radial-gradient(60% 46% at 72% 76%, rgba(233, 150, 48, 0.42), transparent 74%),
      radial-gradient(90% 56% at 62% 92%, rgba(201, 122, 46, 0.40), transparent 76%),
      var(--bg);
  }
  :root[data-theme='light'] .hero-foot p { text-shadow: 0 1px 12px rgba(250, 247, 241, 0.9); }
}

/*
  Mobile recomposition. At narrow widths a headline spans most of the frame, so
  the side-lit composition would put type straight on the hot shaft. Rotate the
  light: dark top for the headline, amber rising from the bottom-right.
*/
@media (max-width: 768px) {
  .hero-light {
    background:
      /* 1. holds the top half black, under the headline and CTA */
      linear-gradient(180deg,
        var(--bg) 0%,
        var(--bg) 42%,
        rgba(10, 9, 8, 0.94) 54%,
        rgba(10, 9, 8, 0.6) 64%,
        transparent 76%),
      /* 2. the shaft, pushed toward the right edge */
      linear-gradient(90deg,
        transparent 58%,
        rgba(255, 178, 74, 0.18) 64%,
        rgba(255, 214, 150, 0.6) 69%,
        rgba(255, 240, 214, 0.92) 71%,
        rgba(255, 214, 150, 0.6) 73%,
        rgba(255, 178, 74, 0.20) 80%,
        transparent 92%),
      radial-gradient(60% 46% at 72% 76%, rgba(255, 150, 40, 0.52), transparent 74%),
      radial-gradient(90% 56% at 62% 92%, rgba(214, 112, 28, 0.58), transparent 76%),
      var(--bg);
  }

  /* The footnotes now sit on lit ground, so give them a scrim of their own. */
  .hero-foot p { color: var(--text-hi); text-shadow: 0 1px 12px rgba(10, 9, 8, 0.85); }
}

/* Vignette so type never sits on a hot edge. */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(10, 9, 8, 0.55) 0%, transparent 22%, transparent 72%, rgba(10, 9, 8, 0.75) 100%);
}

/* The layered "hand reaching for a screen" asset, when supplied. */
/*
  Grain across the hero's own background. .hero is `isolation: isolate`, so the
  page-level grain layer cannot reach inside it — this is the same texture,
  scoped to the hero, sitting above the gradient but below the hand and the type.
*/
.hero-grain {
  position: absolute;
  top: -60%; left: -60%;
  width: 220%; height: 220%;
  z-index: -1;
  pointer-events: none;
  background-image: url('/assets/grain.png');
  background-repeat: repeat;
  background-size: 512px 512px;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  animation: grain-flicker 0.7s steps(1) infinite;
  will-change: transform;
}

/*
  The keyed hand plate. Black background + `screen` means the black drops out and
  only the gold light is added, so it reads as part of the gradient rather than a
  rectangle pasted over it. z-index 0 keeps it ABOVE .hero-grain.
*/
.hero-hand {
  position: absolute;
  right: 0;
  top: 50%;
  width: min(88%, 70rem);
  right: -7%;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.55;
  /* A wide, early falloff dissolves the plate's edges into the gradient. */
  -webkit-mask-image: radial-gradient(70% 66% at 52% 50%, #000 38%, transparent 86%);
  mask-image: radial-gradient(70% 66% at 52% 50%, #000 38%, transparent 86%);
  transform: translateY(-50%);
}
video.hero-hand { height: auto; object-fit: contain; }

/*
  Screen blend has far less headroom on a pale ground — the plate washes out in
  light mode. Push saturation and contrast so it still reads, without turning it
  into a hard-edged rectangle.
*/
:root[data-theme='light'] .hero-hand {
  opacity: 0.66;
  filter: saturate(1.65) contrast(1.22) brightness(0.94);
}
/*
  On mobile the headline fills the middle of the frame, so the plate drops into
  the lower third — where the light already rises from — instead of running
  straight through the type.
*/
@media (max-width: 900px) {
  .hero-hand {
    width: 175%;
    right: -24%;      /* keeps the hand itself on screen, not just the phone */
    top: 76%;
    opacity: 0.45;
  }
}

.hero-content {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero h1 { max-width: 16ch; }
.hero .hero-cta { margin-top: clamp(1.75rem, 4vw, 2.75rem); }

/* The two low-contrast footnote blocks at the bottom of the reference hero. */
.hero-foot {
  position: relative;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 0 var(--gutter);
  margin-top: clamp(3rem, 8vw, 6rem);
  display: grid;
  gap: 1.5rem;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .hero-foot { grid-template-columns: minmax(0, 34ch) minmax(0, 30ch); justify-content: space-between; }
  .hero-foot > :last-child { justify-self: end; }
}
.hero-foot p { margin: 0; font-size: 0.8125rem; line-height: 1.5; color: var(--text-lo); }
.hero-foot .with-mark { display: flex; gap: 0.75rem; align-items: flex-start; }
.hero-foot .with-mark .icon { margin-top: 0.2rem; color: var(--text-faint); }

.scroll-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ======================================================= Home sections ==== */

.wins-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.win-card { display: grid; gap: 0.85rem; }
.win-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.015em;
  margin: 0;
}
/* flex-start so a wrapping client name doesn't drag its "See more" off-baseline. */
.win-card .win-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.win-card .win-meta .link-arrow { min-height: 1.5rem; margin-top: -0.1rem; }

.teaser-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}
.teaser-grid .glass-card {
  display: flex;
  flex-direction: column;
  min-height: clamp(16rem, 26vw, 22rem);
}

/* ==================================================== Our Work sections === */

/* The single headline row of ↑ results. */
.results-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem clamp(1rem, 2.5vw, 2rem);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.25rem, 3vw, 2.25rem);
  letter-spacing: -0.025em;
}
.results-row .result {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.results-row .result .icon { color: var(--gold-1); width: 0.7em; height: 0.7em; stroke-width: 1.5; }
.results-row .divider { color: var(--hairline); }

.stat-list { display: grid; gap: 1px; background: var(--hairline); border-radius: 14px; overflow: hidden; }
.stat-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-elevated);
  list-style: none;
}
.stat-list .stat-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold-text);
  letter-spacing: -0.02em;
}

/* Reels + generic media grids */
.reel-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 15rem));
  justify-content: start;
}
.photo-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
}
.site-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}

/* Branding masonry — CSS columns keeps mixed aspect ratios honest. */
.branding-masonry { columns: 4 14rem; column-gap: 0.85rem; }
.branding-masonry > * { break-inside: avoid; margin-bottom: 0.85rem; }

/* Industry / client / photography disclosure. Instant reveal, no animation —
   explicit in the brief. */
.disclosure { border-top: 1px solid var(--hairline); }
.disclosure:last-of-type { border-bottom: 1px solid var(--hairline); }

.disclosure-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.disclosure-head:hover .disclosure-title { color: var(--gold-text); }
.disclosure-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  transition: color var(--mid) var(--ease);
}
.disclosure-meta { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.disclosure-panel { padding-bottom: 1.75rem; }
.disclosure-panel[hidden] { display: none; }

.industry-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin: 0.35rem 0 0;
  padding: 0;
  list-style: none;
}
.industry-names li { font-size: 0.8125rem; color: var(--text-lo); }

/*
  One client: their selected reel with their name under it, and the rest of
  their reels beside it as a small drifting row — always showing.
*/
.client-list { display: grid; grid-template-columns: minmax(0, 1fr); }
.client-feature {
  display: grid;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
  padding-block: 1.75rem;
  border-top: 1px solid var(--hairline-soft);
}
.client-feature:first-child { border-top: 0; padding-top: 0.25rem; }
.client-feature-lead { margin: 0; display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.client-feature-lead figcaption { display: grid; gap: 0.3rem; align-content: end; }
.client-feature-lead figcaption .tiny { margin: 0; }
.client-feature-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.client-feature-label .icon { width: 14px; height: 14px; }
.client-feature-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--text-hi);
}
.client-feature-reels { min-width: 0; }
/* A client with one reel: their name sits beside it, not in an empty column. */
.client-feature--solo .client-feature-lead {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
  column-gap: clamp(1rem, 3vw, 2rem);
  align-items: end;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.tag {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-lo);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}

/* ================================== All-clients index (R9) =============== */

/* The client index opens as its own panel beneath the Video Marketing actions. */
.all-clients-panel {
  margin-top: 2.5rem;
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 1px solid var(--hairline);
}
.client-index-empty { padding: 0.9rem 0; list-style: none; }

.client-index + .client-index { margin-top: 2rem; }

.client-index-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.35rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-text);
}

.client-index-list { margin: 0; padding: 0; list-style: none; }
.client-index-list > li { border-bottom: 1px solid var(--hairline-soft); }

.client-index-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 44px;
  padding: 0.85rem 0;
  background: none;
  border: 0;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: color var(--mid) var(--ease), padding-left var(--mid) var(--ease);
}
.client-index-row:hover { color: var(--gold-text); padding-left: 0.4rem; }
.client-index-row[aria-expanded='true'] { color: var(--gold-text); }
.client-index-row[aria-expanded='true'] .icon { transform: rotate(90deg); }
.client-index-row .icon { transition: transform var(--mid) var(--ease); flex: none; color: var(--text-lo); }

.client-index-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  letter-spacing: -0.015em;
}
.client-index-count { margin-left: auto; white-space: nowrap; }

.tag--soft {
  border-style: dashed;
  color: var(--text-faint);
  font-size: 0.75rem;
}
@media (max-width: 640px) {
  .client-index-row { flex-wrap: wrap; gap: 0.4rem 0.75rem; }
  .client-index-count { margin-left: 0; width: 100%; }
  .tag--soft { max-width: 100%; }
}

/* ============================================ Case studies (R8) ========== */

.case-study {
  display: grid;
  gap: 0.85rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--hairline);
}
.case-study:last-child { border-bottom: 0; padding-bottom: 0; }
.case-study-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}
.case-study-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  letter-spacing: -0.025em;
}

/* ============================================================ About ======= */

.quote-block { position: relative; padding-block: clamp(1rem, 3vw, 2rem); }
.quote-block blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.75rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  max-width: 18ch;
}
.quote-block figcaption { margin-top: 1.5rem; font-size: 0.8125rem; color: var(--text-lo); }

.stat-row {
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
}
.stat-row .stat { padding: 1.5rem; }
.stat-row .stat .num {
  display: block;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  letter-spacing: -0.04em;
  line-height: 1;
  /* Starts at --gold-text, not --gold-1: on a light glass card the lighter gold
     measures 2.84:1, just under the 3:1 floor for large text. */
  background: linear-gradient(135deg, var(--gold-text), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-row .stat .label { margin-top: 0.6rem; display: block; }

/* The Ihsan watermark. */
.ihsan { position: relative; overflow: hidden; padding-block: clamp(3rem, 8vw, 6rem); }
.ihsan-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  user-select: none;
  font-family: var(--font-display);
  font-size: clamp(7rem, 28vw, 20rem);
  line-height: 1;
  color: var(--text-hi);
  opacity: 0.045;
  letter-spacing: 0;
}
.ihsan-body { position: relative; display: grid; gap: 0.75rem; }

/* =========================================================== Contact ===== */

.contact-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr auto 1fr; } }

/* Vertical "Or" divider on wide screens, horizontal when stacked. */
.or-divider {
  display: grid;
  place-items: center;
  gap: 1rem;
  color: var(--text-lo);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  grid-auto-flow: column;
}
.or-divider::before, .or-divider::after {
  content: '';
  background: var(--hairline);
  height: 1px;
  width: 100%;
  min-width: 3rem;
}
@media (min-width: 900px) {
  .or-divider { grid-auto-flow: row; height: 100%; }
  .or-divider::before, .or-divider::after { width: 1px; height: 100%; min-width: 0; min-height: 3rem; }
}

.field { display: grid; gap: 0.5rem; }
.field label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-lo); }
.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  font-size: 0.9375rem;
  transition: border-color var(--mid) var(--ease), background var(--mid) var(--ease);
}
.field textarea { min-height: 8rem; resize: vertical; line-height: 1.55; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: rgba(255, 255, 255, 0.18); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--gold-1);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.field select { appearance: none; cursor: pointer; padding-right: 2.5rem; }
.field--select { position: relative; }
.field--select .icon {
  position: absolute;
  right: 1rem; bottom: 0.95rem;
  pointer-events: none;
  color: var(--text-lo);
}
.field ::placeholder { color: var(--text-faint); }

/* Honeypot — off-screen, never focusable by a real user. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { font-size: 0.8125rem; min-height: 1.5rem; }
.form-status[data-state='error'] { color: #FF9A8B; }
.form-status[data-state='ok'] { color: var(--gold-text); }

/* ======================================================= Look Inside ===== */

/* ================================================= Look Inside ======== */

/*
  A sticky, scroll-filled timeline. Each step is a row: its name pins beside the
  line while the text and image scroll past, then hands over to the next. One
  continuous line runs through every marker, and its gold fill grows with scroll
  — bright at the tip, fading behind it — lighting each marker as it arrives.
*/
.process {
  --dot: 3.25rem;
  --line: 4px;
  --pin: 7rem;
  position: relative;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}

.process-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--dot) / 2 - var(--line) / 2);
  width: var(--line);
  border-radius: var(--line);
  overflow: hidden;
  background: linear-gradient(to bottom, transparent, var(--hairline) 6%, var(--hairline) 94%, transparent);
}
.process-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--fill, 0px);
  border-radius: inherit;
  background: linear-gradient(to top, var(--gold-1) 0%, var(--gold-2) 22%, transparent 100%);
  box-shadow: 0 0 22px 2px var(--gold-glow);
}

.process-step {
  display: grid;
  grid-template-columns: minmax(0, 26rem) minmax(0, 1fr);
  column-gap: clamp(2rem, 5vw, 5rem);
  padding-top: clamp(5rem, 11vw, 9rem);
}

.process-marker {
  position: sticky;
  top: var(--pin);
  align-self: start;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 1;
}

.process-dot {
  position: relative;
  flex: none;
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg);
  box-shadow: 0 0 0 1px var(--hairline);
  transition: box-shadow var(--slow) var(--ease);
}
.process-dot::after {
  content: '';
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 2px solid var(--hairline);
  transition: background var(--slow) var(--ease), border-color var(--slow) var(--ease),
              box-shadow var(--slow) var(--ease), transform var(--slow) var(--ease-out);
}
.process-step[data-lit='true'] .process-dot::after {
  background: var(--gold-1);
  border-color: var(--gold-1);
  box-shadow: 0 0 16px 2px var(--gold-glow);
}
.process-step[data-current='true'] .process-dot {
  box-shadow: 0 0 0 1px rgba(242, 169, 59, 0.55), 0 0 0 9px var(--gold-glow);
}
.process-step[data-current='true'] .process-dot::after { transform: scale(1.18); }

/* The name and the text reveal together as the step arrives. */
.process-label,
.process-body {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 620ms var(--ease-out), transform 620ms var(--ease-out);
}
.process-body { transition-delay: 90ms; }
.process-step[data-shown='true'] .process-label,
.process-step[data-shown='true'] .process-body { opacity: 1; transform: none; }

.process-num {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  color: var(--gold-text);
}
.process-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1.02;
  /* Upcoming names sit back; 0.62 still clears 3:1 for large text in both themes. */
  opacity: 0.62;
  transition: opacity var(--slow) var(--ease);
}
.process-step[data-lit='true'] .process-title { opacity: 0.82; }
.process-step[data-current='true'] .process-title { opacity: 1; }

.process-label--inline { display: none; }

.process-body { max-width: 42rem; padding-top: 0.4rem; }
.process-heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.process-copy {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.6;
  color: var(--text-lo);
}

.process-media { margin: 1.75rem 0 0; }
.process-media img,
.process-media.media--empty {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-card);
}
.process-media img {
  transform: scale(1.04);
  transition: transform 900ms var(--ease-out) 150ms;
}
.process-step[data-shown='true'] .process-media img { transform: none; }
.process-media figcaption { margin-top: 0.6rem; }
/* The placeholder shares the frame but centres its icon and label. */
.process-media.media--empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.6rem;
}

@media (max-width: 899px) {
  .process { --dot: 2.25rem; --line: 3px; --pin: 5.5rem; }
  .process-step {
    grid-template-columns: var(--dot) minmax(0, 1fr);
    column-gap: 1.1rem;
    padding-top: 3.75rem;
  }
  .process-label--pinned { display: none; }
  .process-label--inline { display: block; margin-bottom: 0.9rem; opacity: 1; transform: none; }
  .process-title { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .process-media { margin-top: 1.25rem; }
}

/* =========================================================== Hiring ====== */

.bts-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(13rem, 1fr);
  gap: 0.85rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
}
.bts-strip > * { scroll-snap-align: start; }

.values-list { display: grid; gap: 0; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.values-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.125rem, 2.4vw, 1.75rem);
  letter-spacing: -0.02em;
}
.values-list li:last-child { border-bottom: 1px solid var(--hairline); }
.values-list .value-num { font-family: var(--font-ui); font-size: 0.75rem; color: var(--gold-text); letter-spacing: 0.08em; }

/* Job board */
.job-filters {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  margin-bottom: 1.5rem;
}
.job-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 0.5rem;
}

.job-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.job-item { border-bottom: 1px solid var(--hairline); }
.job-item > a, .job-item > div {
  display: grid;
  gap: 0.5rem 1.5rem;
  grid-template-columns: 1fr auto;
  align-items: center;
  padding: 1.35rem 0;
}
.job-item h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.0625rem, 1.8vw, 1.25rem);
  letter-spacing: -0.02em;
  margin: 0;
  transition: color var(--mid) var(--ease);
}
.job-item:hover h3 { color: var(--gold-text); }
.job-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: 0.8125rem; color: var(--text-lo); }
.job-meta span { display: inline-flex; align-items: center; gap: 0.35rem; }

/* ============================================================ Modal ====== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: var(--overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: fade var(--mid) var(--ease);
}

.modal {
  position: relative;
  width: min(100%, 60rem);
  max-height: min(88vh, 52rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface-1);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  animation: rise var(--slow) var(--ease);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.modal-head h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.375rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  margin: 0;
}
.modal-head .modal-sub { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--text-lo); }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ============================================================ Toast ====== */

.toast-region {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-toast);
  display: grid;
  gap: 0.5rem;
  width: min(92vw, 26rem);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  background: var(--surface-1);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 0.875rem;
  animation: rise var(--mid) var(--ease);
}
.toast[data-tone='ok'] { border-color: rgba(242, 169, 59, 0.4); }
.toast[data-tone='ok'] .icon { color: var(--gold-1); }
.toast[data-tone='error'] { border-color: rgba(255, 154, 139, 0.45); }
.toast[data-tone='error'] .icon { color: #FF9A8B; }

/* ========================================================== Edit mode ==== */

/* Small inline affordance rendered next to editable content. Only ever in the
   DOM when a valid edit session exists. */
.edit-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 32px;
  padding: 0.25rem 0.7rem;
  margin-left: 0.5rem;
  border-radius: 999px;
  border: 1px dashed rgba(242, 169, 59, 0.45);
  background: rgba(242, 169, 59, 0.08);
  color: var(--gold-text);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  vertical-align: middle;
  transition: background var(--mid) var(--ease);
}
.edit-chip:hover { background: rgba(242, 169, 59, 0.18); }

.edit-bar {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.6rem 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid rgba(242, 169, 59, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
}

/* Admin editor forms inside modals. */
.editor-form { display: grid; gap: 1.1rem; }
.editor-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }
.editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hairline);
}
.editor-actions .spacer { margin-right: auto; }

.repeater { display: grid; gap: 0.75rem; }
.repeater-row {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: 1fr 1fr auto auto;
  align-items: end;
  padding: 0.85rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
}
@media (max-width: 640px) { .repeater-row { grid-template-columns: minmax(0, 1fr); } }

.admin-list { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.admin-list li {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--bg-elevated);
}
.admin-list .admin-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
}
.admin-list .admin-msg { font-size: 0.875rem; color: var(--text-lo); white-space: pre-wrap; }

/* =========================================================== Footer ====== */

.footer {
  position: relative;
  /* No top margin — the preceding .section already supplies the bottom rhythm. */
  border-top: 1px solid var(--hairline);
  padding-block: clamp(2.5rem, 6vw, 4rem) 2rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin: 0; padding: 0; list-style: none; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.8125rem;
  color: var(--text-lo);
  transition: color var(--mid) var(--ease);
}
.footer-links a:hover { color: var(--text-hi); }

.socials { display: flex; gap: 0.5rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline-soft);
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* The deliberately quiet "Web dev edit" pill. */
.webdev-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 32px;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--hairline-soft);
  background: transparent;
  color: var(--text-faint);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--mid) var(--ease), border-color var(--mid) var(--ease);
}
.webdev-pill:hover { color: var(--text-lo); border-color: var(--hairline); }

/* ============================== Living sheen on key type ================= */

/*
  Headings carry a slow gradient that shifts between two tones of their OWN
  colour — black to dark grey in light mode, off-white to warm grey in dark —
  plus a soft glow behind the glyphs. Both ends of every gradient clear WCAG AA,
  so the animation can never drift text below contrast.
*/
:root {
  --sheen-a: var(--text-hi);
  --sheen-b: #A9A395;                        /* dark theme: warm grey, 7.9:1 */
  --sheen-glow: rgba(242, 169, 59, 0.34);
  --sheen-glow-soft: rgba(242, 169, 59, 0.20);
}
:root[data-theme='light'] {
  --sheen-b: #5A5147;                        /* light theme: dark grey, 7.3:1 */
  --sheen-glow: rgba(201, 122, 46, 0.26);
  --sheen-glow-soft: rgba(201, 122, 46, 0.16);
}

@keyframes sheen-drift {
  0%   { background-position: 0% 50%; }
  100% { background-position: -200% 50%; }
}

/*
  Every heading-shaped element. background-clip:text needs a transparent fill,
  so the gradient IS the text — with the animation off the gradient still paints,
  it simply stops moving.
*/
.display,
.glow-text,
.win-card h3,
.card-body h3,
.job-item h3,
.process-heading, .process-title,
.disclosure-title,
.client-index-name,
.case-study-head h3,
.empty-state h3,
.modal-head h2 {
  background-image: linear-gradient(
    100deg,
    var(--sheen-a) 0%,
    var(--sheen-a) 28%,
    var(--sheen-b) 42%,
    var(--sheen-b) 50%,
    var(--sheen-a) 64%,
    var(--sheen-a) 100%
  );
  background-size: 300% 100%;
  background-repeat: repeat-x;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sheen-drift 9s linear infinite;
}

/* Display type gets the bigger halo; smaller headings a cheaper text-shadow. */
.display,
.glow-text { filter: drop-shadow(0 0 16px var(--sheen-glow)) drop-shadow(0 0 3px var(--sheen-glow-soft)); }

.win-card h3,
.card-body h3,
.job-item h3,
.process-heading, .process-title,
.disclosure-title,
.client-index-name,
.case-study-head h3,
.modal-head h2 { text-shadow: 0 0 18px var(--sheen-glow-soft); }

/* Gradient-filled text can't also carry a background colour, so the stat
   numbers keep their own gold gradient and opt out of the sheen. */
.stat-row .stat .num { animation: none; filter: none; }

/*
  A child of a gradient-filled heading inherits `transparent` but has no
  background of its own to clip — it would render invisible. Give any such child
  a real fill back, except a .glow-word, which brings its own gradient.
*/
.display > *:not(.glow-word),
.glow-text > *:not(.glow-word),
.disclosure-title > *:not(.glow-word),
.process-heading > *:not(.glow-word),
.modal-head h2 > *:not(.glow-word) {
  color: var(--text-hi);
  -webkit-text-fill-color: var(--text-hi);
}

/* One word inside a line, e.g. a name or a key noun. */
.glow-word {
  background-image: linear-gradient(100deg,
    var(--gold-text) 0%, var(--gold-text) 30%, var(--gold-1) 46%, var(--gold-text) 62%, var(--gold-text) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: sheen-drift 7s linear infinite;
}

/*
  Arrows and monoline icons breathe on the same cycle — a halo that swells and
  settles rather than a blink.
*/
@keyframes glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 2px var(--sheen-glow-soft)); opacity: 0.9; }
  50%      { filter: drop-shadow(0 0 10px var(--sheen-glow)); opacity: 1; }
}
.link-arrow .icon,
.results-row .result .icon,
.eyebrow .icon,
.carousel-nav .icon,
.client-index-row .icon,
.disclosure-meta .icon,
.btn .icon { animation: glow-pulse 5s ease-in-out infinite; }

/* Website screenshots and media frames get a drifting edge glow. */
@keyframes frame-glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--glass-border), 0 0 20px -8px var(--sheen-glow-soft); }
  50%      { box-shadow: 0 0 0 1px var(--glass-border), 0 0 38px -4px var(--sheen-glow); }
}
.site-grid .media,
.media--wide { animation: frame-glow 8s ease-in-out infinite; }

/* ==================================================== Scroll reveals ===== */

/*
  Shared reveal primitive (R5). JS adds [data-reveal] to anything that should
  animate in, and flips data-shown="true" via IntersectionObserver. The stagger
  index is passed as --i so grouped items cascade.
*/
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity var(--reveal) var(--ease-out) calc(var(--i, 0) * 70ms),
    transform var(--reveal) var(--ease-out) calc(var(--i, 0) * 70ms);
  will-change: opacity, transform;
}
[data-reveal][data-shown='true'] {
  opacity: 1;
  transform: none;
}

/* Hero parallax + hand-off. JS writes these from the scroll position. */
.hero-media,
.hero-light,
.hero-hand { will-change: transform; }

.hero-content,
.hero-foot { will-change: opacity, transform; }

/* ==================================================== Theme toggle ======= */

.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle .icon {
  position: absolute;
  transition: transform var(--slow) var(--ease), opacity var(--slow) var(--ease);
}
.theme-toggle .icon-sun   { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.theme-toggle .icon-moon  { opacity: 1; transform: none; }
:root[data-theme='light'] .theme-toggle .icon-sun  { opacity: 1; transform: none; }
:root[data-theme='light'] .theme-toggle .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* ================================================= Nav menu (R3) ========= */

.nav-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.5rem;
  padding: 1.1rem var(--gutter) clamp(2rem, 6vw, 3.5rem);
  background: var(--scrim);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  overflow-y: auto;
  animation: fade var(--mid) var(--ease);
}

.nav-menu-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* One item per line, left-aligned, large and legible. */
.nav-menu-links {
  display: grid;
  align-content: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu-links a {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: fit-content;
  padding: 0.6rem 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 4.4vw, 2rem);   /* 24–32px */
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-lo);
  transition: color var(--mid) var(--ease), transform var(--mid) var(--ease);
}
.nav-menu-links a:hover { color: var(--text-hi); transform: translateX(4px); }
.nav-menu-links .icon { width: 0.78em; height: 0.78em; opacity: 0.85; }

/* Active page gets a gold accent bar and a colour shift — not colour alone. */
.nav-menu-links a[aria-current='page'] {
  color: var(--gold-1);
  position: relative;
  padding-left: 1.1rem;
}
.nav-menu-links a[aria-current='page']::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 1.1em;
  border-radius: 2px;
  background: var(--gold-1);
}

/* Utilities (theme toggle, reserved Login slot) sit below a divider. */
.nav-menu-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}
.nav-menu-foot .micro { margin-right: auto; }

/* ====================================== Recent Wins carousel (R4) ======== */

.carousel { position: relative; }

.carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-block: 0.25rem;
  padding-inline-end: 4rem;   /* room so the last card clears the fade */
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; }

/*
  Snap fights a slow continuous drift — it would yank the row back to the
  nearest card every frame — so the auto-scrolling row opts out of it and out
  of smooth-scroll, and relies on free scrolling plus drag instead.
*/
.carousel-track[data-autoscroll='true'] {
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.carousel-track[data-dragging='true'] { cursor: grabbing; scroll-behavior: auto; scroll-snap-type: none; }
.carousel-track[data-dragging='true'] * { pointer-events: none; }

@media (prefers-reduced-motion: reduce) { .carousel-track { scroll-behavior: auto; } }

/* Right-edge fade hinting there's more to the right. */
.carousel::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: clamp(3rem, 8vw, 6rem);
  pointer-events: none;
  background: linear-gradient(to left, var(--bg), transparent);
  opacity: 1;
  transition: opacity var(--mid) var(--ease);
}
.carousel[data-at-end='true']::after { opacity: 0; }

.carousel-nav {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  z-index: 2;
  background: var(--surface-1);
  transition: opacity var(--mid) var(--ease), transform var(--fast) var(--ease);
}
.carousel-nav:hover { transform: translateY(-50%) scale(1.06); }
.carousel[data-at-end='true'] .carousel-nav { opacity: 0; pointer-events: none; }

/* Touch devices get swipe; the button is desktop-only affordance. */
@media (hover: none) { .carousel-nav { display: none; } }

/* ================================= Micro-interactions (R10) ============== */

.glass-card { box-shadow: var(--shadow-card); }

a.glass-card,
.glass-card--interactive,
.win-card,
.job-item,
.carousel-track > * {
  transition:
    transform var(--mid) var(--ease),
    border-color var(--mid) var(--ease),
    background var(--mid) var(--ease),
    box-shadow var(--mid) var(--ease);
}
a.glass-card:hover,
.glass-card--interactive:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 60px -34px var(--gold-glow), var(--shadow-card);
}
a.glass-card:active, .glass-card--interactive:active { transform: translateY(-1px); }

.win-card:hover .media,
.carousel-track > *:hover .media {
  border-color: rgba(242, 169, 59, 0.35);
  transform: scale(1.012);
}
.win-card .media,
.carousel-track > * .media { transition: transform var(--mid) var(--ease), border-color var(--mid) var(--ease); }

.btn:hover { transform: translateY(-1px); }
.btn--gold:hover { box-shadow: 0 0 54px -6px var(--gold-glow); }
.icon-btn:hover { transform: scale(1.06); }
.icon-btn { transition: color var(--mid) var(--ease), border-color var(--mid) var(--ease), transform var(--fast) var(--ease); }

/*
  Animated unravel for photography + websites (R10). The Video Marketing
  industry panels stay instant, per the original brief — they use plain
  [hidden] and are untouched by this.
*/
.disclosure-panel--animated {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  overflow: hidden;
  transition: grid-template-rows var(--slow) var(--ease-out), opacity var(--slow) var(--ease-out);
}
.disclosure-panel--animated > * { min-height: 0; min-width: 0; }
/* An implicit grid column is `auto`, which grows to its items' min-content —
   and a carousel's min-content is every card side by side. Pin the column. */
.disclosure-panel--animated { grid-template-columns: minmax(0, 1fr); }
/* Same for the stacking grids a carousel can sit inside (case studies, modals). */
.stack, .stack-2, .case-study, .video-card, .win-card { grid-template-columns: minmax(0, 1fr); }
.carousel,
.carousel-track { min-width: 0; max-width: 100%; }
.disclosure-panel--animated[data-open='true'] { grid-template-rows: 1fr; opacity: 1; }

/* ====================================================== Round 4 ======== */

/* ---------------------------------------------------- Video poster tiles --- */

/*
  A Drive video tile shows its poster, drawn twice: a blurred, scaled copy fills
  the tile, and the sharp frame sits on top at its own proportions.
  A square or landscape video in a 9:16 tile therefore shows the whole frame,
  centred, with no black bars and nothing cropped — the misalignment people saw
  came from Drive letterboxing a square video inside a portrait player.
*/
.media--video {
  display: block;
  width: 100%;
  /* Lets the player box size itself against the tile in both directions. */
  container-type: size;
}

/* The inline player: the video's own proportions, centred in the tile, fitting
   whichever side runs out first — so no letterboxing, whatever the shape. */
.media-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: min(100cqw, calc(100cqh * var(--ratio, 0.5625)));
  aspect-ratio: var(--ratio, 0.5625);
  transform: translate(-50%, -50%);
}
.media-frame:empty { display: none; }
.media--video[data-hydrated='true'] .media-play { display: none; }

/*
  Drive lays out at var(--base) — at least 480px, below which it overflows and
  crops — and is scaled down to the frame. Transform-origin top-left, so the
  scaled player lands exactly on the frame.
*/
.media--video .media-frame iframe {
  inset: auto;
  top: 0;
  left: 0;
  width: var(--base, 480px);
  height: calc(var(--base, 480px) / var(--ratio, 0.5625));
  /* The base rule caps iframes at max-width: 100%, which would clamp the player
     straight back down to the tile's width and defeat the scaling. */
  max-width: none;
  max-height: none;
  transform: scale(var(--scale, 1));
  transform-origin: 0 0;
}

/*
  Drive's "Pop out" button opens the file in a new tab. This shield sits over
  that corner — sized in the player's own units, so it tracks the scale — and
  swallows the click. It also shades the icon while the controls are showing.
*/
.media-frame::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  width: calc(68px * var(--scale, 1));
  height: calc(64px * var(--scale, 1));
  background: radial-gradient(circle at 100% 0, rgba(6, 5, 5, 0.9) 0 42%, rgba(6, 5, 5, 0) 78%);
  opacity: 0;
  transition: opacity var(--mid) var(--ease);
}
.media--video:hover .media-frame::after { opacity: 1; }
.media--video .media-thumb-fill {
  transform: scale(1.3);
  filter: blur(22px) saturate(1.2) brightness(0.62);
}
.media--video .media-thumb { object-fit: contain; }

.media-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  padding: 0;
  cursor: pointer;
  z-index: 2;
  transition: transform var(--mid) var(--ease), background var(--mid) var(--ease), color var(--mid) var(--ease);
}
.media-play .icon { width: 20px; height: 20px; fill: currentColor; stroke: none; margin-left: 3px; }
.media--video:hover .media-play,
.media-play:focus-visible {
  transform: scale(1.08);
  background: rgba(242, 169, 59, 0.9);
  color: #17120A;
}

/* A poster that can't load (file not shared publicly) is still a play tile. */
.media--thumb-failed .media-thumb,
.media--thumb-failed .media-thumb-fill { display: none; }
.media--thumb-failed {
  background:
    linear-gradient(150deg, rgba(242, 169, 59, 0.12), transparent 60%),
    var(--bg-elevated);
}

/* ------------------------------------------------------ Video carousels --- */

.carousel--videos .carousel-track {
  grid-auto-columns: clamp(9.5rem, 40vw, 13rem);
  padding-inline-end: 0;
}
/* Selected reels: a touch larger than a client's row, still smaller than home. */
.carousel--reels .carousel-track { grid-auto-columns: clamp(9.5rem, 40vw, 15rem); }
/* The edge fade only makes sense when the row actually runs on. */
.carousel--videos:not([data-looping='true'])::after { display: none; }
.video-card { margin: 0; display: grid; gap: 0.5rem; align-content: start; }

/* ------------------------------------------------------ Our Work layout --- */

.work-actions {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.work-actions .btn[aria-expanded='true'] {
  border-color: rgba(242, 169, 59, 0.55);
  color: var(--gold-text);
}

.industry-layout,
.photo-layout {
  display: grid;
  gap: clamp(1rem, 3vw, 2rem);
  align-items: start;
}
.industry-layout { grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); padding-bottom: 0.5rem; }
.photo-layout { grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); }

/* ---------------------------------------------------------- Theme intro --- */

/* Theme switches crossfade the whole page where View Transitions exist. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: var(--theme-swap, 450ms);
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toggle-spotlight {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242, 169, 59, 0.6), 0 0 20px 2px rgba(242, 169, 59, 0.45); }
  50%      { box-shadow: 0 0 0 11px rgba(242, 169, 59, 0), 0 0 30px 6px rgba(242, 169, 59, 0.6); }
}
.theme-toggle.theme-toggle--spotlight {
  border-color: var(--gold-1);
  color: var(--gold-1);
  transform: scale(1.12);
  animation: toggle-spotlight 1.1s ease-in-out infinite;
}

.theme-hint {
  position: fixed;
  z-index: var(--z-toast);
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid rgba(242, 169, 59, 0.5);
  color: var(--text-hi);
  font-size: 0.8125rem;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.55);
  animation: rise var(--mid) var(--ease);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease);
}
.theme-hint::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 16px;
  width: 10px;
  height: 10px;
  background: inherit;
  border-left: 1px solid rgba(242, 169, 59, 0.5);
  border-top: 1px solid rgba(242, 169, 59, 0.5);
  transform: rotate(45deg);
}
.theme-hint--out { opacity: 0; transform: translateY(-4px); }

/* --------------------------------------------------------- Text editing --- */

body[data-copy-editing='true'] [data-copy] {
  outline: 1px dashed rgba(242, 169, 59, 0.6);
  outline-offset: 3px;
  border-radius: 3px;
  cursor: text;
}
body[data-copy-editing='true'] [data-copy]:hover { outline-style: solid; }

/* Gradient-filled headings would hide the caret and the selection, so the text
   being edited is shown solid until it's saved. */
[data-copy].copy-editing {
  outline: 2px solid var(--gold-1) !important;
  outline-offset: 4px;
  background-image: none !important;
  color: var(--text-hi) !important;
  -webkit-text-fill-color: var(--text-hi) !important;
  caret-color: var(--gold-1);
  animation: none !important;
  filter: none !important;
}

.copy-toolbar {
  position: fixed;
  z-index: var(--z-toast);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.4rem 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid rgba(242, 169, 59, 0.45);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 12px 34px -14px rgba(0, 0, 0, 0.55);
}
.copy-toolbar-key {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-right: 0.2rem;
}
.edit-text-toggle[aria-pressed='true'] {
  background: var(--gold-1);
  color: #17120A;
  border-color: transparent;
}

/* ------------------------------------------------------------- Mobile --- */

@media (max-width: 720px) {
  .industry-layout,
  .photo-layout { grid-template-columns: minmax(0, 1fr); }
  .photo-layout > .media { max-width: 15rem; }
  /* On a phone a client's reel sits small with their name beside it — never one
     big reel filling the screen — and their other reels run full width below. */
  .client-feature { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; padding-block: 1.5rem; }
  .client-feature-lead,
  .client-feature--solo .client-feature-lead {
    grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
    column-gap: 1rem;
    align-items: end;
  }
}

@media (max-width: 560px) {
  .carousel-track { grid-auto-columns: min(66vw, 240px); }
  .work-actions .btn { flex: 1 1 100%; justify-content: center; }
  .modal { padding: 1.1rem; border-radius: 16px; }
  .edit-bar { left: 0.75rem; right: 0.75rem; justify-content: space-between; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle.theme-toggle--spotlight { animation: none; transform: none; }
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
  .media-play { transition: none; }
}

/* ============================================================ Loader ====== */

/*
  The homepage intro film. Its background is the film's own #171717, so on any
  screen shape the letterboxing disappears into it. After the film, the black
  lifts away while the wordmark flies into the nav.
*/
.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  /* The film's own opening colour, so the first paint already matches it. */
  background-color: #E2E2E2;
  cursor: pointer;
}
html[data-loading] .loader { display: block; }
html[data-loading] { overflow: hidden; }

/*
  The film's own edges, stretched out to the sides of the screen — see the
  script in index.html. Painted at a quarter resolution and scaled back up here,
  which is all the detail a field of stretched edges can carry anyway.
*/
.loader-wash {
  position: absolute;
  inset: -8%;
  display: block;
  width: 116%;
  height: 116%;
  /*
    Blurred, for two reasons. A quarter-resolution canvas stretched back up has
    visible steps in it, and stretching the picture's edges outwards turns a
    diagonal into stripes — both of which read as background once they are soft.
    The radius stays well short of the wordmark, which sits a quarter of the
    frame in from the nearest edge, so nothing of the logo bleeds out past the
    film. The canvas runs 8% past the screen on every side so the blur has real
    pixels to reach for rather than pulling in transparency at the edges.
  */
  filter: blur(clamp(14px, 3vw, 34px));
}

/*
  Shown at its own size rather than stretched over the whole screen: the film is
  1280 wide, and blown up to a desktop display it went soft. The wash behind it
  carries its background out to the edges, so it still reads as full screen.
*/
.loader-video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 720px);
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  transition: opacity 260ms var(--ease);
}
.loader--lifting {
  background-color: transparent;
  transition: background-color 900ms var(--ease);
  pointer-events: none;
}
.loader--lifting .loader-wash {
  opacity: 0;
  transition: opacity 900ms var(--ease);
}

.loader-skip {
  position: absolute;
  left: 50%;
  bottom: clamp(1.25rem, 4vh, 2.25rem);
  transform: translateX(-50%);
  min-height: 40px;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 241, 232, 0.72);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 260ms var(--ease), color var(--mid) var(--ease);
}
.loader-skip:hover { color: #F5F1E8; }
/* The film opens on a light background and ends on a dark one; the skip button
   follows it, or it would be invisible over one of them. */
.loader[data-wash='light'] .loader-skip {
  border-color: rgba(0, 0, 0, 0.16);
  background: rgba(0, 0, 0, 0.04);
  color: rgba(23, 23, 23, 0.66);
}
.loader[data-wash='light'] .loader-skip:hover { color: #171717; }
.loader--lifting .loader-skip { opacity: 0; }

.loader-flyer {
  position: fixed;
  z-index: 301;
  transform-origin: 0 0;
  pointer-events: none;
}
.loader-flyer img { position: absolute; inset: 0; width: 100%; height: 100%; }
.loader-flyer-alt { opacity: 0; }

/* ================================================== Reduced motion ======= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  /* Scroll-driven reveals must never leave content invisible. */
  [data-reveal] { opacity: 1; transform: none; }

  /* No parallax, no drift, no hover displacement. */
  .glow { animation: none; }
  .hero-media, .hero-light, .hero-hand { transform: none !important; }
  .hero-content, .hero-foot { opacity: 1 !important; transform: none !important; }
  a.glass-card:hover, .glass-card--interactive:hover,
  .btn:hover, .icon-btn:hover, .nav-menu-links a:hover { transform: none; }
  .win-card:hover .media, .carousel-track > *:hover .media { transform: none; }

  /* Unravel opens instantly rather than animating. */
  .disclosure-panel--animated { transition: none; }

  /* The sheen stops drifting but the gradient still paints, so headings keep
     their fill and never go transparent. */
  .display, .glow-text, .glow-word, .win-card h3, .card-body h3, .job-item h3,
  .process-heading, .process-title, .disclosure-title, .client-index-name, .case-study-head h3,
  .empty-state h3, .modal-head h2 { animation: none; }
  .link-arrow .icon, .results-row .result .icon, .eyebrow .icon,
  .carousel-nav .icon, .client-index-row .icon, .disclosure-meta .icon,
  .btn .icon { animation: none; filter: none; opacity: 1; }
  .site-grid .media, .media--wide { animation: none; }

  /* Grain holds still rather than flickering. */
  .grain, .hero-grain { animation: none; }
}

/*
  Safety net: if background-clip:text isn't supported, the transparent fill
  would make every heading invisible. Restore a solid colour in that case.
*/
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .display, .glow-text, .glow-word, .win-card h3, .card-body h3, .job-item h3,
  .process-heading, .process-title, .disclosure-title, .client-index-name, .case-study-head h3,
  .empty-state h3, .modal-head h2 {
    background-image: none;
    color: var(--text-hi);
    -webkit-text-fill-color: var(--text-hi);
  }
  .glow-word { color: var(--gold-text); -webkit-text-fill-color: var(--gold-text); }
}
