/* Submikro · Startseite und Simulationsseiten
   Farben, Schrift, Abstände nach DESIGN.md.
   Referenzen: Brilliant (Ruhe, große Schrift), PhET (Kachelkatalog),
   Glyphic/Obys (zweifarbige Überschrift, Linienlisten). */

/* Schrift selbst gehostet statt Google Fonts: Datenschutz, keine Drittanfrage. */
@font-face {
  font-family: "Geist";
  src: url("fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Hell ist Grundzustand (Entscheidung Tom, 2.11.: C war zu dunkel). */
:root {
  --bg: #F3F6F6;
  --bg2: #E4EDED;
  --panel: #DCE9E8;
  --line: rgba(7, 28, 39, 0.16);
  --fg: #071C27;
  --muted: #3E6B79;
  --faint: #91B3B9;
  --acc: #F0B429;
  --accfg: #071C27;
  --sec: #245568;
  --secfg: #DCE9E8;
  --pa: #245568;
  --pb: #91B3B9;
  --shadow: 0 20px 40px rgba(7, 28, 39, 0.16), 0 2px 6px rgba(7, 28, 39, 0.10);
  --simalpha: 0.35;
  --maxw: 1200px;
  --pad: 32px;
}
[data-theme="dark"] {
  --bg: #0A2230;
  --bg2: #123747;
  --panel: #123747;
  --line: rgba(220, 233, 232, 0.14);
  --fg: #DCE9E8;
  --muted: #91B3B9;
  --faint: #477C8B;
  --pa: #9ED0D8;
  --pb: #3F7A8C;
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.36), 0 2px 6px rgba(0, 0, 0, 0.30);
  --simalpha: 0.32;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  transition: background-color .45s ease, color .45s ease;
}
a { color: inherit; }
a:hover { color: var(--muted); }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* Kopf */
.kopf { position: relative; overflow: hidden; }
.kopf canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; opacity: var(--simalpha);
}
.kopf > .wrap { position: relative; z-index: 1; }
.nav {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; flex-wrap: wrap; padding-top: 32px; font-size: 15px;
}
.nav .marke { font-weight: 500; text-decoration: none; letter-spacing: -0.01em; display: inline-flex; align-items: center; gap: 10px; }
.nav .marke svg { width: 28px; height: 28px; flex: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; flex-wrap: wrap; }
.nav ul a { text-decoration: none; }
.nav .ton {
  min-height: 44px; padding: 0; border: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: 15px; cursor: pointer;
}
.nav .ton:hover { text-decoration: underline; }

/* Hero: Überschrift in zwei Tönen (Glyphic), zweiter Weg als zweite Kapsel (C) */
.hero { padding: 120px 0 96px; display: flex; flex-direction: column; gap: 44px; }
.hero h1 { font-size: 112px; line-height: .98; letter-spacing: -0.04em; font-weight: 500; max-width: 12ch; }
.hero h1 span { color: var(--faint); font-weight: 300; }
.hero .zeile { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: end; }
.hero .unter { grid-column: span 6; font-size: 22px; line-height: 1.45; font-weight: 300; max-width: 40ch; }
.wege { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 12px; }
.regler { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted); min-height: 44px; align-self: flex-start; }
.regler input { width: 160px; accent-color: var(--fg); }

