/* ==========================================================================
   Michael Doyle. Operations, systems and AI for coaches.
   Prototype stylesheet. Tokens and components match 03-design/design-system.md.
   Dark only, on purpose.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Fonts (self-hosted, SIL OFL; licenses in assets/fonts/)
   -------------------------------------------------------------------------- */
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/dm-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/dm-mono-latin-500-normal.woff2") format("woff2"); }

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --ink: #070707;
  --ink-2: #0E0E0E;
  --ink-3: #161616;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #F3F1EC;
  --text-2: #CFCCC4;
  --text-3: #9A978F;
  --text-4: #82807A;
  --line-dec: #5E5C57; /* decorative only: bullets, rules, never text */
  --signal: #F2A93B;
  --signal-ink: #1A1200;
  --ok: #8FD19E;
  --err: #F0756A;

  --font-sans: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --fs-display: clamp(2.75rem, 1.2rem + 6.4vw, 6.75rem);
  --fs-h1: clamp(2.5rem, 1rem + 4.6vw, 4.9rem);
  --fs-h2: clamp(2rem, 1rem + 3.2vw, 3.75rem);
  --fs-h3: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  --fs-lead: clamp(1.125rem, 1.02rem + 0.5vw, 1.4rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-label: 0.75rem;
  --fs-micro: 0.6875rem;
  --fs-stat: clamp(2.75rem, 1.25rem + 4.2vw, 5.25rem);

  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 32px;
  --s6: 48px; --s7: 64px; --s8: 96px; --s9: 128px; --s10: 192px;

  --section-pad: clamp(5rem, 11vw, 11rem);
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --container: 1360px;
  --gap: clamp(1rem, 2vw, 2rem);
  --nav-h: 72px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 2px;
}

/* --------------------------------------------------------------------------
   2. Reset and base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text-2);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; max-width: 62ch; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; color: var(--text); font-weight: 500; hyphens: manual; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.0; letter-spacing: -0.03em; font-weight: 400; }
h2 { font-size: var(--fs-h2); line-height: 1.04; letter-spacing: -0.03em; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.015em; font-weight: 500; }
strong { color: var(--text); font-weight: 500; }
::selection { background: var(--signal); color: var(--signal-ink); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
[hidden] { display: none !important; }

.display { font-size: var(--fs-display); line-height: 0.98; letter-spacing: -0.035em; font-weight: 400; color: var(--text); }
.lead { font-size: var(--fs-lead); line-height: 1.45; letter-spacing: -0.005em; color: var(--text-2); max-width: 40ch; }
.small { font-size: var(--fs-small); line-height: 1.55; }
.muted { color: var(--text-3); }
.faint { color: var(--text-4); }
.mono { font-family: var(--font-mono); font-weight: 400; }

/* Serif accent inside headlines */
em.ac, .ac {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: inherit;
}

