/* ULearn — landing + legal pages.
   Tokens mirror apps/mobile/lib/core/theme/tokens.dart so the site, the app
   and the RevenueCat paywall read as one product. */

:root {
  --bg: #f6f1e9;
  --surface: #ffffff;
  --surface-alt: #f6f1e9;
  --text: #1c1b33;
  --text-dim: #5f5f75;
  --primary: #7452f5;
  --primary-dark: #5b3fd6;
  --primary-soft: #efeafe;
  --success: #3fa873;
  --warning: #e8833a;
  --outline: #e7e2f2;
  --grad: linear-gradient(135deg, #8a66ff 0%, #6847e8 100%);
  --shadow: 0 8px 24px rgba(55, 43, 107, 0.08);
  --shadow-cta: 0 10px 24px rgba(116, 82, 245, 0.33);
  --radius: 24px;
  --radius-sm: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12121c;
    --surface: #1c1c2b;
    --surface-alt: #24243a;
    --text: #f0eef8;
    --text-dim: #a5a3bc;
    --primary: #9b84ff;
    --primary-dark: #7452f5;
    --primary-soft: #2b2545;
    --success: #5fcb96;
    --warning: #f2a063;
    --outline: #32304a;
    --grad: linear-gradient(135deg, #9b84ff 0%, #6847e8 100%);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

/* ---------- header ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--outline);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  background: var(--grad);
  display: grid; place-items: center;
  font-size: 17px;
}

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--text-dim); font-size: 15px; font-weight: 600; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.lang {
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 5px 13px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
}
.lang:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

@media (max-width: 720px) {
  .nav-links a:not(.lang) { display: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  box-shadow: var(--shadow-cta);
  transition: transform 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--outline);
  box-shadow: none;
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- hero ---------- */

.hero { padding: 88px 0 72px; text-align: center; }

.badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 26px;
}

h1 {
  font-size: clamp(38px, 6.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 22px;
}
h1 .accent {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 36px;
}

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-note { margin-top: 20px; font-size: 14px; color: var(--text-dim); }

/* ---------- sections ---------- */

section { padding: 72px 0; }

h2 {
  font-size: clamp(28px, 3.8vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 14px;
  text-align: center;
}

.section-lede {
  text-align: center;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 48px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.card p { margin: 0; color: var(--text-dim); font-size: 16px; }

.icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: grid; place-items: center;
  font-size: 22px;
  margin-bottom: 18px;
}

/* numbered steps */
.steps { counter-reset: step; }
.steps .card { position: relative; }
.steps .card::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 26px; right: 26px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 800;
}

/* ---------- faq ---------- */

details {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 12px;
}
details[open] { border-color: var(--primary); }
summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 17px;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--primary); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--text-dim); margin: 14px 0 0; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--outline);
  padding: 48px 0 56px;
  margin-top: 40px;
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--text-dim); font-size: 15px; }
.foot-links a:hover { color: var(--primary); text-decoration: none; }
.copy { color: var(--text-dim); font-size: 14px; }

/* ---------- legal pages ---------- */

.legal { padding: 56px 0 24px; }
.legal h1 { font-size: clamp(30px, 4.5vw, 42px); text-align: left; margin-bottom: 10px; }
.legal .updated { color: var(--text-dim); font-size: 15px; margin: 0 0 40px; }
.legal h2 {
  text-align: left;
  font-size: 23px;
  margin: 40px 0 12px;
  letter-spacing: -0.015em;
}
.legal h3 { font-size: 18px; margin: 26px 0 8px; font-weight: 800; }
.legal p, .legal li { color: var(--text-dim); }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--text); }
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 15px;
}
.legal th, .legal td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--outline);
  vertical-align: top;
}
.legal th { color: var(--text); font-weight: 800; }
.legal td { color: var(--text-dim); }
.table-scroll { overflow-x: auto; }

.callout {
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 26px 0;
}
.callout p { color: var(--text); margin: 0; }

.toc {
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius-sm);
  padding: 22px 26px;
  margin-bottom: 40px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--text-dim); }
.toc a:hover { color: var(--primary); }
