:root {
  --bg: #ffffff;
  --bg-2: #f5f5f7;      /* Apple grey band */
  --text: #1d1d1f;
  --dim: #86868b;
  --line: #d2d2d7;
  --accent: #0071e3;    /* Apple blue — matches the app */
  --accent-press: #0060c8;
  --danger: #ff3b30;    /* Apple red — matches the app's delete button */
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
::selection { background: rgba(0, 113, 227, 0.18); }

.wrap { width: min(980px, 100% - 44px); margin-inline: auto; }
.wrap.narrow { max-width: 720px; }
.center { text-align: center; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.nav__inner { width: min(980px, 100% - 44px); margin-inline: auto; height: 52px; display: flex; align-items: center; justify-content: space-between; }
.nav__brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.nav__icon { width: 22px; height: 22px; border-radius: 6px; }
.nav__links { display: flex; align-items: center; gap: 26px; font-size: 14px; color: var(--dim); }
.nav__links a { transition: color 0.2s; }
.nav__links a:hover { color: var(--text); }
.nav__cta { color: var(--accent) !important; font-weight: 500; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 500; letter-spacing: -0.01em; transition: transform 0.15s var(--ease), background 0.2s, color 0.2s; }
.btn--primary { background: var(--accent); color: #fff; padding: 11px 22px; border-radius: 980px; }
.btn--primary:hover { background: var(--accent-press); }
.btn--primary:active { transform: scale(0.98); }
.btn--link { color: var(--accent); }
.btn--link:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 92px 22px 84px; }
.hero__icon { width: 116px; height: 116px; border-radius: 26px; filter: drop-shadow(0 22px 40px rgba(0, 90, 200, 0.28)); }
.hero__title { margin-top: 34px; font-size: clamp(38px, 6.4vw, 68px); line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; }
.hero__sub { margin: 22px auto 0; max-width: 620px; font-size: clamp(17px, 2.1vw, 21px); line-height: 1.5; color: var(--dim); }
.hero__actions { margin-top: 32px; display: flex; gap: 24px; align-items: center; justify-content: center; flex-wrap: wrap; }
.hero__meta { margin-top: 22px; font-size: 13px; color: var(--dim); }

/* ---------- Bands / sections ---------- */
.band { background: var(--bg-2); padding: 100px 0; }
.section { padding: 100px 0; }
.h2 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; }
.p { margin: 18px auto 0; max-width: 640px; font-size: clamp(16px, 1.8vw, 19px); line-height: 1.55; color: var(--dim); }

/* ---------- Stats ---------- */
.stats { margin: 54px auto 0; max-width: 820px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 680px) { .stats { grid-template-columns: 1fr; gap: 30px; } }
.stat b { display: block; font-size: clamp(30px, 4.4vw, 44px); font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
.stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--dim); }

