/* Apex Medical Communications — site styles
   Order: tokens → fonts → base → header → hero → band → sections → components → motion → print

   The palette follows the clock of a program: plan (blue) → prep (teal) →
   room (amber, doors open) → after (plum, reported). Each section owns one
   point on that ramp; #process runs the whole ramp down its rail. */

/* ---------- Tokens ---------- */
:root {
  /* grounds */
  --night: #071627;      /* hero + dark blocks */
  --night-2: #0C2038;
  --plum-night: #1B0A18; /* testimonials */
  --ink: #0A2240;        /* brand navy, body text on light */
  --paper: #F6F3EC;      /* warm paper */
  --paper-2: #FFFFFF;
  --line: #DCD6C9;
  --line-d: rgba(255, 255, 255, 0.15);
  --muted: #545E6A;      /* AA on --paper */
  --muted-d: #9DAFC3;    /* AA on --night */

  /* the day ramp */
  --plan: #3D6FE8;
  --prep: #0E9C8C;
  --room: #E9973A;
  --after: #B4468C;

  /* ramp, legible as small text on --paper */
  --plan-ink: #2A54BE;
  --prep-ink: #077165;
  --room-ink: #8E5405;
  --after-ink: #8C2C69;

  /* ramp, legible on --night */
  --plan-d: #8FB2FF;
  --prep-d: #45DBC6;
  --room-d: #FFC176;
  --after-d: #F591CC;

  --sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;

  --measure: 60ch;
  --wrap: 1220px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 10vw, 8.5rem);
  --header-h: 4.5rem;

  --radius: 4px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 460ms;
}

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: light;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "calt";
  overflow-x: hidden;
}
h1, h2, h3 {
  margin: 0;
  font-family: var(--sans);
  line-height: 1.02;
  text-wrap: balance;
}
h1 {
  font-size: clamp(2.9rem, 8.2vw, 7rem);
  font-weight: 700;
  font-stretch: 118%;
  letter-spacing: -0.035em;
  line-height: 0.94;
}
h2 {
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  font-weight: 650;
  font-stretch: 114%;
  letter-spacing: -0.028em;
}
h3 { font-size: clamp(1.2rem, 1.8vw, 1.45rem); font-weight: 620; letter-spacing: -0.012em; }

p { margin: 0 0 1rem; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }
a { color: var(--plan-ink); text-underline-offset: 0.16em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
ul, ol { margin: 0; padding: 0; }
img, svg, canvas { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--prep); outline-offset: 3px; border-radius: 2px; }
.dark :focus-visible, .site-header.over-hero :focus-visible { outline-color: var(--room-d); }

/* condensed, tabular: the schedule voice */
.tick {
  font-stretch: 78%;
  font-weight: 640;
  letter-spacing: 0.005em;
  font-variant-numeric: tabular-nums;
}

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius);
  text-decoration: none; transition: top 150ms;
}
/* The base `a:hover` rule outranks a plain `color: inherit`, so component
   anchors that live on a dark ground have to restate their hover colour. */
