/* ==========================================================================
   Adria Holdings, adriaholdings.com
   Hand-coded. Warm near-black ground, bone type, one amber accent.
   Switzer (display + text) / Sentient italic (accent words) / IBM Plex Mono (labels, data).
   ========================================================================== */

/* ---------- Fonts (self-hosted woff2) ---------- */
@font-face { font-family: "Switzer";  src: url("../fonts/Switzer-Regular.woff2")      format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer";  src: url("../fonts/Switzer-Medium.woff2")       format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer";  src: url("../fonts/Switzer-Semibold.woff2")     format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Sentient"; src: url("../fonts/Sentient-LightItalic.woff2") format("woff2"); font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("../fonts/IBMPlexMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --ground:   #131210;   /* warm near-black */
  --ground-2: #1c1b18;
  --bone:     #ebe7df;
  --bone-2:   #a9a49a;
  --bone-3:   #6f6b63;
  --rule:     rgba(235, 231, 223, 0.14);
  --amber:    #d5a24d;
  --amber-deep: #8f6a1f; /* the same accent on bone */

  --bg: var(--ground);
  --fg: var(--bone);
  --fg-2: var(--bone-2);
  --fg-3: var(--bone-3);
  --accent: var(--amber);
  --dot: #2b2a26;

  --display: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --text:    "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif:   "Sentient", Georgia, "Times New Roman", serif;
  --mono:    "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4.2vw, 76px);
  --gap:    clamp(16px, 2vw, 32px);
  --nav-h:  64px;
  --section: clamp(96px, 14vh, 184px);

  --ease: cubic-bezier(0.22, 0.74, 0.18, 1);
  color-scheme: dark;
}

/* ---------- Reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
html.reduce { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--amber); color: var(--ground); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
.label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.label .count { text-transform: none; letter-spacing: 0.01em; color: var(--fg-2); }
.serif {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: 1.06em;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.arrow { display: inline-block; margin-left: 0.5em; transition: transform 0.5s var(--ease); }
a:hover .arrow { transform: translateX(4px); }

/* ---------- Layout primitives ---------- */
.wrap { padding-inline: var(--gutter); max-width: 1680px; margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

.section-head {
  position: relative;
  padding-top: 14px;
  margin-bottom: clamp(40px, 7vh, 96px);
}
.rule {
  display: block;
  height: 1px;
  background: var(--rule);
  transform-origin: left center;
}
.section-head .rule { position: absolute; inset: 0 0 auto 0; }

/* Text masks for directed reveals */
.mask { display: block; overflow: clip; }
.mask .in { display: block; }

/* ---------- Opener ----------
   Two ground-toned panels meeting at a seam snapped to a hero grid line (JS sets --seam). Only the 1px edges,
   the tag and the panels' transforms ever move. Sits under the grain so the cover carries the same texture. */
.opener {
  --seam: 50svh;
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  animation: opener-expire 0.01s linear 3.6s forwards;   /* CSS-only insurance: lifts even if main.js never runs */
}
.opener-top, .opener-bottom { position: absolute; left: 0; right: 0; background: var(--ground); will-change: transform; }
.opener-top { top: 0; height: var(--seam); }
.opener-bottom { top: var(--seam); bottom: 0; }
.opener-edge {
  position: absolute;
  left: var(--gutter); right: var(--gutter);
  height: 1px;
  background: rgba(235, 231, 223, 0.38);
  transform-origin: left center;
  transform: scaleX(0);
}
.opener-top .opener-edge { bottom: 0; }
.opener-bottom .opener-edge { top: 0; opacity: 0; }
.opener-label { position: absolute; left: var(--gutter); top: 14px; color: var(--amber); }
.opener-label .in { transform: translateY(110%); }
.no-js .opener, .reduce .opener, .intro-fallback .opener { display: none; }
@keyframes opener-expire { to { visibility: hidden; } }

/* ---------- Grain ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  height: var(--nav-h);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  color: var(--bone);
  background: var(--ground);           /* always opaque: content can never show through the bar */
  transform: translateY(0);
  transition: transform 0.55s var(--ease), background 0.35s linear, color 0.35s linear;
}
.nav::after {
  content: "";
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: 0;
  height: 1px;
  background: var(--rule);
  opacity: 0;
  transition: opacity 0.25s linear;
}
.nav.is-scrolled::after { opacity: 1; }
.nav.is-hidden { transform: translateY(-100%); }
/* Over the bone section: same bar, inverted */
.nav.is-light {
  background: var(--bone);
  color: var(--ground);
  --rule: rgba(19, 18, 16, 0.16);
  --accent: var(--amber-deep);
}
.nav.is-menu { transform: translateY(0); background: var(--ground); color: var(--bone); --rule: rgba(235, 231, 223, 0.14); --accent: var(--amber); }
.wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  justify-self: start;
}
.mark {
  width: 8px; height: 8px;
  background: var(--accent);
  transform: rotate(45deg);
  transition: transform 0.6s var(--ease), background 0.35s linear;
}
.wordmark:hover .mark { transform: rotate(135deg); }
.nav-meta { justify-self: center; opacity: 0.75; }
.nav-links { justify-self: end; display: flex; gap: clamp(20px, 2.4vw, 40px); }
.nav-links a,
.email,
.footer-links a,
.step-link,
.doc-link {
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 0% 1px;
  background-position: left calc(100% - 1px);
  transition: background-size 0.6s var(--ease), color 0.35s var(--ease);
}
.nav-links a:hover, .nav-links a:focus-visible,
.email:hover, .email:focus-visible,
.footer-links a:hover,
.step-link:hover,
.doc-link:hover { background-size: 100% 1px; color: var(--accent); }
.nav-links a { font-size: 0.875rem; font-weight: 500; letter-spacing: -0.005em; padding-bottom: 2px; }
.menu-btn { display: none; justify-self: end; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6875rem; padding: 8px 0; }

