:root {
  --primary: #3a83d6;
  --primary-dark: #2a6bc0;
  --secondary: #70d4ff;
  --success: #34C759;
  --warning: #FF9500;
  --danger: #FF3B30;
  --text: #1C1C1E;
  --text-secondary: #666666;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --border: #E5E5EA;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
  --shadow-lg: 0 40px 80px rgba(0,0,0,0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scroll reveal ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 64px;
  background: rgba(248,249,250,0.85);
  transition: box-shadow 0.2s, border-bottom 0.2s, backdrop-filter 0.2s;
}
.navbar.scrolled {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: rgba(248,249,250,0.75);
}
.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:hover { color: var(--primary); text-decoration: none; }
.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--primary-dark) !important; }
.nav-open {
  border: 1px solid var(--border);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color 0.15s, color 0.15s;
}
.nav-open:hover { border-color: var(--primary); color: var(--primary) !important; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(58,131,214,0.35);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: rgba(58,131,214,0.06); transform: translateY(-1px); }

/* ── Hero ── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem 5rem;
}
.hero-text h1 {
  /* Sized for the longer positioning headline: a touch smaller than a
     three-word hero, with more line-height because it now wraps. */
  font-size: clamp(1.9rem, 3.9vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 1.1rem;
  color: var(--text);
}
.hero-text .subheadline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 480px;
  line-height: 1.65;
}
.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.hero-caption {
  font-size: 0.82rem;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}
.phone-frame {
  border-radius: 40px;
  overflow: hidden;
  width: 260px;
  aspect-ratio: 9 / 19;
  transform: rotate(-3deg);
  box-shadow: var(--shadow-lg);
  background: #111;
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Origin Story ── */
.origin {
  background: #f0f4f8;
  padding: 5rem 2rem;
  text-align: center;
}
.origin-inner {
  max-width: 760px;
  margin: 0 auto;
}
.origin-emoji { font-size: 72px; line-height: 1; margin-bottom: 1.5rem; }
.origin h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.origin p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.origin p:last-child { margin-bottom: 0; }

/* ── Feature Grid ── */
.features {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}
.section-heading {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 3rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(58,131,214,0.25);
}
.feature-card .emoji { font-size: 2rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.55; }

/* ── Algorithm Spotlight ── */
.algo-section {
  background: linear-gradient(135deg, #1a3f7a 0%, #3a83d6 100%);
  padding: 5rem 2rem;
  text-align: center;
  color: #fff;
}
.algo-inner { max-width: 700px; margin: 0 auto; }
.algo-section h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.algo-section .algo-sub {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 2.5rem;
}
.algo-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 2rem;
}
.algo-pill {
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.5);
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.algo-pill.active {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.algo-pill:hover:not(.active) { border-color: #fff; background: rgba(255,255,255,0.1); }
.algo-desc-box {
  background: rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  font-size: 1.05rem;
  line-height: 1.65;
  min-height: 80px;
}

/* ── Beta Section ── */
.beta-section {
  padding: 5rem 2rem;
  text-align: center;
}
.beta-card {
  background: #eef4fd;
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}
.beta-card h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}
.beta-card p { color: var(--text-secondary); margin-bottom: 1.75rem; font-size: 1.05rem; }
.beta-form {
  display: flex;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto 1rem;
}
.beta-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.beta-form input[type="email"]:focus { border-color: var(--primary); }
.beta-form button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.beta-form button:hover { background: var(--primary-dark); }
.beta-note { font-size: 0.8rem; color: var(--text-secondary); }
.beta-card .beta-note { font-size: 0.8rem; margin: 0.75rem 0 0; }
.beta-success {
  display: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--success);
  padding: 1rem;
}

/* ── Footer ── */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2.5rem 2rem;
  text-align: center;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-bottom: 1rem;
  list-style: none;
}
.footer-links a { color: var(--text-secondary); font-size: 0.9rem; }
.footer-links a:hover { color: var(--primary); }
.footer-meta { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.8; }