.skip:focus { top: 0.75rem; }
.skip:hover { color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
/* transparent while it sits over the dark hero (index only; JS removes it) */
.site-header.over-hero {
  color: #fff;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.site-header .wrap {
  display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: var(--header-h);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  color: inherit; text-decoration: none; margin-right: auto;
  transition: color 220ms var(--ease);
}
/* Wordmark rollover picks up the stage-light amber, one step of the ramp
   per ground so it stays legible on paper and on the hero. */
.brand:hover, .brand:focus-visible { color: var(--room-ink); }
.site-header.over-hero .brand:hover,
.site-header.over-hero .brand:focus-visible { color: var(--room-d); }
.brand svg { height: 21px; width: auto; }
.brand-name { font-stretch: 84%; font-size: 0.9rem; font-weight: 500; opacity: 0.72; display: none; white-space: nowrap; }
@media (min-width: 1320px) { .brand-name { display: inline; } }

.site-nav { display: none; }
.site-nav ul { list-style: none; display: flex; gap: clamp(0.9rem, 1.8vw, 1.6rem); }
.site-nav a {
  color: inherit; text-decoration: none; white-space: nowrap;
  font-size: 0.94rem; font-stretch: 92%; font-weight: 500;
  padding: 0.35rem 0; position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform 320ms var(--ease);
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { transform: none; }
@media (min-width: 860px) { .site-nav { display: block; } }

.menu-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: none; border: 1px solid currentColor; border-radius: var(--radius);
  padding: 0.45rem 0.85rem; cursor: pointer; color: inherit;
  font-stretch: 84%; font-weight: 600; font-size: 0.9rem;
}
@media (min-width: 860px) { .menu-btn { display: none; } }

/* client access: header on wide screens, bar under the hero below that */
.client-access { display: none; align-items: center; gap: 0.5rem; }
.client-access label { font-size: 0.82rem; font-stretch: 84%; opacity: 0.75; white-space: nowrap; }
.client-access input {
  width: 9.5rem; padding: 0.48rem 0.7rem; border: 1px solid currentColor; border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper-2) 88%, transparent); color: var(--ink);
  font-size: 0.92rem;
}
.over-hero .client-access input { background: rgba(255, 255, 255, 0.1); color: #fff; }
.client-access input::placeholder { color: #6A737E; }
.over-hero .client-access input::placeholder { color: rgba(255, 255, 255, 0.6); }
/* --prep itself is too light behind 14px white text (3.5:1); this is the
   darkened step that clears AA at 5.2:1. */
.client-access button {
  padding: 0.5rem 0.95rem; border: 1px solid #0A7A6E; background: #0A7A6E; color: #fff;
  border-radius: var(--radius); cursor: pointer; font-weight: 650; font-stretch: 88%; font-size: 0.88rem;
  transition: background 180ms, border-color 180ms;
}
.client-access button:hover { background: #075E55; border-color: #075E55; }
.site-header .client-access { display: none; }
@media (min-width: 1080px) { .site-header .client-access { display: flex; } }

.access-bar { background: var(--paper-2); border-bottom: 1px solid var(--line); }
.access-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; padding-block: 0.9rem; }
.access-bar p { margin: 0; font-size: 0.94rem; color: var(--muted); }
.access-bar .client-access { display: flex; flex-wrap: wrap; }
.access-bar .client-access input { flex: 1 1 8rem; }
@media (min-width: 1080px) { .access-bar { display: none; } }

/* mobile menu */
.menu { border: 0; padding: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; background: var(--night); color: #fff; }
.menu::backdrop { background: rgba(7, 22, 39, 0.7); }
.menu .wrap { display: flex; flex-direction: column; min-height: 100dvh; padding-block: 1rem 2rem; }
.menu-top { display: flex; justify-content: space-between; align-items: center; min-height: var(--header-h); }
.menu-top svg { height: 21px; width: auto; }
.menu-close {
  background: none; border: 1px solid rgba(255, 255, 255, 0.5); color: #fff;
  border-radius: var(--radius); padding: 0.45rem 0.85rem; cursor: pointer; font-stretch: 84%; font-weight: 600; font-size: 0.9rem;
}
.menu ul { list-style: none; margin-top: 2rem; }
.menu li + li { border-top: 1px solid var(--line-d); }
.menu a {
  display: block; padding: 1rem 0; color: #fff; text-decoration: none;
  font-size: clamp(1.75rem, 8vw, 2.5rem); font-weight: 650; font-stretch: 112%; letter-spacing: -0.03em;
}
.menu li:nth-child(1) a:hover { color: var(--plan-d); }
.menu li:nth-child(2) a:hover { color: var(--prep-d); }
.menu li:nth-child(3) a:hover { color: var(--room-d); }
.menu li:nth-child(4) a:hover { color: var(--after-d); }
.menu li:nth-child(5) a:hover { color: var(--room-d); }
.menu-foot { margin-top: auto; color: var(--muted-d); font-size: 0.9rem; }
.menu-foot a { color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  margin-top: calc(-1 * var(--header-h));
  padding-top: var(--header-h);
  min-height: clamp(560px, 93svh, 900px);
  display: flex; align-items: center;
  background: var(--night);
  color: #fff;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg canvas { width: 100%; height: 100%; }
/* Warm light pools drifting behind the room. One layer, gradients only:
   no blur filters, so it stays a single cheap composited surface. */
.pool {
  position: absolute; inset: -25%; pointer-events: none; z-index: -3;
  background:
    radial-gradient(38% 42% at 78% 22%, rgba(233, 151, 58, 0.30), transparent 70%),
    radial-gradient(34% 38% at 14% 84%, rgba(61, 111, 232, 0.26), transparent 70%),
    radial-gradient(26% 30% at 56% 92%, rgba(14, 156, 140, 0.20), transparent 70%);
}
/* scrim keeps the headline column readable over the room */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(97deg, rgba(7, 22, 39, 0.96) 0%, rgba(7, 22, 39, 0.9) 28%, rgba(7, 22, 39, 0.5) 44%, rgba(7, 22, 39, 0) 60%),
    linear-gradient(to top, rgba(7, 22, 39, 0.55), transparent 26%);
}
@media (max-width: 860px) {
  .hero { align-items: flex-start; }
  .hero .wrap { padding-block: clamp(2rem, 7vw, 3.5rem) clamp(3rem, 14vw, 6rem); }
  .hero::before {
    background: linear-gradient(to bottom,
      rgba(7, 22, 39, 0.88) 0%, rgba(7, 22, 39, 0.82) 38%,
      rgba(7, 22, 39, 0.34) 66%, rgba(7, 22, 39, 0.55) 100%);
  }
}

.hero .wrap { position: relative; padding-block: clamp(3rem, 7vw, 5rem); width: 100%; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede {
  font-size: clamp(1.08rem, 1.35vw, 1.26rem);
  color: #DDE6F0;
  margin: 1.6rem 0 2.25rem;
  max-width: 47ch;
}
.hero-copy { max-width: none; }
.hero-note {
  margin-top: 2rem; color: var(--muted-d); font-size: 0.95rem; max-width: 40ch;
  padding-top: 1rem; border-top: 1px solid var(--line-d);
}
.hero-note b { color: var(--room-d); font-weight: 640; }

/* Buttons fill from the bottom on hover. --edge is the outline and the fill;
   --on-fill is the text once the fill has arrived. */
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
/* `color` is declared in exactly two places — .btn and .btn:hover — so the
   hover state can never lose a specificity tie to a context rule. Context
   rules set the four custom properties and nothing else:
     --edge     outline, and the fill that sweeps up on hover
     --fill     override when the fill differs from the outline
     --fg       text at rest
     --on-fill  text once the fill has arrived */
.btn {
  --edge: var(--ink);
  --fg: var(--ink);
  --on-fill: var(--paper);
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-block; padding: 0.85rem 1.5rem; border-radius: var(--radius); text-decoration: none;
  font-weight: 650; font-stretch: 96%; font-size: 0.98rem;
  border: 1px solid var(--edge); background: transparent;
  color: var(--fg);
  transition: color 240ms var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--fill, var(--edge));
  transform: scaleY(0); transform-origin: bottom; transition: transform 340ms var(--ease);
}
.btn:hover, .btn:focus-visible { color: var(--on-fill); }
.btn:hover::before, .btn:focus-visible::before { transform: none; }

/* The ground decides the plain button; the primary carries its own palette
   everywhere, so it is excluded rather than overridden. */
.hero .btn:not(.btn-primary),
.dark .btn:not(.btn-primary) { --edge: #fff; --fg: #fff; --on-fill: var(--night); }
.btn-primary {
  --edge: var(--room); --fill: #FFC176; --fg: var(--night); --on-fill: var(--night);
  background: var(--room);
}

/* ---------- Formats band (marquee) ---------- */
.band {
  background: var(--room);
  color: var(--night);
  border-block: 1px solid #C97C1E;
  overflow: hidden;
  padding-block: 0.85rem;
}
.band-track { display: flex; width: max-content; will-change: transform; }
.band ul {
  display: flex; align-items: center; list-style: none;
  font-stretch: 88%; font-weight: 620; font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  letter-spacing: -0.008em;
}
.band li { display: flex; align-items: center; white-space: nowrap; }
.band li::after {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--night); opacity: 0.55; margin-inline: clamp(1.1rem, 2.4vw, 2.2rem);
}
@media (prefers-reduced-motion: no-preference) {
  .band-track { animation: slide 42s linear infinite; }
  .band:hover .band-track, .band:focus-within .band-track { animation-play-state: paused; }
  @keyframes slide { to { transform: translateX(-50%); } }
}

/* ---------- Sections ---------- */
.section { position: relative; padding-block: var(--section); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); position: relative; }
.section-head p { margin-top: 1.1rem; color: var(--muted); font-size: 1.1rem; }
.dark { background: var(--night); color: #fff; }
.dark .section-head p, .dark .muted { color: var(--muted-d); }
.dark a { color: var(--prep-d); }
.dark a:hover { color: #fff; }

/* ---------- Services ---------- */
.services-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: 5fr 7fr; gap: 5rem; align-items: start; }
  .services-head { position: sticky; top: calc(var(--header-h) + 2.5rem); margin-bottom: 0; }
}
.svc-index { display: flex; gap: 0.5rem; margin-top: 2.25rem; }
.svc-index i {
  height: 6px; width: 2.75rem; border-radius: 99px; opacity: 0.55;
  transition: opacity 300ms var(--ease), width 460ms var(--ease);
}
.svc-index .i1 { background: var(--plan); }
.svc-index .i2 { background: var(--prep); }
.svc-index .i3 { background: var(--room); }
.svc-index .i4 { background: var(--after); }
.services-grid:has(.s1:is(:hover, :focus-within)) .i1,
.services-grid:has(.s2:is(:hover, :focus-within)) .i2,
.services-grid:has(.s3:is(:hover, :focus-within)) .i3,
.services-grid:has(.s4:is(:hover, :focus-within)) .i4 { opacity: 1; width: 5.5rem; }

.service {
  position: relative; isolation: isolate;
  padding: 2rem 0 2rem 1.5rem;
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.s1 { --c: var(--plan); --c-ink: var(--plan-ink); }
.s2 { --c: var(--prep); --c-ink: var(--prep-ink); }
.s3 { --c: var(--room); --c-ink: var(--room-ink); }
.s4 { --c: var(--after); --c-ink: var(--after-ink); }
.service::before {
  content: ""; position: absolute; z-index: -1; inset: 0 -1rem 0 -0.75rem;
  background: var(--c); opacity: 0; border-radius: var(--radius);
  transform: scaleX(0.35); transform-origin: left;
  transition: opacity 300ms var(--ease), transform 560ms var(--ease);
}
.service::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--c); transform: scaleY(0); transform-origin: top;
  transition: transform 440ms var(--ease);
}
.service:is(:hover, :focus-within)::before { opacity: 0.075; transform: none; }
.service:is(:hover, :focus-within)::after { transform: none; }
.service h3 { margin-bottom: 0.7rem; transition: color 260ms var(--ease); }
.service:is(:hover, :focus-within) h3 { color: var(--c-ink); }
.service ul { list-style: none; margin-top: 0.5rem; }
.service li { padding-left: 1.15rem; position: relative; margin-bottom: 0.45rem; max-width: var(--measure); }
.service li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 0.5rem; height: 2px; background: var(--c);
}