/* Mono label (section labels, tags, table heads) */
.label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1.5;
  margin: 0 0 var(--s4);
}
.label .n { color: var(--text-4); }
.label.signal { color: var(--signal); }
.micro {
  font-family: var(--font-mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  line-height: 1.4;
  color: var(--text-4);
}

/* Skip link */
.skip {
  position: absolute; left: var(--s3); top: -100px; z-index: 1000;
  padding: 10px 14px; background: var(--text); color: var(--ink);
  font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase;
}
.skip:focus { top: var(--s3); }

/* --------------------------------------------------------------------------
   3. Layout
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-pad); position: relative; }
.section > .container { position: relative; }
.section + .section > .container::before,
.section.ruled > .container::before {
  content: ""; display: block; height: 1px; background: var(--line);
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(-1 * var(--section-pad));
}
.section.ruled { position: relative; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
/* Column classes set only the span; start classes set only the start line, so they combine (.col-5.start-7 = 7 / span 5). */
.col-2 { grid-column-end: span 2; }
.col-3 { grid-column-end: span 3; }
.col-4 { grid-column-end: span 4; }
.col-5 { grid-column-end: span 5; }
.col-6 { grid-column-end: span 6; }
.col-7 { grid-column-end: span 7; }
.col-12 { grid-column: 1 / -1; }
.start-6 { grid-column-start: 6; }
.start-7 { grid-column-start: 7; }
.start-8 { grid-column-start: 8; }
.start-9 { grid-column-start: 9; }
.section[id], .case[id], .service[id] { scroll-margin-top: var(--nav-h); }
.stack > * + * { margin-top: var(--s5); }
.stack-sm > * + * { margin-top: var(--s3); }
.mt-2 { margin-top: var(--s2); } .mt-3 { margin-top: var(--s3); } .mt-4 { margin-top: var(--s4); }
.mt-5 { margin-top: var(--s5); } .mt-6 { margin-top: var(--s6); } .mt-7 { margin-top: var(--s7); } .mt-8 { margin-top: var(--s8); }
.section-head { margin-bottom: var(--s7); }
.section-head h2 { max-width: 16ch; }
.section-head .lead { margin-top: var(--s5); }

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background 300ms linear, border-color 300ms linear;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(7, 7, 7, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s5); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.brand svg { width: 20px; height: 20px; flex: none; }
.brand .wordmark { font-family: var(--font-sans); font-weight: 500; font-size: 1.0625rem; letter-spacing: -0.02em; line-height: 1; }
.nav-links { display: flex; align-items: center; gap: var(--s5); }
.nav-links a {
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-3); white-space: nowrap; position: relative; padding-block: 6px; transition: color 250ms;
}
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--signal); }
.nav-links .email { font-family: var(--font-sans); font-size: 0.875rem; letter-spacing: 0; text-transform: none; color: var(--text); margin-left: var(--s3); }
.nav-links .email:hover { color: var(--signal); }
.menu-btn { display: none; background: none; border: 0; color: var(--text); font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; padding: 10px 0; cursor: pointer; }

/* Mobile overlay */
.menu {
  position: fixed; inset: 0; z-index: 200; background: var(--ink-2);
  display: flex; flex-direction: column; padding: var(--s3) var(--gutter) var(--s6);
  opacity: 0; visibility: hidden; transition: opacity 400ms var(--ease-out), visibility 0s 400ms;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 400ms var(--ease-out), visibility 0s; }
