/* Laika Loves Lassie – Brückenseite
   Farbe kommt aus der Collage; darunter Papierweiß, Schwarz aus dem Logo, Korallenrot für den Schritt hinaus.
   Schrift: Logo in Gill Sans (als Pfade), alle Texte in IBM Plex Mono. */

@font-face { font-family: "Plex Mono"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --sky: #2b86a8;          /* Himmel der Collage, Fallback bis das Bild lädt */
  --paper: #ffffff;
  --black: #000000;        /* Logo-Schwarz */
  --ink-soft: #4a4a4a;
  --rule: rgba(0, 0, 0, .16);
  --push: #f78770;         /* Koralle: die Verbindung (Button, aktive Sprache) */
  --teal: #83ac97;         /* Laika: Himmel, Orbit, Funk */
  --mustard: #f3c65d;      /* Lassie: Fernsehgold, Fell */
  --gutter: clamp(20px, 5vw, 72px);
  --max: 1680px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font-family: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 12px; background: var(--black); color: var(--paper); padding: 8px 12px; z-index: 10; }

/* Kopf: nur die Sprachwahl, liegt über dem Foto */
.head { position: absolute; inset: 0 0 auto; z-index: 3; padding-top: 22px; }
.head .wrap { display: flex; justify-content: flex-end; }
.lang { display: flex; gap: 2px; font-size: 14px; color: var(--paper); }
.legal .lang { color: var(--black); }
.lang a, .lang span { padding: 6px 8px; text-decoration: none; }
.lang > :last-child { padding-right: 0; }
.lang [aria-current] { box-shadow: inset 0 -2px 0 var(--push); }
.lang a { opacity: .55; }
.lang a:hover, .lang a:focus-visible { opacity: 1; }

/* Bühne: nur Collage und Logo */
/* Bühne bleibt stehen (sticky), der weiße Textblock schiebt sich davor; Himmel, Hunde und Logo steigen unterschiedlich schnell (board.js). */
.hero { position: sticky; top: 0; z-index: 0; margin: 0; height: 100svh; min-height: 0; display: flex; align-items: center; overflow: hidden; background: var(--sky); }
.hero picture, .hero .shot { position: absolute; inset: 0; }
.hero .shot { width: 100%; height: 100%; object-fit: cover; object-position: 50% 82%; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .12; mix-blend-mode: multiply;
}
.hero > .wrap { position: relative; z-index: 2; }
.hero [data-speed] { will-change: transform; }
/* Sendestreifen an der Oberkante des Textblocks (Naht zu Bild): Laika | Verbindung | Lassie */
.text::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, var(--teal) 0 42%, var(--push) 42% 58%, var(--mustard) 58% 100%);
  animation: send .55s cubic-bezier(.3, .7, .2, 1) .25s both;
}
@keyframes send { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

::selection { background: var(--mustard); color: var(--black); }
.logo { display: block; width: clamp(200px, 19vw, 280px); height: auto; }
.hero .logo { aspect-ratio: 205 / 227; overflow: visible; }

/* Milch: die ausgestanzten Buchstaben füllen sich nach dem Laden von unten nach oben weiß */
.milk { transform: translateY(186px); animation: milk-rise 2.4s cubic-bezier(.45, .05, .35, 1) .9s forwards; }
.milk-wave { animation: milk-slosh .9s linear 4 .9s; }
@keyframes milk-rise { to { transform: translateY(8px); } }
@keyframes milk-slosh { from { transform: translateX(0); } to { transform: translateX(-100px); } }

/* Bildunterschrift: erste Zeile unter der Collage */
.credit { margin: 0 0 clamp(40px, 6vw, 72px); font-size: 12px; line-height: 1.5; color: var(--ink-soft); }

/* Text unter dem Bild */
.text { position: relative; z-index: 1; margin-top: -6px; background: linear-gradient(transparent 0 6px, var(--paper) 6px); padding: 22px 0 clamp(48px, 7vw, 96px); }
.foot { position: relative; z-index: 1; background: var(--paper); }
.col > * { max-width: 74ch; }
.col > h1 { max-width: none; }
.col > .note { max-width: 88ch; }
.col > .credit { max-width: none; text-align: right; font-size: 12px; }

h1 {
  margin: 0 0 1.4em;
  font-weight: 500;
  font-size: clamp(19px, 1.75vw, 24px);
  line-height: 1.35;
  letter-spacing: -.015em;
  text-wrap: pretty;
}
h1 .where { display: block; }

.sub { margin: 0 0 2.4em; font-size: 17px; line-height: 1.65; text-wrap: pretty; }
.cta { margin: 0 0 3.5em; }
.note { margin: 0; padding-top: 1.2em; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-soft); }

