/* Tessera-Tokens (KAPITEL_DESIGN 2.3). Hell als Standard, dunkel per System oder Einstellung. */
:root {
  --color-bg-canvas: #f6f2ea;
  --color-bg-surface: #fffdf8;
  --color-bg-sunken: #ece5d8;
  --color-text-primary: #1e1a16;
  --color-text-secondary: #574e45;
  --color-text-tertiary: #6f655a;
  --color-line-subtle: #ddd3c3;
  --color-line-strong: #8c8070;
  --color-action-primary: #2b4c86;
  --color-action-on-primary: #ffffff;
  --color-action-secondary-bg: #e6ecf6;
  --color-field-bg: #fbefd4;
  --color-field-border: #966a1c;
  --color-mark-target: #94681a;
  --color-latin-emphasis: #2b4c86;
  --color-state-correct-fg: #23694c;
  --color-state-correct-bg: #dcefe4;
  --color-state-wrong-fg: #9e3f25;
  --color-state-wrong-bg: #f7e1d8;
  --color-state-hint-fg: #6e5410;
  --color-state-hint-bg: #faf0d2;
  --color-state-solution-fg: #5b4a86;
  --color-state-solution-bg: #ece7f6;
  --color-brand-cinnabar: #a23a2a;
  --color-tessera-empty: #e3dacb;
  --color-tessera-done: #2b4c86;
  --color-tessera-solution: #b9a9de;
  --color-tessera-current: #966a1c;
  --color-focus-ring: #2b4c86;

  /* Programmakzente (nur Kopfbereiche) */
  --accent-disce1: #c58b2a;
  --accent-disce2: #2b4c86;
  --accent-verte: #23694c;
  --accent-vocab: #a23a2a;

  --font-latin: 'Literata Variable', 'Literata', Georgia, serif;
  --font-ui: 'Atkinson Hyperlegible Next', system-ui, sans-serif;

  --space-1: 2px;
  --space-2: 4px;
  --space-3: 8px;
  --space-4: 12px;
  --space-5: 16px;
  --space-6: 20px;
  --space-7: 24px;
  --space-8: 32px;
  --space-9: 48px;
  --space-10: 64px;
  --page-margin: 16px;

  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --radius-tessera: 3px;

  --elevation-1: 0 1px 2px rgb(30 26 22 / 8%), 0 1px 1px rgb(30 26 22 / 4%);
  --elevation-2: 0 4px 12px rgb(30 26 22 / 10%);
  --elevation-3: 0 12px 32px rgb(30 26 22 / 16%);

  --motion-instant: 80ms;
  --motion-quick: 160ms;
  --motion-standard: 240ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  color-scheme: light;
}

@media (min-width: 600px) {
  :root {
    --page-margin: 24px;
  }
}

@media (min-width: 1024px) {
  :root {
    --page-margin: 32px;
  }
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --color-bg-canvas: #14120f;
    --color-bg-surface: #1e1b17;
    --color-bg-sunken: #0e0c0a;
    --color-text-primary: #f2ece2;
    --color-text-secondary: #c8beb0;
    --color-text-tertiary: #9e9385;
    --color-line-subtle: #34302a;
    --color-line-strong: #7d7366;
    --color-action-primary: #9db8ec;
    --color-action-on-primary: #0f1a2e;
    --color-action-secondary-bg: #1f2a3d;
    --color-field-bg: #2a2418;
    --color-field-border: #d9a94e;
    --color-mark-target: #e3b45c;
    --color-latin-emphasis: #a9c1f0;
    --color-state-correct-fg: #7fd3a8;
    --color-state-correct-bg: #142d22;
    --color-state-wrong-fg: #f29a7e;
    --color-state-wrong-bg: #351a12;
    --color-state-hint-fg: #eac766;
    --color-state-hint-bg: #2b2410;
    --color-state-solution-fg: #c3b4ee;
    --color-state-solution-bg: #241e35;
    --color-brand-cinnabar: #e07a62;
    --color-tessera-empty: #2c2822;
    --color-tessera-done: #9db8ec;
    --color-tessera-solution: #5e5287;
    --color-tessera-current: #e3b45c;
    --color-focus-ring: #9db8ec;
    --accent-disce1: #d9a94e;
    --accent-disce2: #9db8ec;
    --accent-verte: #7fd3a8;
    --accent-vocab: #e07a62;
    --elevation-1: none;
    --elevation-2: none;
    --elevation-3: 0 12px 32px rgb(0 0 0 / 50%);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --color-bg-canvas: #14120f;
  --color-bg-surface: #1e1b17;
  --color-bg-sunken: #0e0c0a;
  --color-text-primary: #f2ece2;
  --color-text-secondary: #c8beb0;
  --color-text-tertiary: #9e9385;
  --color-line-subtle: #34302a;
  --color-line-strong: #7d7366;
  --color-action-primary: #9db8ec;
  --color-action-on-primary: #0f1a2e;
  --color-action-secondary-bg: #1f2a3d;
  --color-field-bg: #2a2418;
  --color-field-border: #d9a94e;
  --color-mark-target: #e3b45c;
  --color-latin-emphasis: #a9c1f0;
  --color-state-correct-fg: #7fd3a8;
  --color-state-correct-bg: #142d22;
  --color-state-wrong-fg: #f29a7e;
  --color-state-wrong-bg: #351a12;
  --color-state-hint-fg: #eac766;
  --color-state-hint-bg: #2b2410;
  --color-state-solution-fg: #c3b4ee;
  --color-state-solution-bg: #241e35;
  --color-brand-cinnabar: #e07a62;
  --color-tessera-empty: #2c2822;
  --color-tessera-done: #9db8ec;
  --color-tessera-solution: #5e5287;
  --color-tessera-current: #e3b45c;
  --color-focus-ring: #9db8ec;
  --accent-disce1: #d9a94e;
  --accent-disce2: #9db8ec;
  --accent-verte: #7fd3a8;
  --accent-vocab: #e07a62;
  --elevation-1: none;
  --elevation-2: none;
  --elevation-3: 0 12px 32px rgb(0 0 0 / 50%);
  color-scheme: dark;
}