/* Kapselknöpfe */
.kapsel {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 64px; padding: 0 28px; border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: 17px; box-shadow: var(--shadow);
  transition: transform .18s ease, background-color .18s ease;
}
.kapsel:hover { transform: translateY(-2px); }
.kapsel:active { transform: translateY(1px); }
.kapsel span { display: flex; flex-direction: column; gap: 1px; }
.kapsel small { font-size: 13px; font-weight: 400; opacity: .75; }
.kapsel svg { flex: none; }
.kapsel.primaer { background: var(--acc); color: var(--accfg); }
.kapsel.primaer:hover { background: #FFC94D; color: var(--accfg); }
.kapsel.sekundaer { background: var(--sec); color: var(--secfg); }
.kapsel.sekundaer:hover { background: #2E6A80; color: var(--secfg); }
.kapsel.klein { min-height: 60px; padding: 0 24px; font-size: 16px; }
.kapsel.klein small { font-size: 12px; }
.knopf {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border: 1px solid var(--fg); border-radius: 999px; text-decoration: none;
  font-weight: 500; font-size: 15px; align-self: flex-start;
  transition: transform .18s ease;
}
.knopf:hover { transform: translateY(-2px); color: var(--fg); }

/* Abschnitte: starke Linie oben, Label links 4/12, Inhalt rechts 8/12 */
.abschnitt { padding-bottom: 104px; }
.abschnitt .kopfzeile {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px; flex-wrap: wrap;
  border-top: 1px solid var(--fg); padding-top: 20px; margin-bottom: 28px;
}
.abschnitt h2 { font-size: 36px; letter-spacing: -0.025em; font-weight: 500; line-height: 1.1; }
.abschnitt .hinweis { font-size: 14px; color: var(--muted); }
.zweispaltig {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px;
  border-top: 1px solid var(--fg); padding-top: 20px;
}
.zweispaltig.leise { border-top-color: var(--line); }
.zweispaltig > .links { grid-column: span 4; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.zweispaltig > .rechts { grid-column: span 8; min-width: 0; }
.links .vor { font-size: 14px; color: var(--muted); }
.links p { font-size: 16px; line-height: 1.55; font-weight: 300; color: var(--muted); }
.label { font-size: 24px; font-weight: 500; letter-spacing: -0.015em; }

/* Kacheln: echte Screenshots, Verlauf nur für die Lesbarkeit (PhET-Katalog, ohne Pastell) */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.kacheln.zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kachel {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end;
  aspect-ratio: 3 / 2; border-radius: 20px; overflow: hidden; text-decoration: none;
  color: #DCE9E8; background: #071C27;
  transition: transform .22s ease, box-shadow .22s ease;
}
.kachel:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: #DCE9E8; }
.kachel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.kachel:hover img { transform: scale(1.04); }
.kachel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 28, 39, .88) 0%, rgba(7, 28, 39, .4) 45%, rgba(7, 28, 39, .05) 70%);
}
.kachel .text { position: relative; z-index: 1; padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.kachel .titel { font-size: 22px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.kachel .meta { font-size: 13px; opacity: .8; }
.kachel.platz {
  border: 1px dashed var(--line); background: transparent; color: var(--muted);
  padding: 22px 24px; box-shadow: none; transform: none;
}
.kachel.platz::after { display: none; }
.kachel.platz .titel { font-weight: 400; }
.kachel.flaeche { background: var(--panel); color: var(--fg); padding: 22px 24px; cursor: default; }
.kachel.flaeche::after { display: none; }
.kachel.flaeche:hover { transform: none; box-shadow: none; }
.kachel.flaeche .meta { color: var(--muted); opacity: 1; }
.pille {
  position: absolute; top: 20px; left: 24px; font-size: 12px; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px;
}

/* Linienlisten */
.liste { display: flex; flex-direction: column; }
.liste a, .liste .zeile {
  display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 24px; align-items: baseline;
  padding: 20px 0; border-top: 1px solid var(--line); text-decoration: none;
}
.liste > :last-child { border-bottom: 1px solid var(--line); }
.liste .begriff { font-size: 24px; letter-spacing: -0.015em; font-weight: 400; line-height: 1.2; }
.liste .begriff + small { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
.liste .format { font-size: 14px; color: var(--muted); text-align: right; }
.liste.inhalte .zeile { grid-template-columns: 260px minmax(0, 1fr); }
.liste.inhalte .begriff { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; }
.liste.inhalte .erkl { font-size: 16px; line-height: 1.55; font-weight: 300; color: var(--muted); }

/* Escape Game */
.escape { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: center; border-top: 1px solid var(--fg); padding-top: 20px; }
.escape .links { grid-column: span 5; }
.escape .bild { grid-column: 7 / span 6; display: block; aspect-ratio: 15 / 8; border-radius: 20px; overflow: hidden; background: #0B1420; }
.escape .bild img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.escape .bild:hover img { transform: scale(1.03); }

/* Über mich */
.ueber .profil { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--muted); padding-top: 6px; }
.ueber .profil strong { color: var(--fg); font-weight: 400; }
.ueber .rechts { grid-column: span 7; display: flex; flex-direction: column; gap: 20px; }
.ueber .gross { font-size: 26px; line-height: 1.4; letter-spacing: -0.015em; font-weight: 300; }
.ueber p.klein { font-size: 16px; line-height: 1.55; font-weight: 300; color: var(--muted); }
.ueber .mail { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; text-decoration: underline; text-underline-offset: 5px; font-size: 15px; }

/* Verlage */
.verlage .rechts { grid-column: span 7; display: flex; flex-direction: column; gap: 20px; }
.verlage .gross { font-size: 20px; line-height: 1.5; font-weight: 300; }

/* Unterseite */
.zurueck { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); text-decoration: none; min-height: 44px; align-self: flex-start; }
.simkopf { padding: 72px 0 48px; display: flex; flex-direction: column; gap: 32px; }
.simkopf .zeile { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px; align-items: end; }
.simkopf .titelblock { grid-column: span 8; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.simkopf .meta { font-size: 14px; color: var(--muted); }
.simkopf h1 { font-size: 80px; line-height: 1; letter-spacing: -0.035em; font-weight: 500; }
.simkopf .unter { font-size: 22px; line-height: 1.45; font-weight: 300; max-width: 44ch; }
.simkopf .wege { grid-column: 9 / span 4; }
.simbild { padding-bottom: 88px; }
.simbild div { border-radius: 24px; overflow: hidden; background: #071C27; box-shadow: var(--shadow); aspect-ratio: 16 / 9; }
.simbild img { width: 100%; height: 100%; object-fit: cover; }
.vierer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.vierer h3 { font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.vierer p { font-size: 15px; line-height: 1.55; font-weight: 300; color: var(--muted); }
.unterseite .abschnitt { padding-bottom: 88px; }

/* Fuß */
footer { border-top: 1px solid var(--line); }
footer .wrap { padding-top: 28px; padding-bottom: 28px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; flex-wrap: wrap; }
footer a { text-decoration: none; color: var(--muted); }
footer a:hover { color: var(--fg); }

/* Fokus sichtbar, für Tastatur und Smartboard */
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }

/* Mobil */
@media (max-width: 900px) {
  .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 80px; }
  .simkopf h1 { font-size: 60px; }
}
@media (max-width: 760px) {
  :root { --pad: 20px; }
  .hero { padding: 72px 0 64px; gap: 32px; }
  .hero h1 { font-size: 56px; }
  .hero .unter, .wege, .zweispaltig > .links, .zweispaltig > .rechts,
  .escape .links, .escape .bild, .simkopf .titelblock, .simkopf .wege,
  .ueber .rechts, .verlage .rechts { grid-column: 1 / -1; }
  .kacheln, .kacheln.zwei, .vierer { grid-template-columns: 1fr; }
  .simkopf h1 { font-size: 44px; }
  .liste a, .liste .zeile, .liste.inhalte .zeile { grid-template-columns: 1fr; gap: 6px; }
  .liste .format { text-align: left; }
  .abschnitt, .unterseite .abschnitt { padding-bottom: 64px; }
  .nav ul { gap: 16px; }
}

/* Weniger Bewegung, wenn das System es wünscht */
@media (prefers-reduced-motion: reduce) {
  .kapsel, .knopf, .kachel, .kachel img, .escape .bild img { transition: none; }
  .kapsel:hover, .knopf:hover, .kachel:hover { transform: none; }
}
