/* ==========================================================================
   TempoGo website — design tokens follow the app's Master Design System
   ========================================================================== */

:root {
  --purple: #5046E5;
  --purple-600: #4338CA;
  --purple-100: #ECEBFD;
  --navy: #172338;
  --navy-900: #0E1626;
  --green: #22B886;
  --orange: #FF7646;
  --red: #D94A4A;
  --blue: #2F7CF6;
  --teal: #14A3A3;

  --bg: #FFFFFF;
  --surface: #F2F5F9;
  --card: #FFFFFF;
  --text: #172338;
  --muted: #617084;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 2px rgba(23, 35, 56, .06), 0 2px 8px rgba(23, 35, 56, .05);
  --shadow-md: 0 10px 30px rgba(23, 35, 56, .10);
  --shadow-lg: 0 30px 60px rgba(14, 22, 38, .28);

  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --gutter: 20px;
  --header-h: 68px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1626;
    --surface: #131D31;
    --card: #18243A;
    --text: #EEF2F8;
    --muted: #A3B0C2;
    --border: #26344D;
    --purple-100: #24254A;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .35);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--purple); text-decoration-thickness: 1px; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: #A5A0FF; } }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.25rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 4.2vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul { padding: 0; margin: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.narrow { max-width: 820px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--purple); color: #fff; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.icon { width: 24px; height: 24px; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 1rem; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--purple); color: #fff; box-shadow: 0 8px 20px rgba(80, 70, 229, .35); }
.btn-primary:hover { background: var(--purple-600); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .16); min-width: 96px; }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .14); }
.btn-round { width: 72px; height: 72px; padding: 0; border-radius: 50%; }
.btn-round svg { width: 30px; height: 30px; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.store-buttons.is-center { justify-content: center; }
.store-btn {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 20px 8px 16px; border-radius: 14px;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .22);
  transition: transform .15s ease, box-shadow .15s ease;
}
.store-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.store-btn svg { width: 28px; height: 28px; flex: none; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.store-btn small { font-size: .7rem; opacity: .85; letter-spacing: .02em; }
.store-btn strong { font-size: 1.2rem; font-weight: 600; letter-spacing: -.01em; }
.store-btn.is-soon { opacity: .7; cursor: default; }
.store-btn.is-soon:hover { transform: none; box-shadow: none; }
.store-buttons.is-compact { margin-top: 20px; }
.store-buttons.is-compact .store-btn { min-height: 50px; padding: 6px 16px 6px 12px; }
.store-buttons.is-compact .store-btn strong { font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background-color .2s ease;
}
@media (prefers-color-scheme: dark) { .site-header { background: rgba(14, 22, 38, .82); } }
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; }
.brand img { border-radius: 10px; }
.brand b { color: var(--purple); font-weight: 800; }
@media (prefers-color-scheme: dark) { .brand b { color: #8E88FF; } }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 24px; }
.site-nav ul a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .97rem; padding: 6px 0; }
.site-nav ul a:hover, .site-nav ul a[aria-current="page"] { color: var(--purple); }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 48px; height: 48px; padding: 12px; margin-right: -8px;
    background: none; border: 0; border-radius: 12px; color: var(--text);
  }
  .nav-toggle span { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 16px;
    padding: 12px var(--gutter) 24px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    max-height: calc(100dvh - var(--header-h)); overflow-y: auto;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 14px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--border); }
  .nav-cta { width: 100%; }
}

