/* MediTrack website — design tokens.
   Brand source: the app icon (blue gradient #4A9EF5 → #1461CC, two-tone capsule #FFFFFF / #CCE8FF, green check
   #21B377) and the app theme (src/constants/theme.ts), including the gold Premium accent.
   Light is the default; dark applies with the system setting unless the visitor picked a theme
   (html[data-theme]). All text pairs are checked for WCAG AA (see the development report). */

:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #FFFFFF;
  --bg-tint: #F3F7FC;
  --bg-tint-2: #E8F0FA;
  --surface: #FFFFFF;
  --line: #DFE8F1;
  --line-strong: #C3D3E4;

  /* Text */
  --ink: #0B1B2E;
  --ink-2: #3F536A;
  --ink-3: #56687C;

  /* Brand */
  --brand: #1461CC;
  --brand-hover: #0F52AE;
  --on-brand: #FFFFFF;
  --sky: #4A9EF5;
  --capsule-a: #FFFFFF;
  --capsule-b: #CCE8FF;
  --pill-a: #1461CC;
  --pill-b: #9ACCF7;
  --check: #21B377;
  --focus: #1461CC;

  /* Status */
  --green: #17704A;
  --green-soft: #E2F5EC;
  --warning: #8A5300;
  --warning-soft: #FFF3DE;
  --warning-line: #E9C78C;

  /* Premium (restrained gold) */
  --gold: #765609;
  --gold-fill: #B38A22;
  --gold-soft: #FBF5E6;
  --gold-wash: #F7EED6;
  --gold-line: #DCC48C;
  --on-gold: #1C1500;

  /* Deep navy band (same in both themes, slightly deeper in dark) */
  --band-bg: #0B1B2E;
  --band-bg-2: #0F2540;

  /* Device frame */
  --device-body: linear-gradient(150deg, #39434F 0%, #161D26 38%, #0D1219 70%, #2A333E 100%);
  --device-edge: #59677A;
  --device-outline: rgb(11 27 46 / 0.18);

  /* Elevation */
  --shadow-1: 0 1px 2px rgb(11 27 46 / 0.05), 0 2px 8px rgb(11 27 46 / 0.04);
  --shadow-2: 0 2px 6px rgb(11 27 46 / 0.06), 0 12px 32px -8px rgb(11 27 46 / 0.12);
  --shadow-3: 0 24px 60px -24px rgb(11 27 46 / 0.28), 0 8px 20px -10px rgb(11 27 46 / 0.12);
  --shadow-device: 0 50px 90px -40px rgb(11 27 46 / 0.45), 0 22px 40px -24px rgb(11 27 46 / 0.30);
  --shadow-device-lite: 0 20px 34px -20px rgb(11 27 46 / 0.40);

  /* Typography — system faces only (no downloads): New York / Iowan for display, SF / Segoe for text */
  --font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: ui-serif, 'New York', 'Iowan Old Style', 'Charter', 'Bitstream Charter', 'Sitka Heading', Cambria, Georgia, serif;
  --fs-hero: clamp(2.75rem, 1.5rem + 5.4vw, 5.75rem);
  --fs-h1: clamp(2.5rem, 1.7rem + 3.4vw, 4.25rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.5vw, 3.25rem);
  --fs-h3: 1.125rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.32vw, 1.3125rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;
  --fs-fine: 0.8125rem;

  /* Spacing (4 / 8 rhythm) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --section-y: clamp(72px, 9vw, 140px);
  --gutter: clamp(16px, 4vw, 40px);
  --container: 1200px;

  /* Radius: small controls → cards → panels → pills */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 40px;
  --r-pill: 999px;

  /* Motion */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 150ms;
  --dur-2: 240ms;
  --dur-3: 700ms;

  /* Layers */
  --z-header: 50;
  --z-skip: 100;
}

