/* Gemeinsame Basis der drei Hero-Varianten (Entwurf, 19.10.2026).
   System aus dem Bauplan: Linienraster mit Plus-Ecken (Heron), Korn (Monolog), Schriftmaßstab, fester Erstgespräch-Knopf.
   Linienraster und Korn hat Jonah ausdrücklich gewählt, sie schlagen hier die Sperrliste.
   Eine Radius-Regel für alles Gestaltete: 4 px (innen 3 px). */
@import url("schrift/schrift.css");   /* Inter Tight lokal, kein Google-Abruf */
:root {
  --sand: rgb(var(--vg-k));
  --sand-200: #f5ebe2;
  --tinte: #27201b;          /* sand-900, Text auf hell */
  --nacht: rgb(var(--hg-k));          /* night-900 */
  --nacht-800: #161311;
  --sonne: #ff6a1f;          /* sun-500: Fläche und Handlung */
  --sonne-700: #c43c0c;      /* sun-700: Schrift auf hell */
  --linie: rgb(39 32 27 / .2);
  --linie-stark: rgb(39 32 27 / .45);
  --wassergrund: #e8dccd;      /* Sand unter der Wasserszene (v5, v6), aus sand-100 abgedunkelt; Bestätigung offen */
  --fokus: var(--sonne-700);   /* Fokusring auf hellem Grund (Sonne allein hat dort 2,5:1) */
  --rand: clamp(16px, 8px + 1.25vw, 28px);
  --kopf: 64px;
  --radius: 4px;
  --schrift: "Inter Tight", system-ui, sans-serif;
  --aus: cubic-bezier(.16, 1, .3, 1);   /* exponentiell auslaufend */
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--sand);
  color: var(--tinte);
  font: 400 16px/1.5 var(--schrift);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--sonne); color: var(--nacht); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 3px; border-radius: 2px; }
.auf-nacht { --fokus: var(--sonne); }
img, svg, video { display: block; max-width: 100%; }

/* ---------- Schrift ---------- */
.titel {
  margin: 0;
  font-weight: 300;
  font-size: clamp(40px, 22px + 3.9vw, 84px);
  line-height: .98;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.satz {
  margin: 0;
  font-size: clamp(16px, 15px + .3vw, 19px);
  line-height: 1.45;
  letter-spacing: -.005em;
  max-width: 36ch;
  text-wrap: pretty;
}
.leise { color: rgb(39 32 27 / .7); }

/* ---------- Knopf: Erstgespräch ---------- */
.knopf {
  --hg: var(--nacht); --vg: var(--sand);
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 6px 6px 6px 20px;
  background: var(--hg); color: var(--vg);
  border-radius: var(--radius); text-decoration: none;
  font: 500 15px/1 var(--schrift); letter-spacing: -.005em;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .2s var(--aus), background-color .3s var(--aus), color .3s var(--aus);
}
.knopf .pfeil {
  width: 36px; height: 36px; display: grid; place-items: center; flex: none; position: relative; overflow: hidden;
  background: var(--sonne); color: var(--nacht); border-radius: 3px;
}
.knopf .pfeil svg { width: 14px; height: 14px; transition: transform .3s var(--aus); }
/* Die Kachel bleibt stehen, nur der Pfeil fährt (Jonah 20.10.: „die Box mit dem Pfeil soll sich nicht nach rechts bewegen … so wie
   der Text“): wie die zweite Textzeile wartet ein zweiter Pfeil links außerhalb der Kachel und schiebt den ersten nach rechts hinaus */
.knopf .pfeil::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8h10M8.5 3.5 13 8l-4.5 4.5' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8h10M8.5 3.5 13 8l-4.5 4.5' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translateX(-26px); transition: transform .3s var(--aus);
}
.knopf .text { position: relative; display: inline-block; overflow: hidden; height: 1.2em; line-height: 1.2em; }
.knopf .text > span { display: block; transition: transform .3s var(--aus); }
.knopf .text > span + span { position: absolute; inset: 100% 0 auto 0; }
@media (hover: hover) and (pointer: fine) {
  .knopf:hover .text > span { transform: translateY(-100%); }
  .knopf:hover .pfeil svg { transform: translateX(26px); }
  .knopf:hover .pfeil::after { transform: none; }
}
.knopf:active { transform: scale(.98); }