/* ---------- Eyebrow / section heads ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--purple); }
@media (prefers-color-scheme: dark) { .eyebrow { color: #A5A0FF; } }
.eyebrow-light, .section-dark .eyebrow, .panel-dark .eyebrow { color: #A9FFE0; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(34, 184, 134, .25); }
.section { padding: clamp(64px, 10vw, 112px) 0; }
.section-tint { background: var(--surface); }
.section-head { max-width: 680px; margin: 0 auto clamp(36px, 6vw, 56px); text-align: center; }
.section-head p:last-child { color: var(--muted); font-size: 1.08rem; }
.text-gradient { background: linear-gradient(90deg, #8E88FF, #22B886); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Phone frame ---------- */
.phone {
  position: relative; width: 100%; max-width: 300px; aspect-ratio: 640 / 1387;
  padding: 8px; border-radius: 44px;
  background: linear-gradient(145deg, #2B3550, #0B111E);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; background: #0E1626; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(80, 70, 229, .55), transparent 60%),
              radial-gradient(900px 500px at -10% 110%, rgba(34, 184, 134, .25), transparent 60%),
              linear-gradient(160deg, #1B2240 0%, var(--navy) 45%, var(--navy-900) 100%);
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + clamp(40px, 7vw, 88px)) 0 clamp(56px, 8vw, 96px);
}
.page-home .site-header:not(.is-scrolled) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.page-home .site-header:not(.is-scrolled) .brand,
.page-home .site-header:not(.is-scrolled) .nav-toggle { color: #fff; }
.page-home .site-header:not(.is-scrolled) .brand b { color: #A5A0FF; }
@media (min-width: 901px) {
  .page-home .site-header:not(.is-scrolled) .site-nav ul a { color: rgba(255, 255, 255, .86); }
  .page-home .site-header:not(.is-scrolled) .site-nav ul a:hover { color: #fff; }
}
.hero-glow { position: absolute; inset: auto -20% -40% auto; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 118, 70, .18), transparent 65%); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: rgba(255, 255, 255, .82); max-width: 560px; }
.hero h1 { margin-bottom: 20px; }
.download-anchor { position: relative; top: calc(var(--header-h) * -1 - 120px); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; color: rgba(255, 255, 255, .85); font-weight: 500; font-size: .95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .icon { width: 18px; height: 18px; color: var(--green); }

.hero-visual { position: relative; min-height: 600px; display: flex; justify-content: center; align-items: center; }
.hero-visual .phone { position: absolute; }
.phone-front { max-width: 290px; z-index: 2; transform: translateX(40px) rotate(2deg); animation: float 7s ease-in-out infinite; }
.phone-back { max-width: 250px; z-index: 1; transform: translateX(-120px) translateY(30px) rotate(-6deg); opacity: .9; }
.float-card {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .95); color: var(--navy); box-shadow: var(--shadow-md);
  font-size: .9rem; line-height: 1.25;
}
.float-card strong { display: block; font-weight: 700; }
.float-card small { color: var(--muted); }
.float-card .icon { color: var(--purple); }
.float-card-1 { top: 14%; right: -2%; animation: float 6s ease-in-out infinite reverse; }
.float-card-2 { bottom: 12%; left: 0; animation: float 8s ease-in-out infinite; }
.badge-dot { width: 12px; height: 12px; border-radius: 50%; }
.badge-dot.work { background: var(--green); box-shadow: 0 0 0 5px rgba(34, 184, 134, .2); }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero .store-buttons, .hero-points { justify-content: center; }
  .eyebrow-light { justify-content: center; }
  .hero-visual { min-height: 560px; margin-top: 8px; }
}
@media (max-width: 560px) {
  .hero-visual { min-height: 470px; }
  .phone-front { max-width: 230px; transform: translateX(28px) rotate(2deg); }
  .phone-back { max-width: 190px; transform: translateX(-78px) translateY(24px) rotate(-6deg); }
  .float-card { font-size: .8rem; padding: 10px 12px; }
  .float-card-1 { right: 0; top: 6%; }
  .float-card-2 { left: 0; bottom: 4%; }
  .store-buttons { justify-content: center; }
  .store-btn { flex: 1 1 200px; justify-content: center; }
}
@media (max-width: 360px) {
  .float-card { display: none; }
}

/* ---------- Stats ---------- */
.stats { background: var(--bg); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 28px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat strong { display: block; font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; letter-spacing: -.02em; color: var(--purple); line-height: 1.1; }
@media (prefers-color-scheme: dark) { .stat strong { color: #A5A0FF; } }
.stat span { color: var(--muted); font-size: .92rem; }
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
}

/* ---------- Feature cards ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  padding: 28px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card p { color: var(--muted); margin: 0; }
.feature-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; margin-bottom: 18px; flex: none; }
.tone-purple { background: rgba(80, 70, 229, .12); color: var(--purple); }
.tone-green { background: rgba(34, 184, 134, .14); color: #148A63; }
.tone-orange { background: rgba(255, 118, 70, .15); color: #D9531F; }
.tone-blue { background: rgba(47, 124, 246, .13); color: var(--blue); }
.tone-teal { background: rgba(20, 163, 163, .14); color: #0F8585; }
.tone-red { background: rgba(217, 74, 74, .13); color: var(--red); }
.tone-glass { background: rgba(255, 255, 255, .1); color: #A9FFE0; }
@media (prefers-color-scheme: dark) {
  .tone-purple { color: #A5A0FF; } .tone-green { color: #4FD8A8; } .tone-orange { color: #FF9C78; }
  .tone-blue { color: #7FB0FF; } .tone-teal { color: #4FD2D2; } .tone-red { color: #F08A8A; }
}
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .feature-grid { grid-template-columns: 1fr; gap: 14px; }
  .feature-card { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; padding: 20px; }
  .feature-card .feature-icon { grid-row: span 2; margin: 0; width: 46px; height: 46px; }
  .feature-card h3 { margin-bottom: 4px; }
}

/* ---------- Split spotlights ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.split-reverse .split-media { order: 2; }
.split-media { display: flex; justify-content: center; }
.split-media .phone { max-width: 320px; }
.split-copy > p { color: var(--muted); font-size: 1.08rem; }
.section-dark { background: linear-gradient(160deg, var(--navy), var(--navy-900)); color: #fff; }
.section-dark .split-copy > p { color: rgba(255, 255, 255, .78); }
.check-list { display: grid; gap: 12px; margin-top: 24px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.check-list .icon { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--green); color: #fff; stroke-width: 3; margin-top: 2px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; text-align: left; }
  .split-reverse .split-media { order: 0; }
  .split-media .phone { max-width: 260px; }
}

.prompt-demo { display: grid; gap: 10px; margin: 24px 0 8px; }
.bubble { padding: 14px 18px; border-radius: 20px; max-width: 100%; font-weight: 500; }
.bubble-user { justify-self: end; background: var(--purple); color: #fff; border-bottom-right-radius: 6px; }
.bubble-app { justify-self: start; display: flex; flex-wrap: wrap; gap: 8px; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 6px; box-shadow: var(--shadow-sm); }
.chip { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600; background: var(--surface); color: var(--text); }
.chip-work { background: rgba(34, 184, 134, .15); color: #148A63; }
.chip-rest { background: rgba(255, 118, 70, .15); color: #C9471A; }
.chip-total { background: rgba(80, 70, 229, .12); color: var(--purple); }
@media (prefers-color-scheme: dark) { .chip-work { color: #4FD8A8; } .chip-rest { color: #FF9C78; } .chip-total { color: #A5A0FF; } }

/* ---------- Demo timer ---------- */
.try-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.try-copy > p { color: var(--muted); font-size: 1.08rem; }
.demo-timer {
  --phase-color: var(--purple);
  width: 100%; max-width: 420px; justify-self: center;
  padding: 28px 24px 32px; border-radius: var(--radius-lg);
  background: radial-gradient(400px 260px at 50% 0%, rgba(80, 70, 229, .35), transparent 70%), linear-gradient(170deg, var(--navy), var(--navy-900));
  color: #fff; box-shadow: var(--shadow-lg); text-align: center;
  transition: background-color .3s ease;
}
.demo-timer[data-phase="work"] { --phase-color: var(--green); }
.demo-timer[data-phase="rest"] { --phase-color: var(--orange); }
.demo-timer[data-phase="done"] { --phase-color: #A5A0FF; }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .95rem; }
.demo-head span { color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }
.demo-ring { position: relative; width: min(100%, 280px); aspect-ratio: 1; margin: 18px auto 14px; }
.demo-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 12; }
.ring-progress { fill: none; stroke: var(--phase-color); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 552.92; stroke-dashoffset: 0; transition: stroke .3s ease; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--phase-color) 55%, transparent)); }
.demo-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.demo-time { font-size: clamp(3rem, 12vw, 4.2rem); font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.demo-phase { margin-top: 8px; font-weight: 800; letter-spacing: .14em; color: var(--phase-color); font-size: 1.15rem; }
.demo-next { margin: 0 auto 20px; padding: 10px 14px; max-width: 280px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); font-size: .92rem; }
.demo-controls { display: flex; justify-content: center; align-items: center; gap: 14px; }
.demo-controls .btn-ghost-light { font-size: .9rem; padding: 0 14px; }
.demo-timer .i-pause { display: none; }
.demo-timer[data-state="running"] .i-play { display: none; }
.demo-timer[data-state="running"] .i-pause { display: block; }
@media (max-width: 860px) { .try-grid { grid-template-columns: 1fr; } }
@media (max-width: 380px) {
  .demo-timer { padding: 22px 16px 26px; }
  .demo-controls { gap: 8px; }
  .demo-controls .btn-ghost-light { min-width: 80px; padding: 0 10px; }
}