/* Dark: the same palette, deepened. Applied by the system (unless the visitor chose light) or by choice. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #07111D;
    --bg-tint: #0B1828;
    --bg-tint-2: #102236;
    --surface: #0D1B2C;
    --line: #1A2D43;
    --line-strong: #2A4360;
    --ink: #ECF3FA;
    --ink-2: #B4C4D5;
    --ink-3: #93A7BC;
    --brand: #6AB2F5;
    --brand-hover: #8CC4FA;
    --on-brand: #04101D;
    --capsule-a: #10233A;
    --capsule-b: #183A5E;
    --pill-a: #6AB2F5;
    --pill-b: #2B5A88;
    --focus: #8CC4FA;
    --green: #5BD39A;
    --green-soft: #0F2F20;
    --warning: #F2B44C;
    --warning-soft: #2E220D;
    --warning-line: #6A4E1E;
    --gold: #E8CD86;
    --gold-fill: #E5C97E;
    --gold-soft: #1D180C;
    --gold-wash: #241D0D;
    --gold-line: #5E4E26;
    --on-gold: #231A03;
    --band-bg: #030A13;
    --band-bg-2: #08162A;
    --device-body: linear-gradient(150deg, #4A5563 0%, #1B232D 38%, #10161E 70%, #38424F 100%);
    --device-edge: #6B7A8D;
    --device-outline: rgb(255 255 255 / 0.10);
    --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-2: 0 2px 6px rgb(0 0 0 / 0.35), 0 12px 32px -8px rgb(0 0 0 / 0.5);
    --shadow-3: 0 24px 60px -24px rgb(0 0 0 / 0.7);
    --shadow-device: 0 50px 90px -40px rgb(0 0 0 / 0.85), 0 22px 40px -24px rgb(0 0 0 / 0.6);
    --shadow-device-lite: 0 20px 34px -20px rgb(0 0 0 / 0.75);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #07111D;
  --bg-tint: #0B1828;
  --bg-tint-2: #102236;
  --surface: #0D1B2C;
  --line: #1A2D43;
  --line-strong: #2A4360;
  --ink: #ECF3FA;
  --ink-2: #B4C4D5;
  --ink-3: #93A7BC;
  --brand: #6AB2F5;
  --brand-hover: #8CC4FA;
  --on-brand: #04101D;
  --capsule-a: #10233A;
  --capsule-b: #183A5E;
  --pill-a: #6AB2F5;
  --pill-b: #2B5A88;
  --focus: #8CC4FA;
  --green: #5BD39A;
  --green-soft: #0F2F20;
  --warning: #F2B44C;
  --warning-soft: #2E220D;
  --warning-line: #6A4E1E;
  --gold: #E8CD86;
  --gold-fill: #E5C97E;
  --gold-soft: #1D180C;
  --gold-wash: #241D0D;
  --gold-line: #5E4E26;
  --on-gold: #231A03;
  --band-bg: #030A13;
  --band-bg-2: #08162A;
  --device-body: linear-gradient(150deg, #4A5563 0%, #1B232D 38%, #10161E 70%, #38424F 100%);
  --device-edge: #6B7A8D;
  --device-outline: rgb(255 255 255 / 0.10);
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-2: 0 2px 6px rgb(0 0 0 / 0.35), 0 12px 32px -8px rgb(0 0 0 / 0.5);
  --shadow-3: 0 24px 60px -24px rgb(0 0 0 / 0.7);
  --shadow-device: 0 50px 90px -40px rgb(0 0 0 / 0.85), 0 22px 40px -24px rgb(0 0 0 / 0.6);
  --shadow-device-lite: 0 20px 34px -20px rgb(0 0 0 / 0.75);
}

/* MediTrack website — layout and components. Uses only the tokens in tokens.css.
   Signature: the two-tone capsule of the app icon, tilted at −35°, used once large (hero) and small as list
   markers. Display type is a calm system serif; everything else is quiet and left-aligned. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body) / 1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
picture { display: block; }
a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--capsule-b); color: var(--ink); }
h1, h2, h3 { margin: 0; color: var(--ink); }
h1, h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: var(--fs-h1); line-height: 1.04; }
h2 { font-size: var(--fs-h2); line-height: 1.08; }
h3 { font-size: var(--fs-h3); line-height: 1.35; font-weight: 650; letter-spacing: -0.005em; }
p { margin: 0 0 var(--s-4); }
code { font-size: 0.9em; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
.fine { font-size: var(--fs-small); color: var(--ink-3); }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.narrow { max-width: 760px; }
.demo-note { font-size: var(--fs-fine); color: var(--ink-3); margin: var(--s-6) auto 0; }

.skip-link { position: absolute; left: -9999px; top: 0; }
.skip-link:focus { left: var(--s-4); top: var(--s-4); z-index: var(--z-skip); background: var(--surface); color: var(--ink); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm); box-shadow: var(--shadow-2); }
main:focus, section:focus { outline: none; }

.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease !important;
}

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-6) 0 0; }
.actions--center { justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 22px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; touch-action: manipulation;
  transition: background-color var(--dur-1) ease, border-color var(--dur-1) ease, box-shadow var(--dur-2) ease, transform var(--dur-1) ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 8px 20px -10px var(--brand); }
.btn--primary:hover { background: var(--brand-hover); text-decoration: none; }
.btn--quiet { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--quiet:hover { background: var(--bg-tint-2); text-decoration: none; }
.btn--gold { background: var(--gold-fill); color: var(--on-gold); }
.btn--gold:hover { filter: brightness(1.05); text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2) ease, background-color var(--dur-2) ease;
}
html:not(.js) .site-header, .site-header.is-scrolled { border-bottom-color: var(--line); }
@supports not (background: color-mix(in srgb, red 50%, transparent)) { .site-header { background: var(--bg); } }
.site-header__inner { display: flex; align-items: center; gap: var(--s-4); min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand img { border-radius: 8px; box-shadow: var(--shadow-1); }
.brand:hover { text-decoration: none; }

.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.9688rem; transition: background-color var(--dur-1) ease, color var(--dur-1) ease; }
.nav a:hover { color: var(--ink); background: var(--bg-tint-2); }
.nav a[aria-current='page'] { color: var(--ink); background: var(--bg-tint-2); font-weight: 600; }
.nav-desktop { display: none; }

.header-tools { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
.lang-switch, .theme-toggle, .nav-toggle summary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 600 0.8125rem / 1 var(--font-sans); letter-spacing: 0.02em; text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-1) ease, border-color var(--dur-1) ease, transform var(--dur-1) ease;
}
.lang-switch:hover, .theme-toggle:hover, .nav-toggle summary:hover { background: var(--bg-tint-2); border-color: var(--line-strong); text-decoration: none; }
.theme-toggle:active, .nav-toggle summary:active { transform: scale(0.94); }
.theme-toggle { padding: 0; }
.theme-toggle[hidden] { display: none; }
.theme-toggle .icon { transition: transform var(--dur-2) var(--ease-out); }
.theme-toggle[data-current='light'] .icon--sun, .theme-toggle[data-current='dark'] .icon--moon { display: none; }
.theme-toggle:hover .icon { transform: rotate(-18deg); }

.nav-toggle summary { list-style: none; padding: 0 14px; font-size: 0.9375rem; letter-spacing: 0; }
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-toggle[open] summary { background: var(--bg-tint-2); }
.nav-sheet {
  position: absolute; left: var(--gutter); right: var(--gutter); top: calc(100% + 8px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-3); padding: var(--s-2);
}
@media (prefers-reduced-motion: no-preference) {
  .nav-toggle[open] .nav-sheet { animation: sheet-in var(--dur-2) var(--ease-out); }
}
@keyframes sheet-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav-sheet .nav { flex-direction: column; gap: 2px; }
.nav-sheet .nav a, .nav-sheet__lang { display: flex; align-items: center; min-height: 52px; padding: 0 var(--s-4); border-radius: var(--r-md); font-size: 1.0625rem; }
.nav-sheet__lang { margin-top: var(--s-2); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-md) var(--r-md); color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav-sheet__lang:hover { color: var(--ink); background: var(--bg-tint-2); }

@media (max-width: 419px) {
  .header-tools .lang-switch { display: none; }
  .nav-toggle summary span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav-toggle summary { padding: 0; }
}
@media (min-width: 900px) {
  .nav-desktop { display: block; margin-inline: auto; }
  .header-tools { margin-left: 0; }
  .nav-toggle { display: none; }
}

/* ---------- App screenshot in an iPhone frame ---------- */
.device { container-type: inline-size; width: var(--dw, 280px); max-width: 100%; flex-shrink: 0; }
.device__frame {
  position: relative; padding: 3.1cqw; border-radius: 15.9cqw;
  background: var(--device-body);
  box-shadow: inset 0 0 0 0.55cqw var(--device-edge), inset 0 0 0 1.2cqw rgb(0 0 0 / 0.55), 0 0 0 1px var(--device-outline), var(--shadow-device);
}
.device__frame::before {
  content: ''; position: absolute; z-index: 1; left: 50%; top: calc(3.1cqw + 2.5cqw);
  width: 29cqw; height: 8.4cqw; transform: translateX(-50%);
  border-radius: var(--r-pill); background: #000;
}
.device img { display: block; width: 100%; height: auto; border-radius: 12.8cqw; background: var(--bg-tint); }