/* Reduzierte Bewegung: nur kurze Überblendung (2.3.4) */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-quick: 120ms;
    --motion-standard: 120ms;
  }
}

/* Website disce-ludens.com – baut auf den Tessera-Tokens der App auf (tokens.css wird beim Build vorangestellt). */

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/assets/fonts/atkinson-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/assets/fonts/atkinson-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Literata Variable';
  src: url('/assets/fonts/literata.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--color-bg-canvas);
  color: var(--color-text-primary);
  font: 400 1.0625rem/1.6 var(--font-ui);
}

h1,
h2,
h3 {
  font-family: var(--font-latin);
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
  margin: 0 0 0.5em;
}
h1 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  letter-spacing: -0.01em;
}
h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.125rem);
}
h3 {
  font-size: 1.25rem;
}
p {
  margin: 0 0 1em;
}
a {
  color: var(--color-action-primary);
  text-underline-offset: 0.15em;
}
:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 8px 12px;
  background: var(--color-bg-surface);
  z-index: 20;
}
.skip:focus {
  top: 8px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 600px) {
  .wrap {
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
  }
}
.narrow {
  max-width: 760px;
}
.center {
  text-align: center;
}

/* Kopf */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--color-bg-canvas) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--color-line-subtle);
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}
.brand,
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-latin);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--color-text-primary);
  text-decoration: none;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-sub {
  font: 400 0.75rem/1.3 var(--font-ui);
  color: var(--color-text-tertiary);
}
.mark {
  width: 28px;
  height: 28px;
  flex: none;
}
.top nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.top nav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.top nav a:hover {
  color: var(--color-text-primary);
  background: var(--color-bg-sunken);
}
.top nav .lang {
  border: 1px solid var(--color-line-strong);
  letter-spacing: 0.04em;
}
@media (max-width: 719px) {
  .top nav li:not(:last-child) {
    display: none;
  }
}

/* Knöpfe */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line-strong);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font: 700 1rem var(--font-ui);
  text-decoration: none;
  cursor: pointer;
}
.btn-primary {
  background: var(--color-action-primary);
  border-color: var(--color-action-primary);
  color: var(--color-action-on-primary);
}
.btn-primary:hover {
  filter: brightness(1.08);
}
.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.center .cta {
  align-items: center;
}
.note {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  max-width: 46ch;
}

/* Kopfbereich */
.hero {
  padding-block: clamp(40px, 6vw, 88px);
}
.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 1fr;
    gap: 64px;
  }
}
.kicker {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-brand-cinnabar);
}
.lead {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  max-width: 54ch;
}
.lang-note {
  font-size: 0.95rem;
  padding: 8px 12px;
  border-left: 3px solid var(--color-field-border);
  background: var(--color-field-bg);
  max-width: 54ch;
}

.hero-card {
  margin: 0;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-line-subtle);
  box-shadow: var(--elevation-3);
  min-width: 0;
}
.card-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}
.latin {
  font-family: var(--font-latin);
  font-size: 1.4rem;
  line-height: 1.45;
}
.latin mark {
  background: none;
  color: inherit;
  font-weight: 600;
  text-decoration: underline 2px var(--color-mark-target);
  text-underline-offset: 0.2em;
}
.card-q {
  color: var(--color-text-secondary);
}
.card-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
}
.card-options li {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--color-action-secondary-bg);
  font-weight: 700;
  font-size: 0.95rem;
}
.card-options .is-right {
  background: var(--color-state-correct-bg);
  color: var(--color-state-correct-fg);
  box-shadow: inset 0 0 0 2px var(--color-state-correct-fg);
}
.card-options .is-right::before {
  content: '✓ ';
}

