/* LangPrep — shared styles. Pure CSS, no build step. */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-soft-2: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
  --border: #e2e8f0;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --white: #ffffff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 6px 20px rgba(15, 23, 42, .08);
  --shadow-lg: 0 20px 45px rgba(79, 70, 229, .18);
  --maxw: 1120px;
  --maxw-read: 760px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Inter, Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.2; color: var(--text); margin: 0 0 .5em; }

p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* Accessibility helpers */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-ghost { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto; }
.brand span b { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  color: var(--muted);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
}
.nav a:hover { color: var(--text); background: var(--bg-soft-2); text-decoration: none; }
.nav .btn { margin-left: 6px; padding: 9px 18px; }
/* Keep the primary CTA white-on-indigo despite the .nav a color rules above */
.nav a.btn-primary, .nav a.btn-primary:hover { color: #fff; background: var(--accent); }
.nav a.btn-primary:hover { background: var(--accent-hover); }

.nav-toggle {
  display: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 44px; height: 44px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--text); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 480px at 78% -8%, rgba(99, 102, 241, .20), transparent 60%),
    linear-gradient(180deg, #f5f3ff 0%, #ffffff 70%);
  padding: 72px 0 64px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  font-size: .85rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -.02em;
  margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 1.18rem;
  color: var(--muted);
  max-width: 36ch;
  margin-bottom: 28px;
}

.store-badges { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge { display: inline-block; transition: transform .12s ease, box-shadow .15s ease; border-radius: 12px; }
.store-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.store-badge svg { height: 54px; width: auto; }
.badge-note { color: var(--muted-2); font-size: .82rem; margin-top: 14px; }

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 260px;
  max-width: 70vw;
  aspect-ratio: 9 / 18.5;
  background: #0b1020;
  border-radius: 38px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.12);
  transform: rotate(2deg);
}
.phone-screen {
  height: 100%;
  border-radius: 28px;
  background: linear-gradient(180deg, #eef2ff, #ffffff 45%);
  padding: 22px 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ps-title { font-weight: 800; font-size: 1.1rem; }
.ps-sub { color: var(--muted-2); font-size: .8rem; margin-top: -8px; }
.ps-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.ps-card .row { display: flex; align-items: center; justify-content: space-between; }
.ps-score { font-weight: 800; color: var(--accent); }
.ps-bar { height: 8px; border-radius: 999px; background: var(--bg-soft-2); margin-top: 8px; overflow: hidden; }
.ps-bar i { display: block; height: 100%; background: linear-gradient(90deg, #6366f1, #4f46e5); border-radius: 999px; }
.ps-pill { display: inline-block; font-size: .72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.ps-muted { color: var(--muted-2); font-size: .78rem; }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.2rem); letter-spacing: -.01em; }
.section-head p { color: var(--muted); font-size: 1.05rem; margin: 0; }

/* Stats band */
.stats {
  background: var(--accent);
  background: linear-gradient(120deg, #4f46e5, #6d28d9);
  color: #fff;
  padding: 40px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  text-align: center;
}
.stat .num { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800; letter-spacing: -.01em; }
.stat .label { color: rgba(255,255,255,.85); font-size: .9rem; }
.stats-note { text-align: center; color: rgba(255,255,255,.7); font-size: .78rem; margin: 22px 0 0; }

/* Card grids */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .16s ease, border-color .16s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cbd5e1; }

.exam-card .flag {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; font-size: .95rem;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  margin-bottom: 14px;
}
.exam-card h3 { font-size: 1.12rem; margin-bottom: 4px; }
.exam-card .lang { color: var(--accent); font-weight: 600; font-size: .85rem; }
.exam-card p { color: var(--muted); font-size: .92rem; margin: 8px 0 0; }

.feature-card .ficon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-card .ficon svg { width: 26px; height: 26px; stroke: var(--accent); }
.feature-card h3 { font-size: 1.1rem; }
.feature-card p { color: var(--muted); font-size: .95rem; margin: 0; }

.features { background: var(--bg-soft); }

/* Testimonials */
.testi-card { display: flex; flex-direction: column; gap: 14px; }
.testi-card .stars { color: #f59e0b; letter-spacing: 2px; }
.testi-card blockquote { margin: 0; color: var(--text); font-size: 1rem; }
.testi-card .who { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.testi-card .avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.testi-card .who .name { font-weight: 700; font-size: .92rem; }
.testi-card .who .loc { color: var(--muted-2); font-size: .82rem; }

/* CTA */
.cta {
  text-align: center;
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(99,102,241,.18), transparent 60%),
    var(--bg-soft);
}
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.cta p { color: var(--muted); font-size: 1.08rem; max-width: 48ch; margin: 0 auto 26px; }
.cta .store-badges { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 0 28px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer-brand .brand { color: #fff; }
.footer-brand p { color: #94a3b8; font-size: .9rem; margin-top: 12px; max-width: 36ch; }
.footer-col h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a, .footer-col address { color: #cbd5e1; font-style: normal; font-size: .92rem; line-height: 1.6; }
.footer-col a:hover { color: #fff; }
.legal-line {
  margin-top: 26px;
  color: #94a3b8;
  font-size: .82rem;
  line-height: 1.7;
}
.legal-line strong { color: #e2e8f0; }
.copyright {
  margin-top: 18px;
  color: #64748b;
  font-size: .82rem;
}

/* ---------- Legal pages ---------- */
.legal-hero {
  background: linear-gradient(180deg, #f5f3ff, #ffffff);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
}
.legal-hero .container { max-width: var(--maxw-read); }
.legal-hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 8px; }
.legal-hero .updated { color: var(--muted-2); font-size: .92rem; }
.legal-hero .intro { color: var(--muted); margin-top: 16px; }

.legal-body { padding: 40px 0 72px; }
.legal-body .container { max-width: var(--maxw-read); }
.legal-body section { padding: 0; margin-bottom: 38px; }
.legal-body h2 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 12px;
  scroll-margin-top: 80px;
}
.legal-body h3 { font-size: 1.08rem; margin-top: 22px; }
.legal-body p, .legal-body li { color: var(--muted); }
.legal-body strong { color: var(--text); }
.legal-body ul, .legal-body ol { padding-left: 22px; margin: 0 0 1rem; }
.legal-body li { margin-bottom: 8px; }

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 40px;
}
.toc h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-2); margin: 0 0 12px; }
.toc ol { columns: 2; column-gap: 28px; margin: 0; padding-left: 18px; }
.toc li { margin-bottom: 6px; color: var(--accent); }

.callout {
  background: var(--accent-soft);
  border: 1px solid #c7d2fe;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 0 0 1rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent-hover); }

.contact-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.contact-box p { margin-bottom: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { order: -1; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 66px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    padding: 12px 16px 18px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
  .nav-toggle { display: inline-flex; }

  section { padding: 48px 0; }
  .hero { padding: 48px 0 44px; }
  .toc ol { columns: 1; }
}

@media (max-width: 560px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; }
  .store-badge svg { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
