/* DeuLern — Junior Achievement SoCal. Tokens below are verbatim from design.md; retheme here only. */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/manrope-var-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  /* colors — light-dark(light, dark). Dark side is derived; design.md specifies light only. */
  color-scheme: light dark;
  --primary: light-dark(#285f74, #a7e8ea);
  --secondary: light-dark(#00a0af, #4fd3de);
  --tertiary: #e6e33c;
  --on-accent: #285f74; /* ink on tertiary/cyan fills — dark in both themes */
  --neutral: light-dark(#ffffff, #0f2530);
  --surface: light-dark(#f6fbfc, #163540);
  --surface-strong: light-dark(#eaf2f4, #1e4553); /* primary-10 */
  --on-surface: light-dark(#285f74, #eaf2f4);
  --on-surface-muted: light-dark(#5f8f9f, #9fc0ca); /* primary-60 */
  --accent-cyan: #a7e8ea;
  --border: light-dark(#285f7440, #a7e8ea33);
  --border-subtle: light-dark(#285f741f, #a7e8ea1f);
  --glow-cyan: light-dark(#a7e8ea66, #a7e8ea1c);
  --glow-lime: light-dark(#dceb4a4d, #dceb4a14);

  /* radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 16px;
  --r-xl: 28px;
  --r-full: 9999px;

  /* spacing */
  --s-xs: 6px;
  --s-sm: 14px;
  --s-md: 28px;
  --s-lg: 40px;
  --s-xl: 88px;

  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --container: 1200px;
}

/* the switcher: the toggle sets data-theme, which pins color-scheme and therefore every
   light-dark() above. No attribute = follow the OS. Works without JS, just not switchable. */
:root[data-theme='light'] { color-scheme: light; }
:root[data-theme='dark'] { color-scheme: dark; }

/* reset — the few lines that actually matter */
*,
*::before,
*::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
:target { scroll-margin-top: 96px; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--neutral);
  color: var(--on-surface);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  line-height: 23px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- type scale (design.md) ---------- */
.t-display {
  font-size: clamp(34px, 6.4vw, 57px);
  font-weight: 800;
  line-height: 1.19;
}
.t-h2 {
  font-size: clamp(28px, 4.2vw, 36px);
  font-weight: 800;
  line-height: 1.22;
}
.t-h3 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 800;
  line-height: 1.21;
}
/* body-lg, but at 1.5 line-height — design.md's 24px is too tight for a multi-line lead */
.t-lead {
  font-size: clamp(17px, 2vw, 20px);
  font-weight: 600;
  line-height: 1.5;
  color: var(--on-surface-muted);
}
.t-small {
  font-size: 14px;
  line-height: 20px;
  color: var(--on-surface-muted);
}
.t-eyebrow {
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
}

/* ---------- layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--s-md);
}
/* half of design.md's 88px xl each side, so the gap BETWEEN sections lands on the rhythm */
.section {
  padding-block: clamp(36px, 6vw, 44px);
  border-top: 1px solid var(--border-subtle);
}
.section__head {
  max-width: 62ch;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section__head > * + * { margin-top: var(--s-sm); }

/* ---------- focus ---------- */
:where(a, button, summary, details):focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: absolute;
  left: var(--s-md);
  top: var(--s-sm);
  z-index: 10;
  padding: var(--s-xs) var(--s-sm);
  border-radius: var(--r-full);
  background: var(--primary);
  color: var(--neutral);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--neutral) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  min-height: 72px;
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  color: var(--primary);
  font-size: 21px;
  font-weight: 800;
  text-decoration: none;
}
.wordmark b { color: var(--secondary); font-weight: 800; }
.header__inner .wordmark { margin-right: auto; }

/* ---------- theme toggle ----------
   One stateless half-disc icon in both themes — nothing to swap, so no icon state to keep
   in sync with color-scheme. */
.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  transition: border-color .18s ease;
}
.theme-toggle:hover { border-color: var(--secondary); }
.theme-toggle svg { width: 20px; height: 20px; }

/* ---------- language switcher ----------
   EN sits left, DE right. The active side becomes a raised knob carrying that language's
   flag; the inactive side stays plain text. Which side is active comes from .lang--en /
   .lang--de on the element, set per page — pure CSS, no JS, no state. */
.lang {
  display: inline-flex;
  align-items: center;
  gap: var(--s-xs);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  background: var(--surface);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color .18s ease;
}
.lang:hover { border-color: var(--secondary); }
.lang__opt {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: var(--r-full);
  color: var(--on-surface-muted);
}
.lang__opt svg { width: 20px; height: 14px; border-radius: 2px; }
/* only the active option shows its flag and gets the knob */
.lang--en .lang__opt--de svg,
.lang--de .lang__opt--en svg { display: none; }
.lang--en .lang__opt--en,
.lang--de .lang__opt--de {
  background: var(--accent-cyan);
  color: var(--on-accent);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-sm);
  min-height: 56px;
  padding: var(--s-sm) var(--s-md);
  border: 1px solid transparent;
  border-radius: var(--r-full);
  font-size: 17px;
  font-weight: 700;
  line-height: 20px;
  text-decoration: none;
  text-align: center;
  text-wrap: balance; /* long German CTA labels overflow narrow cards if forced onto one line */
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--tertiary);
  color: var(--on-accent);
}
.btn--primary:hover { background: color-mix(in srgb, var(--tertiary) 88%, var(--on-accent)); }
.btn--secondary {
  min-height: 48px;
  background: var(--neutral);
  color: var(--primary);
  border-color: var(--border);
}
.btn--secondary:hover { background: var(--surface); border-color: var(--primary); }

/* ---------- chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs);
}
.chip {
  padding: var(--s-xs) 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-full);
  background: var(--surface);
  color: var(--on-surface-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.chip--accent {
  background: var(--tertiary);
  border-color: transparent;
  color: var(--on-accent);
}

/* ---------- hero ---------- */
.hero {
  padding-block: clamp(44px, 7vw, 88px) clamp(40px, 7vw, 64px);
  background:
    radial-gradient(60% 90% at 12% 0%, var(--glow-cyan) 0%, transparent 62%),
    radial-gradient(45% 70% at 92% 8%, var(--glow-lime) 0%, transparent 60%);
}
.hero__inner {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
}
.hero__copy > * + * { margin-top: var(--s-sm); }
.hero__copy .t-lead { max-width: 52ch; }
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm) var(--s-md);
  margin-top: var(--s-lg);
}
.hero__proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm) var(--s-lg);
  margin-top: var(--s-lg);
  padding-top: var(--s-md);
  border-top: 1px solid var(--border-subtle);
}
.hero__proof li {
  display: flex;
  align-items: center;
  gap: var(--s-xs);
  color: var(--on-surface-muted);
  font-size: 15px;
}
.hero__proof svg { flex: none; width: 18px; height: 18px; color: var(--secondary); }

/* hero panel — stacked app previews */
.stack { display: grid; gap: var(--s-sm); }
.stack__row {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  padding: var(--s-sm);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--neutral);
}
.stack__row:nth-child(2) { margin-left: clamp(0px, 3vw, 32px); }
.stack__row:nth-child(3) { margin-left: clamp(0px, 6vw, 64px); }
.stack__glyph {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--surface-strong);
  color: var(--primary);
  font-size: 20px;
  font-weight: 800;
}
.stack__row b { display: block; font-size: 17px; font-weight: 700; }
.stack__row span { color: var(--on-surface-muted); font-size: 14px; }