.capabilities { margin-top: clamp(3.5rem, 7vw, 6rem); padding-top: 2.5rem; border-top: 2px solid var(--ink); }
.capabilities h3 { margin-bottom: 1.5rem; }
.capabilities ul { list-style: none; display: grid; gap: 0 2.5rem; }
@media (min-width: 640px) { .capabilities ul { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .capabilities ul { grid-template-columns: repeat(3, 1fr); } }
.capabilities li {
  padding: 0.65rem 0 0.65rem 1.1rem; border-bottom: 1px solid var(--line);
  font-size: 0.98rem; position: relative;
}
.capabilities li::before {
  content: ""; position: absolute; left: 0; top: 1.15em; width: 5px; height: 5px; border-radius: 50%;
  background: var(--prep); opacity: 0.55; transition: opacity 240ms, transform 300ms var(--ease);
}
.capabilities li:hover::before { opacity: 1; transform: scale(1.6); }

/* ---------- Compliance ---------- */
.compliance-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .compliance-grid { grid-template-columns: 5fr 7fr; gap: 5rem; } }
.practices { list-style: none; counter-reset: none; }
.practices li {
  padding: 1.5rem 0 1.5rem 1.5rem; border-top: 1px solid var(--line-d);
  font-size: clamp(1.1rem, 1.7vw, 1.4rem); font-weight: 560; font-stretch: 104%;
  letter-spacing: -0.015em; line-height: 1.22; position: relative;
}
.practices li:last-child { border-bottom: 1px solid var(--line-d); }
.practices li::before {
  content: ""; position: absolute; left: 0; top: 1.55rem; width: 3px; height: 1.1em;
  background: var(--prep-d); transform: scaleY(0.35); transform-origin: top;
  transition: transform 420ms var(--ease), background 300ms;
}
.practices li:hover::before { transform: none; }
.practices small {
  display: block; margin-top: 0.55rem; font-size: 0.95rem; font-weight: 400; font-stretch: 100%;
  letter-spacing: 0; line-height: 1.55; color: var(--muted-d); max-width: 52ch;
}