/* ---------- Kopfleiste im Raster: die Teilung folgt der Spaltenteilung des Heros (--links/--rechts) ---------- */
.kopf {
  position: relative; z-index: 20;
  display: grid; grid-template-columns: minmax(0, var(--links, 7fr)) minmax(0, var(--rechts, 5fr));
  height: var(--kopf); margin: 0 var(--rand);
  border-bottom: 1px solid var(--linie);
}
.kopf .marke { align-self: center; justify-self: start; width: 92px; min-height: 44px; display: flex; align-items: center; color: inherit; text-decoration: none; }
.kopf .marke svg { width: 100%; height: auto; }
.kopf-r { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-left: 28px; border-left: 1px solid var(--linie); }
.kopf-r nav { display: flex; gap: 24px; font-weight: 500; font-size: 15px; }
.kopf-r nav a { text-decoration: none; opacity: .78; transition: opacity .2s; padding: 12px 0; }
@media (hover: hover) and (pointer: fine) { .kopf-r nav a:hover { opacity: 1; } }
.kopf .knopf { min-height: 44px; }
.kopf .knopf .pfeil { width: 32px; height: 32px; }
.menue-knopf { display: none; }
/* zwischen Handy und breitem Desktop: rechte Spalte so breit wie ihr Inhalt, sonst bricht das Menü um (Taste-Prüfung v7) */
@media (min-width: 861px) and (max-width: 1220px) {
  .kopf { grid-template-columns: 1fr auto; }
  .kopf-r { gap: 28px; }
}
@media (max-width: 860px) {
  .kopf { grid-template-columns: 1fr auto; }
  .kopf-r { border-left: 0; padding-left: 0; gap: 8px; }
  .kopf-r nav { display: none; }
  /* Handy (26.10.2026, Jonah: Knopf mit Wort, Tag und Nacht ins Menü): oben stehen Marke, Menü und „Erstgespräch“ mit Pfeil */
  .kopf-r .thema-knopf { display: none; }
  .kopf-r .knopf { gap: 10px; padding: 6px 6px 6px 14px; font-size: 14px; }
  .kopf .knopf .zusatz { display: none; }
  .menue-knopf { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border: 1px solid var(--linie-stark); border-radius: var(--radius);
                 background: none; color: inherit; font: 500 15px/1 var(--schrift); cursor: pointer; }
  .kopf.offen .kopf-r nav { display: flex; position: absolute; top: var(--kopf); left: 0; right: 0; flex-direction: column; gap: 0;
                            background: var(--sand); color: var(--tinte); border-bottom: 1px solid var(--linie); padding: 8px 0 16px; }
  .kopf.offen .kopf-r nav a { padding: 14px 0; font-size: 20px; opacity: 1; }
  .kopf.offen .thema-zeile { display: flex; }
  .kopf.offen .kopf-r .knopf { padding: 6px; }          /* „Schließen“ ist breiter als „Menü“: bei offenem Menü bleibt vom Knopf die Pfeil-Kachel */
  .kopf.offen .kopf-r .knopf .text { display: none; }
  .kopf.offen .kopf-r .knopf .pfeil { display: grid; }
}
/* sehr schmal: erst ohne Pfeil-Kachel, unter 340 px wieder nur der Pfeil */
@media (max-width: 374px) { .kopf-r .knopf { padding: 6px 14px; } .kopf-r .knopf .pfeil { display: none; } }
@media (max-width: 339px) { .kopf-r .knopf { padding: 6px; } .kopf-r .knopf .text { display: none; } .kopf-r .knopf .pfeil { display: grid; } }

/* ---------- Linienraster: Linien als eigene Elemente, Plus an den Knoten ---------- */
.linie-h, .linie-v { position: absolute; background: var(--linie); pointer-events: none; }
.linie-h { height: 1px; left: 0; right: 0; transform-origin: left center; }
.linie-v { width: 1px; top: 0; bottom: 0; transform-origin: center top; }
.plus { position: absolute; width: 11px; height: 11px; translate: -50% -50%; pointer-events: none; color: var(--linie-stark); }
.plus::before, .plus::after { content: ""; position: absolute; background: currentColor; }
.plus::before { left: 5px; top: 0; width: 1px; height: 11px; }
.plus::after { top: 5px; left: 0; height: 1px; width: 11px; }
.zeichnen .linie-h { animation: linie-x .9s var(--aus) both; }
.zeichnen .linie-v { animation: linie-y .9s var(--aus) both; }
.zeichnen .plus { animation: plus .5s var(--aus) .5s both; }
@keyframes linie-x { from { transform: scaleX(0); } }
@keyframes linie-y { from { transform: scaleY(0); } }
@keyframes plus { from { opacity: 0; scale: .4; } }

/* ---------- Korn: eine feste Ebene, die springt (Monolog-Prinzip, eigenes Rauschen) ---------- */
.korn {
  position: fixed; top: -20vh; left: -20%; width: 140%; height: 140vh;   /* deckt den Sprung von höchstens 9 % ab */
  pointer-events: none; z-index: 10000; opacity: .05;   /* über dem Seitenwechsel (9999), Jonah 28.10.: „da fehlt der Grain“ */
  background-size: 400px 400px;
  animation: korn 1.2s steps(1, end) infinite;
}
@keyframes korn {
  0% { transform: translate(0, 0); } 10% { transform: translate(-6%, 4%); } 20% { transform: translate(5%, -7%); }
  30% { transform: translate(-8%, -3%); } 40% { transform: translate(7%, 6%); } 50% { transform: translate(-3%, 8%); }
  60% { transform: translate(4%, -5%); } 70% { transform: translate(-7%, 2%); } 80% { transform: translate(9%, -2%); }
  90% { transform: translate(-2%, -8%); } 100% { transform: translate(0, 0); }
}

/* ---------- Umschalter der Varianten (nur Entwurf) ---------- */
.varianten {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 90;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 3px; border-radius: 6px;
  width: max-content; max-width: calc(100vw - 16px);   /* sechs Fassungen: auf dem Handy in zwei Zeilen */
  background: rgb(var(--hg-k) / .86); box-shadow: 0 8px 24px -10px rgb(var(--hg-k) / .5);
}
.varianten a {
  min-height: 36px; padding: 0 14px; display: inline-flex; align-items: center;
  border-radius: var(--radius); color: rgb(var(--vg-k) / .72); text-decoration: none; font: 500 13px/1 var(--schrift);
}
.varianten a[aria-current="page"] { background: var(--sand); color: var(--nacht); }
.ohne-leiste .varianten { display: none; }
@media (max-width: 500px) { .varianten a { padding: 0 9px; font-size: 12px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
                           transition-duration: .01ms !important; transition-delay: 0s !important; }
  .korn { animation: none; }
}

/* Mit sichtbarem Umschalter steht der Hinweis „Abtauchen“ darüber */
html:not(.ohne-leiste) .weiter { bottom: 70px; }
