/* Sprachvogel landing site. Tokens mirror lib/shared/widgets/glass.dart. */

:root {
  color-scheme: light dark;

  --purple: #6C4AE6;
  --purple-2: #7C5CF0;
  --amber: #FFB22E;
  --ink: #241B3D;
  --muted: #5F5873;          /* glass.dart #6B647D, darkened a touch for AA on glass */
  --link: #5B39D6;

  --bg-1: #EFEAFF;
  --bg-2: #F5F2FB;
  --bg-3: #EAE3FA;
  --glow: rgba(124, 92, 240, 0.18);

  --glass: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.72);
  --glass-shadow: 0 10px 26px rgba(64, 44, 130, 0.2);
  --hairline: rgba(64, 44, 130, 0.13);
  --radius: 22px;
  --blur: 14px;

  --chip: rgba(108, 74, 230, 0.1);
  --chip-ink: #4A2FC0;

  --der-bg: #BBDEFB; --der-ink: #0D3C78;
  --die-bg: #FFCDD2; --die-ink: #8A1C1C;
  --das-bg: #C8E6C9; --das-ink: #1B5E20;

  --btn-ink: #FFFFFF;
  --focus: #241B3D;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --wrap: 1080px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #F1EEFA;
    --muted: #BDB6D2;
    --link: #C3B4FF;

    --bg-1: #17112E;
    --bg-2: #120D24;
    --bg-3: #1B1438;
    --glow: rgba(124, 92, 240, 0.28);

    --glass: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.13);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --hairline: rgba(255, 255, 255, 0.1);

    --chip: rgba(195, 180, 255, 0.14);
    --chip-ink: #D9CFFF;

    --der-bg: #1E3A5F; --der-ink: #CFE4FF;
    --die-bg: #5A2229; --die-ink: #FFD9DD;
    --das-bg: #1F4A2A; --das-ink: #D2F2D6;

    --focus: #FFB22E;
  }
}

/* --- Base ------------------------------------------------------------- */

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--bg-2);
  background-image:
    radial-gradient(60rem 36rem at 85% -10%, var(--glow), transparent 70%),
    radial-gradient(40rem 30rem at -10% 30%, var(--glow), transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2) 45%, var(--bg-3));
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 10px 16px;
  background: var(--purple);
  color: #fff;
  border-radius: 12px;
  z-index: 10;
}
.skip:focus { top: 12px; }

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

/* --- Glass surface ---------------------------------------------------- */

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(var(--blur));
  backdrop-filter: blur(var(--blur));
}

/* --- Header ----------------------------------------------------------- */

.site-header { padding: 14px 0; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand img { width: 36px; height: 36px; border-radius: 10px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  display: none;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 10px;
}
.nav a:not(.btn):hover { color: var(--ink); background: var(--chip); }

@media (min-width: 820px) {
  .nav a:not(.btn) { display: inline-block; }
}

/* --- Buttons ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(180deg, var(--purple-2), var(--purple));
  color: var(--btn-ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(108, 74, 230, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(108, 74, 230, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  text-decoration: none;
}
.btn:active { transform: translateY(0); }
.btn--small { min-height: 40px; padding: 8px 16px; font-size: 0.95rem; }
.btn svg { width: 18px; height: 18px; }

/* --- Hero ------------------------------------------------------------- */

.hero { padding: 28px 0 56px; }
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--chip-ink);
  font-size: 0.875rem;
  font-weight: 600;
}

.lead {
  font-size: clamp(1.1rem, 2.6vw, 1.25rem);
  color: var(--muted);
  max-width: 34em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
}
.cta-note {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}
.cta-note::before {
  content: "";
  display: inline-block;
  width: 10px; height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--amber);
  vertical-align: 0.05em;
}

.hero-visual {
  position: relative;
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  padding-top: 52px;
}
.hero-bird {
  position: absolute;
  top: 0;
  left: 50%;
  width: 104px;
  height: 104px;
  margin-left: -52px;
  border-radius: 28px;
  box-shadow: 0 14px 30px rgba(108, 74, 230, 0.35);
  z-index: 1;
  animation: float 6s ease-in-out infinite;
}

