/* Midtown Physical Therapy By Empire PT · Brandcore.io proposal
   Palette derived from the clinic's logo: logo red #AF000A, logo ink, and clinical paper.
   Typography: Geist for body and display, Instrument Serif Italic for one payoff per headline,
   JetBrains Mono for labels and sources. Responsive tokens use clamp() with matching breakpoints. */

@font-face { font-family: "Geist"; src: url("assets/fonts/geist-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/instrument-serif-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/instrument-serif-regular.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/jetbrains-mono-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #0D0B0A;
  --ink-2: #17120F;
  --paper: #F3EDE3;
  --paper-2: #E8E0D1;
  --red: #AF000A;
  --red-hot: #E0242B;
  --red-deep: #6E0006;
  --coral: #F4A09A;
  --text-dark: #F3EDE3;
  --muted-dark: #C9BFB2;
  --text-paper: #1B1613;
  --muted-paper: #54483F;
  --line-dark: rgba(243, 237, 227, 0.16);
  --line-paper: rgba(27, 22, 19, 0.16);

  --fs-body: clamp(16px, 0.42vw + 0.94rem, 22px);
  --fs-lede: clamp(18px, 0.5vw + 1rem, 26px);
  --fs-h2: clamp(38px, 3.4vw, 64px);
  --fs-h3: clamp(21px, 1.4vw, 29px);
  --fs-label: clamp(13px, 0.35vw + 0.5rem, 16px);
  --fs-source: clamp(13px, 0.2vw + 0.44rem, 14px);
  --fs-display: clamp(50px, 6.2vw, 118px);

  --gutter: clamp(24px, 4.2vw, 84px);
  --chrome-top: 66px;
  --chrome-bottom: 60px;
}

@media (min-width: 1900px) {
  :root { --fs-body: 23px; --fs-lede: 27px; --fs-h2: 68px; --fs-h3: 30px; }
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text-dark);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-body);
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
button, select, input { font: inherit; color: inherit; }
ol, ul { margin: 0; padding: 0; }
code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.82em; }

:focus-visible { outline: 3px solid #FF8A80; outline-offset: 3px; }
.paper :focus-visible, .chrome-top.paper-chrome :focus-visible { outline-color: var(--red); }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--paper); color: var(--text-paper); padding: 10px 14px; }
.skip:focus { left: 12px; }

[hidden] { display: none !important; }

/* ---------- Deck shell ---------- */
.deck { position: fixed; inset: 0; overflow: hidden; background: var(--ink); }
.deck[data-theme="dark"] { --chrome-bg: #0D0B0A; --chrome-fg: #F3EDE3; --chrome-line: rgba(243, 237, 227, 0.14); --chrome-mute: #C9BFB2; }
.deck[data-theme="paper"] { --chrome-bg: #F3EDE3; --chrome-fg: #1B1613; --chrome-line: rgba(27, 22, 19, 0.14); --chrome-mute: #54483F; }

.chrome {
  position: absolute; left: 0; right: 0; z-index: 50;
  background: var(--chrome-bg);
  color: var(--chrome-fg);
  transition: background-color 0.4s ease, color 0.4s ease;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 3vw, 56px);
}
.chrome-top { top: 0; height: var(--chrome-top); border-bottom: 1px solid var(--chrome-line); }
.chrome-bottom { bottom: 0; height: var(--chrome-bottom); border-top: 1px solid var(--chrome-line); }

.brand-pair { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-bc { height: 22px; width: auto; }
.x-mark { display: inline-flex; color: var(--chrome-mute); width: 14px; height: 14px; }
.x-mark svg { width: 14px; height: 14px; }
.client-tile { display: inline-flex; align-items: center; background: #F3EDE3; border-radius: 4px; padding: 6px 10px; border: 1px solid rgba(27, 22, 19, 0.10); }
.client-tile img { height: 30px; width: auto; }

.chrome-label {
  margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-label);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--chrome-mute); white-space: nowrap;
}
.chrome-right { display: flex; align-items: center; gap: 14px; }
.chrome-count { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-label); color: var(--chrome-mute); white-space: nowrap; }

