/* ─── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Custom properties ─────────────────────────────────────────────────────── */
:root {
  --bg:         #09090f;
  --surface:    #111118;
  --surface-2:  #18181f;
  --border:     rgba(255,255,255,0.07);
  --border-h:   rgba(255,255,255,0.14);

  --brand:      #5c7cfa;
  --brand-l:    #748ffc;
  --brand-d:    #4263eb;
  --brand-glow: rgba(92,124,250,0.25);

  --text:       #f1f5f9;
  --muted:      #94a3b8;
  --subtle:     #475569;

  --radius:    10px;
  --radius-lg: 18px;
  --radius-xl: 26px;

  --nav-h: 64px;
  --max-w: 1080px;
  --transition: 180ms ease;
}

/* ─── Typography ────────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { color: var(--muted); }

/* ─── Background dot grid ───────────────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
section { padding: 5rem 0; }

/* ─── Navigation ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(9,9,15,0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 100%;
}
.nav__logo {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--brand-l));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}
.nav__links {
  display: flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}
.nav__links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav__links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav__links a.active { color: var(--text); }
.nav__spacer { flex: 1; }
.nav__cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  background: var(--brand);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius);
  transition: background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.nav__cta:hover { background: var(--brand-l); box-shadow: 0 0 18px var(--brand-glow); }
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  background: transparent;
  border: none;
  margin-left: auto;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav__mobile a {
  padding: 0.6rem 0.75rem;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius);
  transition: color var(--transition), background var(--transition);
}
.nav__mobile a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav__mobile .nav__cta { text-align: center; margin-top: 0.5rem; }
.nav__mobile.open { display: flex; }

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-lg);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-l); box-shadow: 0 0 24px var(--brand-glow); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border-h);
}
.btn-ghost:hover { background: rgba(255,255,255,0.10); border-color: var(--border-h); transform: translateY(-1px); }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }

/* ─── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  padding: 6.5rem 0 5rem;
  text-align: center;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-l);
  background: rgba(92,124,250,0.12);
  border: 1px solid rgba(92,124,250,0.25);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 2rem;
}
.hero__badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 8px var(--brand); }
.hero__title {
  font-size: clamp(2.8rem, 6.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.4rem;
  background: linear-gradient(150deg, #ffffff 30%, var(--brand-l) 65%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero__sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero__actions { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.hero__stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}
.hero__stat { text-align: center; }
.hero__stat-n { font-size: 1.6rem; font-weight: 800; color: var(--text); letter-spacing: -0.03em; }
.hero__stat-l { font-size: 0.8rem; color: var(--subtle); margin-top: 0.15rem; }

/* ─── Mockup ─────────────────────────────────────────────────────────────────── */
.mockup-wrap {
  margin-top: 4.5rem;
  position: relative;
  display: flex;
  justify-content: center;
}
.mockup-wrap::before {
  content: '';
  position: absolute;
  inset: 10% 15%;
  background: radial-gradient(ellipse, var(--brand-glow) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.mockup {
  width: min(380px, 90vw);
  background: var(--surface);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  position: relative;
}
.mockup__bar {
  background: var(--surface-2);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.mockup__dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup__dot:nth-child(1) { background: #ef4444; }
.mockup__dot:nth-child(2) { background: #f59e0b; }
.mockup__dot:nth-child(3) { background: #22c55e; }
.mockup__url {
  flex: 1;
  height: 24px;
  background: rgba(255,255,255,0.05);
  border-radius: 6px;
  margin-left: 0.5rem;
  display: flex;
  align-items: center;
  padding: 0 0.6rem;
  font-size: 0.7rem;
  color: var(--subtle);
  overflow: hidden;
  white-space: nowrap;
}
.mockup__body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.mockup__progress { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.mockup__progress-fill { height: 100%; width: 35%; background: var(--brand); border-radius: 2px; }
.mockup__card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.mockup__label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-l);
  margin-bottom: 0.6rem;
}
.mockup__question {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.4;
}
.mockup__options { display: flex; flex-direction: column; gap: 0.5rem; }
.mockup__opt {
  padding: 0.5rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}
.mockup__opt.correct {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.35);
  color: #86efac;
}
.mockup__counter {
  font-size: 0.75rem;
  color: var(--subtle);
  text-align: center;
}

/* ─── Section labels ─────────────────────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}
.section-title { margin-bottom: 1rem; }
.section-sub { max-width: 520px; margin-bottom: 3rem; }

/* ─── Features ───────────────────────────────────────────────────────────────── */
.features { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { border-color: var(--border-h); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.feature-card__icon {
  width: 44px;
  height: 44px;
  background: rgba(92,124,250,0.12);
  border: 1px solid rgba(92,124,250,0.2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1.1rem;
}
.feature-card h3 { color: var(--text); margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9rem; line-height: 1.6; }

/* ─── How it works ───────────────────────────────────────────────────────────── */
.steps__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}
.steps__grid::before {
  content: '';
  position: absolute;
  top: 20px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 1px;
  background: linear-gradient(90deg, var(--border), var(--brand-glow), var(--border));
}
.step { text-align: center; padding: 0 0.5rem; }
.step__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand-l);
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
}
.step h3 { color: var(--text); margin-bottom: 0.4rem; font-size: 0.95rem; }
.step p { font-size: 0.85rem; }

/* ─── CTA ────────────────────────────────────────────────────────────────────── */
.cta-section {
  background: linear-gradient(135deg, rgba(92,124,250,0.1) 0%, rgba(124,58,237,0.08) 100%);
  border-top: 1px solid rgba(92,124,250,0.15);
  border-bottom: 1px solid rgba(92,124,250,0.15);
  text-align: center;
  padding: 6rem 0;
}
.cta-section h2 { margin-bottom: 1rem; }
.cta-section p { margin-bottom: 2rem; }
.cta-section .hero__actions { margin: 0; }

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer__brand p { font-size: 0.875rem; color: var(--subtle); margin-top: 0.5rem; max-width: 260px; }
.footer__col h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--subtle); margin-bottom: 0.85rem; }
.footer__col a {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
  padding: 0.2rem 0;
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--text); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--subtle);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.footer__bottom a { color: var(--subtle); transition: color var(--transition); }
.footer__bottom a:hover { color: var(--muted); }

/* ─── About / App pages ──────────────────────────────────────────────────────── */
.page-hero { padding: 5rem 0 3rem; }
.page-hero .section-label { margin-bottom: 0.75rem; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.page-hero p { font-size: 1.1rem; max-width: 580px; }

.prose-section { padding: 0 0 4rem; }
.prose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.prose-card h3 { color: var(--text); margin-bottom: 0.6rem; }
.prose-card p { font-size: 0.9rem; line-height: 1.65; }

.card-types { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.card-type {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.card-type__badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-l);
  background: rgba(92,124,250,0.12);
  border: 1px solid rgba(92,124,250,0.2);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.card-type__info h4 { font-size: 0.9rem; color: var(--text); margin-bottom: 0.25rem; }
.card-type__info p { font-size: 0.85rem; }

/* ─── Legal pages ────────────────────────────────────────────────────────────── */
.legal { max-width: 760px; }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 0.6rem; color: var(--text); }
.legal h2:first-of-type { margin-top: 0; }
.legal p { font-size: 0.95rem; margin-bottom: 0.75rem; color: var(--muted); }
.legal ul { padding-left: 1.5rem; margin-bottom: 0.75rem; }
.legal ul li { font-size: 0.95rem; color: var(--muted); margin-bottom: 0.3rem; list-style: disc; }
.legal a { color: var(--brand-l); }
.legal a:hover { text-decoration: underline; }
.legal-edit-hint {
  background: rgba(92,124,250,0.08);
  border: 1px solid rgba(92,124,250,0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.82rem;
  color: var(--brand-l);
  margin-bottom: 2.5rem;
}

/* ─── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__cta:not(.mobile-only) { display: none; }
  .nav__burger { display: flex; }

  .features__grid { grid-template-columns: 1fr; }
  .steps__grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .steps__grid::before { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: span 2; }
  .prose-grid { grid-template-columns: 1fr; }
  section { padding: 3.5rem 0; }
  .hero { padding: 4rem 0 3rem; }
}
@media (max-width: 480px) {
  .hero__stats { gap: 1.5rem; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__brand { grid-column: span 1; }
  .steps__grid { grid-template-columns: 1fr; }
}

/* ─── Animation ──────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate { opacity: 0; animation: fadeUp 0.5s ease forwards; }
.animate.delay-1 { animation-delay: 0.1s; }
.animate.delay-2 { animation-delay: 0.2s; }
.animate.delay-3 { animation-delay: 0.3s; }
.animate.delay-4 { animation-delay: 0.4s; }