/* ---------- Process: the rail runs the whole ramp ---------- */
.agenda {
  --tw: 9rem;
  --rail: calc(var(--tw) + 1rem);
  list-style: none; position: relative; max-width: 58rem;
}
/* Wide screens read it the way a run-of-show sheet is laid out:
   time | rail | what happens | detail. */
@media (min-width: 1080px) {
  .agenda { --tw: 10rem; max-width: none; }
  .step { grid-template-columns: var(--tw) 2rem minmax(14rem, 20rem) 1fr; }
  .step .when { text-align: right; padding-right: 1.1rem; }
  .step .body { display: contents; }
  .step h3 { grid-column: 3; margin-left: 1.5rem; }
  .step p { grid-column: 4; padding-left: 2.5rem; margin-top: 0; }
}
.agenda::before, .agenda::after {
  content: ""; position: absolute; left: var(--rail); top: 0.4rem; bottom: 0.4rem; width: 2px;
}
.agenda::before { background: var(--line); }
.agenda::after {
  transform: scaleY(var(--p, 0)); transform-origin: top;
  background: linear-gradient(to bottom,
    var(--plan) 0%, var(--plan) 12%,
    var(--prep) 26%, var(--prep) 40%,
    var(--room) 54%, var(--room) 84%,
    var(--after) 96%);
}
.step {
  display: grid;
  grid-template-columns: var(--tw) 2rem 1fr;
  align-items: baseline;
  gap: 0 0;
  padding-block: 1.5rem;
}
.step .when { font-size: clamp(1.05rem, 1.8vw, 1.35rem); color: var(--muted); transition: color 420ms var(--ease); }
.step.lit .when { color: var(--stage-ink); }
.step .dot {
  grid-column: 2; justify-self: center; align-self: start;
  width: 13px; height: 13px; border-radius: 50%; margin-top: 0.35em;
  background: var(--paper); border: 2px solid var(--line);
  transition: background 420ms var(--ease), border-color 420ms var(--ease), box-shadow 480ms var(--ease);
}
.step.lit .dot {
  background: var(--stage); border-color: var(--stage);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--stage) 16%, transparent);
}
.step .body { grid-column: 3; padding-left: 1.5rem; }
.step h3 { margin-bottom: 0.3rem; position: relative; display: inline-block; }
.step h3::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--stage); transform: scaleX(0); transform-origin: left;
  transition: transform 560ms var(--ease) 120ms;
}
.step.lit h3::after { transform: none; }
.step p { color: var(--muted); font-size: 0.99rem; margin-top: 0.55rem; }
.p1 { --stage: var(--plan); --stage-ink: var(--plan-ink); }
.p2 { --stage: var(--prep); --stage-ink: var(--prep-ink); }
.p3 { --stage: var(--room); --stage-ink: var(--room-ink); }
.p4 { --stage: var(--after); --stage-ink: var(--after-ink); }