.float { animation: float 8s var(--ease-in-out) infinite; will-change: translate; }
.float--slow { animation-duration: 10s; animation-delay: -3s; }
.float.is-paused { animation-play-state: paused; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

.reveal { opacity: 0; transform: translateY(28px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity var(--dur-3) var(--ease-out), transform 900ms var(--ease-out); }

/* Two overlapping phones (front + back) and two side by side */
.duo { display: grid; place-items: center; padding-block: var(--s-5); }
.duo > .device { grid-area: 1 / 1; --dw: clamp(168px, 24vw, 290px); }
.duo > .device--back { transform: translate(-30%, 7%) scale(0.9); }
.duo > .device--front { transform: translate(24%, 0); }
.duo--even { display: flex; justify-content: center; gap: clamp(12px, 2.4vw, 28px); }
.duo--even > .device { --dw: clamp(148px, 21vw, 270px); width: min(var(--dw), calc(50% - 8px)); transform: none; }
.duo--even > .device:last-child { margin-top: 56px; }
.solo { display: flex; justify-content: center; }
.solo > .device { --dw: clamp(230px, 26vw, 320px); }

/* ---------- Capsule (the brand mark, from the app icon) ---------- */
.capsule {
  position: absolute; display: flex; aspect-ratio: 760 / 300; border-radius: var(--r-pill); overflow: hidden;
  rotate: -35deg; box-shadow: inset 0 0 0 1px var(--line), var(--shadow-2);
}
.capsule span { flex: 1; }
.capsule span:first-child { background: var(--capsule-a); }
.capsule span:last-child { background: var(--capsule-b); }

/* Capsule list markers */
.capsule-list { list-style: none; margin: var(--s-5) 0 0; padding: 0; max-width: 36em; }
.capsule-list li { position: relative; padding-left: 30px; margin-block: 10px; }
.capsule-list li::before {
  content: ''; position: absolute; left: 1px; top: 0.66em; width: 17px; height: 7px; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--pill-a) 50%, var(--pill-b) 50%); rotate: -35deg;
}
.capsule-list--gold li::before { background: linear-gradient(90deg, var(--gold-fill) 50%, var(--gold-line) 50%); }
.capsule-list--roomy li { margin-block: var(--s-4); }