/* Mobile menu overlay */
.menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--ground);
  color: var(--bone);
  visibility: hidden; /* parked off-screen by JS (yPercent -100); .open makes it visible */
  padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 24px) var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.menu.open { visibility: visible; }
.menu-links { display: flex; flex-direction: column; }
.menu-links a {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 9vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.menu-index { color: var(--amber); letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.6875rem; }
.menu-foot { color: var(--fg-3); }

/* ---------- Hero ---------- */
.hero {            /* full-bleed shell: carries the grid layer; the content wrap sits inside it */
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: grid;
}
.hero-inner {
  width: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(24px, 5vh, 56px));
  padding-bottom: clamp(24px, 4vh, 48px);
}
/* Graph-paper grid behind the hero only: bone hairlines at a few percent, dissolving toward the bottom */
.hero-grid {
  --cell: clamp(56px, 6.6vw, 104px);
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(235, 231, 223, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(235, 231, 223, 0.07) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 100%);
  will-change: transform;
}
.hero-main { align-self: start; padding-block: clamp(16px, 4vh, 48px) clamp(40px, 8vh, 96px); }   /* headline sits high, under the nav */
.hero-title {
  grid-column: 1 / 13;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.375rem, 5.9vw, 6.25rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 28ch;   /* four lines at desktop widths */
}
.hero-title .serif { font-size: 1.04em; }
.nb { white-space: nowrap; }   /* phrases that must not break: SplitText measures rendered lines, so this holds */
.hl { display: inline; }        /* headline phrases: natural wrapping on phones, one line each from 768px up */
@media (min-width: 768px) {
  .hl { display: block; }
  .hero-title { text-wrap: initial; max-width: none; }
}
/* Entrance choreography: these start hidden and are composed in by JS; the fallback class
   (added by JS after 3.5 s) guarantees nothing can stay hidden if the sequence never runs. */
