/*
  Coding Class — Ankündigungsseite
  Bildmotiv ist Lennys Spielfeld: Der Hintergrund ist Rasterpapier, die Kästchen
  tauchen im Hero als echtes Feld wieder auf.
  Es werden keine Schriften oder anderen Inhalte von fremden Servern geladen.
*/

:root {
  --papier:   #eef2f5;
  --linie:    #dbe3ea;
  --flaeche:  #ffffff;
  --tinte:    #1b2430;
  --grau:     #5c6874;
  --gelb:     #f2c230;  /* die Gluehbirne aus Lennys Logo */
  --moos:     #1f6f52;
  --kastanie: #a8531c;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "DejaVu Sans Mono", monospace;

  --kaestchen: 26px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--tinte);
  background-color: var(--papier);
  /* Rasterpapier */
  background-image:
    linear-gradient(var(--linie) 1px, transparent 1px),
    linear-gradient(90deg, var(--linie) 1px, transparent 1px);
  background-size: var(--kaestchen) var(--kaestchen);
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }

h1 {
  font-size: clamp(2rem, 6vw, 3.1rem);
  font-weight: 700;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.45rem;
  margin: 0 0 0.6rem;
}

h3 {
  font-size: 1.05rem;
  margin: 0 0 0.2rem;
}

p { margin: 0 0 1rem; max-width: 62ch; }

a { color: var(--moos); }
a:focus-visible,
.knopf:focus-visible { outline: 3px solid var(--gelb); outline-offset: 3px; }

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ---------- Kopfbereich ---------- */

.kopf {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) 1.5rem 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.termin {
  font-size: 0.95rem;
  color: var(--kastanie);
  margin-bottom: 0.6rem;
}

.anriss { font-size: 1.1rem; color: var(--grau); }

.knoepfe { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.6rem; }

.knopf {
  display: inline-block;
  background: var(--tinte);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
}
.knopf:hover { background: var(--moos); }

.knopf-leise {
  background: transparent;
  color: var(--tinte);
  border: 1px solid var(--tinte);
}
.knopf-leise:hover { background: var(--flaeche); color: var(--tinte); }

/* ---------- Spielfeld ---------- */

.feld-rahmen { display: grid; gap: 1rem; justify-items: start; }

.feld {
  display: grid;
  grid-template-columns: repeat(6, 46px);
  grid-template-rows: repeat(6, 46px);
  gap: 3px;
  padding: 6px;
  background: var(--flaeche);
  border: 2px solid var(--tinte);
  border-radius: 8px;
  width: max-content;
}

/* Leere Kaestchen zeichnet der Hintergrund des Feldes selbst */
.feld::before {
  content: "";
  grid-area: 1 / 1 / 7 / 7;
  background-image:
    linear-gradient(var(--linie) 1px, transparent 1px),
    linear-gradient(90deg, var(--linie) 1px, transparent 1px);
  background-size: 49px 49px;
}

.zelle {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.huerde { color: var(--tinte); font-weight: 700; }

.lenny {
  width: 40px;
  height: 40px;
  object-fit: contain;
  /* Ein einziger Bewegungsmoment: Lenny geht beim Laden zwei Felder weit */
  animation: laufen 2.4s steps(1, end) 0.6s 1 both;
}

@keyframes laufen {
  0%   { transform: translateX(0); }
  40%  { transform: translateX(49px); }
  80%  { transform: translateX(98px); }
  100% { transform: translateX(98px); }
}

@media (prefers-reduced-motion: reduce) {
  .lenny { animation: none; transform: translateX(98px); }
}

.route {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  padding: 0.9rem 1.1rem;
  background: var(--tinte);
  color: #e8eef3;
  border-radius: 8px;
  overflow-x: auto;
}
.route code { background: none; border: none; padding: 0; color: inherit; }

/* ---------- Inhalt ---------- */

main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

section {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: clamp(1.3rem, 3vw, 2rem);
  margin-bottom: 1.2rem;
}

.fakten { list-style: none; margin: 0; padding: 0; }
.fakten li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 0.8rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--linie);
}
.fakten li:first-child { border-top: none; }
.fakten span { color: var(--grau); }

.ablauf { list-style: none; margin: 0; padding: 0; }
.ablauf li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--linie);
}
.ablauf li:first-child { border-top: none; }
.ablauf p { margin: 0; }

.zeit {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--kastanie);
  padding-top: 0.15rem;
}

.termin-box {
  background: var(--papier);
  border-left: 4px solid var(--gelb);
  border-radius: 0 6px 6px 0;
  padding: 0.9rem 1.1rem;
  max-width: none;
}

#anmelden .knopf { margin-top: 0.4rem; }

.klein { font-size: 0.9rem; color: var(--grau); }

footer {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  font-size: 0.9rem;
  color: var(--grau);
}
footer p { margin: 0.2rem 0; }
footer a { color: var(--grau); }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 760px) {
  .kopf { grid-template-columns: 1fr; padding-top: 2rem; }
  .feld { grid-template-columns: repeat(6, 38px); grid-template-rows: repeat(6, 38px); }
  .feld::before { background-size: 41px 41px; }
  .lenny { width: 34px; height: 34px; }
  @keyframes laufen {
    0%   { transform: translateX(0); }
    40%  { transform: translateX(41px); }
    80%  { transform: translateX(82px); }
    100% { transform: translateX(82px); }
  }
  .fakten li, .ablauf li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ---------- Unterseiten (Impressum, Datenschutz) ---------- */

.unterseiten-kopf {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) 1.5rem 1.5rem;
}
.unterseiten-kopf h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); }
.unterseiten-kopf p { color: var(--grau); }
.unterseiten-kopf .knopf { margin-top: 0.8rem; }

main section ul { max-width: 62ch; }