@media (max-width: 700px) {
  .agenda { --rail: 6px; }
  .step { --pad: 2rem; grid-template-columns: 1fr; padding-left: var(--pad); padding-block: 1.35rem; position: relative; }
  /* An absolutely positioned grid child is placed inside its grid area, so
     pull it back out to sit on the rail. */
  .step .dot {
    position: absolute; grid-column: 1; justify-self: start;
    left: calc(-1 * var(--pad)); top: 1.6rem; margin-top: 0;
  }
  .step .body { grid-column: 1; padding-left: 0; margin-top: 0.35rem; }
}

/* ---------- Results ---------- */
#results { background: var(--plum-night); }
#results a { color: var(--after-d); }
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.arrows { display: flex; gap: 0.5rem; }
.arrows button {
  width: 2.9rem; height: 2.9rem; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center;
  transition: background 220ms, border-color 220ms, color 220ms;
}
.arrows button:hover { background: var(--after); border-color: var(--after); color: #fff; }
.arrows svg { width: 1.1rem; height: 1.1rem; }
.quotes {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 30rem); gap: 1.5rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1.25rem;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
  overscroll-behavior-x: contain;
}
.quote {
  scroll-snap-align: start; margin: 0; padding-top: 1.6rem;
  display: flex; flex-direction: column; position: relative;
  border-top: 1px solid var(--line-d);
}
.quote::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 3.5rem; height: 3px;
  background: var(--after-d); transition: width 520ms var(--ease);
}
.quote:hover::before, .quote:focus-within::before { width: 100%; }
.quote p {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.12rem, 1.55vw, 1.36rem); line-height: 1.4;
  margin-bottom: 1.5rem; max-width: none; color: #F3E9F0;
}
.quote p::before { content: "\201C"; }
.quote p::after { content: "\201D"; }
.quote footer { margin-top: auto; font-size: 0.92rem; font-stretch: 88%; color: var(--muted-d); }
.quote footer b { color: #fff; font-weight: 640; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 6fr 6fr; gap: 5rem; align-items: start; } }
.contact-card { border-top: 3px solid var(--room); padding-top: 1.75rem; }
.contact-name { font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 680; font-stretch: 112%; letter-spacing: -0.03em; line-height: 1.05; }
.contact-title { color: var(--muted); margin: 0.35rem 0 1.75rem; font-stretch: 92%; }
.contact-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.85rem 1.75rem; margin: 0; }
.contact-card dt { color: var(--muted); font-size: 0.85rem; font-stretch: 82%; font-weight: 600; padding-top: 0.35rem; }
.contact-card dd { margin: 0; font-size: 1.12rem; }
.contact-card dd a { color: var(--ink); text-decoration: none; box-shadow: inset 0 -1px 0 var(--line); transition: box-shadow 260ms var(--ease), color 200ms; }
.contact-card dd a:hover { color: var(--room-ink); box-shadow: inset 0 -2px 0 var(--room); }
.contact-card address { font-style: normal; line-height: 1.5; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.75rem; font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-start; }
.site-footer svg { height: 18px; width: auto; color: var(--ink); margin-bottom: 0.7rem; }
.site-footer address { font-style: normal; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }
.site-footer a { color: var(--ink); text-decoration: none; box-shadow: inset 0 -1px 0 transparent; transition: box-shadow 220ms; }
.site-footer a:hover { box-shadow: inset 0 -1px 0 var(--ink); }