.tesserae {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tesserae i {
  width: 14px;
  height: 14px;
  border-radius: var(--radius-tessera);
  background: var(--color-tessera-empty);
}
.tesserae.progress i:nth-child(-n + 8) {
  background: var(--color-tessera-done);
}
.tesserae.progress i:nth-child(9) {
  background: var(--color-tessera-solution);
}

/* Kurzantwort */
.summary {
  padding-block: 0 40px;
}
.summary .wrap {
  border-left: 4px solid var(--color-brand-cinnabar);
}
.summary-h {
  font: 700 0.85rem/1.4 var(--font-ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
  margin-bottom: 8px;
}
.summary p {
  font-size: 1.15rem;
  margin: 0;
}

/* Lernpsychologie */
.science {
  margin-top: 48px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-line-subtle);
}
.science ul {
  display: grid;
  gap: 14px;
  padding-left: 20px;
  margin: 0;
}
@media (min-width: 900px) {
  .science ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 48px;
  }
}
.science li {
  color: var(--color-text-secondary);
}
.science strong {
  color: var(--color-text-primary);
}

/* Zahlen */
.facts {
  border-block: 1px solid var(--color-line-subtle);
  background: var(--color-bg-surface);
}
.facts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  list-style: none;
  margin: 0 auto;
  padding-block: 24px;
  color: var(--color-text-secondary);
}
@media (min-width: 720px) {
  .facts-row {
    grid-template-columns: repeat(4, 1fr);
  }
}
.facts strong {
  display: block;
  font-family: var(--font-latin);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--color-text-primary);
  font-variant-numeric: tabular-nums;
}

/* Abschnitte */
.section {
  padding-block: clamp(48px, 7vw, 96px);
}
.section.alt {
  background: var(--color-bg-sunken);
}
.cards {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1040px) {
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}
.prog {
  padding: 22px;
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-line-subtle);
  border-top: 6px solid var(--accent);
  min-width: 0;
}
.prog-sub {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-tertiary);
}
.method {
  display: grid;
  gap: 32px;
  margin-top: 24px;
}
@media (min-width: 720px) {
  .method {
    grid-template-columns: repeat(2, 1fr);
  }
}
.method p,
.prog p:last-child {
  color: var(--color-text-secondary);
  margin: 0;
}
.checks,
.limits {
  display: grid;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 720px) {
  .checks {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 40px;
  }
}
.checks li {
  padding-left: 32px;
  position: relative;
}
.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-tessera);
  background: var(--color-state-correct-fg);
}
.limits li {
  padding-left: 28px;
  position: relative;
}
.limits li::before {
  content: '–';
  position: absolute;
  left: 6px;
  color: var(--color-text-tertiary);
}

/* Bilder aus der App */
.section-lead {
  color: var(--color-text-secondary);
  max-width: 60ch;
}
.shots {
  display: grid;
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}
@media (min-width: 900px) {
  .shots {
    grid-template-columns: repeat(3, 1fr);
  }
}
.shot {
  margin: 0;
  min-width: 0;
}
.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line-subtle);
  box-shadow: var(--elevation-2);
  background: var(--color-bg-surface);
}
.shot figcaption {
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--color-text-secondary);
}

.phones-h {
  margin-top: 48px;
}
.phones {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.phone {
  margin: 0;
  min-width: 0;
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--color-line-strong);
  box-shadow: var(--elevation-2);
}
.phone figcaption {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  text-align: center;
}
@media (min-width: 720px) {
  .phones {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}
.phones + .note {
  margin-top: 20px;
}

/* Preise */
.table-wrap {
  overflow-x: auto;
  margin-block: 20px;
}
.prices {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.prices th,
.prices td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-line-subtle);
}
.prices td {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.prices thead th {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}
.prices .row-all {
  font-weight: 700;
  background: var(--color-action-secondary-bg);
}

/* Fragen */
details {
  border-bottom: 1px solid var(--color-line-subtle);
}
summary {
  padding: 16px 0;
  font-weight: 700;
  cursor: pointer;
}
details p {
  color: var(--color-text-secondary);
}

.closing-latin {
  font-family: var(--font-latin);
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 600;
  margin: 0;
}

.legal h1 {
  margin-bottom: 1em;
}
.legal h2 {
  font-size: 1.2rem;
  margin-top: 1.6em;
}

/* Formulare */
.form {
  display: grid;
  gap: 18px;
  margin-block: 24px;
}
.field {
  display: grid;
  gap: 6px;
}
.field label {
  font-weight: 700;
}
.req {
  color: var(--color-state-wrong-fg);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--color-line-strong);
  border-bottom: 2px solid var(--color-field-border);
  border-radius: var(--radius-sm);
  background: var(--color-field-bg);
  color: var(--color-text-primary);
  font: inherit;
}
.field textarea {
  resize: vertical;
}
.form .btn {
  justify-self: start;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Fuß */
.foot {
  border-top: 1px solid var(--color-line-subtle);
  padding-block: 40px;
  color: var(--color-text-secondary);
  font-size: 0.95rem;
}
.foot-grid {
  display: grid;
  gap: 16px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.foot-credits {
  color: var(--color-text-tertiary);
  max-width: 70ch;
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--color-action-primary);
  text-decoration: underline;
  cursor: pointer;
}

/* Einwilligung */
.consent {
  position: fixed;
  z-index: 30;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 560px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-line-strong);
  box-shadow: var(--elevation-3);
}
.consent-title {
  font-weight: 700;
}
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
