/* ==========================================================================
   SAOR7 — site4
   White and navy editorial system with pale blue supporting surfaces.
   Display: Fraunces · Text: Instrument Sans · Labels: JetBrains Mono
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/fraunces-roman.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/instrument-sans-roman.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/instrument-sans-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --ink: #142d4e;
  --ink-2: #1c385a;
  --ink-3: #284766;
  --surface: #f3f6fa;
  --surface-2: #e8eef5;
  --surface-3: #d5dfec;
  --paper: #ffffff;
  --primary: #142d4e;
  --primary-hover: #24466f;
  --blue-soft: #e3edf9;
  --blue-light: #a8c7ee;
  --sky: #557ca7;
  --mute: #526176;
  --mute-d: #b9c8dc;
  --line: rgba(20, 45, 78, 0.12);
  --line-d: rgba(255, 255, 255, 0.14);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", Inter, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --max: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(5rem, 10vw, 9rem);
  --r: 1.5rem;
  --r-sm: 0.875rem;
  --nav-h: 4.5rem;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 600ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; border-radius: 4px; }
::selection { background: var(--primary); color: var(--surface); }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 1000;
  padding: .6rem 1rem; background: var(--ink); color: var(--surface);
  border-radius: 999px; font-weight: 600;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--max));
  margin-inline: auto;
}

/* Grain overlay for a tactile, printed feel */
body::after {
  content: none;
}
.dark body::after { mix-blend-mode: screen; }

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .75rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--mute);
}
.eyebrow::before {
  content: ""; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--primary); flex: none;
}
.on-dark .eyebrow, .on-dark.eyebrow { color: var(--mute-d); }
.mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }

.h-display {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3rem, 7.4vw, 6.9rem);
  line-height: .98;
  letter-spacing: -0.025em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
.h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h-display em, .h2 em, .statement em, .band-quote em {
  font-weight: 400; color: var(--primary);
}
.lede { font-size: clamp(1.125rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--mute); max-width: 56ch; }
.on-dark .lede { color: var(--mute-d); }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--surface); --bd: transparent;
  display: inline-flex; align-items: center; gap: .6rem;
  height: 3.25rem; padding: 0 1.5rem;
  border-radius: 999px; border: 1.5px solid var(--bd);
  background: var(--bg); color: var(--fg);
  font-weight: 600; font-size: 1rem; line-height: 1; white-space: nowrap;
  transition: transform 220ms var(--ease), background-color 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
  will-change: transform;
}
.btn svg { width: 1.1em; height: 1.1em; transition: transform 260ms var(--ease-out); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(0); }
.btn-clay {
  --bg: var(--primary); --fg: #ffffff; box-shadow: 0 4px 12px rgba(20, 45, 78, .08);
}
.btn-clay:hover {
  --bg: var(--primary-hover);
}
.btn-ink { --bg: var(--ink); --fg: var(--surface); }
.btn-ink:hover { --bg: var(--ink-3); }
.btn-ghost { --bg: transparent; --fg: var(--ink); --bd: var(--line); }
.btn-ghost:hover { --bg: rgba(20, 45, 78, .05); --bd: var(--ink); }
.btn-ghost-d { --bg: transparent; --fg: var(--surface); --bd: var(--line-d); }
.btn-ghost-d:hover { --bd: var(--surface); --bg: rgba(255, 255, 255, .06); }
.btn-sm { height: 2.6rem; padding: 0 1.1rem; font-size: .9rem; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 900; height: var(--nav-h); background: rgba(255, 255, 255, .96); color: var(--ink); border-bottom: 1px solid var(--line); transition: background-color 300ms var(--ease);
}
.nav.is-dark {
  background: rgba(255, 255, 255, .96); color: var(--ink); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
  color: var(--ink);
}
.nav-in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand svg { width: 2rem; height: 2rem; flex: none; }
.nav-links { display: flex; gap: 2.25rem; font-size: .95rem; font-weight: 500; }
.nav-links a { position: relative; padding: .35rem 0; opacity: .82; transition: opacity 200ms var(--ease); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--primary); transform: scaleX(0); transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.nav-links a:hover, .nav-links a.is-active { opacity: 1; }
.nav-links a.is-active::after, .nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: flex; align-items: center; gap: .75rem; }
.burger {
  display: none; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1.5px solid currentColor; background: transparent; cursor: pointer;
  position: relative; opacity: .9;
}
.burger span {
  position: absolute; left: 50%; top: 50%; width: 1.1rem; height: 1.5px; background: currentColor;
  transform: translate(-50%, -50%) translateY(-3px);
  transition: transform 260ms var(--ease-out);
}
.burger span + span { transform: translate(-50%, -50%) translateY(3px); }
.burger[aria-expanded="true"] span { transform: translate(-50%, -50%) rotate(45deg); }
.burger[aria-expanded="true"] span + span { transform: translate(-50%, -50%) rotate(-45deg); }