/* ---------- Badges and notes ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  font: 650 var(--fs-fine) / 1.2 var(--font-sans); letter-spacing: 0;
  padding: 5px 11px; border-radius: var(--r-pill); white-space: nowrap; border: 1px solid transparent;
}
.badge .icon { width: 14px; height: 14px; }
.badge--available { background: var(--green-soft); color: var(--green); }
.badge--premium { background: var(--gold-soft); color: var(--gold); border-color: var(--gold-line); }
.badge--planned { color: var(--ink-3); border: 1px dashed var(--line-strong); }

.aside-note { margin: var(--s-6) 0 0; padding-top: var(--s-4); border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-3); max-width: 36em; }
.aside-note .badge { margin-right: 6px; }
.status { margin: var(--s-5) 0 0; padding: 14px 18px; border-radius: var(--r-md); background: var(--bg-tint-2); color: var(--ink); font-size: var(--fs-small); max-width: 40em; }
.status--gold { background: var(--gold-soft); border: 1px solid var(--gold-line); }
.premium-band .status--gold, .premium-hero .status--gold { background: var(--surface); }

/* ---------- Home: hero ---------- */
.hero {
  position: relative; overflow: clip;
  padding-block: clamp(40px, 6vw, 96px) clamp(40px, 5vw, 72px);
  background: radial-gradient(70% 60% at 85% 35%, var(--bg-tint-2) 0%, transparent 70%), linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 100%);
}
.hero__grid { display: grid; gap: clamp(40px, 6vw, 72px); align-items: center; }
.hero__title { font-size: var(--fs-hero); line-height: 0.98; letter-spacing: -0.018em; }
.hero__title span { display: block; }
.hero__lead { margin-top: var(--s-5); font-size: var(--fs-lead); line-height: 1.55; color: var(--ink-2); max-width: 31em; }
.soon { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: var(--s-6); }
.soon__pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: var(--fs-small); box-shadow: var(--shadow-1);
}
.soon__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--check); box-shadow: 0 0 0 4px color-mix(in srgb, var(--check) 20%, transparent); }
.soon__note { font-size: var(--fs-small); color: var(--ink-3); }

.hero__stage { position: relative; display: grid; place-items: center; min-height: 360px; padding-block: var(--s-5); }
.hero__stage > .device { grid-area: 1 / 1; position: relative; z-index: 1; }
.hero__stage > .device--front { --dw: clamp(214px, 58vw, 340px); transform: translateX(16%); z-index: 2; }
.hero__stage > .device--back { --dw: clamp(184px, 50vw, 290px); transform: translate(-38%, 9%); }
.hero__stage .capsule { width: min(118%, 680px); left: 50%; top: 50%; translate: -50% -50%; z-index: 0; }
.hero__stage .capsule::after { content: none; }
.hero .demo-note { margin-top: var(--s-7); }
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
  .hero__stage > .device--front { --dw: clamp(250px, 25vw, 340px); }
  .hero__stage > .device--back { --dw: clamp(214px, 21vw, 290px); }
}

