/*
  Quiwi im Netz. Farben und Schriften kommen aus der App
  (src/theme.ts und src/theme-context.tsx), damit Seite und App
  als dasselbe Produkt zu erkennen sind.
*/

:root {
  /* Farben und Schrift wie auf der Startseite, damit die Seite ein Stueck ist */
  --bg: #efebe5;
  --card: #ffffff;
  --ink: #101010;
  --ink-soft: rgba(16, 16, 16, 0.6);
  --ink-faint: rgba(16, 16, 16, 0.4);
  --green: #7bc618;
  --deep: #5c9e0b;
  --wash: rgba(123, 198, 24, 0.14);
  --line: rgba(0, 0, 0, 0.08);
  --night: #faf8f4;
  --night-text: #101010;
  --orp: #5c9e0b;

  --display: Inter, system-ui, sans-serif;
  --body: Inter, system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 clamp(1.1rem, 4vw, 2rem);
}

.narrow {
  max-width: 44rem;
}

/* ------------------------------- Kopfzeile -------------------------------- */

header.top {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}

.brand img {
  width: 32px;
  height: 32px;
}

.brand span {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: 0.01em;
}

nav.top-nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 500;
}

nav.top-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

nav.top-nav a:hover,
nav.top-nav a:focus-visible {
  color: var(--ink);
}

@media (max-width: 40rem) {
  nav.top-nav a.hide-small {
    display: none;
  }
}

/* --------------------------------- Text ----------------------------------- */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0;
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--deep);
}

.lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
}

.muted {
  color: var(--ink-soft);
}

.small {
  font-size: 0.9rem;
}

section {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stack-lg {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* -------------------------------- Knöpfe ---------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn-green {
  background: var(--deep);
  color: #ffffff;
}

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn:focus-visible {
  outline: 3px solid var(--deep);
  outline-offset: 3px;
}

/* -------------------------------- Karten ---------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.4rem;
}

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

.tile {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--wash);
  display: grid;
  place-items: center;
  color: var(--deep);
  font-family: var(--display);
  font-size: 1.1rem;
}

/* ------------------------------ Leseflaeche -------------------------------- */
/* Dieselbe Anmutung wie der Reader in der App: dunkler Grund, fester Blickpunkt */

.reader {
  background: var(--night);
  color: var(--night-text);
  border-radius: 30px;
  border: 1px solid var(--line);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.guide {
  width: 100%;
  max-width: 22rem;
  height: 2px;
  background: rgba(0, 0, 0, 0.1);
  position: relative;
}

.guide::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 2px;
  height: 9px;
  background: var(--orp);
}

.guide.top::after {
  top: 0;
}

.guide.bottom::after {
  bottom: 0;
}

.word {
  display: flex;
  width: 100%;
  max-width: 22rem;
  height: 5.5rem;
  align-items: center;
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  letter-spacing: 0.01em;
}

.word .before {
  flex: 1;
  text-align: right;
}

.word .after {
  flex: 1;
  text-align: left;
}

.word .focus {
  color: var(--orp);
}

.reader-meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--ink-faint);
}

/* -------------------------------- Fusszeile -------------------------------- */

footer.bottom {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

footer.bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 0.9rem;
}

footer.bottom a {
  color: var(--ink-soft);
}

/* ------------------------------ Rechtstexte -------------------------------- */

.legal h2 {
  margin-top: 2.2rem;
}

.legal h3 {
  margin-top: 1.6rem;
}

.legal p,
.legal li {
  color: var(--ink-soft);
}

.legal ul {
  margin: 0;
  padding-left: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legal strong {
  color: var(--ink);
}

.todo {
  display: inline-block;
  background: #fff3d6;
  border: 1px dashed #c99700;
  color: #7a5c00;
  border-radius: 6px;
  padding: 0.1rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
}