/* Full-screen menu */
.menu {
  position: fixed; inset: 0; z-index: 800;
  background: var(--ink); color: var(--surface);
  display: grid; align-content: center; padding: var(--nav-h) var(--gutter) 2rem;
  opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease), visibility 300ms;
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu ol { display: grid; gap: .5rem; }
.menu ol a {
  display: flex; align-items: baseline; gap: 1rem;
  font-family: var(--display); font-size: clamp(2.4rem, 9vw, 4rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1;
  padding: .35rem 0; border-bottom: 1px solid var(--line-d);
  transform: translateY(12px); opacity: 0; transition: transform 500ms var(--ease-out), opacity 500ms var(--ease-out);
}
.menu ol a span { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; color: var(--primary); }
.menu.is-open ol a { transform: none; opacity: 1; }
.menu.is-open li:nth-child(2) a { transition-delay: 60ms; }
.menu.is-open li:nth-child(3) a { transition-delay: 120ms; }
.menu.is-open li:nth-child(4) a { transition-delay: 180ms; }
.menu .menu-foot { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; color: var(--mute-d); font-size: .95rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; background: #ffffff; color: var(--ink); padding-top: calc(var(--nav-h) + clamp(2.5rem, 6vw, 5rem)); padding-bottom: 0; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; background: #ffffff;
}
.hero-bg::after {
  content: none;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.hero-copy { max-width: 42rem; }
.hero-copy .eyebrow {
  color: var(--mute); font-size: .68rem; letter-spacing: .1em;
}
.hero h1 {
  margin-top: 1.5rem; font-size: clamp(2.9rem, 5.7vw, 5.4rem); line-height: 1.04;
}
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .12em; margin-bottom: -.12em; }
.hero h1 .w > span { display: inline-block; transform: translateY(110%); animation: rise 900ms var(--ease-out) forwards; }
.hero h1 .w:nth-child(1) > span { animation-delay: 80ms; }
.hero h1 .w:nth-child(2) > span { animation-delay: 160ms; }
.hero h1 .w:nth-child(3) > span { animation-delay: 240ms; }
.hero h1 .w:nth-child(4) > span { animation-delay: 320ms; }
.hero h1 .w:nth-child(5) > span { animation-delay: 400ms; }
@keyframes rise { to { transform: none; } }
.hero-sub {
  margin-top: 1.75rem; font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55;
  color: var(--mute); max-width: 34rem;
  opacity: 0; animation: fade 900ms var(--ease-out) 500ms forwards;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; opacity: 0; animation: fade 900ms var(--ease-out) 620ms forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.hero-facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); opacity: 0; animation: fade 900ms var(--ease-out) 760ms forwards;
}
.hero-facts dt {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute);
}
.hero-facts dd {
  font-family: var(--display); font-size: clamp(1.05rem, 1.65vw, 1.5rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; margin-top: .4rem;
}
.hero-media {
  position: relative;
  border-radius: var(--r); overflow: hidden;
  aspect-ratio: 4 / 5; max-height: min(78vh, 760px);
  box-shadow: 0 4px 12px rgba(20, 45, 78, .08); border: 1px solid var(--line);
  transform: scale(.96); opacity: 0; animation: media 1200ms var(--ease-out) 200ms forwards;
}
@keyframes media { to { transform: none; opacity: 1; } }
.hero-slides { position: absolute; inset: 0; background: var(--ink-2); }
.hero-slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%;
  opacity: 0; transform: scale(1.07);
  transition: opacity 900ms var(--ease), transform 5s linear;
}
.hero-slides img.is-active { opacity: 1; transform: scale(1); }
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 55%, rgba(20, 45, 78, .55) 100%);
}
.hero-card {
  position: absolute; left: 1.25rem; right: 1.25rem; bottom: 1.25rem; z-index: 2;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-radius: var(--r-sm); padding: 1rem 1.15rem;
  display: grid; gap: .35rem;
}
.hero-card .mono { color: var(--primary-hover); font-weight: 500; }
.hero-card p { font-family: var(--display); font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }
.hero-card > * { transition: opacity 240ms var(--ease), transform 240ms var(--ease); }
.hero-card.is-out > * { opacity: 0; transform: translateY(5px); }
.hero-card a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .9rem; color: var(--primary-hover); margin-top: .2rem; width: fit-content; }
.hero-card a svg { width: 1em; height: 1em; transition: transform 200ms var(--ease-out); }
.hero-card a:hover svg { transform: translateX(3px); }

