/* ErgPulse — International Klein Blue (#002FA7). Heart red and connected green match the app. */
:root {
  --klein: #002fa7;
  --accent: #002fa7;        /* links, icons; lifted in dark mode for contrast */
  --heart: #ff3b30;
  --connected: #34c759;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --text: #0b0d12;
  --muted: #5b6170;
  --line: rgba(11, 13, 18, 0.1);
  --radius: 20px;
  --max: 1080px;
  color-scheme: light;
}
/* Light by default; dark only when the visitor picks it with the header toggle. */
:root[data-theme="dark"] {
  --accent: #7f9cff; --bg: #07080c; --surface: #12141b; --text: #f2f4f8;
  --muted: #a3a9b8; --line: rgba(255, 255, 255, 0.1); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.35em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px); background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; padding: 8px 10px; border-radius: 10px; }
.nav a:hover { background: var(--line); }
.nav .hide-sm { display: none; }
@media (min-width: 640px) { .nav .hide-sm { display: inline-block; } }
.theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--accent); display: grid; place-items: center; cursor: pointer; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
[data-scheme="light"] .theme-toggle .moon { display: block; }
[data-scheme="light"] .theme-toggle .sun { display: none; }

/* Hero: a field of Klein blue */
.hero { background: var(--klein); color: #fff; overflow: hidden; padding-bottom: 0; }  /* phone sits on the bottom edge */
.hero .wrap { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 0; align-items: center; }
@media (min-width: 900px) { .hero .wrap { grid-template-columns: 1.1fr 0.9fr; padding-top: 88px; } }
.hero-copy { padding-bottom: 24px; }
@media (min-width: 900px) { .hero-copy { padding-bottom: 88px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 650; letter-spacing: 0.04em;
  text-transform: uppercase; opacity: 0.85; margin-bottom: 18px; }
.hero p.lede { font-size: 1.2rem; max-width: 34ch; opacity: 0.92; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 28px; }
.store-badge { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--klein); font-weight: 700;
  padding: 14px 22px; border-radius: 999px; text-decoration: none; }
.store-badge small { font-weight: 600; opacity: 0.7; }
.price { font-size: 0.95rem; opacity: 0.88; }
/* iPhone 18 Pro frame with the app inside (scripts/frame_screenshots.py); the hero shows its top. */
.phone { align-self: end; width: min(320px, 78vw); margin: 0 auto; aspect-ratio: 978 / 1320; overflow: hidden; }
.phone img { width: 100%; filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.35)); }

/* Sections */
section { padding: 72px 0; }
@media (min-width: 720px) { section { padding: 104px 0; } }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

/* Signal path diagram */
.flow { display: grid; gap: 12px; align-items: center; }
@media (min-width: 760px) { .flow { grid-template-columns: 1fr auto 1fr auto 1fr; } }
.node { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; }
/* The signal-path icons stay Klein Blue in both themes, matching the AirPods Pro 3 symbol. */
.node svg { width: 44px; height: 44px; color: var(--klein); margin: 0 auto 12px; }
.node .symbol { display: flex; justify-content: center; height: 44px; margin: 0 auto 12px; }
.node .symbol img { width: auto; height: 44px; }
.node h3 { margin-bottom: 4px; }
.node p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.link { display: flex; flex-direction: column; align-items: center; color: var(--muted); font-size: 0.8rem; font-weight: 600; gap: 4px; }
.link svg { width: 28px; height: 28px; color: var(--klein); transform: rotate(90deg); }
@media (min-width: 760px) { .link svg { transform: none; } }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--klein); color: #fff; font-weight: 750; margin-bottom: 16px; }
.steps p { color: var(--muted); margin: 0; }
kbd { font: inherit; font-weight: 650; color: var(--text); }

/* Features */
.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.feature .icon svg { width: 22px; height: 22px; }
.feature p { color: var(--muted); margin: 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--connected); margin-right: 6px; vertical-align: 1px; }

/* Light/dark showcase */
.duo { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; margin: 0 auto; }
.duo figure { margin: 0; text-align: center; }
.duo img { width: 100%; filter: drop-shadow(0 18px 36px rgba(0, 0, 0, 0.18)); }
.duo figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 12px; }

/* Privacy band */
.privacy-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.privacy-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 860px) { .privacy-grid { grid-template-columns: 1fr 1fr; } }
.label-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: var(--bg); }
.label-card .title { font-weight: 750; font-size: 1.25rem; display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.label-card .title svg { width: 26px; height: 26px; color: var(--accent); }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding: 10px 0 10px 32px; border-top: 1px solid var(--line); position: relative; }
.checks li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 14px; height: 8px; border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

/* Requirements + FAQ */
.reqs { display: grid; gap: 16px; }
@media (min-width: 760px) { .reqs { grid-template-columns: repeat(3, 1fr); } }
.req { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.req strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.req span { color: var(--muted); font-size: 0.95rem; }
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* Closing CTA */
.closing { background: var(--klein); color: #fff; text-align: center; }
.closing p { opacity: 0.9; font-size: 1.15rem; }
.closing .cta-row { justify-content: center; }

/* Document pages (privacy, support) */
.doc { max-width: 720px; padding-top: 56px; padding-bottom: 80px; }
.doc h1 { font-size: clamp(2rem, 5vw, 3rem); }
.doc h2 { font-size: 1.4rem; margin-top: 2em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.6em; }
.updated { color: var(--muted); }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--klein); border-radius: 12px; padding: 18px 20px; margin: 24px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .legal { font-size: 0.8rem; }