/* ── Legal pages ── */
.legal-hero {
  background: linear-gradient(135deg, #1a3f7a 0%, #3a83d6 100%);
  color: #fff;
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.legal-hero h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.legal-hero .last-updated { opacity: 0.8; font-size: 0.9rem; }
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.legal-content h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  color: var(--text);
}
.legal-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
  color: var(--text);
}
.legal-content p { margin-bottom: 0.9rem; color: var(--text-secondary); line-height: 1.7; }
.legal-content ul, .legal-content ol {
  margin: 0.5rem 0 1rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.legal-content li { margin-bottom: 0.3rem; }
.legal-content strong { color: var(--text); }
.legal-content hr { border: none; border-top: 1px solid var(--border); margin: 2rem 0; }
.legal-notice {
  background: #fff8e6;
  border: 1px solid #ffd66b;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-top: 2rem;
  font-size: 0.88rem;
  color: #7a5c00;
}

/* ── Support page ── */
.support-hero {
  background: linear-gradient(135deg, #1a3f7a 0%, #3a83d6 100%);
  color: #fff;
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.support-hero h1 { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.support-hero p { opacity: 0.85; font-size: 1.05rem; }
.support-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  text-align: center;
}
.support-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.support-card .card-emoji { font-size: 2.5rem; margin-bottom: 1rem; }
.support-card h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.5rem; }
.support-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.65; }
.support-card a { font-weight: 600; }
.support-note { font-size: 0.85rem; color: var(--text-secondary); }

/* ── Features page ── */
.features-hero {
  background: linear-gradient(135deg, #1a3f7a 0%, #3a83d6 100%);
  color: #fff;
  padding: 5rem 2rem 4rem;
  text-align: center;
}
.features-hero h1 { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.features-hero p { font-size: 1.1rem; opacity: 0.85; max-width: 560px; margin: 0 auto; }
.feature-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.feature-block {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.feature-block:last-child { border-bottom: none; }
.feature-block.text-only { grid-template-columns: 1fr; max-width: 680px; }
.feature-block-text .block-emoji { font-size: 2.5rem; margin-bottom: 0.75rem; }
.feature-block-text h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }
.feature-block-text p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.85rem;
  font-size: 1rem;
}
.feature-block-text p:last-child { margin-bottom: 0; }
.feature-block-image .phone-frame-sm {
  border-radius: 28px;
  overflow: hidden;
  width: 200px;
  aspect-ratio: 9 / 19;
  box-shadow: var(--shadow-md);
  margin: 0 auto;
  background: #111;
}
.feature-block-image .phone-frame-sm img { width: 100%; height: 100%; object-fit: cover; }

/* ── Hero quote ── */
.hero-quote {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}
.hero-quote .stars { color: #f5a623; font-size: 0.9rem; letter-spacing: 1px; }
.hero-quote em { font-style: italic; }
.hero-quote-icon { font-size: 1.1rem; line-height: 1; flex-shrink: 0; }

/* Disclosure note under the hero CTAs (beta access code gate) */
.hero-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: -0.5rem 0 1.25rem;
  max-width: 40ch;
}

/* ── How it works ── */
.how-it-works {
  background: var(--surface);
  padding: 5rem 2rem;
  text-align: center;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  max-width: 860px;
  margin: 0 auto;
}
.step { position: relative; }
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }
.step p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Who it's for ── */
.audience-section {
  background: var(--bg);
  padding: 5rem 2rem;
  text-align: center;
}
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.audience-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.audience-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.audience-card .emoji { font-size: 2.2rem; margin-bottom: 0.75rem; }
.audience-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.audience-card p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Holiday callout ── */
.holiday-callout {
  background: linear-gradient(135deg, #1a3f7a 0%, #3a83d6 100%);
  padding: 4.5rem 2rem;
  text-align: center;
  color: #fff;
}
.holiday-inner { max-width: 620px; margin: 0 auto; }
.holiday-callout .emoji-large { font-size: 64px; margin-bottom: 1.25rem; line-height: 1; }
.holiday-callout h2 { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 0.85rem; }
.holiday-callout p { font-size: 1.05rem; opacity: 0.9; line-height: 1.7; margin-bottom: 0.75rem; }
.holiday-callout .holiday-note { font-size: 0.92rem; opacity: 0.7; margin-bottom: 0; font-style: italic; }

/* ── Beta trust bullets ── */
.beta-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.5rem;
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.beta-trust span::before { content: '✓ '; color: var(--success); font-weight: 700; }

/* ── Roadmap teaser ── */
.roadmap-teaser {
  margin-top: 2rem;
  text-align: left;
  background: rgba(58,131,214,0.07);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}
.roadmap-teaser h4 {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.65rem;
}
.roadmap-teaser ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.roadmap-teaser li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
  line-height: 1.5;
}
.roadmap-teaser li::before { content: '→ '; color: var(--primary); font-weight: 700; }
.roadmap-vote {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 0.65rem;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .navbar { padding: 0 1.25rem; }
  /* Phones keep the two buttons; the text links are in the footer */
  .nav-links { gap: 0.5rem; }
  .nav-links .nav-secondary { display: none; }
  .nav-links a { white-space: nowrap; font-size: 0.85rem; }
  .nav-links .nav-open, .nav-links .nav-cta { padding: 0.4rem 0.75rem; }

  .hero {
    grid-template-columns: 1fr;
    padding: 3rem 1.25rem 2.5rem;
    gap: 2.5rem;
    text-align: center;
  }
  .hero-text .subheadline { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-visual { order: -1; }
  .phone-frame { width: 200px; transform: none; }

  .features { padding: 3.5rem 1.25rem; }
  .algo-section { padding: 3.5rem 1.25rem; }

  .beta-form { flex-direction: column; }
  .beta-form input[type="email"],
  .beta-form button { width: 100%; }

  .feature-block {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem 0;
  }
  .feature-block-image { order: -1; }

  .origin { padding: 3.5rem 1.25rem; }
  .beta-section { padding: 3.5rem 1.25rem; }
  .how-it-works { padding: 3.5rem 1.25rem; }
  .audience-section { padding: 3.5rem 1.25rem; }
  .holiday-callout { padding: 3.5rem 1.25rem; }
  .roadmap-teaser { text-align: left; }
  .beta-trust { flex-direction: column; gap: 0.3rem; align-items: center; }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.8rem; }
  .section-heading { font-size: 1.6rem; }
  .algo-section h2 { font-size: 1.6rem; }
  .beta-card { padding: 2.5rem 1.25rem; }
  .beta-card h2 { font-size: 1.6rem; }
}

/* ── Analytics consent banner (injected by consent.js) ── */
.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: 640px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.consent-text {
  flex: 1 1 260px;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
}
.consent-text a { color: var(--primary); }
.consent-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}
.consent-btn {
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.consent-btn:hover { border-color: var(--text-secondary); color: var(--text); }
.consent-accept {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.consent-accept:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

@media (max-width: 520px) {
  .consent-banner { padding: 1rem; gap: 0.85rem; }
  .consent-actions { width: 100%; }
  .consent-btn { flex: 1; }
}