.js:not(.reduce) .hero-title { visibility: hidden; }
.js:not(.reduce) [data-intro], .js:not(.reduce) .hero-lede { visibility: hidden; }
.intro-fallback .hero-title, .intro-fallback [data-intro], .intro-fallback .hero-lede, .intro-fallback .philosophy-text, .intro-fallback .cap-title, .intro-fallback .cap-desc { visibility: visible !important; }
.line-mask { padding-block: 0.06em; margin-block: -0.06em; } /* room for ascenders/descenders inside every line clip */
.hero-title .line-mask { padding-block: 0.1em; margin-block: -0.1em; } /* room for ascenders/descenders inside the clip */
.hero-bottom { align-items: end; row-gap: 24px; }
.scroll-cue {
  grid-column: 1 / 4;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--fg-2);
}
.scroll-line { display: block; width: 1px; height: 40px; background: var(--bone); transform-origin: top; }
.hero-index { grid-column: 4 / 8; color: var(--fg-2); display: flex; flex-direction: column; gap: 2px; }
.hero-index li::before { content: "· "; color: var(--fg-3); }
.hero-lede {
  grid-column: 8 / 13;
  font-size: clamp(1rem, 1.15vw, 1.125rem);
  line-height: 1.5;
  color: var(--fg-2);
  max-width: 44ch;
  text-wrap: pretty;
}

/* Cursor marks inside the hero grid (positioned by JS; sizes centred with margins so GSAP can own transform) */
.hero-tick, .hero-stamp { position: absolute; pointer-events: none; will-change: transform, opacity; }
.hero-tick { width: 9px; height: 9px; margin: -5px 0 0 -5px; }
.hero-tick::before, .hero-tick::after { content: ""; position: absolute; background: var(--bone-2); }
.hero-tick::before { left: 0; right: 0; top: 4px; height: 1px; }
.hero-tick::after { top: 0; bottom: 0; left: 4px; width: 1px; }
.hero-stamp { width: 10px; height: 10px; margin: -5px 0 0 -5px; }
.hero-stamp::before { content: ""; position: absolute; inset: 0; background: var(--amber); transform: rotate(45deg); }
.hero-stamp i { position: absolute; left: 18px; top: -3px; white-space: nowrap; font-style: normal; color: var(--amber); font-size: 0.6875rem; letter-spacing: 0.08em; }

/* ---------- Capabilities ---------- */
.caps { padding-block: var(--section) var(--section); }
.cap {
  position: relative;
  padding-block: clamp(28px, 4.5vh, 52px);
  row-gap: 18px;
  align-items: start;
}
.cap-rule, .stat-rule {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--rule);
  transform-origin: left center;
}
.cap-end { position: relative; height: 1px; }
.cap-index { grid-column: 1 / 3; color: var(--fg-2); padding-top: 0.6em; transition: color 0.4s var(--ease); }
.cap-title {
  grid-column: 3 / 8;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.625rem, 2.9vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 14ch;
}
.cap-body { grid-column: 8 / 13; display: flex; flex-direction: column; gap: 22px; padding-top: 0.45em; }
.cap-desc {
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--fg-2);
  text-wrap: pretty;
}
.cap-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px var(--gap);
  font-size: 0.875rem;
  color: var(--fg-2);
}
.cap-items li { display: flex; gap: 10px; }
.cap-items li::before { content: ""; width: 5px; height: 5px; margin-top: 0.5em; background: var(--dot); flex: none; transition: background 0.4s var(--ease); }
@media (hover: hover) {
  .cap:hover .cap-index { color: var(--accent); }
  .cap:hover .cap-items li::before { background: var(--accent); }
}