/* ---------- Routines ---------- */
.routine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.routine-card {
  --tone: var(--purple);
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 16px;
  padding: 22px; border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.routine-card::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 55%; background: var(--tone); border-radius: 0 4px 0 0; }
.routine-card h3 { margin: 0 0 2px; font-size: 1.05rem; }
.routine-card p { margin: 0; color: var(--muted); font-size: .92rem; }
.routine-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; flex: none; color: var(--tone); background: color-mix(in srgb, var(--tone) 14%, transparent); }
.routine-card.tone-green { --tone: var(--green); }
.routine-card.tone-orange { --tone: var(--orange); }
.routine-card.tone-purple { --tone: var(--purple); }
.routine-card.tone-red { --tone: var(--red); }
.routine-card.tone-blue { --tone: var(--blue); }
.routine-card.tone-teal { --tone: var(--teal); }
.routine-card[class*="tone-"] { background: var(--card); color: var(--text); }
@media (max-width: 960px) { .routine-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .routine-grid { grid-template-columns: 1fr; gap: 12px; } .routine-card { padding: 18px; } }

/* ---------- Gallery ---------- */
.gallery-track {
  display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px max(var(--gutter), calc((100vw - 1180px) / 2 + var(--gutter))) 28px;
  scroll-padding: 0 max(var(--gutter), calc((100vw - 1180px) / 2 + var(--gutter)));
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item { flex: 0 0 auto; width: clamp(200px, 22vw, 260px); margin: 0; scroll-snap-align: start; }
.gallery-item .phone { max-width: none; border-radius: 36px; padding: 6px; }
.gallery-item .phone img { border-radius: 30px; }
.gallery-item figcaption { margin-top: 14px; text-align: center; font-size: .9rem; color: var(--muted); }
.gallery-nav { display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--text); box-shadow: var(--shadow-sm); }
.icon-btn:hover { border-color: var(--purple); color: var(--purple); }
.icon-btn:disabled { opacity: .4; cursor: default; }
.icon-btn svg { width: 22px; height: 22px; }
@media (hover: none) { .gallery-nav { display: none; } }