/* ---------- app cards ---------- */
.cards {
  display: grid;
  gap: var(--s-sm);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  gap: var(--s-sm);
  padding: var(--s-md);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--neutral);
  color: var(--on-surface);
}
.card p { color: var(--on-surface-muted); }
.card .btn { margin-top: auto; }
.card__num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--secondary);
}

/* ---------- why ---------- */
.why {
  display: grid;
  gap: var(--s-sm);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.why li {
  padding: var(--s-md);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--surface);
}
.why b {
  display: block;
  margin-block: var(--s-sm) var(--s-xs);
  font-size: 20px;
  font-weight: 700;
}
.why p { color: var(--on-surface-muted); }
.why svg { width: 26px; height: 26px; color: var(--secondary); }

/* ---------- faq ---------- */
.faq { display: grid; gap: var(--s-xs); max-width: 860px; }
.faq details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  background: var(--surface);
}
.faq details[open] { border-color: var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-sm);
  padding: var(--s-sm) var(--s-md);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  flex: none;
  color: var(--secondary);
  font-size: 24px;
  line-height: 1;
}
.faq details[open] summary::after { content: '\2212'; }
.faq p {
  padding: 0 var(--s-md) var(--s-sm);
  color: var(--on-surface-muted);
}

/* ---------- cta band ---------- */
.band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-xl);
  background: linear-gradient(120deg, var(--glow-cyan), transparent 62%), var(--surface);
}
.band > div { max-width: 56ch; }
.band > div > * + * { margin-top: var(--s-xs); }

/* ---------- footer ---------- */
.footer {
  padding-block: clamp(40px, 6vw, 72px) var(--s-md);
  border-top: 1px solid var(--border-subtle);
}
.footer__grid {
  display: grid;
  gap: var(--s-lg);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.footer h2 {
  margin-bottom: var(--s-xs);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-muted);
}
.footer li + li { margin-top: 6px; }
.footer a {
  color: var(--on-surface-muted);
  font-size: 15px;
  text-decoration: none;
}
.footer a:hover { color: var(--secondary); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs) var(--s-md);
  justify-content: space-between;
  margin-top: var(--s-md);
  padding-top: var(--s-sm);
  border-top: 1px solid var(--border-subtle);
  color: var(--on-surface-muted);
  font-size: 13px;
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .header__inner { gap: var(--s-sm); }
  .hero__inner { grid-template-columns: 1fr; }
  .stack__row:nth-child(2),
  .stack__row:nth-child(3) { margin-left: 0; }
  .btn { width: 100%; }
  .lang, .card .btn { width: auto; }
  .hero__cta .btn { flex: 1 1 220px; }
}