/* ---------- Inner pages ---------- */
.page { padding-block: clamp(3rem, 8vw, 6rem); }
/* Keep the same left spine as the header and footer, cap the measure. */
.page .wrap > * { max-width: 42rem; }
.page h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1.5rem; }
.page h2 { font-size: 1.5rem; font-stretch: 106%; margin: 2.5rem 0 0.75rem; }
.page ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.page li { margin-bottom: 0.35rem; }
.page .updated { color: var(--muted); font-size: 0.92rem; font-stretch: 88%; margin-bottom: 2rem; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .pool { animation: drift 46s ease-in-out infinite alternate; }
  @keyframes drift { to { transform: translate3d(-4%, 3%, 0) scale(1.14); } }

  /* the one orchestrated page-load moment */
  .hero h1, .hero .lede, .hero .cta-row, .hero-note {
    animation: rise 640ms var(--ease) both;
  }
  .hero h1 { animation-delay: 40ms; }
  .hero .lede { animation-delay: 150ms; }
  .hero .cta-row { animation-delay: 250ms; }
  .hero-note { animation-delay: 340ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

  .js .quote { opacity: 0.001; transform: translateY(16px); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); transition-delay: var(--d, 0ms); }
  .js .quote.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .agenda::after { transform: scaleY(1); }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .access-bar, .band, .arrows, .menu-btn, .skip, .hero-bg, .pool { display: none !important; }
  .hero { min-height: 0; background: none; color: #000; }
  .hero::before { display: none; }
  .dark, #results { background: none; color: #000; }
  .quotes { display: block; overflow: visible; }
  .quote { margin-bottom: 1.5rem; opacity: 1 !important; transform: none !important; }
  .quote p { color: #000; }
}
