:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-soft: #eef5ff;
  --text: #212c3d;
  --muted: #687386;
  --primary: #1e88e5;
  --primary-dark: #1468b4;
  --border: rgba(33, 44, 61, 0.1);
  --shadow: 0 22px 70px rgba(35, 54, 87, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 0%, #eaf4ff 0%, transparent 36%), var(--bg);
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 14px max(20px, calc((100vw - var(--container)) / 2));
  background: rgba(247, 249, 252, 0.82);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--border);
  box-shadow: 0 12px 40px rgba(33, 44, 61, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 20px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #62b6ff);
  box-shadow: 0 14px 28px rgba(30, 136, 229, 0.25);
}

.site-nav { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; color: #536073; }
.site-nav a:hover { color: var(--primary); }
.nav-toggle { display: none; background: transparent; border: 0; padding: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--text); border-radius: 99px; }

.section { padding: 96px 0; }
.section-white { background: rgba(255, 255, 255, 0.72); }
.hero { min-height: calc(100vh - 74px); display: grid; align-items: center; padding-top: 72px; }
.hero-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 70px; align-items: center; }
.eyebrow { margin: 0 0 16px; color: var(--primary); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; font-size: 12px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(46px, 7vw, 84px); line-height: 0.94; letter-spacing: -0.07em; margin-bottom: 26px; }
h2 { font-size: clamp(34px, 4.2vw, 58px); line-height: 1.02; letter-spacing: -0.055em; margin-bottom: 18px; }
h3 { font-size: 20px; letter-spacing: -0.035em; margin-bottom: 10px; }
.lead { max-width: 620px; font-size: clamp(18px, 2.2vw, 23px); color: var(--muted); margin-bottom: 34px; }
.section-lead { max-width: 700px; margin: 0 auto 44px; color: var(--muted); font-size: 18px; }
.hero-actions, .store-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn, .store-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 54px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:hover, .store-btn:hover { transform: translateY(-2px); }
.btn-primary, .store-btn { color: #fff; background: var(--primary); box-shadow: 0 15px 30px -10px rgba(0, 11, 48, 0.25); }
.btn-primary:hover, .store-btn:hover { background: var(--primary-dark); }
.btn-ghost { color: var(--text); background: transparent; }

.hero-visual { position: relative; min-height: 610px; display: grid; place-items: center; }
.hero-visual::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 136, 229, 0.18), rgba(30, 136, 229, 0));
}
.phone {
  position: absolute;
  width: 270px;
  height: 560px;
  border-radius: 42px;
  padding: 12px;
  background: #111825;
  box-shadow: 0 34px 80px rgba(15, 27, 47, 0.28);
}
.phone-main { z-index: 3; transform: rotate(-2deg); }
.phone-back { width: 225px; height: 485px; opacity: 0.82; filter: saturate(0.85); }
.phone-left { transform: translate(-168px, 42px) rotate(-9deg); }
.phone-right { transform: translate(168px, 8px) rotate(8deg); }
.phone-screen {
  height: 100%;
  border-radius: 32px;
  padding: 26px 20px;
  background: linear-gradient(180deg, #fafdff, #eef5ff);
  overflow: hidden;
}
.app-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 42px; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; color: #fff; background: var(--primary); font-weight: 800; }
.streak { padding: 8px 10px; border-radius: 999px; background: #e3f1ff; color: var(--primary-dark); font-size: 11px; font-weight: 800; }
.phone-screen h2 { font-size: 28px; margin-bottom: 12px; }
.phone-screen p { color: var(--muted); font-size: 14px; }
.progress { height: 9px; background: #dce8f6; border-radius: 99px; overflow: hidden; margin: 28px 0 18px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), #52b6ff); border-radius: inherit; }
.lesson-btn { width: 100%; min-height: 48px; border: 0; border-radius: 15px; color: #fff; background: var(--primary); font-weight: 800; }
.quiz-card { margin-top: 22px; padding: 18px; border-radius: 22px; background: #fff; box-shadow: 0 16px 36px rgba(31, 57, 90, 0.11); }
.quiz-card small { display: block; color: var(--muted); margin-bottom: 8px; }
.status-row, .mini-card, .mini-line, .mini-pill-row span { border-radius: 999px; background: #dce8f6; }
.status-row { width: 60%; height: 12px; margin-bottom: 28px; }
.mini-card { height: 130px; border-radius: 24px; margin-bottom: 24px; }
.mini-card.blue { background: linear-gradient(135deg, #d9efff, #a8d4ff); }
.mini-card.green { background: linear-gradient(135deg, #e3f8f1, #b9eada); }
.mini-line { width: 72%; height: 11px; margin-bottom: 14px; }
.mini-line.long { width: 90%; }
.mini-pill-row { display: flex; gap: 8px; margin-top: 30px; }
.mini-pill-row span { width: 44px; height: 18px; }

.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 54px; align-items: start; }
.content-card, .step-card, .benefit-card, .topic-card, .cta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 52px rgba(34, 51, 84, 0.07);
}
.content-card { padding: 36px; font-size: 18px; color: #4f5d70; }
.content-card p:last-child { margin-bottom: 0; }
.center { text-align: center; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step-card { padding: 30px; min-height: 230px; }
.step-number { display: inline-block; margin-bottom: 34px; color: var(--primary); font-weight: 900; letter-spacing: -0.05em; font-size: 38px; }
.step-card p, .benefit-card p, .topic-card p { color: var(--muted); margin-bottom: 0; }
.benefit-grid, .topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.benefit-card, .topic-card { padding: 28px; }
.icon, .topic-card span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; border-radius: 16px; background: var(--surface-soft); color: var(--primary); font-weight: 900; }
.cta-section { padding-bottom: 120px; }
.cta-card { padding: clamp(34px, 6vw, 64px); text-align: center; background: linear-gradient(135deg, #ffffff, #edf6ff); }
.cta-card p { max-width: 620px; margin-inline: auto; color: var(--muted); font-size: 18px; }
.store-actions { justify-content: center; margin-top: 28px; }
.store-btn { min-width: 220px; }
.footer { padding: 54px 0; background: #172131; color: #e7edf6; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 0.8fr 0.8fr; gap: 32px; }
.footer p, .footer span { color: #a9b5c8; }
.footer h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.12em; color: #fff; }
.footer a:not(.brand) { display: block; margin-bottom: 10px; color: #c5d0df; }
.footer a:hover { color: #fff; }
.footer-brand { margin-bottom: 16px; }

.legal-main { padding: 64px 0 96px; }
.legal-card { max-width: 900px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 54px); box-shadow: var(--shadow); }
.legal-card h1 { font-size: clamp(36px, 5vw, 58px); }
.legal-card h2 { font-size: 24px; margin-top: 34px; }
.legal-card p, .legal-card li { color: #4e5b6d; }
.legal-card a { color: var(--primary); font-weight: 700; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .site-nav {
    position: fixed;
    top: 74px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .nav-toggle { display: block; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 42px; }
  .hero { padding-top: 44px; }
  .hero-visual { min-height: 550px; }
  .steps, .benefit-grid, .topic-grid, .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 28px, var(--container)); }
  .section { padding: 68px 0; }
  .hero-visual { min-height: 470px; transform: scale(0.82); }
  .phone-left { transform: translate(-120px, 40px) rotate(-9deg); }
  .phone-right { transform: translate(120px, 10px) rotate(8deg); }
  .hero-actions .btn, .store-btn { width: 100%; }
  .content-card, .step-card, .benefit-card, .topic-card { padding: 24px; }
}


/* Legal and support pages */
.legal-meta {
  display: inline-block;
  padding: 14px 16px;
  margin-bottom: 28px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  color: #42516a !important;
}
.legal-section { scroll-margin-top: 96px; }
.legal-section + .legal-section { margin-top: 34px; padding-top: 8px; border-top: 1px solid var(--border); }
.legal-card h3 { margin-top: 26px; margin-bottom: 10px; font-size: 20px; }
.legal-card h4 { margin-top: 20px; margin-bottom: 8px; font-size: 16px; }
.legal-card ul { padding-left: 22px; }
.legal-card p { overflow-wrap: anywhere; }
.legal-appendix { margin-top: 46px; padding-top: 28px; border-top: 2px solid var(--border); }
.contact-options { display: grid; gap: 14px; margin: 28px 0; }
.contact-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}
.contact-option span { color: var(--muted); }
.contact-option strong { color: var(--primary-dark); overflow-wrap: anywhere; text-align: right; }

/* Auth callback and password reset */
.auth-page { min-height: 100vh; background: #0b1220; color: #fff; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: min(100%, 560px);
  padding: 28px;
  border: 1px solid rgba(126, 187, 242, 0.25);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}
.auth-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 32px; color: #fff; font-weight: 800; }
.auth-card h1 { margin-bottom: 12px; font-size: clamp(30px, 7vw, 46px); letter-spacing: -0.045em; }
.auth-card > p { color: rgba(255, 255, 255, 0.76); font-weight: 600; }
.auth-debug {
  display: block;
  min-height: 130px;
  margin: 22px 0 0;
  padding: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.82);
  font: 12px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.pf-btn {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid rgba(126, 187, 242, 0.45);
  border-radius: 12px;
  background: rgba(126, 187, 242, 0.25);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.pf-btn:hover { background: rgba(126, 187, 242, 0.34); }
.pf-btn.secondary { border-color: rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.08); font-weight: 700; }
.auth-muted { margin: 14px 0 0 !important; font-size: 12px; color: rgba(255, 255, 255, 0.58) !important; }

@media (max-width: 620px) {
  .contact-option { align-items: flex-start; flex-direction: column; gap: 4px; }
  .contact-option strong { text-align: left; }
  .auth-card { padding: 22px; }
  .auth-actions .pf-btn { width: 100%; }
}