/* ---------- Approach ---------- */
.approach { position: relative; overflow-x: clip; } /* the horizontal track overhangs the viewport before it pins */
.approach-pin {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + clamp(16px, 4vh, 40px));
  padding-bottom: clamp(24px, 4vh, 40px);
}
.approach-pin > .wrap:first-child { width: 100%; }
.approach-pin .section-head { margin-bottom: clamp(24px, 5vh, 64px); }
.approach-track {
  flex: 1;
  display: flex;
  align-items: center;
  padding-inline: var(--gutter);
  gap: clamp(32px, 6vw, 120px);
  will-change: transform;
}
.step {
  flex: none;
  width: clamp(280px, 56vw, 860px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.step-when { color: var(--accent); }
.step-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.25rem, 9.5vw, 11rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-top: 8px;
}
.step-text {
  font-size: clamp(1.0625rem, 1.35vw, 1.3125rem);
  line-height: 1.45;
  max-width: 44ch;
  color: var(--fg-2);
  margin-top: 8px;
  text-wrap: pretty;
}
.step-link { align-self: flex-start; font-weight: 500; font-size: 0.9375rem; margin-top: 8px; padding-bottom: 2px; }
.approach-foot {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: clamp(28px, 5vh, 56px);
  color: var(--fg-2);
}
.approach-progress { flex: 1; height: 1px; background: var(--rule); position: relative; }
.approach-progress i { position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left; }

/* ---------- Numbers (bone) ---------- */
.is-bone {
  --bg: var(--bone);
  --fg: var(--ground);
  --fg-2: #5f5b54;
  --fg-3: #8d887f;
  --rule: rgba(19, 18, 16, 0.16);
  --accent: var(--amber-deep);
  --dot: #d6d1c7;
  background: var(--bg);
  color: var(--fg);
}
.numbers { padding-block: clamp(72px, 10vh, 128px) var(--section); }
.stats { row-gap: clamp(56px, 9vh, 120px); }
.stat { position: relative; padding-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.stat-a { grid-column: 1 / 6; }
.stat-b { grid-column: 7 / 12; margin-top: clamp(48px, 12vh, 160px); }
.stat-tag { color: var(--accent); }
.stat-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(4rem, 9.5vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
}
.stat-num .in { display: flex; align-items: baseline; }
.stat-num .mask { padding-bottom: 0.08em; margin-bottom: -0.08em; }
.stat-num .unit { font-weight: 500; font-size: 0.42em; color: var(--fg-2); margin-left: 0.08em; letter-spacing: -0.02em; }
.stat-num .unit.pre { margin-left: 0; margin-right: 0.06em; }
.stat-ctx { font-size: clamp(1rem, 1.2vw, 1.1875rem); color: var(--fg-2); max-width: 30ch; line-height: 1.45; text-wrap: pretty; }

/* ---------- Philosophy ---------- */
.philosophy { padding-block: var(--section) var(--section); }
.philosophy .grid { row-gap: clamp(32px, 6vh, 64px); }
.philosophy-text {
  grid-column: 1 / 12;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4.7vw, 5rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 20ch;
}
.js:not(.reduce) .philosophy-text { visibility: hidden; }
.philosophy-note { grid-column: 8 / 13; color: var(--fg-2); }

/* ---------- Contact ---------- */
.contact { padding-block: 0 clamp(72px, 10vh, 128px); }
.contact-grid { row-gap: clamp(40px, 6vh, 72px); }
.contact-title {
  grid-column: 1 / 8;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.6vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.contact-main { grid-column: 1 / 8; display: flex; flex-direction: column; gap: clamp(28px, 5vh, 48px); }
.contact-lede { font-size: clamp(1rem, 1.2vw, 1.1875rem); line-height: 1.5; color: var(--fg-2); max-width: 52ch; text-wrap: pretty; }

/* Form: underlined fields, mono labels, one amber rule that draws on focus */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(22px, 3vh, 32px) var(--gap); }
.field { position: relative; display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.field-wide { grid-column: 1 / -1; }
.field-label { color: var(--fg-2); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6875rem; transition: color 0.35s var(--ease); }
.field:focus-within .field-label { color: var(--fg); }
.field input, .field textarea {
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.45;
  color: var(--fg);
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  outline: 0;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 3.2em; }
.field input:-webkit-autofill, .field textarea:-webkit-autofill { -webkit-text-fill-color: var(--fg); -webkit-box-shadow: 0 0 0 1000px var(--ground) inset; transition: background-color 9999s; }
.field-rule { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule); transform-origin: left center; }
.field-rule::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(0); transform-origin: left center; transition: transform 0.6s var(--ease); }
.field:focus-within .field-rule::after { transform: scaleX(1); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: clamp(20px, 3vh, 28px); }
.submit {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6875rem;
  color: var(--fg);
  border: 1px solid var(--fg);
  padding: 13px 18px;
  display: inline-flex;
  align-items: center;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.submit .arrow { margin-left: 0.8em; }
.submit:hover, .submit:focus-visible { color: var(--ground); background: var(--amber); border-color: var(--amber); }
.submit:hover .arrow { transform: translateX(4px); }
.submit:disabled { opacity: 0.55; cursor: progress; }
.form-note { color: var(--fg-2); min-height: 1.5em; }
.form-note.is-error { color: var(--amber); }
.form-done { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.form-done[hidden], .form[hidden] { display: none; }
.done-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.03em;
}
.done-text { font-size: clamp(1rem, 1.2vw, 1.1875rem); color: var(--fg-2); max-width: 44ch; }
.done-meta { color: var(--fg-3); }
.contact-side { grid-column: 9 / 13; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; padding-top: 0.5em; }
.side-link { background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-size: 100% 1px; background-position: left calc(100% - 1px); transition: color 0.35s var(--ease); }
.side-link:hover { color: var(--accent); }
.copy {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.6875rem;
  color: var(--fg-2);
  border: 1px solid var(--rule);
  padding: 9px 14px;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.copy:hover, .copy.done { color: var(--ground); background: var(--amber); border-color: var(--amber); }
.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--fg-2);
}
.contact-meta > div { display: grid; grid-template-columns: 11ch 1fr; gap: 12px; }
.contact-meta dt { color: var(--fg-3); }
.contact-meta dd { color: var(--fg); }

/* ---------- Legal documents (privacy.html, terms.html) ---------- */
.doc { padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(40px, 10vh, 112px)); padding-bottom: var(--section); }
.doc-grid { row-gap: clamp(40px, 6vh, 72px); }
.doc-title {
  grid-column: 1 / 8;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.25rem, 5.4vw, 5.75rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.doc-updated { grid-column: 9 / 13; align-self: end; color: var(--fg-2); }
.doc-body { grid-column: 4 / 11; max-width: 64ch; font-size: 1.0625rem; line-height: 1.6; color: var(--fg-2); }
.doc-body h2 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg);
  margin: 2.75rem 0 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body p + p, .doc-body p + ul, .doc-body ul + p { margin-top: 0.75rem; }