/* Stage rail across the bottom of the hero */
.rail {
  border-top: 1px solid var(--line);
}
.rail ol {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
}
.rail li button {
  appearance: none; -webkit-appearance: none; background: none; border: 0; cursor: pointer;
  width: 100%; text-align: left; font: inherit;
  display: flex; align-items: center; gap: .6rem;
  padding: 1.1rem .5rem 1.1rem 0; position: relative;
  font-weight: 500; font-size: .95rem; color: var(--mute);
  transition: color 250ms var(--ease);
}
.rail li button:focus-visible { outline-offset: -4px; }
.rail li button .n {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; color: var(--mute);
}
.rail li button::before {
  content: ""; position: absolute; left: 0; top: -1px; height: 2px; width: 100%;
  background: var(--primary); transform: scaleX(0); transform-origin: left;
}
.rail li.is-on button {
  color: var(--ink);
}
.rail li.is-on button::before { transform: scaleX(1); transition: transform 4200ms linear; }
.rail li button:hover {
  color: var(--ink);
}

/* ---------- Proposition ---------- */
.prop { padding: var(--section) 0; }
.statement {
  margin-top: 1.5rem;
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.8rem, 3.7vw, 3.3rem); line-height: 1.12; letter-spacing: -0.02em;
  max-width: 24ch; text-wrap: balance;
}
.statement em { display: block; margin-top: .3em; font-weight: 400; }
.verbs {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.verbs li {
  padding: 1.5rem 1rem 1.5rem 0; border-right: 1px solid var(--line);
  display: grid; gap: .6rem; align-content: start;
}
.verbs li:last-child { border-right: 0; }
.verbs li > .n { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: var(--primary); font-weight: 500; }
.verbs li > .s { font-family: var(--display); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.1; }
.verbs li > .d { font-size: .9rem; color: var(--mute); line-height: 1.4; }
.prop-note { margin-top: 2rem; color: var(--mute); max-width: 60ch; font-size: 1.05rem; }

/* ---------- Band ---------- */
.band { padding-bottom: var(--section); }
.band-media {
  width: 100%;
  position: relative; border-radius: var(--r); overflow: hidden; isolation: isolate;
  aspect-ratio: 21 / 9; min-height: 340px;
  box-shadow: 0 30px 60px -30px rgba(20, 45, 78, .4);
}
.band-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.2s var(--ease-out); }
.band-media.in img { transform: scale(1); }
.band-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(20, 45, 78, .78) 0%, rgba(20, 45, 78, .45) 45%, rgba(20, 45, 78, .05) 100%);
}
.band-media figcaption {
  position: absolute; inset: 0; z-index: 2; display: grid; align-content: end; gap: .75rem;
  padding: clamp(1.5rem, 4vw, 3rem); color: var(--surface); max-width: 40rem;
}
.band-quote { font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 4.5vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; }
.band-media figcaption p:not(.band-quote) { font-size: 1.1rem; color: rgba(255, 255, 255, .8); max-width: 34rem; }

