/* Landing page: a fixed 3D stage with the story scrolling over it. Shared tokens live in style.css. */
:root {
  --normal: #23917f; --elevated: #c99416; --stage1: #d8702c; --stage2: #c23b3b; --crisis: #8a1745;
  --display: "Barlow Condensed", "SF Pro Display", -apple-system, sans-serif;
  --text: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --normal: #3cc2aa; --elevated: #e8b83a; --stage1: #f08c4a; --stage2: #ef5b5b; --crisis: #d8467f;
  }
}
:root[data-theme="dark"] {
  --normal: #3cc2aa; --elevated: #e8b83a; --stage1: #f08c4a; --stage2: #ef5b5b; --crisis: #d8467f;
}

body.home { font-family: var(--text); overflow-x: hidden; }
body.home header.site { position: relative; z-index: 3; max-width: 1180px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: none; }
.has-3d #stage { display: block; }

.story { position: relative; z-index: 1; max-width: 1180px; padding: 0 32px; }
.chapter { min-height: 110vh; display: flex; flex-direction: column; justify-content: center; position: relative; }
.chapter:first-child { min-height: calc(100vh - 76px); }
.copy { max-width: 470px; }

h1, .home h2 {
  font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance;
}
.home h1 { font-size: clamp(46px, 5.4vw, 74px); line-height: 0.94; margin: 0 0 24px; }
.chapter:first-child .copy { max-width: 540px; }
.home h2 { font-size: clamp(38px, 5vw, 60px); line-height: 0.95; margin: 0 0 20px; }
.home p { font-size: 18px; line-height: 1.6; margin: 0 0 14px; }
.home .lede { font-size: 20px; color: var(--muted); }
.launch {
  display: inline-block; margin-top: 12px !important; padding: 11px 18px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 16px !important;
}

/* The live cuff pressure, driven by the same simulation as the 3D trace. */
.readout {
  font-family: var(--display); font-weight: 600; font-variant-numeric: tabular-nums;
  font-size: clamp(96px, 13vw, 150px); line-height: 0.85; margin: 4px 0 22px; color: var(--pulse, var(--rose));
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
}
.readout small { white-space: nowrap; font-family: var(--text); font-size: 17px; font-weight: 500; color: var(--muted); }

.zones { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.zones li { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; }
.zones li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--c); }

.pdf-link { font-weight: 600; }
.pro { color: var(--rose); font-weight: 600; font-size: 16px !important; }


/* Without WebGL, or with reduced motion: plain screenshots beside the text. */
.still { display: block; width: min(300px, 70vw); height: auto; border-radius: 34px; margin: 28px 0 0;
  box-shadow: 0 0 0 1px var(--line), 0 30px 60px -30px rgba(20, 22, 27, 0.35); }
.chapter[data-chapter="3"] .still { border-radius: 6px; width: min(420px, 86vw); }
.has-3d .still { display: none; }

.after { position: relative; z-index: 2; background: var(--bg); border-top: 1px solid var(--line); }
.after .block, .after .disclaimer, .after footer.site { max-width: 720px; margin-left: auto; margin-right: auto; padding-left: 20px; padding-right: 20px; }
.after .block { padding-top: 64px; }
.after .block h2 { font-size: clamp(34px, 4.4vw, 48px); }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 32px 18px 0; position: relative;
  font-weight: 600; font-size: 18px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--ink); }
.faq details p:last-child { padding-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
.disclaimer { margin-top: 48px !important; color: var(--muted); font-size: 15px !important; }

@media (min-width: 900px) {
  .still { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); margin: 0; }
}

/* Phones: the stage takes the top of the screen and the text sits on a soft panel below it. */
@media (max-width: 899px) {
  .story { padding: 0 20px; }
  /* Scene in the top half, text starting just above the middle, so a chapter's text is on
     screen when its scene is, and the previous chapter's text has scrolled away. */
  .has-3d .chapter { min-height: 135vh; justify-content: flex-start; padding: 58vh 0 12vh; }
  .has-3d .chapter:first-child { min-height: calc(100svh - 76px); justify-content: flex-end; padding: 0 0 28px; }
  .has-3d .copy {
    background: color-mix(in srgb, var(--bg) 84%, transparent);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-radius: 22px; padding: 22px 20px 12px; margin: 0 -8px;
  }
  .has-3d .chapter:first-child .copy { padding-top: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .home h1 { font-size: clamp(38px, 10.6vw, 56px); margin-bottom: 14px; }
  .home .lede { font-size: 16px; line-height: 1.5; }
  .home p { font-size: 17px; }
  .readout { font-size: 96px; }
}
