/*
 * buildeutsch.com
 *
 * The palette is the app's own, lifted from src/design/tokens.ts: the deep
 * violet ground it launches on, the warm off-white it writes in, and the case
 * and gender colours the Builder paints German with. Those colours ARE the
 * product — a learner recognises them before they recognise the name — so the
 * site is built around them rather than around a logo.
 */

:root {
  --ground: #0B0817;
  --ground-lift: #140F26;
  --ink: #F2F0E8;
  --ink-dim: #A39BB8;      /* violet-biased, not a neutral grey */
  --ink-faint: #6F6685;
  --rule: rgba(242, 240, 232, 0.12);

  --akk: #FF8A5C;          /* Akkusativ — and the wordmark's tail */
  --nom: #2BF07A;
  --dat: #A78BFA;
  --der: #4DE4FF;
  --die: #FF63C0;
  --das: #BEF264;
  --verb: #FFD24D;

  --measure: 34rem;
  --shell: 60rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* a wash of violet behind the fold, so the ground is not flat black */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  background: radial-gradient(120% 80% at 50% 0%, #1E1440 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.shell { width: min(var(--shell), calc(100% - 2.5rem)); margin-inline: auto; }

/* ---------- wordmark ---------- */

.wordmark {
  font-family: Outfit, Inter, sans-serif;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span { color: var(--akk); font-size: 0.72em; letter-spacing: 0.16em; }

/* ---------- chrome ---------- */

header.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.75rem;
  flex-wrap: wrap;
}
header.bar nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
header.bar nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.94rem;
}
header.bar nav a:hover, header.bar nav a:focus-visible { color: var(--ink); }

footer.bar {
  margin-top: 6rem;
  padding-block: 2.5rem 4rem;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 0.9rem;
}
footer.bar a { color: var(--ink-dim); text-decoration: none; }
footer.bar a:hover, footer.bar a:focus-visible { color: var(--ink); }
footer.bar nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

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

.hero { padding-block: 3rem 1rem; }
.hero h1 {
  font-family: Outfit, Inter, sans-serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  text-wrap: balance;
  max-width: 20ch;
}
.hero p.lede {
  color: var(--ink-dim);
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  max-width: var(--measure);
  margin: 0 0 2.5rem;
}

/*
 * The sentence card. This is the app's signature and the reason the page
 * exists: every word carries the colour of its case or its gender, so the
 * grammar is visible before it is explained.
 */
.sentence {
  background: var(--ground-lift);
  border: 1px solid var(--rule);
  border-radius: 20px;
  padding: clamp(1.25rem, 4vw, 2rem);
  max-width: 32rem;
}
.sentence .de {
  font-size: clamp(1.35rem, 4.2vw, 1.9rem);
  font-weight: 500;
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.4em;
  row-gap: 0.15em;
}
.sentence .en {
  color: var(--ink-faint);
  font-size: 0.95rem;
  margin-top: 1rem;
}
.w-nom { color: var(--nom); }
.w-akk { color: var(--akk); }
.w-dat { color: var(--dat); }
.w-der { color: var(--der); }
.w-die { color: var(--die); }
.w-das { color: var(--das); }
.w-verb { color: var(--verb); text-decoration: underline; text-underline-offset: 0.22em; text-decoration-thickness: 2px; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.legend span::before {
  content: "";
  display: inline-block;
  width: 0.6em; height: 0.6em;
  border-radius: 50%;
  margin-right: 0.45em;
  background: currentColor;
}

/* ---------- feature grid ---------- */

.features {
  margin-top: 5.5rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.feature {
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 1.5rem;
  background: rgba(242, 240, 232, 0.02);
}
.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.feature p { margin: 0; color: var(--ink-dim); font-size: 0.95rem; }
.feature .de { color: var(--ink-faint); font-size: 0.85rem; margin-top: 0.75rem; }

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

.stores { display: flex; gap: 0.85rem; flex-wrap: wrap; margin-top: 2.5rem; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.35rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.store:hover, .store:focus-visible { border-color: var(--akk); color: var(--akk); }
.store[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

/* ---------- prose (legal + support) ---------- */

.prose { max-width: var(--measure); padding-block: 2rem 1rem; }
.prose h1 {
  font-family: Outfit, Inter, sans-serif;
  font-weight: 600;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  letter-spacing: -0.015em;
  margin: 0 0 0.5rem;
}
.prose .updated { color: var(--ink-faint); font-size: 0.9rem; margin: 0 0 2.5rem; }
.prose h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2.75rem 0 0.75rem;
  letter-spacing: -0.01em;
}
.prose h3 { font-size: 1rem; font-weight: 600; margin: 1.75rem 0 0.5rem; }
.prose p, .prose li { color: var(--ink-dim); }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--akk); text-underline-offset: 0.2em; }
.prose ul { padding-left: 1.2rem; }

/* a plain-language summary above the legal text */
.summary {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--akk);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
  background: rgba(242, 240, 232, 0.02);
}
.summary p { margin: 0.5rem 0 0; }
.summary p:first-of-type { margin-top: 0; }
.summary strong { color: var(--akk); }

table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 0;
  font-size: 0.92rem;
}
table.data th, table.data td {
  text-align: left;
  padding: 0.7rem 0.75rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-dim);
}
table.data th { color: var(--ink); font-weight: 600; }
.scroll-x { overflow-x: auto; }

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

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