/* ---------- Method ---------- */
.method { padding-bottom: var(--section); }
.method-head { display: grid; gap: 1.5rem; max-width: 52rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.method-grid { display: grid; grid-template-columns: 15rem 1fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.method-side { position: sticky; top: calc(var(--nav-h) + 1.5rem); }
.stage-nav-wrap { position: relative; padding-left: 1.25rem; }
.stage-nav-wrap::before { content: ""; position: absolute; left: 0; top: .4rem; bottom: .4rem; width: 2px; background: var(--line); border-radius: 2px; }
.stage-nav-wrap .bar { position: absolute; left: 0; top: .4rem; width: 2px; height: 0; background: var(--primary); border-radius: 2px; transition: height 300ms var(--ease-out); }
.stage-nav li a {
  display: flex; align-items: baseline; gap: .8rem; padding: .45rem 0;
  color: var(--mute); font-weight: 500; transition: color 200ms var(--ease), transform 300ms var(--ease-out);
}
.stage-nav li a .n { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; }
.stage-nav li a .t { font-family: var(--display); font-size: 1.25rem; letter-spacing: -0.01em; }
.stage-nav li a:hover { color: var(--ink); }
.stage-nav li.is-active a { color: var(--ink); transform: translateX(4px); }
.stage-nav li.is-active a .n { color: var(--primary); }
.stage-nav li.is-done a { color: var(--ink); }
.stage-nav li.is-done a .n { color: var(--primary); }
.stage-next { display: none; }

.stages { display: grid; gap: clamp(2rem, 4vw, 3rem); }
.stage {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  scroll-margin-top: calc(var(--nav-h) + 1.5rem);
  transition: box-shadow 400ms var(--ease), transform 400ms var(--ease);
}
.stage:hover { box-shadow: 0 30px 60px -40px rgba(20, 45, 78, .35); }
.stage:nth-child(even) .stage-media { order: 2; }
.stage-media { position: relative; border-radius: var(--r-sm); overflow: hidden; align-self: stretch; min-height: 360px; min-width: 0; background: var(--surface-2); }
.stage-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transition: transform 1s var(--ease-out); }
.stage:hover .stage-media img { transform: scale(1.07); }
.stage-media .badge {
  position: absolute; left: .9rem; top: .9rem; z-index: 2;
  font-family: var(--display); font-size: 2.6rem; line-height: 1; font-weight: 500; letter-spacing: -0.03em;
  color: var(--surface); text-shadow: 0 2px 20px rgba(0, 0, 0, .45);
}
.stage-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(200deg, rgba(20, 45, 78, .35), transparent 45%); }
.stage-body { display: grid; gap: 1rem; align-content: start; }
.stage-kicker { color: var(--primary); font-weight: 500; }
.stage-kicker span { color: var(--mute); }
.stage-title { font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 4.6vw, 4rem); line-height: .95; letter-spacing: -0.03em; }
.stage-tag { font-size: clamp(1.15rem, 1.6vw, 1.35rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.stage-body > p:not(.stage-kicker):not(.stage-tag) { color: var(--mute); max-width: 56ch; }
.q {
  font-family: var(--display); font-size: clamp(1.35rem, 2vw, 1.7rem); font-weight: 500; line-height: 1.25; letter-spacing: -0.015em;
  padding-left: 1.1rem; border-left: 3px solid var(--primary); color: var(--ink);
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips li {
  padding: .45rem .85rem; border-radius: 999px; font-size: .9rem; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink);
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}
.chips li:hover { background: var(--blue-soft); border-color: rgba(20, 45, 78, .4); }
.output {
  margin-top: .5rem; display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: baseline;
  padding: 1rem 1.15rem; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--primary);
}
.output .mono { color: var(--primary-hover); font-weight: 500; }
.output p { font-family: var(--display); font-size: 1.2rem; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }

/* Formula (Assess) */
.formula { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.formula b {
  font-family: var(--display); font-weight: 500; font-size: 1.15rem; letter-spacing: -0.01em;
  padding: .55rem .95rem; border-radius: var(--r-sm); background: var(--ink); color: var(--surface);
}
.formula b:nth-of-type(2) {
  background: var(--primary); color: #ffffff;
}
.formula b:nth-of-type(3) { background: var(--blue-light); color: var(--ink); }
.formula em { font-style: normal; font-family: var(--mono); color: var(--mute); }

/* Realise: the differentiator */
.stage.is-realise {
  background: var(--ink); color: var(--surface); border-color: var(--ink);
  grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(20, 45, 78, .6);
}
.stage.is-realise:hover { box-shadow: 0 40px 80px -40px rgba(20, 45, 78, .6); }
.stage.is-realise .stage-media { order: 0; align-self: auto; height: clamp(300px, 38vw, 540px); min-height: 0; border-radius: 0; }
.stage.is-realise .stage-media::after { background: linear-gradient(180deg, rgba(20, 45, 78, .1), rgba(20, 45, 78, .85) 95%); }
.stage.is-realise .stage-media .badge { display: none; }
.stage.is-realise .realise-head {
  position: absolute; left: clamp(1.5rem, 4vw, 3rem); right: clamp(1.5rem, 4vw, 3rem); bottom: clamp(1.25rem, 3vw, 2.5rem); z-index: 2;
  display: grid; gap: .5rem;
}
.stage.is-realise .realise-head .stage-title { color: var(--surface); font-size: clamp(3rem, 7vw, 6rem); }
.stage.is-realise .stage-body { padding: clamp(1.5rem, 4vw, 3rem); grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2rem; align-items: start; }
.stage.is-realise .stage-body > p:not(.stage-kicker):not(.stage-tag) { color: rgba(255, 255, 255, .78); }
.stage.is-realise .stage-tag { color: var(--surface); }
.stage.is-realise .chips li { background: var(--ink-3); border-color: var(--line-d); color: var(--surface); }
.stage.is-realise .chips li:hover { background: rgba(20, 45, 78, .18); border-color: rgba(20, 45, 78, .5); }
.stage.is-realise .output { background: var(--ink-2); border-color: var(--line-d); border-left-color: var(--primary); }
.stage.is-realise .output .mono { color: var(--primary); }
.stage.is-realise .output p { color: var(--surface); }
.stage.is-realise .stage-kicker span { color: var(--mute-d); }
.callout {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: .5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-d);
}
.callout p { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1.2; letter-spacing: -0.015em; max-width: 30ch; }
.callout p em { color: var(--primary); font-weight: 400; }
.realise-col { display: grid; gap: 1rem; align-content: start; }

/* ---------- Why ---------- */
.why { background: var(--ink); color: var(--surface); padding: var(--section) 0; position: relative; isolation: isolate; overflow: hidden; }
.why::before {
  content: none;
}
.why-head { max-width: 48rem; display: grid; gap: 1.5rem; }
.why .h2 em { color: var(--blue-light); }
.compare { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; position: relative; }
.compare .vs {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: 3.25rem; height: 3.25rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
.cmp {
  position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  border-radius: var(--r); border: 1px solid var(--line-d); background: var(--ink-2);
  transition: transform 500ms var(--ease-out), border-color 300ms var(--ease);
}
.cmp figure { aspect-ratio: 3 / 2; overflow: hidden; position: relative; }
.cmp figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), filter 600ms var(--ease); }
.cmp:hover figure img { transform: scale(1.05); }
.cmp figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, var(--ink-2) 100%); }
.cmp-them figure img { filter: grayscale(1) contrast(.9) brightness(.7); }
.cmp-them:hover figure img { filter: grayscale(.9) contrast(.95) brightness(.8); }
.cmp-us { border-color: rgba(20, 45, 78, .45); box-shadow: 0 30px 80px -40px rgba(20, 45, 78, .5); }
.cmp-body { padding: clamp(1.25rem, 2.5vw, 2rem); display: grid; gap: 1rem; align-content: start; margin-top: -2.5rem; position: relative; z-index: 1; }
.cmp-body .mono { color: var(--mute-d); }
.cmp-us .cmp-body .mono { color: var(--primary); }
.cmp-body h3 { font-family: var(--display); font-weight: 500; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; letter-spacing: -0.02em; }
.cmp-them .cmp-body h3 { color: rgba(255, 255, 255, .7); }
.marks { display: grid; gap: .45rem; margin-top: .5rem; }
.marks li { display: flex; gap: .75rem; align-items: flex-start; padding: .55rem 0; border-top: 1px solid var(--line-d); color: rgba(255, 255, 255, .82); }
.marks li::before {
  content: ""; flex: none; width: 1.35rem; height: 1.35rem; border-radius: 50%; margin-top: .1rem;
  background-color: rgba(255, 255, 255, .1); background-repeat: no-repeat; background-position: center; background-size: .7rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23b9c8dc' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M2 2l8 8M10 2l-8 8'/%3E%3C/svg%3E");
}
.marks.ok li { color: var(--surface); }
.marks.ok li::before {
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23142d4e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6.5l2.6 2.5L10 3.5'/%3E%3C/svg%3E");
}

