/* Palette mirrors frontend/lib/theme/ara_theme.dart. */
:root {
  --bg: #FBF9F5;
  --surface: #FFFBF3;
  --sand: #F4E7D2;
  --parchment: #EBDABC;
  --espresso: #29211B;
  --rust: #C85F2D;
  --rust-dark: #A94C20;
  --muted: #7B746B;
  --outline: #D7C7AD;
  --divider: #E8DCC9;

  --lvl-new: #FF6A3D;
  --lvl-new-bg: rgba(255, 106, 61, 0.2);
  --lvl-learning: #E0A24B;
  --lvl-learning-bg: rgba(224, 162, 75, 0.13);
  --lvl-familiar: #6B8E5A;
  --lvl-familiar-bg: rgba(107, 142, 90, 0.07);
  --lvl-known: #2A2A2A;

  --radius: 8px;
  --wrap: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--espresso);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }

a { color: var(--rust); }

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--divider);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--espresso);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.brand img { border-radius: var(--radius); }

.top-nav {
  display: none;
  gap: 24px;
  margin-left: auto;
}

.top-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.top-nav a:hover { color: var(--espresso); }

.lang-switch {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.top-nav + .lang-switch { margin-left: 0; }

@media (min-width: 720px) {
  .top-nav { display: flex; }
}

.lang-switch a {
  padding: 4px 8px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.lang-switch a:hover { color: var(--espresso); }

.lang-switch a[aria-current="page"] {
  background: var(--sand);
  color: var(--espresso);
  font-weight: 600;
}

/* Buttons — same shape as the app's FilledButton / OutlinedButton */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.btn-primary { background: var(--rust); color: #fff; }
.btn-primary:hover { background: var(--rust-dark); }

.btn-outline { border: 1px solid var(--rust); color: var(--rust); }
.btn-outline:hover { background: var(--sand); }

/* Hero */
.hero { padding: 48px 0 64px; }

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero { padding: 80px 0 96px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 64px; }
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--rust);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 700;
}

.lead {
  margin: 20px 0 28px;
  font-size: 18px;
  color: #4A4038;
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.platforms {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Reader demo — modelled on the reader's sentence plaques and word sheet */
.demo {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 48px -32px rgba(41, 33, 27, 0.35);
}

.demo-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 12px;
}

.sentence {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.75;
}

.w {
  font: inherit;
  color: inherit;
  padding: 1px 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
}

button.w {
  cursor: pointer;
  transition: box-shadow 0.15s;
}

button.w:hover,
button.w.is-active { box-shadow: inset 0 -2px 0 currentColor; }

button.w:focus-visible { outline: 2px solid var(--rust); outline-offset: 1px; }

.w-new { color: var(--lvl-new); background: var(--lvl-new-bg); }
.w-learning { color: var(--lvl-learning); background: var(--lvl-learning-bg); }
.w-familiar { color: var(--lvl-familiar); background: var(--lvl-familiar-bg); }
.w-known { color: var(--lvl-known); }

.card {
  background: var(--bg);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 16px 18px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-lemma { font-size: 20px; font-weight: 700; }

.pill {
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill-new { color: var(--lvl-new); background: var(--lvl-new-bg); }
.pill-learning { color: #A87420; background: rgba(224, 162, 75, 0.2); }
.pill-familiar { color: var(--lvl-familiar); background: rgba(107, 142, 90, 0.15); }
.pill-known { color: var(--lvl-known); background: var(--sand); }

.card-sub {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.card-tr { font-size: 18px; font-weight: 600; color: var(--rust); }

.card-note { margin-top: 4px; font-size: 14px; color: var(--muted); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.legend-item { display: inline-flex; align-items: center; gap: 6px; }

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-new { background: var(--lvl-new); }
.dot-learning { background: var(--lvl-learning); }
.dot-familiar { background: var(--lvl-familiar); }
.dot-known { background: var(--lvl-known); }

/* Sections */
.section { padding: 64px 0; }

@media (min-width: 960px) {
  .section { padding: 96px 0; }
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

.section h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  max-width: 22em;
}

/* The one-paragraph pitch, framed like the demo card so it isn't a wall of text */
.pitch {
  max-width: 48em;
  margin: 0 auto;
  padding: 28px 22px;
  background: var(--surface);
  border: 1px solid var(--divider);
  border-top: 4px solid var(--rust);
  border-radius: 16px;
  box-shadow: 0 24px 48px -32px rgba(41, 33, 27, 0.35);
}

@media (min-width: 640px) {
  .pitch { padding: 44px 52px; }
}

.pitch h2 { margin: 0 0 24px; text-wrap: balance; }

.pitch-text {
  margin: 0 0 16px;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.7;
  color: #5A5047;
}

.pitch-text strong { color: var(--espresso); font-weight: 600; }

.pitch-text .hl {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--sand);
  color: var(--espresso);
  font-weight: 600;
  white-space: nowrap;
}

.pitch-punch {
  margin: 28px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--divider);
  font-size: clamp(20px, 2.6vw, 24px);
  font-weight: 700;
  line-height: 1.35;
  color: var(--rust);
}

.step p { margin: 8px 0 0; color: #5A5047; font-size: 15px; }

.steps {
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  gap: 32px;
}

@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.step-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--espresso);
  color: var(--parchment);
  font-weight: 700;
  margin-bottom: 14px;
}

.step h3 { font-size: 20px; font-weight: 600; }

/* Closing band — the app icon's espresso + parchment */
.closing {
  background: var(--espresso);
  color: var(--parchment);
  padding: 64px 0;
}

.closing-inner {
  display: grid;
  gap: 24px;
  justify-items: start;
}

@media (min-width: 840px) {
  .closing-inner {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
  }
}

.closing img { border-radius: 16px; }

.closing h2 { font-size: clamp(24px, 3.5vw, 32px); font-weight: 700; color: #FBF3E4; }

.closing p { margin: 8px 0 0; color: rgba(235, 218, 188, 0.8); max-width: 36em; }

/* Footer */
.foot {
  padding: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.foot .lang-switch { margin-left: 0; }

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