/* ---------- Steps ---------- */
.steps { margin-top: 60px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 40px; } }
.step { text-align: center; }
.step__ic { width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.step__ic svg { width: 26px; height: 26px; }
.step h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.step p { margin-top: 10px; font-size: 15.5px; line-height: 1.55; color: var(--dim); }

/* ---------- App window mock (faithful to the real app) ---------- */
.wrap.wide { width: min(1080px, 100% - 44px); }
.appwin {
  --p2: #fbfbfd; --ln: #e3e3e6; --dm: #86868b;
  margin-top: 72px; border-radius: 14px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 40px 90px -34px rgba(0, 0, 0, 0.34);
  font-size: 13px; color: var(--text);
}
.tl { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tl.r { background: #ff5f57; } .tl.y { background: #febc2e; } .tl.g { background: #28c840; }
/* toolbar */
.aw-bar { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--ln); }
.aw-brand { margin-left: 8px; font-weight: 600; font-size: 15px; }
.aw-stat { font-size: 12.5px; color: var(--dm); }
.aw-stat b { color: var(--text); font-weight: 600; }
.aw-grow { flex: 1; }
.aw-lang { font-size: 12px; color: var(--dm); border: 1px solid var(--ln); border-radius: 8px; padding: 5px 9px; }
.aw-search { font-size: 12.5px; color: var(--dm); background: var(--p2); border: 1px solid var(--ln); border-radius: 8px; padding: 6px 34px 6px 11px; }
.aw-btn { font-size: 12.5px; color: var(--text); background: var(--p2); border: 1px solid var(--ln); border-radius: 8px; padding: 6px 12px; }
.aw-btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); font-weight: 600; }
@media (max-width: 720px) { .aw-search, .aw-btn:not(.danger), .aw-lang { display: none; } }
/* body */
.aw-body { display: flex; height: 512px; }
.aw-side { width: 232px; flex: none; background: var(--p2); border-right: 1px solid var(--ln); display: flex; flex-direction: column; }
@media (max-width: 720px) { .aw-side { width: 150px; } }
.aw-seg { display: flex; gap: 4px; padding: 12px; }
.aw-seg span { flex: 1; min-width: 0; height: 30px; border-radius: 8px; border: 1px solid var(--ln); background: #fff; color: var(--dm); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.aw-seg span svg { width: 16px; height: 16px; }
.aw-seg span.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.aw-nav { flex: 1; overflow: hidden; padding: 0 8px 12px; }
.aw-crow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; }
.aw-crow .cn { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-crow .cs { font-variant-numeric: tabular-nums; color: var(--dm); font-size: 12px; }
.aw-crow.on { background: var(--accent); color: #fff; }
.aw-crow.on .cs { color: #fff; opacity: 0.85; }
/* card grid */
.aw-main { flex: 1; overflow: hidden; padding: 18px; background: #fff; }
.aw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 720px) { .aw-grid { grid-template-columns: repeat(2, 1fr); } }
.ac { position: relative; background: #fff; border: 2px solid transparent; border-radius: 15px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,0.09); }
.ac.sel { border-color: var(--accent); }
.ac .cb { position: absolute; top: 10px; left: 10px; z-index: 3; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,0.95); background: rgba(0,0,0,0.22); box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.ac.sel .cb { background: var(--accent); border-color: var(--accent); }
.ac.sel .cb::after { content: "✓"; position: absolute; inset: 0; color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ac .bd { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(0,0,0,0.6); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.th { position: relative; height: 150px; background: var(--bg-2); }
.th.tv1 { background: linear-gradient(150deg, #3c4c69, #141c2e); }
.th.tv2 { background: linear-gradient(150deg, #caa079, #593523); }
.th.tv3 { background: linear-gradient(150deg, #88b9e8, #23406c); }
.th.tv4 { background: linear-gradient(150deg, #e59b64, #79324f); }
.th.ti1 { background: linear-gradient(150deg, #92d2a5, #1f6b45); }
.th.ta1 { background: linear-gradient(150deg, #aa9df3, #493a9d); }
.th.vid::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.16); }
.th.vid::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-40%, -50%); border-style: solid; border-width: 11px 0 11px 19px; border-color: transparent transparent transparent #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.55)); }
.th.aud::after { content: "♪"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.92); font-size: 36px; text-shadow: 0 1px 5px rgba(0,0,0,0.3); }
.mt { padding: 10px 12px 12px; }
.mt .cv { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt .dm { display: flex; align-items: center; gap: 5px; color: var(--dm); font-size: 11.5px; margin-top: 3px; }
.mt .dm .mi { width: 13px; height: 13px; flex: none; }
.mt .fn { color: var(--dm); font-size: 11.5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Privacy ---------- */
.lock { width: 64px; height: 64px; margin: 0 auto 26px; border-radius: 18px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.lock svg { width: 30px; height: 30px; }
.pledge { list-style: none; margin: 34px auto 0; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.pledge li { font-size: 14px; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 980px; padding: 8px 16px; }

/* ---------- Download ---------- */
.get__icon { width: 84px; height: 84px; border-radius: 20px; filter: drop-shadow(0 16px 30px rgba(0, 90, 200, 0.25)); margin-bottom: 26px; }
.beta { display: inline-block; margin-top: 18px; font-size: 12px; color: var(--dim); border: 1px solid var(--line); border-radius: 980px; padding: 4px 12px; }
.firstrun { margin: 46px auto 0; max-width: 520px; text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 28px; }
.firstrun h4 { font-size: 16px; font-weight: 600; }
.firstrun > p { font-size: 14px; color: var(--dim); margin-top: 6px; }
.firstrun ol { margin: 16px 0 0 18px; display: grid; gap: 10px; font-size: 14.5px; color: var(--text); line-height: 1.45; }
.firstrun ol b { font-weight: 600; }
.firstrun .muted { margin-top: 16px; font-size: 13px; color: var(--dim); }
.feedback { display: inline-block; margin-top: 34px; font-size: 15px; color: var(--accent); }
.feedback:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 34px 0 46px; background: var(--bg-2); }
.foot__legal { font-size: 12px; color: var(--dim); line-height: 1.55; max-width: 720px; }
.foot__copy { margin-top: 12px; font-size: 12px; color: var(--dim); }

/* ---------- Reveal (subtle, Apple-calm) ---------- */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ---------- Phones ---------- */
@media (max-width: 560px) {
  /* tighter vertical rhythm so the page isn't an endless scroll */
  .band, .section { padding: 64px 0; }
  .hero { padding: 64px 20px 60px; }

  /* nav: smaller gap + font so brand and links don't collide */
  .nav__links { gap: 16px; font-size: 13px; }

  /* hero: keep the big line comfortable, not overpowering */
  .hero__icon { width: 96px; height: 96px; border-radius: 22px; }
  .hero__actions { gap: 16px; }

  /* app-mock: drop the cramped sidebar and let the card grid read full-width */
  .appwin { margin-top: 48px; }
  .aw-side { display: none; }
  .aw-body { height: auto; }
  .aw-main { padding: 14px; }
  .aw-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .th { height: 116px; }

  /* first-run box: less inner padding on narrow screens */
  .firstrun { padding: 22px 20px; }
  .firstrun ol { margin-left: 16px; }
}

/* very small screens: keep only the brand + the Download CTA in the nav */
@media (max-width: 400px) {
  .nav__links a:not(.nav__cta) { display: none; }
}