/* ---------- Home: facts ---------- */
.facts { padding-block: clamp(48px, 6vw, 88px); }
.facts .container { display: grid; gap: var(--s-6); }
.facts__title { font: 650 1.0625rem / 1.4 var(--font-sans); letter-spacing: 0; color: var(--ink-3); }
.facts__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-5) var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.facts__list li { border-top: 1px solid var(--line-strong); padding-top: var(--s-4); }
.facts__list h3 { margin-bottom: 6px; }
.facts__list p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); }
@media (min-width: 1100px) { .facts .container { grid-template-columns: 200px 1fr; } .facts__list { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Home: chapters ---------- */
.chapter { padding-block: var(--section-y); }
.chapter--tint, .section--tint { background: var(--bg-tint); }
.chapter h2, .section h2 { margin-bottom: var(--s-4); max-width: 17ch; }

.split { display: grid; gap: clamp(40px, 6vw, 88px); align-items: center; }
.split > *, .bento > *, .privacy__grid > *, .spread__body > * { min-width: 0; }
@media (max-width: 899px) { .split--flip > .split__media { order: 2; } }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--flip > .split__media { order: -1; }
}

/* Spread: two phones around the points */
.spread__head { max-width: 640px; }
.spread__body { display: grid; gap: var(--s-6) var(--s-5); margin-top: clamp(40px, 5vw, 72px); grid-template-columns: 1fr 1fr; grid-template-areas: 'a b' 'p p'; align-items: start; }
.spread__phone { display: flex; justify-content: center; }
.spread__phone:first-child { grid-area: a; }
.spread__phone--offset { grid-area: b; margin-top: var(--s-7); }
.spread__phone .device { --dw: 100%; max-width: 290px; }
.spread__points { grid-area: p; margin: 0; display: grid; gap: var(--s-5); }
.spread__points div { border-top: 1px solid var(--line-strong); padding-top: var(--s-4); }
.spread__points dt { font-weight: 650; font-size: var(--fs-h3); margin-bottom: 4px; }
.spread__points dd { margin: 0; color: var(--ink-2); }
@media (min-width: 600px) and (max-width: 899px) { .spread__points { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) {
  .spread__body { grid-template-columns: 1fr minmax(240px, 0.9fr) 1fr; grid-template-areas: 'a p b'; align-items: center; gap: clamp(32px, 4vw, 64px); }
  .spread__phone--offset { margin-top: 120px; }
}

/* Bento: today's doses */
.bento { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
.bento__intro { grid-column: 1 / -1; padding-bottom: var(--s-4); }
.bento__tile { grid-column: 1 / -1; background: var(--bg-tint); border-radius: var(--r-lg); padding: var(--s-5); }
.bento__tile h3 { margin-bottom: 4px; }
.bento__tile p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); }
.bento__phone { display: flex; justify-content: center; align-items: center; padding: var(--s-5) var(--s-4); border-radius: var(--r-lg); background: linear-gradient(180deg, var(--bg-tint-2), var(--bg-tint)); overflow: hidden; }
.bento__phone .device { --dw: 100%; max-width: 280px; }
.bento__phone--b { background: linear-gradient(180deg, var(--capsule-b), var(--bg-tint)); }
@media (min-width: 600px) and (max-width: 899px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
  .bento__intro { grid-column: 1 / -1; }
  .bento__tile { grid-column: span 2; }
  .bento__phone { grid-column: span 3; }
  .bento__phone .device { max-width: 250px; }
}
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(12, 1fr); grid-template-rows: auto 1fr; gap: var(--s-4); }
  .bento__intro { grid-column: 1 / 7; grid-row: 1; padding: var(--s-4) var(--s-6) 0 0; }
  .bento__tile--1 { grid-column: 1 / 3; grid-row: 2; }
  .bento__tile--2 { grid-column: 3 / 5; grid-row: 2; }
  .bento__tile--3 { grid-column: 5 / 7; grid-row: 2; }
  .bento__phone--a { grid-column: 7 / 10; grid-row: 1 / 3; }
  .bento__phone--b { grid-column: 10 / 13; grid-row: 1 / 3; }
  .bento__phone { padding: var(--s-6) var(--s-5); }
}

