:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef0f7;
  --text: #161a2e;
  --muted: #5b6078;
  --line: #dfe2ee;
  --blue: #4f63e6;
  --teal: #1f9e86;
  --coral: #d9475c;
  --amber: #b98310;
  --code-bg: #eef0f7;
  --hero-bg: #161a2e;
  --hero-text: #eef0fa;
  --hero-muted: #a6abc6;
  --radius: 14px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1222;
    --surface: #171b30;
    --surface-2: #1e2340;
    --text: #e9ebf7;
    --muted: #9ea3bf;
    --line: #2a3050;
    --blue: #8b9bff;
    --teal: #5fd0b8;
    --coral: #f07a8a;
    --amber: #f5c053;
    --code-bg: #1e2340;
    --hero-bg: #0a0c18;
  }
}

* { 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", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
}
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 5px; overflow-wrap: anywhere; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header and footer */
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 18px 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: inherit; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.site-header nav, .site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); font-size: 15px; }
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 600; }

.landing .site-header { color: var(--hero-text); }
.landing .site-header nav a { color: var(--hero-muted); }
.landing .site-header nav a:hover { color: var(--hero-text); }

.site-footer {
  max-width: 1120px; margin: 0 auto; padding: 32px 20px 48px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 14px; border-top: 1px solid var(--line);
}
.site-footer nav a { color: var(--muted); }

/* Hero */
.hero-band {
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(107, 127, 240, 0.35), transparent 70%),
    radial-gradient(700px 380px at 0% 30%, rgba(95, 208, 184, 0.18), transparent 70%),
    var(--hero-bg);
  color: var(--hero-text);
  padding-bottom: 72px;
}
.hero { text-align: center; padding: 56px 20px 40px; max-width: 820px; margin: 0 auto; }
.hero .app-icon { width: 128px; height: 128px; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45)); }
.hero h1 {
  font-size: clamp(36px, 6vw, 60px); line-height: 1.08; letter-spacing: -0.025em;
  margin: 24px 0 16px; font-weight: 750;
}
.hero p.lede { font-size: clamp(18px, 2.4vw, 21px); color: var(--hero-muted); margin: 0 auto 32px; max-width: 640px; }
.cta { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: #000; border-radius: 12px; padding: 10px 18px;
  font-weight: 600; font-size: 15px; line-height: 1.2; text-align: left;
}
.badge small { display: block; font-weight: 500; font-size: 11px; opacity: 0.7; }
.badge svg { width: 22px; height: 22px; }
.badge:hover { text-decoration: none; }
.cta .note { color: var(--hero-muted); font-size: 14px; }

/* Tour of real screenshots (tour.js) */
.shot-stage { position: relative; max-width: 1180px; margin: 8px auto 0; aspect-ratio: 2400 / 1425; }
.shot { position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease; }
.shot.on { opacity: 1; }
.shot img { display: block; width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5)); }
.hotspot { position: absolute; border: 0; padding: 0; background: transparent; border-radius: 8px; cursor: pointer; }
.hotspot:hover { background: rgba(127, 127, 140, 0.16); }
.hotspot:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.hotspot.pressed { background: rgba(0, 0, 0, 0.18); }
.tour-cursor {
  position: absolute; left: 60%; top: 55%; width: 2.1%; min-width: 14px; opacity: 0; pointer-events: none; z-index: 2;
  transition: left 0.9s cubic-bezier(0.45, 0, 0.2, 1), top 0.9s cubic-bezier(0.45, 0, 0.2, 1), opacity 0.3s;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.tour-cursor svg { display: block; width: 100%; height: auto; transition: transform 0.15s; transform-origin: 20% 10%; }
.tour-cursor.on { opacity: 1; }
.tour-cursor.click svg { transform: scale(0.82); }
.shot-note { text-align: center; color: var(--hero-muted); font-size: 13px; margin: 14px 0 0; }
.chapters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px auto 0; }
.chapters button {
  font: inherit; font-size: 14px; color: var(--hero-muted); background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 999px; padding: 6px 14px; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.chapters button:hover { color: var(--hero-text); }
.chapters button[aria-pressed="true"] { background: var(--hero-text); color: var(--hero-bg); border-color: transparent; }

/* Sections */
section { padding: 80px 0 0; }
.kicker { color: var(--blue); font-weight: 650; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 8px; }
h2.title { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 14px; max-width: 760px; }
p.sub { color: var(--muted); font-size: 19px; max-width: 700px; margin: 0 0 36px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; min-width: 0;
}
.card .tag { display: inline-block; width: 34px; height: 6px; border-radius: 3px; margin-bottom: 16px; }
.card h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -0.01em; }
.card p { margin: 0 0 12px; color: var(--muted); font-size: 16px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.card li { margin: 3px 0; }
.tag.coral { background: var(--coral); } .tag.amber { background: var(--amber); }
.tag.teal { background: var(--teal); } .tag.blue { background: var(--blue); }

.everywhere { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.everywhere div { background: var(--surface-2); border-radius: 12px; padding: 18px; }
.everywhere b { display: block; margin-bottom: 4px; }
.everywhere span { color: var(--muted); font-size: 15px; }

.promises { display: grid; gap: 0; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); border-top: 1px solid var(--line); }
.promises div { padding: 22px 22px 22px 0; border-bottom: 1px solid var(--line); }
.promises b { display: block; margin-bottom: 4px; font-size: 17px; }
.promises span { color: var(--muted); font-size: 15px; }

.closing { text-align: center; padding: 96px 20px 88px; }
.closing img { width: 96px; height: 96px; }
.closing h2 { font-size: clamp(28px, 4vw, 38px); margin: 18px 0 10px; letter-spacing: -0.02em; }
.closing p { color: var(--muted); margin: 0 0 24px; }
.closing .badge { background: var(--text); color: var(--bg); }

/* Generated docs pages */
.prose { max-width: 760px; margin: 0 auto; padding: 24px 20px 64px; }
.prose h1 { font-size: clamp(30px, 5vw, 42px); letter-spacing: -0.02em; line-height: 1.15; margin: 24px 0 8px; }
.prose h2 { font-size: 24px; margin: 44px 0 12px; letter-spacing: -0.01em; }
.prose h1 + p em, .prose h1 + p { color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 72px 0 24px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.faq { border-top: 1px solid var(--line); padding: 18px 0 4px; }
.faq h3 { font-size: 18px; margin: 0 0 6px; }
.faq p { margin: 0 0 12px; }
.prose :target { scroll-margin-top: 24px; }

@media (max-width: 760px) {
  section { padding-top: 64px; }
}
