/*
 * Same palette as the app's default dark theme: black, one violet for actions, and the three
 * recovery colors used only where they mean something (ready / almost / resting).
 */
:root {
  --bg: #000;
  --surface: #0b0b10;
  --surface-2: #12121a;
  --line: #252533;
  --fg: #fff;
  --muted: #a1a1aa;
  --violet: #7c5cfc;
  --violet-soft: #b9a8ff;
  --ready: #22c55e;
  --almost: #f59e0b;
  --rest: #ef4444;
  --max: 1160px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Noto Sans', sans-serif; }
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--violet-soft); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--violet); padding: 8px 12px; border-radius: 8px; z-index: 50; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  background: rgba(0, 0, 0, 0.72); border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; text-decoration: none; letter-spacing: -0.02em; margin-right: auto; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, 0.12); }
.site-nav { display: flex; gap: 20px; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.site-nav a:hover, .site-nav a[aria-current='page'] { color: var(--fg); }
.lang { background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 16px;
  padding: 13px 22px; border-radius: 999px; background: var(--fg); color: #000; border: 0;
}
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: #3a3a4d; }
.btn[aria-disabled='true'] { cursor: default; }
@media (max-width: 820px) { .site-nav, .site-header .btn.small { display: none; } .site-header .lang { margin-left: auto; } }

/* Hero: the one loud moment of the page. */
.hero { position: relative; padding: 64px 0 96px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
h1 { font-size: clamp(44px, 6.8vw, 88px); line-height: 0.96; letter-spacing: -0.048em; font-weight: 800; margin: 0 0 24px; text-wrap: balance; }
.lead { color: var(--muted); font-size: clamp(18px, 1.7vw, 21px); line-height: 1.5; max-width: 30em; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-note { color: var(--muted); font-size: 15px; margin: 18px 0 0; }
.hero-visual { position: relative; display: flex; justify-content: center; min-height: 600px; align-items: center; }
.halo {
  position: absolute; inset: 4% -10% 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(124, 92, 252, 0.42), rgba(124, 92, 252, 0.08) 60%, transparent);
  filter: blur(10px);
}
/* Recovery status, exactly as the app colors the 3D body. */
.chip {
  position: absolute; z-index: 3; padding: 9px 14px; border-radius: 12px; font-weight: 700; font-size: 14px;
  background: rgba(18, 18, 26, 0.82); border: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); will-change: transform; white-space: nowrap;
}
.chip::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.chip.ok::before { background: var(--ready); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18); }
.chip.mid::before { background: var(--almost); box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18); }
.chip.rest::before { background: var(--rest); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18); }
.chip.c1 { top: 9%; left: -6%; }
.chip.c2 { top: 50%; right: -2%; }
.chip.c3 { bottom: 12%; left: 6%; }
@media (max-width: 900px) {
  .hero { padding: 40px 0 64px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { min-height: 560px; }
}

/* Phone frame */
/* The screen has the screenshots' exact ratio (1170 × 2532): nothing is cropped or zoomed,
   and a slightly smaller corner radius keeps the status bar and tab bar labels whole. */
.phone {
  --screen-radius: 34px;
  position: relative; z-index: 2; width: min(290px, 72vw); border-radius: 44px; padding: 9px;
  background: linear-gradient(160deg, #2b2b37, #0d0d13); border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.04); will-change: transform;
}
.phone .screen { width: 100%; aspect-ratio: 1170 / 2532; border-radius: var(--screen-radius); overflow: hidden; background: #0b0b10; position: relative; }
.phone .screen img { width: 100%; height: 100%; object-fit: contain; }
.phone .notch { position: absolute; top: 13px; left: 50%; transform: translateX(-50%); width: 34%; height: 22px; border-radius: 12px; background: #000; z-index: 2; }
.placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px;
  background: var(--surface-2); color: var(--muted); font-weight: 700;
}
.placeholder svg { width: 56px; height: 56px; opacity: 0.9; }

/* Feature sections: quiet, the screenshots do the talking. */
.section { position: relative; padding: 96px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.section .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.section.flip .copy { order: 2; }
.section.solo .wrap { grid-template-columns: 1fr; }
.section.solo .copy { max-width: 36em; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -0.036em; font-weight: 800; margin: 0 0 18px; text-wrap: balance; }
.copy { max-width: 30em; }
.copy p { color: var(--muted); font-size: 19px; line-height: 1.55; margin: 0 0 24px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.points li { display: flex; gap: 12px; align-items: baseline; font-size: 16px; }
.points li::before { content: ''; flex: 0 0 6px; height: 6px; border-radius: 2px; background: var(--violet); transform: translateY(-2px); }
.visual { position: relative; display: flex; justify-content: center; }
/* Two phones side by side, the second a little lower. */
.duo { position: relative; z-index: 2; display: flex; justify-content: center; align-items: flex-start; }
.duo .phone { width: min(240px, 42vw); --screen-radius: 28px; border-radius: 36px; }
.duo .phone + .phone { margin-left: -36px; margin-top: 70px; }
/* Spotlight: the key feature gets a tinted band and a "Next session" tag on its phone. */
.section.spotlight {
  background: radial-gradient(60% 80% at 30% 50%, rgba(124, 92, 252, 0.16), transparent 70%), var(--surface);
  border-top-color: rgba(124, 92, 252, 0.25); border-bottom: 1px solid rgba(124, 92, 252, 0.25);
}
.section.spotlight + .section { border-top-color: transparent; }
.chip.next { background: var(--violet); border-color: transparent; color: #fff; top: 16%; right: 4%; box-shadow: 0 14px 34px rgba(124, 92, 252, 0.45); }
.chip.next::before { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22); }
/* One column: the tag sits on the phone's top edge instead of over the app's buttons. */
@media (max-width: 900px) { .chip.next { top: -18px; right: 50%; transform: translateX(50%); } }
@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .section .wrap { grid-template-columns: 1fr; gap: 40px; }
  .section.flip .copy { order: 0; }
}

/* 3D model */
.model-card {
  position: relative; width: 100%; max-width: 460px; aspect-ratio: 1 / 1.15; border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(70% 55% at 50% 35%, rgba(124, 92, 252, 0.22), transparent 70%), var(--surface); overflow: hidden;
}
.model-card model-viewer { width: 100%; height: 100%; --poster-color: transparent; }
.model-card .model-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600; transition: opacity 0.4s; }
.model-card.is-loaded .model-fallback { opacity: 0; }
.model-switch { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2; display: flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.model-switch button { appearance: none; border: 0; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; cursor: pointer; transition: background 0.2s, color 0.2s; }
.model-switch button[aria-pressed="true"] { color: #fff; background: var(--violet); }
.model-hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 13px; }

/* Reveal (hero only) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .hero-visual[data-reveal] { transition-delay: 0.12s; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Free: an iOS-style grouped list. */
.free { padding: 96px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.free .lead { margin-bottom: 28px; }
.free-grid {
  list-style: none; padding: 0; margin: 0 0 20px; display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
}
.free-grid li { background: var(--surface); padding: 16px 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid var(--line); margin-bottom: -1px; }
.note { color: var(--muted); font-size: 15px; margin: 0; max-width: 48em; }
@media (max-width: 720px) { .free-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq { padding: 96px 0; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.faq .wrap { max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 19px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--violet-soft); font-size: 24px; line-height: 1; font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin: 12px 0 0; }
.faq-more { margin: 24px 0 0; }
.faq-more a { color: var(--violet-soft); font-weight: 700; text-decoration: none; }
.faq-more a:hover { text-decoration: underline; }

/* CTA + footer */
.cta { text-align: center; padding: 112px 0 120px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.cta .wrap { display: flex; flex-direction: column; align-items: center; }
.cta-icon { width: 88px; height: 88px; border-radius: 22px; border: 1px solid rgba(255, 255, 255, 0.12); margin-bottom: 28px; box-shadow: 0 20px 60px rgba(124, 92, 252, 0.35); }
.cta p { color: var(--muted); font-size: 19px; margin: 0 0 28px; }
.site-footer { border-top: 1px solid var(--line); padding: 44px 0; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-footer h3 { color: var(--fg); font-size: 14px; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* Legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); line-height: 1.05; }
.doc h2 { font-size: 21px; margin: 34px 0 8px; letter-spacing: -0.01em; }
.doc p { color: #d6d6e0; }
.doc .updated { color: var(--muted); }
.doc a { color: var(--violet-soft); }