/* Deep navy band: official information (keeps its own inverted tokens in both themes) */
.band {
  --ink: #EDF4FB; --ink-2: #B9C9DA; --ink-3: #A2B5C9; --line: #1F3753; --line-strong: #2C4A6B;
  --brand: #8CC4FA; --pill-a: #8CC4FA; --pill-b: #2F5D8C; --focus: #8CC4FA;
  --device-outline: rgb(255 255 255 / 0.12);
  background: radial-gradient(60% 70% at 80% 40%, var(--band-bg-2), transparent 70%), var(--band-bg);
  color: var(--ink);
}

/* History comparison: Free vs Premium */
.compare { display: grid; gap: var(--s-4); margin-top: var(--s-6); }
@media (min-width: 560px) { .compare { grid-template-columns: 1fr 1fr; } }
.compare__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); }
.compare__col--premium { background: var(--gold-soft); border-color: var(--gold-line); }
.compare__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.0625rem; }
.compare .capsule-list { margin-top: var(--s-3); }
.compare .capsule-list li { font-size: var(--fs-small); }
.compare__note { margin: var(--s-3) 0 0; font-size: var(--fs-fine); color: var(--gold); font-weight: 600; }

/* ---------- Home: privacy ---------- */
.privacy { padding-block: var(--section-y); }
.privacy__grid {
  display: grid; gap: clamp(32px, 5vw, 64px); align-items: start;
  background: linear-gradient(160deg, var(--bg-tint-2), var(--bg-tint) 60%); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: clamp(28px, 6vw, 80px) clamp(20px, 6vw, 80px);
}
.privacy__intro h2 { margin-bottom: var(--s-4); max-width: 14ch; }
.privacy__plain { font-weight: 600; margin-top: var(--s-5); }
.privacy__device { display: flex; justify-content: center; }
.privacy__device .device { --dw: clamp(200px, 54vw, 260px); }
.zones { list-style: none; margin: 0; padding: 0; }
.zone { position: relative; padding: 0 0 var(--s-6) 40px; }
.zone:last-child { padding-bottom: 0; }
.zone::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--bg-tint); }
.zone::after { content: ''; position: absolute; left: 8px; top: 28px; bottom: 6px; width: 2px; background: var(--line-strong); }
.zone:last-child::after { content: none; }
.zone--home::before { border-color: var(--brand); background: var(--brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 22%, transparent); }
.zone h3 { margin-bottom: 6px; }
.zone p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); max-width: 34em; }
@media (max-width: 759px) { .privacy__device { order: 3; } }
@media (min-width: 760px) and (max-width: 1099px) {
  .privacy__grid { grid-template-columns: auto 1fr; }
  .privacy__intro { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .privacy__grid { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.1fr); align-items: center; }
  .privacy__device .device { --dw: 250px; }
}

/* ---------- Premium (band on Home, hero on the Premium page) ---------- */
.premium-band, .premium-hero {
  --pill-a: var(--gold-fill);
  background: radial-gradient(60% 80% at 85% 30%, var(--gold-wash), transparent 70%), var(--gold-soft);
  border-block: 1px solid var(--gold-line);
}
.premium-band { padding-block: var(--section-y); }
.premium-band__grid, .premium-hero__grid { display: grid; gap: clamp(40px, 6vw, 88px); align-items: center; }
@media (min-width: 900px) { .premium-band__grid, .premium-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.crown-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--gold-line); background: var(--surface); color: var(--gold); margin-bottom: var(--s-5); box-shadow: var(--shadow-1); }
.premium-band h2 { margin-bottom: var(--s-4); }
.premium-band .btn { margin-top: var(--s-6); }
.premium-title { color: var(--gold); margin-bottom: var(--s-4); }
.premium-hero { padding-block: clamp(48px, 7vw, 112px) clamp(40px, 5vw, 72px); border-top: 0; }

/* ---------- Home: closing ---------- */
.closing { padding-block: var(--section-y); text-align: center; }
.closing__inner { display: flex; flex-direction: column; align-items: center; }
.closing__icon { border-radius: 22%; box-shadow: var(--shadow-3); margin-bottom: var(--s-6); }
.closing h2 { margin-bottom: var(--s-4); }
.closing .lead { margin-inline: auto; }

/* ---------- Inner pages ---------- */
.page-hero { padding-block: clamp(56px, 8vw, 112px) clamp(24px, 4vw, 48px); background: linear-gradient(180deg, var(--bg-tint) 0%, var(--bg) 100%); }
.page-hero h1 { margin-bottom: var(--s-4); max-width: 16ch; }
.page-hero .demo-note { margin: var(--s-4) 0 0; }
.section { padding-block: var(--section-y); }

