/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: Outfit;
  src: url("assets/fonts/Outfit.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Farben aus dem Spielform-Profilbild (design/fussball/scripts/logo_modern.py) */
:root {
  --ink:    #23262d;
  --blue:   #1f5fd1;
  --red:    #d6342b;
  --bg:     #ffffff;
  --text:   var(--ink);
  --muted:  #6b7280;
  --footer: #8a8f9e;
  --link:   var(--blue);
  --font:   Outfit, 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:     #23262d;
    --text:   #ffffff;
    --muted:  #a3a9b8;
    --footer: #8a90a0;
    --link:   #6f9cf0;
  }
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  min-height: 100dvh;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

main {
  width: 100%;
  max-width: 680px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ── Wortmarke „spiel / form.“ ────────────────────────────── */
.mark {
  font-family: Outfit, sans-serif;
  font-weight: 800;
  font-size: clamp(96px, 26vw, 220px);
  line-height: 0.94;
  letter-spacing: -0.045em;
  color: var(--text);
  user-select: none;
}

.mark .row { white-space: nowrap; }

.mark .l {
  display: inline-block;
  position: relative;
}

/* i-Punkt = blauer Spieler */
.mark .i-dot {
  position: absolute;
  left: 50%;
  top: 0.042em;
  width: 0.25em;
  height: 0.25em;
  margin-left: -0.105em;
  border-radius: 50%;
  background: var(--blue);
}

/* Schlusspunkt = roter Spieler */
.mark .stop {
  display: inline-block;
  width: 0.24em;
  height: 0.24em;
  border-radius: 50%;
  background: var(--red);
  margin-left: 0.04em;
}

/* ── Animation der Startseite ─────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .hero .mark .l {
    opacity: 0;
    animation: jump-in 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    animation-delay: 0.15s;
  }
  .hero .mark .row:first-child .l:nth-child(1) { animation-delay: 0.15s; }
  .hero .mark .row:first-child .l:nth-child(2) { animation-delay: 0.21s; }
  .hero .mark .row:first-child .l:nth-child(3) { animation-delay: 0.27s; }
  .hero .mark .row:first-child .l:nth-child(4) { animation-delay: 0.33s; }
  .hero .mark .row:first-child .l:nth-child(5) { animation-delay: 0.39s; }
  .hero .mark .row:last-child .l:nth-child(1) { animation-delay: 0.45s; }
  .hero .mark .row:last-child .l:nth-child(2) { animation-delay: 0.51s; }
  .hero .mark .row:last-child .l:nth-child(3) { animation-delay: 0.57s; }
  .hero .mark .row:last-child .l:nth-child(4) { animation-delay: 0.63s; }

  .hero .mark .i-dot {
    opacity: 0;
    animation:
      drop-in 0.7s cubic-bezier(0.3, 0, 0.5, 1) 0.95s forwards,
      hop 6s ease-in-out 4s infinite;
  }

  .hero .mark .stop {
    opacity: 0;
    animation:
      roll-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 1.35s forwards,
      hop 6s ease-in-out 4.6s infinite;
  }
}

@keyframes jump-in {
  from { opacity: 0; transform: translateY(0.35em); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Blauer Punkt fällt aufs i und springt zweimal nach */
@keyframes drop-in {
  0%   { opacity: 0; transform: translateY(-1.4em); }
  15%  { opacity: 1; }
  55%  { transform: translateY(0); }
  70%  { transform: translateY(-0.18em); }
  85%  { transform: translateY(0); }
  93%  { transform: translateY(-0.05em); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Roter Punkt rollt von rechts an seinen Platz */
@keyframes roll-in {
  from { opacity: 0; transform: translateX(2.2em); }
  20%  { opacity: 1; }
  to   { opacity: 1; transform: translateX(0); }
}

/* Ruhiger Hüpfer alle 6 s: Bewegung nur in den ersten ~15 % der Dauer */
@keyframes hop {
  0%, 15%, 100% { transform: translateY(0); }
  5%            { transform: translateY(-0.14em); }
  10%           { transform: translateY(0); }
  12.5%         { transform: translateY(-0.04em); }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Link zum Übungsplaner ────────────────────────────────── */
.tool-link {
  margin-top: 2.5rem;
  padding: 0.7rem 1.2rem;
  border: 2px solid var(--text);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.tool-link:hover,
.tool-link:focus-visible {
  background: var(--text);
  color: var(--bg);
}

@media (prefers-reduced-motion: no-preference) {
  .tool-link { opacity: 0; animation: jump-in 0.55s ease-out 1.6s forwards; }
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.6rem;
  font-size: 0.85rem;
  color: var(--footer);
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover,
footer a:focus-visible {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Rechtstexte ──────────────────────────────────────────── */
body.page { justify-content: flex-start; }
body.page main { justify-content: flex-start; }

.page-head {
  margin: 1rem 0 2.5rem;
}

.page-head a {
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
}

.page-head .mark { font-size: 56px; }

.legal {
  width: 100%;
  line-height: 1.65;
  font-size: 1rem;
}

.legal h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.legal h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
}

.legal p,
.legal address {
  margin-bottom: 0.8rem;
  font-style: normal;
  overflow-wrap: anywhere;
}

.legal .stand {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.legal .small {
  color: var(--muted);
  font-size: 0.925rem;
}

.legal a { color: var(--link); }

/* ── Anleitung Übungsplaner ───────────────────────────────── */
.guide h1 { margin-bottom: 1.2rem; }
.guide h3 { font-size: 1rem; font-weight: 700; margin: 1.3rem 0 0.25rem; }
.guide ol { padding-left: 1.3rem; margin-bottom: 0.8rem; }
.guide li { margin-bottom: 0.4rem; }
.guide-cta { margin: 2rem 0 1.5rem; }
.guide .tool-link { display: inline-block; margin-top: 0; opacity: 1; animation: none; color: var(--text); text-decoration: none; }
.guide .tool-link:hover, .guide .tool-link:focus-visible { color: var(--bg); }
.guide-shot { width: 100%; height: auto; border-radius: 12px; border: 1px solid #e5e7eb; }
.guide ul { padding-left: 1.3rem; margin-bottom: 0.8rem; }
.copy-box {
  margin: 0.4rem 0 1rem; padding: 0.7rem 0.9rem; border-radius: 10px; border: 1px solid #e5e7eb;
  font: 0.95rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; user-select: all;
}
.copy-box.prompt { font-size: 0.8rem; user-select: text; }

a:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