.chip-btn {
  appearance: none; cursor: pointer; background: transparent; color: var(--chrome-fg);
  border: 1px solid var(--chrome-line); border-radius: 999px; padding: 10px 18px; min-height: 44px;
  font-size: var(--fs-label); letter-spacing: 0.04em; display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
}
.chip-btn:hover { border-color: var(--red-hot); }
.chip-btn:disabled { opacity: 0.4; cursor: default; }
.chip-btn svg { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
.foot-note { margin: 0; font-size: var(--fs-label); color: var(--chrome-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.progress { position: absolute; top: 0; left: 0; right: 0; height: 2px; z-index: 60; background: rgba(127, 127, 127, 0.22); }
.progress span { display: block; height: 100%; width: 100%; background: var(--red-hot); transform-origin: left center; transform: scaleX(0.11); transition: transform 0.5s ease; }

.stage { position: absolute; top: var(--chrome-top); bottom: var(--chrome-bottom); left: 0; right: 0; overflow: hidden; }

.traction { position: absolute; left: 0; right: 0; top: 50%; height: 2px; z-index: 40; pointer-events: none; transform: scaleX(0); opacity: 0;
  background: linear-gradient(90deg, transparent, var(--red-hot), transparent); }

/* ---------- Rail ---------- */
.rail { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); z-index: 45; display: flex; flex-direction: column; gap: 6px; }
.rail button { width: 22px; height: 22px; border-radius: 999px; border: 1px solid var(--chrome-line); background: transparent; cursor: pointer; padding: 0; }
.rail button[aria-current="true"] { background: var(--red-hot); border-color: var(--red-hot); }
.rail button:focus-visible { outline-offset: 2px; }

/* ---------- Slides ---------- */
.slide {
  position: absolute; inset: 0; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--bg, var(--ink)); color: var(--fg, var(--text-dark));
  opacity: 0; visibility: hidden; z-index: 1;
  transition: opacity 0.5s ease, visibility 0s linear 0.5s;
  overscroll-behavior: contain;
}
.slide.is-active { opacity: 1; visibility: visible; z-index: 2; transition: opacity 0.5s ease, visibility 0s; }
.slide.dark { --bg: var(--ink); --fg: var(--text-dark); --muted: var(--muted-dark); --line: var(--line-dark); --em: var(--coral); }
.slide.paper { --bg: var(--paper); --fg: var(--text-paper); --muted: var(--muted-paper); --line: var(--line-paper); --em: var(--red); }

.slide-inner {
  min-height: 100%; box-sizing: border-box;
  padding: clamp(28px, 4.6vh, 64px) var(--gutter) clamp(28px, 4vh, 56px);
  display: flex; flex-direction: column; gap: clamp(16px, 2.6vh, 30px);
  padding-right: calc(var(--gutter) + 26px);
}

.kicker { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-label); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.h2 { margin: 0; font-size: var(--fs-h2); line-height: 0.98; letter-spacing: -0.045em; font-weight: 600; max-width: 22ch; text-wrap: balance; }
.h2 em, .display em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--em); }
.h3 { margin: 0; font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -0.02em; font-weight: 600; }
.body { margin: 0; font-size: var(--fs-body); line-height: 1.55; color: var(--fg); max-width: 60ch; }
.body.wide { max-width: 78ch; }
.body.small { font-size: var(--fs-label); color: var(--muted); }
.slide-foot { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--fs-source); color: var(--muted); }
.src { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-source); color: var(--muted); letter-spacing: 0.02em; }
.mini-label { margin: 6px 0 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; text-decoration: none; font-size: var(--fs-label); font-weight: 600; letter-spacing: 0.01em; border: 1px solid transparent; cursor: pointer; }
.btn-gold { background: var(--red); color: #FFF7F2; }
.btn-gold:hover { background: var(--red-deep); }
.btn-gold:disabled { background: #7b5b58; color: #efe4dc; cursor: not-allowed; }
.btn-ghost { border-color: currentColor; background: transparent; color: inherit; }

/* ---------- Cover ---------- */
.slide.cover { background: transparent; color: var(--text-dark); --muted: var(--muted-dark); --em: var(--coral); }
.cover-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(60% 60% at 74% 46%, rgba(175, 0, 10, 0.28) 0%, rgba(13, 11, 10, 0) 62%),
    linear-gradient(180deg, #120E0C 0%, #0D0B0A 100%);
}
.cover-bg::after { content: ""; position: absolute; left: 74%; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, rgba(243, 237, 227, 0.12), transparent); }
.cover-stage { position: absolute; top: 0; right: 0; width: 56%; height: 100%; z-index: 1; }
.cover-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cover-fallback { position: absolute; inset: 0; display: none; place-items: center; }
.medallion { width: min(70%, 520px); aspect-ratio: 1.6 / 1; background: #F3EDE3; border-radius: 14px; display: grid; place-items: center; box-shadow: 0 0 0 10px #AF000A, 0 30px 70px rgba(0, 0, 0, 0.55); }
.medallion img { width: 78%; height: auto; }
.no-3d .cover-stage canvas { display: none; }
.no-3d .cover-fallback { display: grid; }

.cover-copy {
  position: absolute; left: 0; top: 0; bottom: 0; width: 46%; z-index: 3;
  padding: clamp(28px, 6vh, 80px) var(--gutter) clamp(28px, 6vh, 72px);
  display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 2.4vh, 26px);
  pointer-events: none;
}
.cover-copy > * { pointer-events: auto; }
.eyebrow { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.display { margin: 0; font-size: var(--fs-display); line-height: 0.92; letter-spacing: -0.055em; font-weight: 600; text-wrap: balance; }
.lede { margin: 0; font-size: var(--fs-lede); line-height: 1.45; color: var(--text-dark); max-width: 40ch; }
.ticker { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; max-width: 46ch; }
.ticker li { border: 1px solid var(--line-dark); border-radius: 999px; padding: 6px 14px; font-size: var(--fs-label); color: var(--text-dark); }
.prepared { margin: 0; font-size: var(--fs-label); color: var(--muted); }
.prepared strong { color: var(--text-dark); font-weight: 600; }
.cue {
  position: absolute; left: var(--gutter); bottom: clamp(18px, 3.4vh, 40px); z-index: 4;
  appearance: none; border: 0; background: transparent; cursor: pointer; color: var(--text-dark);
  display: inline-flex; align-items: center; gap: 10px; font-size: var(--fs-label); padding: 10px 0; min-height: 44px;
}
.cue svg { width: 1.2em; height: 1.2em; color: var(--red-hot); }

/* ---------- Two-column layouts ---------- */
.split { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(24px, 3.6vw, 64px); align-items: start; }
.col-main { display: flex; flex-direction: column; gap: clamp(14px, 2.2vh, 24px); min-width: 0; }

/* ---------- Audit ---------- */
.evidence { margin: 8px 0 0; display: grid; gap: 10px; }
.evidence img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; }
.evidence figcaption { font-size: var(--fs-label); color: var(--muted); line-height: 1.45; }
.evidence .src { display: block; margin-bottom: 4px; }
.findings { list-style: none; display: grid; gap: 0; }
.finding { border-top: 1px solid var(--line); padding: clamp(12px, 1.8vh, 18px) 0; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr); }
.finding:last-child { border-bottom: 1px solid var(--line); }
.finding p { margin: 0; font-size: var(--fs-label); line-height: 1.5; color: var(--fg); }
.finding code { color: var(--fg); }
.sev { display: inline-flex; width: fit-content; align-items: center; padding: 3px 10px; border-radius: 4px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-source); letter-spacing: 0.08em; text-transform: uppercase; }
.sev.high { background: var(--red); color: #FFF7F2; }
.sev.medium { border: 1px solid var(--red); color: var(--red); }
.paper .sev.medium { color: var(--red); }
.dark .sev.medium { border-color: var(--coral); color: var(--coral); }
.finding .src { color: var(--muted); }

/* ---------- Gap ---------- */
.gap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 36px); align-items: stretch; }
.path { border: 1px solid var(--line); border-radius: 10px; padding: clamp(18px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 14px; }
.path-next { border-color: var(--coral); }
.path-title { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-label); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.path-count { margin: 0; font-size: var(--fs-h3); font-weight: 600; }
.path-count .big { font-size: clamp(54px, 5vw, 92px); line-height: 0.9; letter-spacing: -0.05em; color: var(--em); margin-right: 6px; }
.steps { list-style: none; display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; font-size: var(--fs-body); line-height: 1.45; }
.steps .n { width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; font-size: var(--fs-label); font-weight: 600; border: 1px solid var(--line); color: var(--muted); }
.path-next .steps .n { background: var(--red); color: #FFF7F2; border-color: var(--red); }

/* ---------- Flagship ---------- */
.flagship { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: clamp(20px, 2.6vw, 40px); align-items: start; }
.browser { background: var(--paper); color: var(--text-paper); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(243, 237, 227, 0.14); min-width: 0; }
.browser-bar { background: #E8E0D1; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid rgba(27, 22, 19, 0.12); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 999px; background: #B9AE9E; display: block; }
.url { flex: 1; min-width: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-source); color: #54483F; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.concept-tag { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-source); background: var(--red); color: #FFF7F2; padding: 2px 8px; border-radius: 4px; }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid rgba(27, 22, 19, 0.12); background: #F3EDE3; }
.site-logo { display: inline-flex; background: #F3EDE3; }
.site-logo img { height: 34px; width: auto; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { appearance: none; cursor: pointer; border: 1px solid rgba(27, 22, 19, 0.2); background: #FFFBF5; color: #1B1613; border-radius: 999px; padding: 8px 16px; min-height: 40px; font-size: var(--fs-label); }
.tab[aria-selected="true"] { background: var(--red); border-color: var(--red); color: #FFF7F2; }
.panel { padding: 18px 16px 22px; display: grid; gap: 14px; }
.panel .mini-label { color: #54483F; }
.hero-card { background: #FFFBF5; border-radius: 8px; overflow: hidden; border: 1px solid rgba(27, 22, 19, 0.1); }
.hero-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hero-copy { padding: 16px 18px 18px; display: grid; gap: 12px; }
.site-kicker { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-source); letter-spacing: 0.1em; text-transform: uppercase; color: #54483F; }
.hero-copy h3 { margin: 0; font-size: clamp(20px, 1.8vw, 28px); line-height: 1.15; letter-spacing: -0.02em; font-weight: 600; color: #1B1613; }
.hero-copy h3 em { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; color: var(--red); }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cta-row .btn-ghost { color: #1B1613; border-color: rgba(27, 22, 19, 0.5); }
.problem-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.problem { appearance: none; cursor: pointer; border: 1px solid rgba(27, 22, 19, 0.12); background: #FFFBF5; border-radius: 8px; padding: 0; overflow: hidden; text-align: left; display: flex; flex-direction: column; }
.problem img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.problem span { padding: 8px 10px 10px; font-size: var(--fs-label); font-weight: 600; color: #1B1613; }
.problem[aria-pressed="true"] { outline: 3px solid var(--red); outline-offset: -3px; }
.concept-note { margin: 0; font-size: var(--fs-label); color: #54483F; }
.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.svc { background: #FFFBF5; border: 1px solid rgba(27, 22, 19, 0.12); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.svc img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.svc h4 { margin: 0; padding: 12px 14px 4px; font-size: var(--fs-label); font-weight: 600; color: #1B1613; }
.svc p { margin: 0; padding: 0 14px 14px; font-size: var(--fs-label); line-height: 1.45; color: #54483F; }
.svc-text { border-top: 4px solid var(--red); padding-top: 4px; }
.svc-text h4 { padding-top: 14px; }
.modality-row { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.modality-row li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: var(--fs-source); color: #54483F; line-height: 1.3; }
.modality-row img { width: 72px; height: 58px; object-fit: contain; background: #FFFBF5; border-radius: 6px; }
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.visit-info { display: grid; gap: 8px; font-size: var(--fs-label); color: #1B1613; }
.visit-info h4, .request h4 { margin: 0 0 4px; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; color: #1B1613; }
.visit-info p { margin: 0; }
.visit-info a { color: var(--red); }
.ph { background: #FFF2B8; padding: 0 4px; border-radius: 3px; color: #1B1613; }
.team { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; margin-top: 6px; }
.request { display: grid; gap: 12px; background: #FFFBF5; border: 1px solid rgba(27, 22, 19, 0.12); border-radius: 8px; padding: 16px; }
.request label { display: grid; gap: 6px; font-size: var(--fs-label); color: #1B1613; }
.request select { min-height: 44px; border-radius: 6px; border: 1px solid rgba(27, 22, 19, 0.3); background: #FFFFFF; padding: 8px 10px; color: #1B1613; }
.offices { border: 0; padding: 0; margin: 0; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: var(--fs-label); color: #1B1613; }
.offices legend { font-size: var(--fs-label); color: #1B1613; margin-bottom: 4px; }
.offices label { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; }
.offices input { width: 18px; height: 18px; accent-color: var(--red); }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.slot { appearance: none; cursor: pointer; min-height: 44px; border-radius: 6px; border: 1px solid rgba(27, 22, 19, 0.3); background: #FFFFFF; color: #1B1613; font-size: var(--fs-label); padding: 6px 4px; }
.slot.is-on { background: var(--red); border-color: var(--red); color: #FFF7F2; }

.phone-wrap { display: grid; place-items: center; }
.phone { width: 210px; aspect-ratio: 9 / 18.5; border-radius: 32px; background: #0A0908; padding: 12px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), inset 0 0 0 2px #2b2521; }
.phone-screen { background: #F3EDE3; color: #1B1613; border-radius: 22px; height: 100%; overflow: hidden; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.phone-bar { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: #54483F; }
.phone-plate { width: 100%; aspect-ratio: 4 / 3; border-radius: 8px; background: linear-gradient(135deg, #AF000A 0%, #6E0006 100%); color: #FFF7F2; display: grid; place-items: center; padding: 10px; }
.phone-plate span { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; }
.phone-h { margin: 0; font-size: 18px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.phone-btn { display: block; text-align: center; background: var(--red); color: #FFF7F2; border-radius: 999px; padding: 10px 8px; font-size: 14px; font-weight: 600; }
.phone-btn.ghost { background: transparent; color: #1B1613; border: 1px solid #1B1613; }
.flagship-detail { display: none; grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.flagship-detail h4 { margin: 0 0 10px; font-size: var(--fs-h3); font-weight: 600; }
.flagship-detail ul { list-style: none; display: grid; gap: 10px; font-size: var(--fs-label); color: var(--fg); line-height: 1.5; }

/* ---------- System ---------- */
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.pillar { border: 1px solid var(--line); border-radius: 10px; padding: clamp(18px, 2vw, 28px); display: flex; flex-direction: column; gap: 12px; background: #FBF7F0; min-width: 0; }
.pillar .ico { width: 36px; height: 36px; color: var(--red); }
.pillar p { margin: 0; font-size: var(--fs-label); line-height: 1.5; color: var(--fg); }
.pillar .gets { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }

/* ---------- Proof ---------- */
.compare { position: relative; height: clamp(340px, 56vh, 560px); border-radius: 10px; overflow: hidden; border: 1px solid var(--line-dark); user-select: none; }
.cmp-side { position: absolute; inset: 0; padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.cmp-before { background: #1A1512; color: var(--text-dark); clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.cmp-after { background: #F3EDE3; color: #1B1613; clip-path: inset(0 0 0 var(--pos)); }
.cmp-tag { margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-label); letter-spacing: 0.08em; text-transform: uppercase; }
.cmp-before .cmp-tag { color: var(--coral); }
.cmp-after .cmp-tag { color: var(--red); }
.cmp-side ul { list-style: none; display: grid; gap: 12px; font-size: var(--fs-body); line-height: 1.45; }
.cmp-side li { padding-left: 18px; position: relative; }
.cmp-side li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 8px; height: 2px; background: currentColor; opacity: 0.7; }
.handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #FFF7F2; pointer-events: none; z-index: 3; }
.handle span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 999px; background: var(--red); box-shadow: 0 0 0 3px #FFF7F2; }
.range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; z-index: 4; margin: 0; }

/* ---------- Roadmap ---------- */
.phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); }
.phase { border-top: 4px solid var(--red); padding: clamp(16px, 2vw, 26px) 0 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.phase-day { margin: 0; font-size: clamp(30px, 2.6vw, 44px); line-height: 1; letter-spacing: -0.03em; font-weight: 600; color: var(--em); }
.phase p { margin: 0; font-size: var(--fs-label); line-height: 1.5; }
.phase .meta { color: var(--muted); padding-top: 4px; }
.phase .meta strong { color: var(--fg); }
.launch-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; }
.launch-strip p { margin: 0; font-size: var(--fs-label); line-height: 1.5; }

/* ---------- Engagement ---------- */
.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 22px); align-items: stretch; }
.level { position: relative; border: 1px solid var(--line); border-radius: 10px; padding: clamp(20px, 2.4vw, 32px); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.level.recommended { border: 2px solid var(--coral); }
.rec { position: absolute; top: -12px; left: 24px; background: var(--red); color: #FFF7F2; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-source); letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.level-name { margin: 0; font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.02em; }
.level ul { list-style: none; display: grid; gap: 10px; font-size: var(--fs-label); line-height: 1.5; }
.level li { padding-left: 22px; position: relative; }
.level li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 10px; height: 2px; background: var(--em); }
.fit { margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: var(--fs-label); line-height: 1.5; color: var(--muted); }
.fit strong { color: var(--fg); }

/* ---------- Close ---------- */
.close-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 3.6vw, 60px); align-items: start; }
.rep { display: grid; grid-template-columns: minmax(0, min(360px, 40%)) minmax(0, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; }
.portrait { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: #E8E0D1; }
.rep-copy { display: grid; gap: 12px; min-width: 0; }
.rep-copy .h2 { font-size: clamp(34px, 3vw, 56px); }
.rep-role { margin: 0; font-size: var(--fs-label); color: var(--muted); }
.message { margin: 0; font-size: var(--fs-lede); line-height: 1.4; font-family: "Instrument Serif", Georgia, serif; font-style: italic; color: var(--text-paper); }
.contact { list-style: none; display: grid; gap: 8px; margin-top: 4px; }
.contact li { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; font-size: var(--fs-label); align-items: baseline; }
.contact span { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-source); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.contact a { color: var(--text-paper); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(27, 22, 19, 0.3); overflow-wrap: anywhere; }
.schedule { border: 1px solid var(--line); border-radius: 10px; padding: clamp(20px, 2.4vw, 32px); display: grid; gap: 14px; background: #FBF7F0; min-width: 0; }
.schedule .h3 { font-size: clamp(22px, 1.8vw, 30px); }
.schedule label { display: grid; gap: 6px; font-size: var(--fs-label); }
.schedule select { min-height: 48px; border-radius: 6px; border: 1px solid rgba(27, 22, 19, 0.3); background: #FFFFFF; padding: 8px 10px; color: var(--text-paper); }
.fineprint { margin: 0; font-size: var(--fs-source); color: var(--muted); }
.sign-off { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--line); }
.sign-off img { height: 22px; width: auto; }
.sign-off p { margin: 0; font-size: var(--fs-label); color: var(--muted); }

/* ---------- Cover BOOM and Next transitions ---------- */
.slide.cover.is-boom { z-index: 30; pointer-events: none; }
.slide.cover.is-boom .cover-bg { animation: bgFade 0.9s ease 0.3s forwards; }
.slide.cover.is-boom .cover-copy, .slide.cover.is-boom .cue { animation: copyOut 0.42s ease forwards; }
@keyframes bgFade { to { opacity: 0; } }
@keyframes copyOut { to { opacity: 0; transform: translateY(-12px); } }
.slide.boom-in { animation: boomIn 1.05s cubic-bezier(0.16, 0.8, 0.2, 1) 0.5s both; }
@keyframes boomIn { 0% { opacity: 0; transform: scale(1.05); } 45% { opacity: 0.7; } 100% { opacity: 1; transform: none; } }

.slide.spread-in { animation: spreadIn 0.85s cubic-bezier(0.2, 0.7, 0.1, 1) both; }
@keyframes spreadIn { from { clip-path: inset(0 50% 0 50%); opacity: 0.3; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.deck.spreading .traction { animation: tractionLine 0.9s ease both; }
@keyframes tractionLine { 0% { transform: scaleX(0); opacity: 0; } 25% { opacity: 1; transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- Index overlay ---------- */
.index-overlay { position: fixed; inset: 0; z-index: 80; background: rgba(13, 11, 10, 0.96); display: grid; place-items: center; padding: 24px; }
.index-card { width: min(640px, 100%); max-height: 100%; overflow-y: auto; display: grid; gap: 16px; }
.index-card ol { list-style: none; display: grid; gap: 8px; counter-reset: idx; }
.index-card li button { width: 100%; text-align: left; appearance: none; cursor: pointer; background: #17120F; color: var(--text-dark); border: 1px solid var(--line-dark); border-radius: 8px; padding: 14px 16px; min-height: 52px; font-size: var(--fs-body); display: flex; gap: 14px; align-items: center; }
.index-card li button[aria-current="true"] { border-color: var(--red-hot); }
.index-card .num { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: var(--fs-label); color: var(--coral); min-width: 2.2em; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .problem-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modality-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1099px) {
  .flagship { grid-template-columns: minmax(0, 1fr); }
  .phone-wrap { display: none; }
  .flagship-detail { display: block; }
}

@media (max-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cover-copy { width: 52%; }
  .cover-stage { width: 48%; }
}

@media (max-width: 920px) {
  .levels { grid-template-columns: minmax(0, 1fr); }
  .phases { grid-template-columns: minmax(0, 1fr); }
  .close-grid { grid-template-columns: minmax(0, 1fr); }
  .gap-grid { grid-template-columns: minmax(0, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visit-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-note { display: none; }
  .progress span { transition-duration: 0.2s; }
}

/* Tablet portrait and phone: the cover becomes a stacked layout with an opaque chrome */
@media (max-width: 760px) {
  .cover-stage { position: relative; width: 100%; height: 46vh; min-height: 260px; top: auto; right: auto; }
  .cover-copy { position: relative; width: 100%; height: auto; padding: 22px var(--gutter) 60px; justify-content: flex-start; }
  .cover-bg::after { display: none; }
  .cover-bg { background: linear-gradient(180deg, #120E0C 0%, #0D0B0A 60%); }
  .cover { overflow-y: auto; }
  .cue { position: sticky; bottom: 12px; left: 0; margin: 0 var(--gutter); }
  .cover { display: block; }
  .cover-bg { position: absolute; }
  .chrome-label { display: none; }
  .rail { display: none; }
  .h2 { max-width: none; }
  .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .problem-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modality-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 320px; }
  .pillars { grid-template-columns: minmax(0, 1fr); }
  .launch-strip { grid-template-columns: minmax(0, 1fr); }
  .compare { height: auto; min-height: 420px; }
  .cmp-side ul { font-size: var(--fs-label); }
  .slide-inner { padding-right: var(--gutter); }
  .contact li { grid-template-columns: 72px minmax(0, 1fr); }
  .chrome-right { gap: 8px; }
  .client-tile img { height: 24px; }
  .brand-bc { height: 18px; }
  .x-mark { display: none; }
  .brand-pair { gap: 8px; }
}

@media (max-width: 699px) {
  :root { --chrome-top: 58px; --chrome-bottom: 66px; }
  .chrome-count { display: none; }
  .brand-bc { display: none; }
  .client-tile { padding: 4px 8px; }
  .client-tile img { height: 26px; }
  .chrome-top { padding: 0 14px; }
  .chrome-bottom { justify-content: space-between; padding: 0 12px; }
  .nav-btn span { display: inline; }
  .modality-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slide-inner { gap: 16px; }
  .display { font-size: clamp(42px, 13vw, 60px); }
  .pillar, .level, .path { padding: 18px; }
  .flagship-detail ul { font-size: 16px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .slide.cover .cover-copy, .slide.cover .cue, .slide.cover .cover-bg { opacity: 1 !important; }
}

/* G5: balance fitting desktop closing columns, preserving overflow. */
@media (min-width: 921px) {
  #slide-close .close-grid { align-content: safe center; align-items: center; }
}

/* G5: whole-composition vertical centering.
   .slide-comp wraps all inner heading/body/support of a slide. The parent .slide-inner is a
   column flex container with min-height 100%, so auto block margins above/below center the
   whole composition when it fits. When content is taller than the stage, auto margins resolve
   to zero and content keeps natural reachable top flow with no clipping or fake spacing.
   flex:none and gap:inherit keep inner spacing and padding identical to the original layout. */
.slide-comp {
  flex: none;
  margin-top: auto;
  margin-bottom: auto;
  display: flex;
  flex-direction: column;
  gap: inherit;
}