.menu-top { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.menu-links { margin-top: var(--s7); display: flex; flex-direction: column; gap: var(--s2); }
.menu-links a { font-size: var(--fs-h2); color: var(--text); letter-spacing: -0.03em; line-height: 1.1; transform: translateY(12px); opacity: 0; transition: transform 500ms var(--ease-out), opacity 500ms var(--ease-out); }
.menu.is-open .menu-links a { transform: none; opacity: 1; }
.menu.is-open .menu-links a:nth-child(1) { transition-delay: 60ms; }
.menu.is-open .menu-links a:nth-child(2) { transition-delay: 120ms; }
.menu.is-open .menu-links a:nth-child(3) { transition-delay: 180ms; }
.menu.is-open .menu-links a:nth-child(4) { transition-delay: 240ms; }
.menu.is-open .menu-links a:nth-child(5) { transition-delay: 300ms; }
.menu-links a[aria-current="page"] { color: var(--text-3); }
.menu-foot { margin-top: auto; display: flex; flex-direction: column; gap: var(--s2); }
.menu-foot a { font-family: var(--font-mono); font-size: var(--fs-small); color: var(--text-2); }

/* --------------------------------------------------------------------------
   5. Buttons and links
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 16px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background-color 250ms ease-out, color 250ms ease-out, border-color 250ms ease-out;
  line-height: 1;
}
.btn-primary { background: var(--text); color: var(--ink); }
.btn-primary:hover { background: var(--signal); color: var(--signal-ink); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn-block { display: flex; width: 100%; }

.dash {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text); white-space: nowrap;
}
.dash::before { content: ""; display: block; width: 24px; height: 1px; background: var(--text-3); transition: width 300ms ease-out, background-color 300ms ease-out; }
.dash:hover::before, a:hover > .dash::before, .index-row:hover .dash::before { width: 40px; background: var(--signal); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s5); }

.inline-link { color: var(--text); border-bottom: 1px solid var(--line-strong); transition: border-color 250ms; }
.inline-link:hover { border-bottom-color: var(--signal); }

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative; min-height: 100svh; display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + var(--s5)); padding-bottom: clamp(5rem, 12vh, 8rem);
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }
.hero h1 { max-width: 19ch; font-size: min(var(--fs-h1), 9.5svh); }
@media (max-width: 767px) { .hero h1 { font-size: var(--fs-h1); } }
.hero .lead { margin-top: var(--s5); }
.hero .cta-row { margin-top: var(--s6); }
.hero .avail { margin-top: var(--s6); font-family: var(--font-serif); font-style: italic; font-size: 1.25rem; color: var(--text-2); }
.hero .avail .ac { color: var(--text); }
.hero .label { margin-bottom: var(--s5); }
.hero-visual { position: absolute; right: 0; top: 0; width: 62%; height: 100%; z-index: 1; pointer-events: none; -webkit-mask-image: linear-gradient(to right, transparent, #000 22%); mask-image: linear-gradient(to right, transparent, #000 22%); }
.hero-visual svg { width: 100%; height: 100%; }
.hero-visual .node { fill: var(--text); opacity: 0.55; }
.hero-visual .node.hub { fill: var(--signal); opacity: 1; }
.hero-visual .edge { stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; }
.hero-visual .nlabel { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; fill: var(--text-3); text-transform: uppercase; }
.particles { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.scroll-cue {
  position: absolute; left: 50%; bottom: clamp(1.5rem, 4vh, 3rem); transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3);
}
.scroll-cue::after { content: ""; width: 1px; height: 48px; background: linear-gradient(to bottom, var(--text-3), transparent); }
/* Short screens: the cue would sit on the hero buttons */
@media (max-height: 820px) { .scroll-cue { display: none; } }

/* Page hero (interior pages) */
.page-hero { padding-top: calc(var(--nav-h) + clamp(4rem, 10vw, 8rem)); padding-bottom: clamp(3rem, 7vw, 6rem); }
.page-hero h1 { max-width: 16ch; }
.page-hero .lead { margin-top: var(--s5); }

/* --------------------------------------------------------------------------
   7. Components
   -------------------------------------------------------------------------- */
/* Services index */
.index { border-top: 1px solid var(--line); }
.index-row {
  display: grid; grid-template-columns: 72px 1fr auto; gap: var(--gap); align-items: start;
  padding: var(--s5) 0; border-bottom: 1px solid var(--line); position: relative;
  transition: background-color 250ms ease-out;
}
.index-row::before { content: ""; position: absolute; inset: 0 -16px; background: var(--ink-3); opacity: 0; transition: opacity 250ms ease-out; z-index: -1; }
.index-row:hover::before { opacity: 1; }
.index-row .num { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; color: var(--text-4); padding-top: 0.6em; transition: color 250ms; }
.index-row:hover .num { color: var(--signal); }
.index-row h3 { color: var(--text); }
.index-row p { margin-top: var(--s2); color: var(--text-3); max-width: 52ch; }
.index-row .dash { padding-top: 0.5em; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: var(--s6) var(--s5) var(--s6) 0; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: var(--s5); }
.stat:last-child { border-right: 0; }
.stat .num { font-size: var(--fs-stat); line-height: 0.95; letter-spacing: -0.04em; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .num small { font-size: 0.4em; letter-spacing: -0.02em; color: var(--text-3); margin-left: 0.15em; }
.stat p { margin-top: var(--s4); font-size: var(--fs-small); color: var(--text-3); max-width: 26ch; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5);
  display: flex; flex-direction: column; gap: var(--s4); position: relative; transition: border-color 250ms;
}
.card:hover { border-color: var(--line-strong); }
.card.is-featured { border-top: 2px solid var(--signal); }
.card .tags { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.card .label { margin: 0; }
.card h3 { color: var(--text); }
.card p { color: var(--text-2); font-size: var(--fs-small); }
.card .price { font-family: var(--font-mono); font-size: 0.875rem; color: var(--text); letter-spacing: 0.02em; }
.card ul { display: flex; flex-direction: column; gap: 12px; font-size: var(--fs-small); color: var(--text-3); }
.card ul li { padding-left: 18px; position: relative; }
.card ul li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 4px; height: 4px; border-radius: 50%; background: var(--line-dec); }
.card .dash { margin-top: auto; }
/* Projects and 30+ hours: the quieter row under the tier cards */
.extras { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-top: var(--gap); }
.extra { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.extra .label { margin: 0; }
.extra p { color: var(--text-2); font-size: var(--fs-small); }
.extra .price { font-family: var(--font-mono); font-size: 0.875rem; color: var(--text); letter-spacing: 0.02em; margin-top: auto; }
/* Tier terms (services) */
.terms { border-top: 1px solid var(--line); padding-top: var(--s5); max-width: 72ch; }
.terms ul { display: flex; flex-direction: column; gap: 10px; margin-top: var(--s4); font-size: var(--fs-small); color: var(--text-2); }
.terms li { padding-left: 18px; position: relative; }
.terms li::before { content: ""; position: absolute; left: 2px; top: 0.7em; width: 4px; height: 4px; border-radius: 50%; background: var(--line-dec); }
@media (max-width: 767px) { .extras { grid-template-columns: minmax(0, 1fr); } }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; vertical-align: top; padding: 20px 16px 20px 0; border-bottom: 1px solid var(--line); max-width: 28ch; }
.table th { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); border-bottom: 1px solid var(--line-strong); }
.table th.me { color: var(--signal); }
.table td { color: var(--text-2); font-size: var(--fs-small); }
.table td.me { color: var(--text); }
.table td.rowlabel { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); padding-top: 24px; }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); position: relative; padding-top: var(--s5); }
.timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--line); }
.tl-step { position: relative; }
.tl-step::before { content: ""; position: absolute; top: calc(-1 * var(--s5) - 3px); left: 0; width: 7px; height: 7px; background: var(--text); border-radius: 50%; }
.tl-step:first-child::before { background: var(--signal); }
.tl-step .label { margin-bottom: var(--s3); }
.tl-step h3 { font-size: 1.25rem; }
.tl-step p { margin-top: var(--s3); font-size: var(--fs-small); color: var(--text-3); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s5);
  padding: var(--s4) 0; font-size: var(--fs-h3); font-weight: 500; color: var(--text); letter-spacing: -0.015em; line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { position: relative; width: 16px; height: 16px; flex: none; transition: transform 300ms ease-out; }