/* ---------- System ---------- */
.system { padding: var(--section) 0; }
.sys-head { display: grid; gap: 1.25rem; max-width: 52rem; }
.bento {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem;
}
.tile {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  padding: clamp(1.4rem, 2.5vw, 2rem); display: grid; gap: .75rem; align-content: start;
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease);
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -40px rgba(20, 45, 78, .35); }
.tile h3 { font-family: var(--display); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.015em; line-height: 1.15; }
.tile p { color: var(--mute); font-size: 1rem; }
.tile .icon { width: 2.75rem; height: 2.75rem; border-radius: .9rem; background: var(--blue-soft); color: var(--primary-hover); display: grid; place-items: center; margin-bottom: .5rem; }
.tile .icon svg { width: 1.35rem; height: 1.35rem; }
.tile-loop {
  grid-column: span 12; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem); padding: clamp(1.5rem, 3.5vw, 3rem);
  background: var(--ink); color: var(--surface); border-color: var(--ink); position: relative; overflow: hidden;
}
.tile-loop::before {
  content: none;
}
.tile-loop h3 { color: var(--surface); font-size: clamp(1.75rem, 3vw, 2.5rem); }
.tile-loop p { color: var(--mute-d); max-width: 44ch; }
.loop-copy { display: grid; gap: .85rem; align-content: center; position: relative; }
.cycles { display: grid; gap: .65rem; margin-top: 1rem; }
.cycles li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: center; gap: .9rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--mute-d); }
.cycles .bar { display: block; height: .5rem; border-radius: 999px; width: var(--w); background: linear-gradient(90deg, var(--primary), var(--blue-light)); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease-out); }
.cycles li:nth-child(2) .bar { transition-delay: 160ms; }
.cycles li:nth-child(3) .bar { transition-delay: 320ms; }
.tile-loop.in .cycles .bar { transform: none; }
.tile-loop .ring { position: relative; margin: 0 auto; width: min(100%, 440px); }
.tile-loop .ring svg { width: 100%; height: auto; display: block; overflow: visible; }
.ring .track { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 2; }
.ring .arc { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.tile-loop.in .ring .arc { animation: draw 2.2s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.ring .node { fill: var(--ink-3); stroke: rgba(255, 255, 255, .35); stroke-width: 1.5; }
.ring .node.hot { fill: var(--primary); stroke: var(--primary); }
.ring .lbl { font-family: var(--sans); font-size: 12.5px; font-weight: 600; fill: var(--surface); }
.ring .num { font-family: var(--mono); font-size: 9px; fill: var(--mute-d); letter-spacing: .08em; }
.ring .core { font-family: var(--display); font-size: 20px; fill: var(--surface); font-weight: 500; letter-spacing: -.02em; }
.ring .core-sub { font-family: var(--mono); font-size: 8.5px; fill: var(--mute-d); letter-spacing: .12em; }
.ring .spin { transform-origin: 200px 200px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tile-std { grid-column: span 4; }
.tile-wide { grid-column: span 12; }
.tile-wide .chips { margin-top: .25rem; }
.tile-wide .chips li { font-size: .95rem; padding: .55rem 1rem; }

/* ---------- Contact ---------- */
.contact { position: relative; isolation: isolate; padding: clamp(8rem, 16vw, 14rem) 0 clamp(5rem, 10vw, 8rem); overflow: hidden; }
.contact-bg { position: absolute; inset: 0; z-index: -1; }
.contact-bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; opacity: .22; filter: saturate(.55);
}
.contact-bg::before {
  content: none;
}
.contact-bg::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(243, 246, 250, .2), var(--surface) 100%);
}
.contact-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.contact-in .h-display { margin-top: 1.25rem; }
.contact-copy { display: grid; gap: 1rem; color: var(--ink); }
.contact-copy p { font-size: 1.1rem; max-width: 48ch; color: #35465d; }
.contact-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: 1rem; }
.contact-actions .alt { font-weight: 500; color: var(--mute); font-size: .95rem; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--surface); padding: 3.5rem 0 2.5rem; }
.foot-grid { display: grid; grid-template-columns: 1.2fr 2fr; gap: 2rem; align-items: start; }
.foot-brand { display: grid; gap: .75rem; }
.foot-brand p { color: var(--mute-d); max-width: 30ch; }
.foot-seq { display: flex; flex-wrap: wrap; gap: .4rem .9rem; justify-content: flex-end; }
.foot-seq a { display: inline-flex; gap: .4rem; align-items: baseline; font-family: var(--display); font-size: 1.15rem; color: rgba(255, 255, 255, .8); transition: color 200ms var(--ease); }
.foot-seq a span { font-family: var(--mono); font-size: .65rem; letter-spacing: .1em; color: var(--primary); }
.foot-seq a:hover { color: var(--surface); }
.foot-bottom {
  margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-d);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 2rem;
  font-size: .875rem; color: var(--mute-d);
}
.foot-bottom a { color: rgba(255, 255, 255, .85); border-bottom: 1px solid var(--line-d); }
.foot-bottom a:hover { color: var(--surface); border-bottom-color: var(--primary); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); }
.nf-copy { display: grid; align-content: center; gap: 1.5rem; padding: clamp(2rem, 8vw, 6rem) var(--gutter); }
.nf-copy p { color: var(--mute); max-width: 40ch; font-size: 1.1rem; }
.nf-media { position: relative; min-height: 40vh; }
.nf-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  /* Compact sticky stage bar: numbered dots + next stage */
  .method-grid { display: block; }
  .method-side {
    position: sticky; top: var(--nav-h); z-index: 60;
    display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    margin: 0 calc(-1 * var(--gutter)) 1.5rem; padding: .6rem var(--gutter);
    background: rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
  }
  .stage-nav-wrap { padding-left: 0; }
  .stage-nav-wrap::before, .stage-nav-wrap .bar { display: none; }
  .stage-nav { display: flex; gap: .3rem; }
  .stage-nav li a {
    padding: 0; width: 1.85rem; height: 1.85rem; border-radius: 50%; display: grid; place-items: center;
    border: 1px solid var(--line); background: transparent; transform: none;
    transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
  }
  .stage-nav li.is-active a { transform: none; }
  .stage-nav li a .t { display: none; }
  .stage-nav li a .n { font-size: .66rem; letter-spacing: 0; color: var(--mute); }
  .stage-nav li.is-done a { border-color: var(--ink); }
  .stage-nav li.is-done a .n { color: var(--ink); }
  .stage-nav li.is-active a { background: var(--primary); border-color: var(--primary); }
  .stage-nav li.is-active a .n { color: #ffffff; font-weight: 700; }
  .stage-next {
    display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
    font-size: .9rem; font-weight: 600; color: var(--ink); min-width: 0;
  }
  .stage-next .v { overflow: hidden; text-overflow: ellipsis; }
  .stage-next svg { flex: none; }
  .stage-nav-wrap { flex: none; }
  .stage-next .k { font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
  .stage-next svg { width: 1em; height: 1em; color: var(--primary); }
  .stage { scroll-margin-top: calc(var(--nav-h) + 3.75rem); }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { aspect-ratio: 16 / 11; max-height: none; }
  .rail { mask-image: linear-gradient(90deg, #000 82%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent 100%); }
  .rail ol { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-right: 3rem; }
  .rail ol::-webkit-scrollbar { display: none; }
  .rail li { flex: none; }
  .rail li button { padding-right: 1.5rem; }
  .verbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verbs li { border-right: 0; border-bottom: 1px solid var(--line); }
  .verbs li:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 1rem; }
  .verbs li:nth-child(even) { padding-left: 1rem; }
  .verbs li:nth-last-child(-n+1) { border-bottom: 0; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .stage:nth-child(even) .stage-media { order: 0; }
  .stage-media { align-self: start; aspect-ratio: 4 / 3; min-height: 0; }
  .stage.is-realise .stage-media { aspect-ratio: auto; height: clamp(280px, 72vw, 440px); }
  .stage.is-realise .stage-body { grid-template-columns: minmax(0, 1fr); }
  .tile-loop { grid-template-columns: minmax(0, 1fr); }
  .compare { grid-template-columns: 1fr; }
  .compare .vs { display: none; }
  .contact-in { grid-template-columns: 1fr; align-items: start; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-seq { justify-content: flex-start; }
  .nf { grid-template-columns: 1fr; }
  .nf-media { order: -1; min-height: 38vh; }
}
@media (max-width: 760px) {
  :root { --nav-h: 4rem; }
  .nav-links, .nav-cta .btn { display: none; }
  .burger { display: inline-block; }
  .band-media { aspect-ratio: 4 / 5; min-height: 0; }
  .band-media::after { background: linear-gradient(0deg, rgba(20, 45, 78, .85) 0%, rgba(20, 45, 78, .3) 60%, rgba(20, 45, 78, .05) 100%); }
  .tile-std { grid-column: span 12; }
  .hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem 1rem; }
  .hero-facts > div:last-child { grid-column: auto; }
  .hero-facts dd { font-size: 1.1rem; }
  .cycles li { grid-template-columns: 6rem minmax(0, 1fr); }
  .output { grid-template-columns: 1fr; gap: .35rem; }
}
@media (max-width: 480px) {
  .stage-next .k { display: none; }
  .stage-nav { gap: .22rem; }
  .stage-nav li a { width: 1.7rem; height: 1.7rem; }
  .verbs { grid-template-columns: 1fr; }
  .verbs li, .verbs li:nth-child(odd), .verbs li:nth-child(even) { border-right: 0; padding-left: 0; padding-right: 0; }
  .hero-media { aspect-ratio: 4 / 5; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; transition-duration: .001ms !important; }
  .hero h1 .w > span { transform: none; }
  .hero-sub, .hero-actions, .hero-facts, .hero-media { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
  .ring .arc { stroke-dashoffset: 0; }
}

/* ---------- Navy surfaces ---------- */
.on-dark {
  --primary: #a8c7ee;
  --primary-hover: #d4e4f8;
}
.on-dark .btn-clay { --fg: var(--ink); }
.on-dark :focus-visible { outline-color: var(--primary); }
.band-media em { color: #d4e4f8; }
.foot .brand rect { fill: #a8c7ee; }
.foot .brand path { stroke: #142d4e; }
.nav:has(.burger[aria-expanded="true"]) { background: var(--ink); color: #ffffff; border-bottom-color: var(--line-d); }
.nav:has(.burger[aria-expanded="true"]) .brand rect { fill: #a8c7ee; }
.nav:has(.burger[aria-expanded="true"]) .brand path { stroke: #142d4e; }
.cycles li { grid-template-columns: 5.5rem minmax(0, 1fr); align-items: baseline; padding-top: .7rem; border-top: 1px solid var(--line-d); }
.cycles li span + span { font-family: var(--sans); font-size: .95rem; letter-spacing: 0; text-transform: none; color: var(--surface); }
.contact .h-display { font-size: clamp(3rem, 6vw, 5.5rem); }
@media (max-width: 480px) {
  .hero h1 { font-size: clamp(2.5rem, 10.8vw, 3.2rem); }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .contact-actions .btn { justify-content: center; padding-inline: 1rem; font-size: .9rem; }
}

/* ---------- Contact dialog (lightbox) ---------- */
.contact-dialog {
  width: min(100% - 2rem, 46rem);
  margin: auto; padding: 0; border: 0; border-radius: var(--r);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 80px rgba(20, 45, 78, .28);
  overflow: hidden;
}
.contact-dialog::backdrop { background: rgba(20, 45, 78, .55); backdrop-filter: blur(6px); }
.contact-dialog[open] { animation: cd-in 380ms var(--ease-out); }
.contact-dialog[open]::backdrop { animation: cd-fade 300ms var(--ease); }
@keyframes cd-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes cd-fade { from { opacity: 0; } }
html.has-dialog { overflow: hidden; }

.cd-card {
  position: relative; display: grid; gap: 1.5rem;
  max-height: calc(100dvh - 2rem); overflow: auto; overscroll-behavior: contain;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.cd-close {
  position: absolute; top: 1rem; right: 1rem; z-index: 1;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; transition: background-color 200ms var(--ease), border-color 200ms var(--ease);
}
.cd-close:hover { background: var(--surface-2); border-color: var(--ink); }
.cd-close svg { width: 1rem; height: 1rem; }

.cd-head { padding-right: 2.5rem; }
.cd-title {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.05; letter-spacing: -0.02em;
  margin-top: .75rem; text-wrap: balance;
}
.cd-title em { font-weight: 400; color: var(--primary); }
.cd-lede { color: var(--mute); margin-top: .75rem; max-width: 52ch; }

.cd-form { display: grid; gap: 1.1rem; }
.cd-form[hidden] { display: none; }
.cd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.cd-field { display: grid; gap: .4rem; }
.cd-field > span, .cd-choice legend {
  display: flex; justify-content: space-between; align-items: baseline; gap: .75rem;
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--mute);
}
.cd-field small { font-family: var(--sans); font-size: .8rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--sky); }
.cd-field input, .cd-field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-sm);
  padding: .8rem 1rem; transition: border-color 200ms var(--ease), background-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.cd-field input:focus, .cd-field textarea:focus {
  outline: none; border-color: var(--primary); background: var(--paper); box-shadow: 0 0 0 3px var(--blue-soft);
}
.cd-field input:user-invalid, .cd-field textarea:user-invalid, .cd-field [aria-invalid="true"] { border-color: #b3261e; }
.cd-field textarea { resize: vertical; min-height: 8rem; }

.cd-choice { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: .5rem; }
.cd-choice legend { padding: 0; margin-bottom: .5rem; }
.cd-choice > div { display: inline-flex; gap: .25rem; padding: .25rem; background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; width: max-content; }
.cd-choice label { position: relative; }
.cd-choice input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.cd-choice span {
  display: inline-flex; align-items: center; height: 2.2rem; padding: 0 1rem; border-radius: 999px;
  font-weight: 600; font-size: .9rem; color: var(--mute); cursor: pointer; transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.cd-choice input:checked + span { background: var(--ink); color: var(--surface); }
.cd-choice input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Honeypot: off-screen and hidden from assistive technology; bots still fill it. */
.cd-hp { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }

.cd-turnstile:empty { display: none; }
.cd-status { min-height: 1.5em; margin: 0; font-size: .95rem; color: var(--mute); }
.cd-status:empty { display: none; }
.cd-status.is-error { color: #b3261e; }
.cd-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.cd-note { font-size: .85rem; color: var(--mute); }
.cd-form.is-busy .btn { opacity: .7; pointer-events: none; }

.cd-done { display: grid; gap: .25rem; justify-items: start; padding-right: 2.5rem; }
.cd-done[hidden] { display: none; }
.cd-done .btn { margin-top: 1.25rem; }

@media (max-width: 640px) {
  .contact-dialog { width: calc(100% - 1rem); border-radius: var(--r-sm); }
  .cd-card { max-height: calc(100dvh - 1rem); }
  .cd-grid { grid-template-columns: 1fr; }
  .cd-actions .btn { width: 100%; justify-content: center; }
}