.doc-body ul { display: flex; flex-direction: column; gap: 6px; }
.doc-body li { position: relative; padding-left: 17px; }
.doc-body li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 5px; height: 5px; background: var(--accent); }
.doc-body strong { color: var(--fg); font-weight: 500; }
.doc-link { color: var(--fg); padding-bottom: 1px; }

/* ---------- Careers ---------- */
.careers { padding-bottom: clamp(48px, 8vh, 96px); }
.careers .section-head { margin-bottom: clamp(32px, 6vh, 72px); }
.careers-head { row-gap: clamp(24px, 4vh, 40px); }
.careers-lede { grid-column: 1 / 8; font-size: clamp(1rem, 1.2vw, 1.1875rem); line-height: 1.5; color: var(--fg-2); max-width: 52ch; text-wrap: pretty; }
.roles { padding-block: 0 var(--section); }
.role { position: relative; padding-block: clamp(28px, 4.5vh, 52px); row-gap: 18px; align-items: start; }
.role-index { grid-column: 1 / 3; color: var(--fg-2); padding-top: 0.6em; }
.role-head { grid-column: 3 / 8; display: flex; flex-direction: column; gap: 14px; }
.role-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.625rem, 2.9vw, 2.9rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.role-meta { color: var(--fg-2); }
.role-body { grid-column: 8 / 13; display: flex; flex-direction: column; gap: 14px; padding-top: 0.45em; }
.role-desc { max-width: 46ch; font-size: 1rem; line-height: 1.55; color: var(--fg-2); text-wrap: pretty; }
.role-h { font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.6875rem; color: var(--fg); margin-top: 10px; }
.role-items { display: flex; flex-direction: column; gap: 6px; font-size: 0.9375rem; color: var(--fg-2); max-width: 48ch; }
.role-items li { display: flex; gap: 10px; }
.role-items li::before { content: ""; width: 5px; height: 5px; margin-top: 0.55em; background: var(--dot); flex: none; }
.role .step-link { margin-top: 8px; }
.apply { padding-block: 0 clamp(72px, 10vh, 128px); }
.side-note { color: var(--fg-3); max-width: 26ch; }