.faq summary .plus::before, .faq summary .plus::after { content: ""; position: absolute; background: var(--text-3); }
.faq summary .plus::before { left: 0; right: 0; top: 7px; height: 1px; }
.faq summary .plus::after { top: 0; bottom: 0; left: 7px; width: 1px; }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq .answer { padding: 0 0 var(--s5); color: var(--text-2); max-width: 62ch; }

/* Service sections (services page) */
.service { padding-block: var(--section-pad); position: relative; scroll-margin-top: var(--nav-h); }
.service .bignum { font-family: var(--font-serif); font-style: italic; font-size: clamp(4rem, 2rem + 8vw, 9rem); line-height: 0.8; color: var(--text-4); letter-spacing: -0.04em; }
.service h2 { margin-top: var(--s4); max-width: 16ch; }
.service .body { margin-top: var(--s5); }
.service .list { margin-top: var(--s5); display: flex; flex-direction: column; gap: 14px; }
.service .list li { padding-left: 22px; position: relative; color: var(--text-2); max-width: 62ch; }
.service .list li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 4px; height: 4px; border-radius: 50%; background: var(--line-dec); }
.service .list.paras li { padding-left: 0; }
.service .list.paras li::before { display: none; }
.service .list.paras li strong { display: block; color: var(--text); margin-bottom: 4px; }
.service .side { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: var(--s6); }
.service .side .label { margin-bottom: var(--s3); }
.service .side p { font-size: var(--fs-small); color: var(--text-3); }
.service .tools { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.9; color: var(--text-3); letter-spacing: 0.02em; }
.service .tools .sep { color: var(--text-4); }
.jumpbar { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.jumpbar .container { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.jumpbar ul { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); padding: var(--s3) 0; white-space: nowrap; }
.jumpbar a { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.jumpbar a:hover { color: var(--text); }
.jumpbar a .n { color: var(--text-4); margin-right: 6px; }

/* Principles (about) */
.principles { border-top: 1px solid var(--line); }
.principle { display: grid; grid-template-columns: 72px 1fr; gap: var(--gap); padding: var(--s5) 0; border-bottom: 1px solid var(--line); }
.principle .num { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; color: var(--text-4); padding-top: 0.5em; }
.principle h3 { color: var(--text); }
.principle p { margin-top: var(--s2); color: var(--text-3); max-width: 56ch; }

/* Background timeline (about) */
.bg-list { border-top: 1px solid var(--line); }
.bg-row { display: grid; grid-template-columns: 160px 1fr; gap: var(--gap); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.bg-row .when { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.1em; color: var(--text-3); padding-top: 0.4em; }
.bg-row h3 { font-size: 1.125rem; color: var(--text); }
.bg-row p { margin-top: 6px; font-size: var(--fs-small); color: var(--text-3); }
.tool-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4) var(--gap); }
.tool-groups div { font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.9; color: var(--text-3); }
.tool-groups div b { display: block; font-weight: 500; color: var(--text); letter-spacing: 0.1em; text-transform: uppercase; font-size: var(--fs-micro); margin-bottom: 4px; }

/* Portrait */
.portrait { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.figure-caption { margin-top: var(--s3); }

/* Case notes (work) */
.case { padding-block: var(--section-pad); scroll-margin-top: var(--nav-h); }
.case h2 { max-width: 18ch; }
.case dl { margin: var(--s6) 0 0; display: grid; grid-template-columns: 140px 1fr; gap: var(--s4) var(--gap); }
.case dt { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); padding-top: 0.45em; }
.case dd { margin: 0; color: var(--text-2); max-width: 58ch; }
.case dd.tools { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-3); line-height: 1.9; }
.case .caseimg { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }

