/* Tokens: app colors (lib/core/theme), light and dark. */
:root {
  --bg: #f5f7fc;
  --card: #ffffff;
  --text: #1b2340;
  --muted: #545d72;
  --primary: #1a66e0;
  --primary-hover: #1456c2;
  --on-primary: #ffffff;
  --primary-soft: #dce8ff;
  --line: #e1e6f0;
  --shadow: 0 1px 2px rgba(20, 40, 90, .06), 0 8px 24px rgba(20, 40, 90, .08);
  --shadow-lg: 0 24px 48px rgba(20, 40, 90, .18);
  --bezel: #1b2340;
  --radius: 20px;
  /* Topic tints from the app: background / icon */
  --c1-bg: #e7f0ff; --c1-fg: #123e8c;
  --c2-bg: #fff6d6; --c2-fg: #6b4700;
  --c3-bg: #e0f7f3; --c3-fg: #0b5048;
  --c4-bg: #ffeedd; --c4-fg: #7a2e00;
  --c5-bg: #f0ebff; --c5-fg: #3e2a8c;
  --c6-bg: #e2f4fc; --c6-fg: #0b4a6b;
  --c7-bg: #e6f7ea; --c7-fg: #1b5e2b;
  --c8-bg: #f0ebff; --c8-fg: #3e2a8c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420;
    --card: #182030;
    --text: #e6e9f2;
    --muted: #a7afc1;
    --primary: #7aaeff;
    --primary-hover: #9cc3ff;
    --on-primary: #0b1a33;
    --primary-soft: #1c3a70;
    --line: #2a3446;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 48px rgba(0, 0, 0, .45);
    --bezel: #2a3446;
    --c1-bg: #1c2f55; --c1-fg: #a9c8ff;
    --c2-bg: #3a3112; --c2-fg: #ffd866;
    --c3-bg: #123a36; --c3-fg: #7fe0d0;
    --c4-bg: #3d2614; --c4-fg: #ffb37a;
    --c5-bg: #2a2252; --c5-fg: #c4b5ff;
    --c6-bg: #12334a; --c6-fg: #8fd3f5;
    --c7-bg: #173a22; --c7-fg: #8fe3a2;
    --c8-bg: #2a2252; --c8-fg: #c4b5ff;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--primary); color: var(--on-primary); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Top bar (also used by privacy.html) */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: flex; white-space: nowrap; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.bar nav { display: flex; gap: 4px; }
.bar nav a { white-space: nowrap; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; transition: background-color .15s, color .15s; }
.bar nav a:hover { color: var(--primary); background: var(--primary-soft); }

/* Hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; padding: 40px 16px 56px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: .85rem; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.12; margin: 16px 0 14px; letter-spacing: -.025em; text-wrap: balance; }
.hl { color: var(--primary); }
.lead { font-size: 1.12rem; color: var(--muted); margin: 0 0 10px; max-width: 34em; }
.de { color: var(--muted); font-size: .95rem; font-style: italic; margin: 0 0 26px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--primary); color: var(--on-primary); text-decoration: none; font-weight: 600; border: 1.5px solid transparent; transition: background-color .15s, transform .15s; }
.btn:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn.ghost:hover { background: var(--primary-soft); color: var(--primary); }
.stats { display: flex; flex-wrap: wrap; gap: 28px; list-style: none; margin: 32px 0 0; padding: 0; }
.stats li { display: flex; flex-direction: column; }
.stats strong { font-size: 1.6rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: .9rem; }

/* Device frames */
.phones { display: flex; justify-content: center; align-items: flex-start; gap: 18px; }
.device { background: var(--bezel); padding: 7px; border-radius: 34px; box-shadow: var(--shadow-lg); width: 48%; max-width: 250px; }
.device img { display: block; width: 100%; border-radius: 28px; }
.phones .device:nth-child(2) { margin-top: 56px; }
.device.sm { width: 100%; max-width: none; padding: 5px; border-radius: 26px; box-shadow: var(--shadow); }
.device.sm img { border-radius: 21px; }

/* Sections */
section { padding: 48px 0; }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); line-height: 1.25; margin: 0 0 6px; letter-spacing: -.015em; }
h3 { line-height: 1.35; }
.sub { color: var(--muted); margin: 0 0 28px; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; margin: 24px 0 0; padding: 0; }
.steps li { position: relative; background: var(--card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.steps .num { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 700; }
.steps h3 { margin: 14px 0 4px; font-size: 1.08rem; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat h3 { margin: 14px 0 4px; font-size: 1.05rem; }
.feat p { margin: 0; color: var(--muted); font-size: .95rem; }
.ico { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.c1 { background: var(--c1-bg); color: var(--c1-fg); }
.c2 { background: var(--c2-bg); color: var(--c2-fg); }
.c3 { background: var(--c3-bg); color: var(--c3-fg); }
.c4 { background: var(--c4-bg); color: var(--c4-fg); }
.c5 { background: var(--c5-bg); color: var(--c5-fg); }
.c6 { background: var(--c6-bg); color: var(--c6-fg); }
.c7 { background: var(--c7-bg); color: var(--c7-fg); }
.c8 { background: var(--c8-bg); color: var(--c8-fg); }

.shots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shots figure { margin: 0; text-align: center; }
.shots figcaption { color: var(--muted); font-size: .92rem; margin-top: 10px; font-weight: 500; }

/* Version history */
.timeline { position: relative; margin: 0; padding: 0; list-style: none; max-width: 760px; }
.timeline > li { position: relative; padding: 0 0 22px 30px; }
.timeline > li::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: -8px; width: 2px; background: var(--line); }
.timeline > li:last-child::before { display: none; }
.timeline > li::after { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--card); border: 3px solid var(--primary); }
.timeline .ver { font-weight: 700; }
.timeline .date { color: var(--muted); font-size: .9rem; margin-left: 8px; }
.timeline .tag { margin-left: 8px; font-size: .78rem; padding: 2px 10px; border-radius: 99px; background: var(--primary); color: var(--on-primary); font-weight: 600; }
.timeline .card { margin-top: 8px; padding: 14px 18px; }
.timeline ul { margin: 0; padding-left: 18px; }
.timeline ul li { margin: 3px 0; }
details.older summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--primary); font-weight: 600; margin: 0 0 12px; }