/* ---------- Panels ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { padding: clamp(28px, 4vw, 44px); border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.panel-dark { background: linear-gradient(160deg, #262D6B, var(--navy) 60%); color: #fff; border-color: transparent; }
.panel-dark p { color: rgba(255, 255, 255, .75); }
.icon-list { display: grid; gap: 20px; margin-top: 8px; }
.icon-list li { display: flex; gap: 16px; align-items: flex-start; }
.icon-list .feature-icon { margin: 0; width: 46px; height: 46px; border-radius: 14px; }
.icon-list strong { display: block; margin-bottom: 2px; }
.icon-list p { margin: 0; color: var(--muted); font-size: .95rem; }
.panel-dark .icon-list p { color: rgba(255, 255, 255, .72); }
.text-link { display: inline-block; margin-top: 24px; font-weight: 700; color: #A9FFE0; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item { border-radius: 16px; background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.faq-item summary {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--purple-100); }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; background: var(--purple); border-radius: 2px; transition: transform .2s ease; }
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0); }
.faq-item p { margin: 0; padding: 0 20px 20px; color: var(--muted); }
.faq-more { margin-top: 28px; text-align: center; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { padding: 0 0 clamp(64px, 10vw, 112px); }
.cta-inner {
  padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 48px); border-radius: var(--radius-lg); text-align: center; color: #fff;
  background: radial-gradient(600px 300px at 80% 0%, rgba(34, 184, 134, .35), transparent 60%), linear-gradient(135deg, var(--purple), #2C2391);
  box-shadow: 0 30px 60px rgba(80, 70, 229, .3);
}
.cta-inner p { color: rgba(255, 255, 255, .85); font-size: 1.1rem; }
.cta-icon { margin: 0 auto 20px; border-radius: 22px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 56px 0 calc(24px + env(safe-area-inset-bottom)); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand p { color: var(--muted); max-width: 340px; margin: 14px 0 0; }
.footer-title { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer-links { display: grid; gap: 4px; }
.footer-links a { display: inline-block; padding: 6px 0; color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--purple); }
.footer-links li { color: var(--muted); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-footer .store-btn { border-color: transparent; }

/* ---------- Inner pages (legal, support) ---------- */
.page-hero { padding: clamp(48px, 8vw, 88px) 0 clamp(32px, 5vw, 48px); background: linear-gradient(180deg, var(--surface), var(--bg)); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.page-hero p { color: var(--muted); font-size: 1.08rem; margin: 0; max-width: 680px; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.page-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); }