/* Button: rote Outline, füllt sich beim Hover ungleichmäßig mit Druckrot */
.go {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-block;
  border: 2px solid var(--push); color: var(--black);
  border-radius: 2px;
  font-weight: 500; font-size: 16px; text-decoration: none;
  padding: 14px 22px 15px;
}
/* Füllung mit schräger Vorderkante; die Neigung (--sk) setzt board.js bei jedem Hover neu */
.go .fill {
  position: absolute; top: -2px; bottom: -2px; left: -30%; width: 160%; z-index: -1;
  background: var(--push);
  transform: translateX(-100%) skewX(var(--sk, -18deg));
  transition: transform .27s linear(0, .3 22%, .34 34%, .66 52%, .7 64%, 1);
}
.go:hover .fill, .go:focus-visible .fill { transform: translateX(0) skewX(var(--sk, -18deg)); }
.nw { white-space: nowrap; }
.go:focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }

/* Links mit wachsendem Unterstrich */
.u { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .22s ease; }
.u:hover, .u:focus-visible { background-size: 100% 2px; background-image: linear-gradient(var(--teal), var(--teal)); }
.note .u, .legal main .u { color: var(--black); background-size: 100% 1px; }


/* Fuß */
.foot { padding: 0 0 28px; font-size: 13px; color: var(--ink-soft); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 18px; background: linear-gradient(var(--rule), var(--rule)) var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px no-repeat; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--ink-soft); }
.foot a:hover { color: var(--black); }

/* Schreibmaschine */
.board .ch { color: transparent; }
.board .ch.on { color: inherit; }
.caret { display: inline-block; width: .6em; height: 1.05em; margin-left: .04em; vertical-align: -.15em; background: currentColor; animation: caret-blink 1s steps(1) infinite; }
.caret.gone { display: none; }
@keyframes caret-blink { 50% { opacity: 0; } }
.after { transition: opacity .5s ease; }
.board-wait .after { opacity: 0; }

/* Rechtstexte: weißes Papier */
body.legal { background: var(--paper); }
.legal .head { position: static; }
.legal main { padding: 24px 0 72px; }
.legal main .wrap { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 64ch); gap: clamp(32px, 6vw, 96px); align-items: start; }
.legal .logo { width: 150px; }
.legal h1 { font-size: clamp(24px, 2.6vw, 32px); margin: 0 0 1.2em; }
.legal h2 { font-size: 16px; font-weight: 500; margin: 2.4em 0 .5em; }
.legal p, .legal li { font-size: 15px; }
.legal .back { display: inline-block; margin-top: 3em; font-size: 14px; }

/* Tablet und Mobil: Logo zentriert oben */
@media (max-width: 1024px) {
  .hero { align-items: flex-start; }
  .hero > .wrap { padding-top: 76px; display: flex; justify-content: center; }
  .logo { width: clamp(150px, 26vw, 220px); }
  .hero .shot { object-position: 62% 78%; }
}
@media (max-width: 1024px) and (orientation: landscape) {
  .logo { width: 180px; }
}
@media (max-width: 1024px) and (orientation: portrait) {
  .hero .shot { object-position: 66% 100%; }
}
@media (max-width: 700px) {
  .sub { font-size: 16px; }
  h1 .where { display: inline; }
  .go { display: block; text-align: center; }
  .legal main .wrap { grid-template-columns: 1fr; gap: 24px; }
  .legal .logo { width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .go .fill { transition: none; }
  .text::before { animation: none; }
  .milk { animation: none; transform: translateY(8px); }
  .milk-wave { animation: none; }
  .u, .after { transition: none; }
}