/* ---------- Footer ---------- */
.footer { padding-block: 22px calc(28px + env(safe-area-inset-bottom, 0px)); position: relative; }
.footer > .rule { position: absolute; top: 0; left: var(--gutter); right: var(--gutter); }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--fg-2); }
.footer-links { display: flex; gap: 28px; }
.footer-links a { padding-bottom: 1px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1199px) {
  .role-head { grid-column: 3 / 7; }
  .role-body { grid-column: 7 / 13; }
  .hero-index { grid-column: 3 / 7; }
  .hero-lede { grid-column: 7 / 13; }
  .contact-main { grid-column: 1 / 9; }
  .cap-title { grid-column: 3 / 7; }
  .cap-body { grid-column: 7 / 13; }
}
@media (max-width: 1023px) {
  .nav-meta { display: none; }
  /* Approach: vertical sequence on tablet/phone */
  .approach-pin { min-height: 0; padding-top: 0; padding-bottom: var(--section); }
  .approach-track { flex-direction: column; gap: clamp(48px, 8vh, 80px); padding-inline: var(--gutter); }
  .step { width: 100%; }
  .approach-foot { display: none; }
  .stat-a { grid-column: 1 / 7; }
  .stat-b { grid-column: 7 / 13; }
}

@media (max-width: 767px) {
  :root { --nav-h: 56px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .menu-btn { display: inline-block; }

  .eyebrow-x { display: none; }
  .hero-main { padding-bottom: clamp(28px, 5vh, 48px); }
  .hero-title { grid-column: 1 / 13; font-size: clamp(2.125rem, 10.4vw, 3.75rem); max-width: none; }
  .hero-bottom { row-gap: 20px; }
  .hero-lede { grid-column: 1 / 13; order: 1; max-width: none; }
  .hero-index { grid-column: 1 / 13; order: 2; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .scroll-cue { grid-column: 1 / 13; order: 3; }

  .cap { row-gap: 12px; }
  .cap-index { grid-column: 1 / 13; padding-top: 0; }
  .cap-title { grid-column: 1 / 13; max-width: none; }
  .cap-body { grid-column: 1 / 13; padding-top: 4px; gap: 16px; }
  .cap-desc { font-size: 0.9375rem; }
  .cap-items { grid-template-columns: 1fr; }

  .stat-a, .stat-b { grid-column: 1 / 13; margin-top: 0; }
  .stats { row-gap: clamp(48px, 8vh, 72px); }

  .philosophy-text { grid-column: 1 / 13; font-size: clamp(1.75rem, 8vw, 2.5rem); max-width: none; }
  .philosophy-note { grid-column: 1 / 13; }

  .careers-lede, .role-index, .role-head, .role-body { grid-column: 1 / 13; }
  .role { row-gap: 12px; }
  .role-index { padding-top: 0; }
  .role-body { padding-top: 4px; }
  .contact-title, .contact-main, .contact-side { grid-column: 1 / 13; }
  .form-grid { grid-template-columns: 1fr; }
  .contact-side { padding-top: 0; }
  .doc-title, .doc-updated, .doc-body { grid-column: 1 / 13; }
  .contact-meta > div { grid-template-columns: 11ch 1fr; }
  .footer-row { flex-direction: column; gap: 14px; }
  .footer-links { gap: 20px; flex-wrap: wrap; }
}

/* ---------- Reduced motion: everything at rest ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain { display: none; }
  .scroll-line { display: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
  .approach-progress i { transform: scaleX(1); }
}