.doc-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: clamp(36px, 6vw, 64px) 0 clamp(64px, 9vw, 96px); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-size: .92rem; }
.toc h2 { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover, .toc a.is-active { color: var(--purple); border-left-color: var(--purple); }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .toc { position: static; }
  .toc details { border: 1px solid var(--border); border-radius: 14px; background: var(--card); padding: 4px 16px; }
  .toc summary { min-height: 48px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
  .toc h2 { display: none; }
  .toc ol { margin-bottom: 12px; }
}
@media (min-width: 901px) { .toc summary { display: none; } .toc details > ol { display: block; } }

.prose { max-width: 760px; font-size: 1.02rem; }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.65rem); margin: 2.2em 0 .6em; padding-top: 4px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 1.6em 0 .5em; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--purple); }
.prose .note { padding: 16px 20px; border-radius: 14px; background: var(--purple-100); border-left: 4px solid var(--purple); margin: 1.4em 0; }
.prose .note p:last-child { margin: 0; }

.table-wrap { overflow-x: auto; margin: 1.2em 0 1.6em; border: 1px solid var(--border); border-radius: 14px; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface); font-weight: 700; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }

/* Support page */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: clamp(36px, 6vw, 56px) 0; }
.support-card { padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.support-card h2 { font-size: 1.2rem; margin: 0 0 8px; }
.support-card p { color: var(--muted); margin-bottom: 18px; flex: 1; }
.support-card .btn { align-self: flex-start; }
.btn-outline { background: transparent; color: var(--purple); border: 1.5px solid var(--purple); }
.btn-outline:hover { background: var(--purple-100); }
@media (prefers-color-scheme: dark) { .btn-outline { color: #A5A0FF; border-color: #A5A0FF; } }
@media (max-width: 860px) { .support-grid { grid-template-columns: 1fr; } }
.steps { counter-reset: step; display: grid; gap: 14px; margin: 1.2em 0 1.6em; padding: 0 !important; list-style: none !important; }
.steps li { counter-increment: step; position: relative; padding: 16px 18px 16px 62px; border-radius: 14px; background: var(--surface); margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--purple); color: #fff; font-weight: 700; font-size: .9rem; }

/* 404 */
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.not-found .big { font-size: clamp(5rem, 18vw, 9rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; background: linear-gradient(90deg, var(--purple), var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 12px; }
.not-found p { color: var(--muted); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

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

/* ---------- Print (legal pages) ---------- */
@media print {
  .site-header, .site-footer, .toc, .skip-link { display: none !important; }
  .doc-layout { display: block; }
  body { color: #000; background: #fff; }
}