/* Features */
.fgroups { padding-bottom: var(--section-y); }
.fgroup { display: grid; gap: var(--s-6); align-items: center; padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid var(--line); }
.fgroup:first-child { border-top: 0; }
.fgroup h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); margin: var(--s-4) 0 0; max-width: 20ch; }
.fgroup__media { display: flex; justify-content: center; }
.device--sm { --dw: clamp(200px, 52vw, 260px); }
@media (min-width: 800px) {
  .fgroup { grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(40px, 7vw, 120px); }
  .fgroup--flip { grid-template-columns: 300px minmax(0, 1fr); }
  .fgroup--flip .fgroup__media { order: -1; }
}
.upcoming { background: var(--bg-tint); padding-block: var(--section-y); }
.upcoming h2 { margin-bottom: var(--s-4); }
.planned { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.planned li { border: 1px dashed var(--line-strong); border-radius: var(--r-lg); padding: var(--s-5); }
.planned h3 { margin: var(--s-3) 0 6px; }
.planned p { margin: 0; color: var(--ink-2); font-size: var(--fs-small); }

/* Premium page */
.premium-hero__media { min-height: 0; }
.ledger { list-style: none; margin: var(--s-7) 0 0; padding: 0; display: grid; gap: 0 var(--s-7); }
@media (min-width: 700px) { .ledger { grid-template-columns: 1fr 1fr; } }
.ledger li { border-top: 1px solid var(--gold-line); padding: var(--s-5) 0 var(--s-6); }
.ledger h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 6px; }
.ledger p { margin: 0; color: var(--ink-2); max-width: 30em; }

/* Support */
.support { display: grid; gap: var(--s-7); padding-block: var(--s-6) var(--section-y); align-items: start; }
.support h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem); margin-bottom: var(--s-4); }
@media (min-width: 900px) { .support { grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(48px, 6vw, 96px); } .contact { position: sticky; top: 96px; } }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { position: relative; list-style: none; cursor: pointer; padding: 20px 44px 20px 0; font-weight: 600; font-size: 1.0625rem; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform var(--dur-2) var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq summary:hover { color: var(--brand); }
.faq details p { margin: 0; padding: 0 0 22px; color: var(--ink-2); max-width: 40em; }
.contact { background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-6); }
.contact h2 { font-size: 1.75rem; }
.warning { background: var(--warning-soft); border: 1px solid var(--warning-line); color: var(--ink); padding: 14px 16px; border-radius: var(--r-md); margin: 0; font-size: var(--fs-small); }

/* Legal */
.legal-wrap { display: grid; gap: var(--s-5); padding-block: clamp(32px, 5vw, 72px) var(--section-y); align-items: start; }
.legal-nav__title { font-weight: 650; font-size: var(--fs-small); color: var(--ink-3); margin-bottom: var(--s-2); }
.legal-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.legal-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: var(--fs-small); }
.legal-nav a:hover { color: var(--ink); background: var(--bg-tint-2); }
.legal-nav a[aria-current='page'] { color: var(--ink); background: var(--bg-tint-2); border-color: var(--line-strong); font-weight: 600; }
@media (min-width: 1000px) {
  .legal-wrap { grid-template-columns: 220px minmax(0, 1fr); gap: clamp(48px, 6vw, 96px); }
  .legal-nav { position: sticky; top: 96px; padding-top: 12px; }
  .legal-nav ul { flex-direction: column; gap: 2px; }
  .legal-nav a { border-color: transparent; border-radius: var(--r-sm); width: 100%; }
}
.legal { max-width: 70ch; }
.legal h1 { margin-bottom: var(--s-5); }
.legal h2 { font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem); line-height: 1.2; margin: 2.2em 0 0.6em; }
.legal h3 { margin: 1.6em 0 0.5em; }
.legal p, .legal li { line-height: 1.72; }
.legal ul, .legal ol { padding-left: 1.3em; margin: 0 0 var(--s-4); }
.legal li { margin-block: 0.4em; }
.legal li::marker { color: var(--ink-3); }
.draft { background: var(--warning-soft); border: 1px solid var(--warning-line); border-radius: var(--r-lg); padding: var(--s-5); margin: 0 0 var(--s-5); }
.draft strong { color: var(--warning); }
.draft p { margin: var(--s-2) 0 0; }
mark.placeholder { background: var(--warning-soft); color: var(--warning); font-weight: 700; padding: 0 0.25em; border-radius: 4px; box-shadow: inset 0 0 0 1px var(--warning-line); }