/* Steps (systems check) */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); border-top: 1px solid var(--line); }
.step { padding-top: var(--s5); border-right: 1px solid var(--line); padding-right: var(--s5); }
.step:last-child { border-right: 0; }
.step .label { margin-bottom: var(--s4); }
.step h3 { color: var(--text); }
.step p { margin-top: var(--s3); color: var(--text-3); font-size: var(--fs-small); }

/* Quote (not used at launch) */
.quote { max-width: 34ch; }
.quote blockquote { margin: 0; font-family: var(--font-serif); font-style: italic; font-size: var(--fs-h3); color: var(--text); line-height: 1.3; }
.quote cite { display: block; margin-top: var(--s4); font-style: normal; font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }

/* Form */
.form { display: flex; flex-direction: column; gap: var(--s5); max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field label { font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.field label .opt { color: var(--text-4); font-weight: 400; margin-left: 8px; }
.field input[type="text"], .field input[type="email"], .field textarea, .field select {
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  padding: 14px 0; color: var(--text); font-family: var(--font-sans); font-size: var(--fs-body); width: 100%;
  transition: border-color 250ms;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-4); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-bottom-color: var(--signal); }
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; -webkit-appearance: none; cursor: pointer; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%238E8B84' stroke-width='1.2'/></svg>"); background-repeat: no-repeat; background-position: right 2px center; padding-right: 24px; }
.field select option { background: var(--ink-2); color: var(--text); }
.field .err { color: var(--err); font-size: var(--fs-small); display: none; }
.field.is-invalid .err { display: block; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--err); }
.radios { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.field .radio { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-family: var(--font-mono); font-size: 0.8125rem; font-weight: 400; color: var(--text-2); letter-spacing: 0.02em; text-transform: none; }
.radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio .box { width: 16px; height: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); flex: none; transition: background-color 200ms, border-color 200ms; }
.radio input:checked + .box { background: var(--text); border-color: var(--text); }
.radio input:focus-visible + .box { outline: 2px solid var(--signal); outline-offset: 3px; }
.form .note { font-size: var(--fs-small); color: var(--text-4); }
.form .form-error { font-size: var(--fs-small); color: var(--err); }
.form button[disabled] { opacity: 0.6; cursor: wait; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.legend { padding: 0; margin-bottom: 12px; }
.page-hero.tall { min-height: 70svh; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { display: none; }
.form.is-sent { display: none; }
.form.is-sent + .form-success { display: block; }

/* Embed placeholder */
.embed {
  border: 1px dashed var(--line-strong); border-radius: var(--radius); min-height: 480px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: var(--s3); text-align: center; padding: var(--s6); background: var(--ink-2);
}
.embed .label { margin: 0; }
.embed p { color: var(--text-3); font-size: var(--fs-small); max-width: 40ch; }
/* Live Cal.com embed: the box loses its placeholder styling once the calendar is ready */
.embed-frame { width: 100%; }
.embed-fallback { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
html:not(.no-js) .embed-fallback:not(.is-shown) { display: none; }
.embed.is-live { border: 0; padding: 0; background: transparent; display: block; min-height: 640px; }
@media (max-width: 767px) { .embed.is-live { min-height: 480px; } }

/* Placeholder images: real assets replace these; the dashed border and label are part of the placeholder PNG, not CSS */
.ph { border: 1px solid var(--line); border-radius: var(--radius); }

/* Stack map figure */
.stackmap { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); padding: var(--s4); }
.stackmap svg { width: 100%; height: auto; }
.stackmap figcaption { display: flex; justify-content: space-between; gap: var(--s4); margin-top: var(--s3); }
.stackmap picture { display: block; }

/* CTA block */
.cta { padding-block: var(--section-pad); }
.cta .display { max-width: 12ch; }
.cta .lead { margin-top: var(--s5); }
.cta .cta-row { margin-top: var(--s6); }
.cta .or { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-3); letter-spacing: 0.02em; }
.cta .or a { color: var(--text); border-bottom: 1px solid var(--line-strong); }
.cta .or a:hover { border-bottom-color: var(--signal); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding-block: var(--s8) var(--s6); }
.footer .grid { align-items: start; }
.footer .brand { margin-bottom: var(--s4); }
.footer p { font-size: var(--fs-small); color: var(--text-3); max-width: 34ch; }
.footer .label { margin-bottom: var(--s3); }
.footer ul { display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: var(--fs-small); color: var(--text-2); transition: color 250ms; }
.footer ul a:hover { color: var(--text); }
.footer-bottom { margin-top: var(--s8); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.footer-bottom a:hover { color: var(--text-2); }

/* Reveal (only when the script runs: <html> carries .no-js until the inline script removes it).
   :where() keeps the guard at zero specificity so the .is-in and .is-loaded states below always win. */
html:where(:not(.no-js)) [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
[data-reveal].is-in { opacity: 1; transform: none; }
html:where(:not(.no-js)) [data-reveal-group] > * { opacity: 0; transform: translateY(16px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
[data-reveal-group].is-in > * { opacity: 1; transform: none; }
[data-reveal-group].is-in > *:nth-child(2) { transition-delay: 70ms; }
[data-reveal-group].is-in > *:nth-child(3) { transition-delay: 140ms; }
[data-reveal-group].is-in > *:nth-child(4) { transition-delay: 210ms; }
[data-reveal-group].is-in > *:nth-child(5) { transition-delay: 280ms; }
[data-reveal-group].is-in > *:nth-child(6) { transition-delay: 350ms; }
[data-reveal-group].is-in > *:nth-child(7) { transition-delay: 420ms; }
html:where(:not(.no-js)) .hero [data-hero] { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out); }
.hero.is-loaded [data-hero] { opacity: 1; transform: none; }
.hero.is-loaded [data-hero]:nth-of-type(2) { transition-delay: 90ms; }
.hero.is-loaded [data-hero]:nth-of-type(3) { transition-delay: 180ms; }
.hero.is-loaded [data-hero]:nth-of-type(4) { transition-delay: 270ms; }
.hero.is-loaded [data-hero]:nth-of-type(5) { transition-delay: 360ms; }

/* Dev-only notes in the prototype (remove on the live site) */
.devnote {
  font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.06em; color: var(--signal);
  border: 1px dashed rgba(242, 169, 59, 0.4); padding: 8px 10px; display: inline-block; margin-top: var(--s3); border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   8. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1279px) {
  .hero-visual { width: 72%; }
}
@media (max-width: 1023px) {
  .nav-links .email { display: none; }
  .col-4, .col-5, .col-6, .col-7, .service .side, .start-6, .start-7, .start-8, .start-9 { grid-column: 1 / -1; }
  .footer .col-2, .footer .col-3 { grid-column: auto / span 4; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); }
  .stat:nth-child(4) { border-top: 1px solid var(--line); }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { width: 84%; opacity: 0.6; }
  .section-head { margin-bottom: var(--s6); }
  .timeline { grid-template-columns: repeat(2, 1fr); row-gap: var(--s6); }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: var(--s5); }
  .step:last-child { border-bottom: 0; }
}
@media (max-width: 767px) {
  :root { --nav-h: 60px; }
  .jumpbar ul { flex-wrap: nowrap; }
  .jumpbar .container { border: 0; }
  .jumpbar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .scroll-cue { display: none; }
  .nav-links { display: none; }
  .menu-btn { display: inline-block; }
  .hero { align-items: center; padding-bottom: var(--s8); }
  .hero-visual { width: 100%; height: 58%; top: 4%; opacity: 0.32; -webkit-mask-image: none; mask-image: none; }
  .hero .avail { font-size: 1.125rem; }
  .index-row { grid-template-columns: 44px 1fr; }
  .index-row .dash { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding-left: 0; padding-right: 0; border-right: 0; border-top: 1px solid var(--line); }
  .stat:first-child { border-top: 0; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; max-width: none; }
  .table tr { border-bottom: 1px solid var(--line); padding: var(--s3) 0 var(--s4); }
  .table td { border: 0; padding: 8px 0; }
  .table td.rowlabel { padding: 0 0 8px; }
  .table td[data-col]::before { content: attr(data-col); display: block; font-family: var(--font-mono); font-size: var(--fs-micro); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-4); margin-bottom: 2px; }
  .table td.me[data-col]::before { color: var(--signal); }
  .timeline { grid-template-columns: 1fr; padding-top: 0; padding-left: var(--s5); }
  .timeline::before { top: 0; bottom: 0; left: 3px; right: auto; width: 1px; height: auto; }
  .tl-step::before { top: 0.35em; left: calc(-1 * var(--s5)); }
  .principle { grid-template-columns: 40px 1fr; }
  .bg-row { grid-template-columns: 1fr; gap: 6px; }
  .tool-groups { grid-template-columns: 1fr; }
  .case dl { grid-template-columns: 1fr; gap: var(--s2); }
  .case dt { padding-top: var(--s3); }
  .footer-bottom { flex-direction: column; gap: var(--s2); }
  .footer .col-2, .footer .col-3 { grid-column: 1 / -1; }
  .cta-row { gap: var(--s4); }
  .stackmap figcaption { display: none; }
  .stackmap { padding: var(--s3); }
}
@media (max-width: 359px) {
  .brand .wordmark { display: none; }
}

/* --------------------------------------------------------------------------
   9. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
  [data-reveal], [data-reveal-group] > *, .hero [data-hero] { opacity: 1 !important; transform: none !important; }
  .menu-links a { transform: none; opacity: 1; }
}

/* Visually hidden (screen readers only) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