.demo-card { position: relative; padding: 72px 22px 22px; text-align: center; }
.demo-card .level {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--chip-ink);
  background: var(--chip);
  padding: 3px 10px;
  border-radius: 999px;
}
.word-face {
  border-radius: 16px;
  padding: 20px 14px;
  background: var(--die-bg);
  color: var(--die-ink);
}
.word-face .article { font-size: 1rem; font-weight: 600; opacity: 0.9; }
.word-face .word { display: block; font-size: 2rem; font-weight: 750; letter-spacing: -0.02em; line-height: 1.2; }
.word-face .plural { font-size: 0.95rem; }
.demo-card .meaning { margin: 16px 0 4px; font-weight: 650; font-size: 1.125rem; }
.demo-card .example { margin: 0; color: var(--muted); font-size: 0.95rem; }
.demo-card .example span { display: block; }
.grades {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.grades span {
  padding: 9px 0;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 650;
  background: var(--chip);
  color: var(--chip-ink);
}
.demo-caption {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (min-width: 880px) {
  .hero { padding: 48px 0 80px; }
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
}

/* --- Stats strip ------------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin: 40px 0 0;
  padding: 0;
  overflow: hidden;
}
.stats div { display: flex; flex-direction: column-reverse; padding: 18px 12px; text-align: center; }
.stats dt { color: var(--muted); font-size: 0.9rem; }
.stats dd { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }

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

/* --- Sections --------------------------------------------------------- */

.section { padding: 64px 0 8px; }
.section-head { max-width: 40em; margin-bottom: 28px; }
.section-head p { color: var(--muted); font-size: 1.0625rem; }

.grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }

.card { padding: 22px; }
.card p { margin: 0; color: var(--muted); }
.card p + p { margin-top: 0.6em; }

.icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--chip);
  color: var(--chip-ink);
}
.icon svg { width: 22px; height: 22px; }

.genders { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.g {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}
.g--der { background: var(--der-bg); color: var(--der-ink); }
.g--die { background: var(--die-bg); color: var(--die-ink); }
.g--das { background: var(--das-bg); color: var(--das-ink); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 22px 22px 22px 76px; }
.steps li + li { margin-top: 16px; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 22px; top: 20px;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--purple-2), var(--purple));
  color: #fff;
  font-weight: 700;
}
@media (min-width: 880px) {
  .steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .steps li { padding: 76px 22px 22px; }
  .steps li + li { margin-top: 0; }
  .steps li::before { top: 22px; }
}

/* Roadmap */
.roadmap { list-style: none; margin: 0; padding: 0; }
.roadmap li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 18px 22px;
}
.roadmap li + li { border-top: 1px solid var(--hairline); }
.roadmap h3 { margin: 0; }
.roadmap p { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.roadmap .text { flex: 1 1 18em; }
.pill {
  flex: none;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: rgba(255, 178, 46, 0.22);
  color: #7A4A00;
}
@media (prefers-color-scheme: dark) {
  .pill { background: rgba(255, 178, 46, 0.18); color: #FFD08A; }
}

/* About */
.about { display: grid; gap: 20px; padding: 26px 22px; }
.about p { color: var(--ink); }
.about p:last-child { margin-bottom: 0; }
.about .muted { color: var(--muted); }
@media (min-width: 760px) {
  .about { grid-template-columns: 96px 1fr; padding: 32px; align-items: start; }
}
.about img { width: 72px; height: 72px; border-radius: 20px; }
@media (min-width: 760px) { .about img { width: 96px; height: 96px; border-radius: 26px; } }

/* Closing CTA */
.closing { padding: 64px 0 24px; }
.closing .glass {
  padding: 36px 22px;
  text-align: center;
}
.closing h2 { margin-bottom: 0.3em; }
.closing p { color: var(--muted); }
.closing .cta-row { justify-content: center; margin-top: 20px; }

/* --- Footer ----------------------------------------------------------- */

.site-footer {
  margin-top: 48px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--hairline);
  font-size: 0.95rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer p { margin: 0; }

/* --- Legal pages ------------------------------------------------------ */

.legal { padding: 8px 0 24px; }
.legal .glass {
  max-width: 780px;
  margin: 0 auto;
  padding: 28px 20px 36px;
  line-height: 1.7;
}
@media (min-width: 640px) { .legal .glass { padding: 40px 44px 48px; } }
.legal h1 { font-size: clamp(1.7rem, 5vw, 2.2rem); }
.legal h2 { font-size: 1.25rem; margin-top: 1.8em; }
.legal ul { padding-left: 1.25em; }
.legal li { margin-bottom: 0.4em; }

/* --- 404 -------------------------------------------------------------- */

.notfound { padding: 48px 0; text-align: center; }
.notfound .glass { max-width: 520px; margin: 0 auto; padding: 36px 22px; }
.notfound img { width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 24px; }

/* --- Motion ----------------------------------------------------------- */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

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

/* Browsers without backdrop-filter get a more opaque card so text stays legible. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(255, 255, 255, 0.9); }
  @media (prefers-color-scheme: dark) {
    .glass { background: rgba(30, 22, 56, 0.92); }
  }
}