/* 404 */
.lost { text-align: center; padding-block: clamp(72px, 10vw, 140px); }
.lost .capsule { position: relative; width: 180px; margin: 0 auto var(--s-8); }
.lost .lead { margin-inline: auto; }

/* Root language choice */
.root { padding-block: clamp(56px, 8vw, 120px) var(--section-y); }
.root__head { text-align: center; margin-bottom: var(--s-8); }
.root__head img { border-radius: 22%; box-shadow: var(--shadow-3); margin-bottom: var(--s-5); }
.root__head h1 { margin-bottom: var(--s-3); }
.root__head .lead { margin-inline: auto; }
.root__tiles { display: grid; gap: var(--s-4); max-width: 920px; margin-inline: auto; }
@media (min-width: 700px) { .root__tiles { grid-template-columns: 1fr 1fr; } }
.lang-tile {
  display: flex; flex-direction: column; gap: var(--s-3); padding: clamp(24px, 4vw, 40px); border-radius: var(--r-xl);
  border: 1px solid var(--line); background: linear-gradient(160deg, var(--bg-tint), var(--surface)); color: var(--ink); text-decoration: none;
  transition: border-color var(--dur-2) ease, transform var(--dur-2) var(--ease-out), box-shadow var(--dur-2) ease;
}
.lang-tile:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-2); text-decoration: none; }
.lang-tile__name { font-weight: 650; color: var(--brand); }
.lang-tile__line { font: 600 clamp(1.5rem, 1.2rem + 1.2vw, 2rem) / 1.15 var(--font-display); letter-spacing: -0.02em; }
.lang-tile__lead { color: var(--ink-2); font-size: var(--fs-small); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-tint); border-top: 1px solid var(--line); padding-block: var(--s-8) var(--s-6); font-size: var(--fs-small); }
.footer-top { display: grid; gap: var(--s-6) var(--s-5); grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { color: var(--ink-2); margin: var(--s-3) 0 0; max-width: 28em; }
.footer-email a { overflow-wrap: anywhere; }
.footer-brand .footer-soon { display: inline-block; margin-top: var(--s-4); padding: 6px 12px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--ink); font-weight: 600; font-size: var(--fs-fine); }
.footer-col__title { font: 650 var(--fs-fine) / 1.4 var(--font-sans); color: var(--ink-3); margin: 0 0 var(--s-2); }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-col__note { margin: var(--s-2) 0 0; color: var(--ink-3); font-size: var(--fs-fine); max-width: 26em; }
.footer-col a[aria-current] { color: var(--ink); font-weight: 600; }
.footer-fine { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.footer-fine p { font-size: var(--fs-fine); color: var(--ink-3); max-width: 86ch; margin-bottom: var(--s-2); }
@media (min-width: 700px) { .footer-top { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .footer-top { grid-template-columns: 1.5fr 1fr 1fr 1fr; } .footer-brand { grid-column: auto; } }

/* ---------- Large displays ---------- */
@media (min-width: 1600px) { :root { --container: 1320px; } }

/* ---------- Lightweight rendering (perf-lite: set by theme.js / site.js on low-performance devices) ----------
   Same layout, colours, images and text. Only costly effects are simplified: no floating or rising motion, no blur
   behind the header (an almost opaque header instead), and a shorter, lighter phone shadow. */
.perf-lite .float { animation: none; will-change: auto; }
.perf-lite .reveal { opacity: 1; transform: none; transition: none; }
.perf-lite .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: color-mix(in srgb, var(--bg) 97%, transparent); }
.perf-lite .device__frame { box-shadow: inset 0 0 0 0.55cqw var(--device-edge), inset 0 0 0 1.2cqw rgb(0 0 0 / 0.55), 0 0 0 1px var(--device-outline), var(--shadow-device-lite); }
.perf-lite .theme-anim, .perf-lite .theme-anim *, .perf-lite .theme-anim *::before, .perf-lite .theme-anim *::after { transition: none !important; }
@media (prefers-reduced-motion: no-preference) { .perf-lite { scroll-behavior: auto; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .skip-link, .hero__stage, .split__media, .spread__phone, .bento__phone, .privacy__device, .premium-band__media, .premium-hero__media, .fgroup__media { display: none !important; }
  body { background: #fff; color: #000; }
  .band { background: #fff; --ink: #000; --ink-2: #222; --ink-3: #333; }
}
