/* Gemeinsame Basis für alle Onepager-Entwürfe.
   Farben + Schrift 1:1 aus src/styles/studio.css. */

/* Quelle: Onest (github.com/simpals/onest), Lizenz: SIL Open Font License 1.1 — lokal */
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Onest";
  src: url("../fonts/onest-latin-ext-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --snow: #f7f9f9;
  --onyx: #080f0f;
  --dust: #d4d4d8;
  --blue: #071fa9;
  --paper: var(--snow);
  --ink: var(--onyx);
  --ink-soft: #4a5152;
  --muted: #5d6465;
  --sans: "Onest", system-ui, -apple-system, sans-serif;
  --gutter: clamp(1.15rem, 2.4vw, 2rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[data-logo] svg { display: block; width: 100%; height: auto; }

/* Fokus immer sichtbar (WCAG 2.4.7) */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 0.7rem 1rem;
}
.skip:focus { top: var(--gutter); }

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

/* ═══ RECHTSTEXTE — als Dialog auf derselben Seite, keine Unterseite ═══ */
.legal {
  border: 0; padding: 0; margin: auto;
  width: min(44rem, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100svh - 2 * var(--gutter));
  background: var(--paper); color: var(--ink);
}
.legal::backdrop { background: color-mix(in srgb, var(--onyx) 70%, transparent); backdrop-filter: blur(4px); }
.legal__inner { padding: clamp(1.5rem, 5vw, 3rem); }
.legal__close {
  position: sticky; top: 0; float: right;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.5rem 0.2rem; background: var(--paper);
}
.legal h2 { font-size: clamp(2rem, 6vw, 3rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 1.8rem; }
.legal h3 { font-size: 1rem; font-weight: 600; margin: 1.6rem 0 0.3rem; }
.legal p { color: var(--ink-soft); max-width: 62ch; }
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal__hint {
  margin-top: 2rem; padding: 1rem 1.2rem; border: 1px dashed var(--muted);
  font-size: 0.9rem;
}

/* Zurück zur Übersicht — nur in den Entwürfen */
.proto-back {
  position: fixed; left: 50%; top: 0.8rem; transform: translateX(-50%); z-index: 90;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: #fff; color: var(--onyx); border: 1px solid var(--dust);
  padding: 0.45rem 0.8rem; border-radius: 999px;
}

/* Einblenden beim Laden */
.rein { opacity: 0; transform: translateY(1.2rem); animation: rein 1s var(--ease) forwards; }
@keyframes rein { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ═══ WELLE — Buchstaben werden nacheinander kräftiger, Farbe läuft nur
   kurz als Welle hindurch (nie das ganze Wort auf einmal) ═══ */
.welle { --w0: 300; --w1: 480; --welle-farbe: var(--blue); }
.welle .wort { display: inline-block; white-space: nowrap; }
.welle .w {
  display: inline-block;
  font-weight: var(--w0);
  transition: font-weight 0.7s var(--ease);
}
.welle.spielt .w,
.welle-ausloeser:hover .welle .w,
.welle-ausloeser:focus-visible .welle .w {
  font-weight: var(--w1);
  animation: welle 0.9s ease-out calc(var(--i) * 85ms) both;
}
@keyframes welle {
  0%   { font-weight: var(--w0); }
  22%  { font-weight: 700; color: var(--welle-farbe); transform: translateY(-0.03em); }
  50%  { color: inherit; transform: none; }
  100% { font-weight: var(--w1); }
}
.welle .dot {
  display: inline-block; width: 0.15em; height: 0.15em; background: #071fa9;
  margin-left: 0.04em;
  transition: transform 0.8s var(--ease);
}
.welle-ausloeser:hover .welle .dot { transform: translateX(0.12em); }

/* ═══ BLAUE SEITE — Endzustand von „Der Punkt": alle Pflichtinfos ═══ */
.blau {
  position: absolute; z-index: 5; background: #071fa9;
  pointer-events: none;
  transform-origin: center;
  transition: transform 0.9s var(--ease);
  will-change: transform;
}
.blau.scrollt { transition: none; }

.blaupanel {
  position: absolute; inset: 0; z-index: 6;
  display: grid; grid-template-rows: auto 1fr auto;
  gap: 1.5rem;
  padding: var(--gutter);
  color: #fff;
  --logo-grund: #071fa9;
  opacity: var(--t, 0);
  transform: translateY(calc((1 - var(--t, 0)) * 2rem));
}
.blaupanel :focus-visible { outline-color: #fff; }
.blaupanel a { background: linear-gradient(#fff, #fff) 0 100% / 0 1px no-repeat; transition: background-size 0.5s var(--ease); }
.blaupanel a:hover, .blaupanel a:focus-visible { background-size: 100% 1px; }
.blaupanel__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; font-weight: 500; font-size: clamp(0.95rem, 1.4vw, 1.15rem); }
.blaupanel__signet { width: clamp(3.4rem, 5vw, 4.6rem); color: #fff; }
.blaupanel__signet rect { fill: #fff; }
.blaupanel__main { align-self: center; }
.blaupanel h2 {
  font-size: clamp(3.4rem, 12.5vw, 13.5rem);
  line-height: 0.9; letter-spacing: -0.055em;
  --welle-farbe: #aab6ff;
}
.blaupanel h2 .dot { background: #fff; }
.blaupanel__links {
  margin-top: clamp(1rem, 2.5vw, 2rem);
  display: flex; flex-wrap: wrap; gap: 0.4rem 2.5rem;
  font-size: clamp(1.1rem, 2.3vw, 1.8rem); font-weight: 500;
}
.blaupanel__links a { background-size: 0 2px; }
.blaupanel__links a:hover, .blaupanel__links a:focus-visible { background-size: 100% 2px; }
.blaupanel__info {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 1rem 2rem;
  padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.88rem; line-height: 1.45;
}
.blaupanel__info small {
  display: block; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78); margin-bottom: 0.25rem;
}
.blaupanel__info button { text-align: left; }
.blaupanel__info button:hover { text-decoration: underline; text-underline-offset: 3px; }
.blaupanel__legal { display: flex; gap: 1.2rem; }

/* Bühne: Startbildschirm klebt, während der Punkt wächst */
.stage { height: 300vh; position: relative; }
.stage__sticky {
  position: sticky; top: 0; height: 100svh; min-height: 34rem;
  overflow: hidden;
  /* clip statt hidden: kein Scroll-Container — Fokus oder scrollIntoView
     können die Bühne sonst intern verschieben (Kopfzeile rutscht raus) */
  overflow: clip;
}