/* Join band */
.join { display: flex; align-items: center; gap: 24px; padding: 32px; border-radius: 28px; background: linear-gradient(135deg, #1a66e0, #3d86f5); color: #fff; }
.join img { border-radius: 16px; flex: none; }
.join h2 { color: #fff; }
.join p { margin: 0; opacity: .92; }
.join > div { flex: 1; }
.btn.light { background: #fff; color: #1456c2; }
.btn.light:hover { background: #eaf1ff; color: #1456c2; }
.join :focus-visible { outline-color: #fff; }

footer { padding: 32px 0 48px; color: var(--muted); font-size: .92rem; border-top: 1px solid var(--line); margin-top: 24px; }
footer a { margin-right: 14px; display: inline-block; padding: 4px 0; }

/* Privacy page */
.doc { background: var(--card); border-radius: var(--radius); padding: 8px 24px 20px; margin-top: 20px; box-shadow: var(--shadow); }
.doc h2 { font-size: 1.3rem; margin-top: 20px; }
.doc h3 { font-size: 1.02rem; margin: 20px 0 4px; }
.doc ul { padding-left: 20px; }
.note { color: var(--muted); font-size: .92rem; }

@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 16px; gap: 32px; }
  .steps { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .join { flex-direction: column; align-items: flex-start; padding: 24px; }
  .bar nav a { padding: 0 8px; font-size: .9rem; }
  .bar nav a.hide-sm { display: none; }
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .stats strong { font-size: 1.35rem; }
  .stats span { font-size: .82rem; line-height: 1.35; }
  .cta .btn { flex: 1 1 100%; }
  section { padding: 36px 0; }
}
@media (max-width: 400px) {
  .bar { gap: 8px; }
  .brand { gap: 8px; font-size: .9rem; }
  .brand img { width: 28px; height: 28px; }
  .bar nav a { padding: 0 6px; font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
