@font-face {
  font-family: "Shoulders";
  src: url("fonts/big-shoulders.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/literata-opsz.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Literata";
  src: url("fonts/literata-opsz-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ink: #0b0a12;
  --paper: #f1e8d8;
  --paper-dim: rgb(241 232 216 / .68);
  --line: rgb(241 232 216 / .14);
  --display: "Shoulders", "Arial Narrow", sans-serif;
  --read: "Literata", Georgia, serif;
  --ui: "Schibsted", ui-sans-serif, system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 16px/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; border-radius: 4px; }

/* ---------------------------------------------------------------- Leiste */
.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: max(16px, env(safe-area-inset-top)) clamp(18px, 4vw, 40px) 16px;
  font: 600 14px/1 var(--ui);
  pointer-events: none;
}
.bar a { pointer-events: auto; text-decoration: none; }
.bar-open { color: var(--paper-dim); font-weight: 500; }
.mark { font: 800 21px/1 var(--display); letter-spacing: .02em; }
.bar-world {
  flex: 1;
  color: var(--paper-dim);
  font-weight: 500;
  opacity: 0;
  transition: opacity .5s ease;
}
.bar-world.on { opacity: 1; }
.bar-open {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(11 10 18 / .45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color .2s ease, border-color .2s ease;
}

/* ---------------------------------------------------------------- Bühnen */
section { position: relative; height: var(--len, 300vh); }
.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.world .scene { filter: brightness(var(--boost, 1)); }

/* Der Name als Fenster: der Schleier ist tintenschwarz, die Schrift weiß -
   multipliziert bleibt nur dort Bild, wo Buchstaben sind. */
.veil {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  mix-blend-mode: multiply;
  opacity: var(--veil, 1);
  will-change: opacity;
}
.knock {
  margin: 0;
  color: #fff;
  font: 900 20vw/.82 var(--display);
  text-transform: uppercase;
  letter-spacing: -.005em;
  white-space: nowrap;
  transform: scale(var(--zoom, 1));
  will-change: transform;
}

.shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(11 10 18 / .82) 0%, rgb(11 10 18 / .45) 42%, transparent 70%),
    linear-gradient(0deg, rgb(11 10 18 / .7) 0%, transparent 45%);
  opacity: var(--shade, 0);
  pointer-events: none;
}
/* Helle Szenen brauchen mehr Schatten unter dem Text. */
.world.bright .shade {
  background:
    linear-gradient(90deg, rgb(6 20 26 / .82) 0%, rgb(6 20 26 / .5) 36%, transparent 60%),
    linear-gradient(0deg, rgb(6 20 26 / .45) 0%, transparent 32%);
}

/* Liegt die Figur links im Bild, steht der Text rechts. */
.world.text-right .story { left: auto; right: clamp(20px, 6vw, 96px); top: clamp(84px, 13vh, 140px); bottom: auto; }
.world.text-right .shade {
  background:
    linear-gradient(270deg, rgb(6 20 26 / .82) 0%, rgb(6 20 26 / .55) 45%, transparent 72%),
    linear-gradient(180deg, rgb(6 20 26 / .4) 0%, transparent 40%);
}
@media (max-width: 760px) {
  .world.text-right .story { right: auto; left: clamp(20px, 6vw, 96px); top: 84px; bottom: auto; }
  .world.text-right .shade {
    background: linear-gradient(180deg, rgb(6 20 26 / .9) 0%, rgb(6 20 26 / .6) 45%, transparent 70%);
  }
}

/* Ausblende zur nächsten Welt. */
.stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  opacity: var(--out, 0);
  pointer-events: none;
}

.story {
  position: absolute;
  left: clamp(20px, 6vw, 96px);
  bottom: clamp(40px, 11vh, 120px);
  width: min(36rem, calc(100% - 40px));
  opacity: var(--story, 0);
  transform: translateY(calc((1 - var(--story, 0)) * 24px));
}
.kicker {
  margin: 0 0 18px;
  font: 700 clamp(26px, 3.4vw, 44px)/1 var(--display);
  letter-spacing: .01em;
  background: linear-gradient(95deg, var(--a), var(--b));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}
.excerpt {
  margin: 0;
  font: 400 clamp(19px, 1.9vw, 25px)/1.55 var(--read);
  text-wrap: pretty;
}
.excerpt .w { opacity: .14; transition: opacity .25s linear; }
.excerpt .w.on { opacity: 1; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin: 30px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  color: var(--paper-dim);
  font-size: 14px;
  line-height: 1.5;
  opacity: var(--facts, 0);
}
.facts b {
  display: block;
  margin-bottom: 4px;
  color: var(--paper);
  font: 700 19px/1.1 var(--display);
  letter-spacing: .02em;
}

/* ---------------------------------------------------------------- Auftakt */
.hero-text {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  padding: 0 clamp(20px, 6vw, 96px);
}
.hero-title {
  margin: 0;
  font: 900 clamp(64px, 11.5vw, 210px)/.86 var(--display);
  text-transform: uppercase;
  letter-spacing: -.01em;
}
.hero-title .line {
  display: block;
  background: linear-gradient(100deg, #f4ead8 10%, #f2a33a 55%, #ff5f6d 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: translateX(var(--shift, 0));
}
.hero-title .line + .line { padding-left: clamp(24px, 9vw, 180px); }
.hero-sub {
  max-width: 30rem;
  margin: 28px 0 0;
  color: var(--paper-dim);
  font: 400 clamp(17px, 1.5vw, 21px)/1.5 var(--read);
}
.cue {
  position: absolute;
  left: 50%;
  bottom: 28px;
  width: 1px;
  height: 56px;
  overflow: hidden;
  background: var(--line);
  opacity: var(--cue, 1);
}
.cue i {
  position: absolute;
  inset: 0;
  background: var(--paper);
  animation: cue 2.4s cubic-bezier(.6, 0, .2, 1) infinite;
}
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(100%); } }

/* ---------------------------------------------------------------- Telefon */
.story-phone {
  inset: 0;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 6vw, 96px);
  padding: 80px clamp(20px, 6vw, 96px) 40px;
  transform: none;
}
.phone-copy { max-width: 26rem; }
.phone {
  flex: none;
  width: min(320px, 78vw);
  padding: 18px 14px 22px;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 40px;
  background: rgb(14 14 24 / .58);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 40px 90px rgb(0 0 0 / .5), inset 0 1px 0 rgb(255 255 255 / .08);
  transform: translateY(calc((1 - var(--story, 0)) * 60px)) rotate(calc((1 - var(--story, 0)) * -4deg));
}
.phone-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 6px 14px;
  border-bottom: 1px solid rgb(255 255 255 / .08);
  font-size: 15px;
}
.phone-head small { display: block; color: #8fd7a3; font-size: 12px; }
.ava {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--a), var(--b));
  color: #17142a;
  font: 800 17px/1 var(--display);
}
.chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 300px;
  margin: 0;
  padding: 16px 4px 0;
  list-style: none;
  font-size: 15px;
  line-height: 1.35;
}
.chat li {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 18px;
  opacity: 0;
  transform: translateY(10px) scale(.92);
  transform-origin: 0 100%;
  transition: opacity .3s ease, transform .45s cubic-bezier(.2, 1.2, .3, 1);
}
.chat li.on { opacity: 1; transform: none; }
.chat .them { align-self: flex-start; background: rgb(255 255 255 / .1); border-bottom-left-radius: 6px; }
.chat .me {
  align-self: flex-end;
  transform-origin: 100% 100%;
  background: linear-gradient(135deg, #7aa8ff, #b48bff);
  color: #101022;
  border-bottom-right-radius: 6px;
}
.chat .typing { display: flex; align-self: flex-start; gap: 4px; padding: 12px 14px; background: rgb(255 255 255 / .1); }
.chat .typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(255 255 255 / .6);
  animation: hop 1.2s ease-in-out infinite;
}
.chat .typing i:nth-child(2) { animation-delay: .15s; }
.chat .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 30% { transform: translateY(-4px); } 60% { transform: none; } }

/* Im Video sitzt Mia links, rechts das Fenster: die Nachrichten schweben dort
   frei, ohne Handy-Rahmen - als würde man ihr über die Schulter sehen. */
.phone-world .shade {
  background:
    linear-gradient(0deg, rgb(11 10 18 / .88) 0%, rgb(11 10 18 / .35) 40%, transparent 60%),
    linear-gradient(270deg, rgb(11 10 18 / .55) 0%, transparent 45%);
}
.phone-world .story-phone { justify-content: flex-end; align-items: center; }
.phone-world .phone {
  width: min(340px, 80vw);
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.phone-world .phone-head { display: none; }
.phone-world .chat { min-height: 0; padding: 0; gap: 8px; }
.phone-world .chat li {
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 10px 30px rgb(0 0 0 / .35);
}
.phone-world .chat .them, .phone-world .chat .typing { background: rgb(20 18 32 / .55); }
.phone-world .phone-copy {
  position: absolute;
  left: clamp(20px, 6vw, 96px);
  bottom: clamp(36px, 9vh, 100px);
}

/* ---------------------------------------------------------------- Gedächtnis */
.stage-plain {
  display: grid;
  align-content: center;
  gap: clamp(28px, 5vh, 56px);
  background:
    radial-gradient(70% 60% at 80% 20%, rgb(242 163 58 / .08), transparent 70%),
    radial-gradient(60% 60% at 10% 90%, rgb(255 79 139 / .07), transparent 70%),
    var(--ink);
}
.memory-title {
  margin: 0;
  padding: 0 clamp(20px, 6vw, 96px);
  font: 900 clamp(54px, 9vw, 160px)/.88 var(--display);
  text-transform: uppercase;
  background: linear-gradient(100deg, #f4ead8, #f2a33a 60%, #ff5f6d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rows { display: grid; gap: 12px; }
.row {
  display: flex;
  gap: 12px;
  width: max-content;
  transform: translateX(var(--x, 0));
  will-change: transform;
}
.row span {
  flex: none;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(241 232 216 / .035);
  color: var(--paper-dim);
  font-size: 14px;
}
.row b { margin-right: 10px; color: var(--paper); font: 700 18px/1 var(--display); letter-spacing: .02em; }
.memory-copy {
  max-width: 40rem;
  margin: 0;
  padding: 0 clamp(20px, 6vw, 96px);
  color: var(--paper-dim);
  font: 400 clamp(17px, 1.5vw, 21px)/1.6 var(--read);
}

/* ---------------------------------------------------------------- Schluss */
.outro-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 30px;
  padding: 0 24px;
  text-align: center;
}
.outro-title {
  margin: 0;
  font: 900 clamp(56px, 10vw, 180px)/.86 var(--display);
  text-transform: uppercase;
  text-wrap: balance;
}
.go {
  padding: 18px 30px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 800 22px/1 var(--display);
  letter-spacing: .03em;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.2, 1.4, .4, 1), background-color .2s ease;
}
.go:hover { transform: scale(1.04); background: #fff; }
.soon {
  margin: 0;
  padding: 16px 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  font: 700 22px/1 var(--display);
  letter-spacing: .03em;
}
.fine { margin: 0; color: var(--paper-dim); font-size: 13px; }

/* ---------------------------------------------------------------- Schmal */
@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; gap: 14px; }
  .facts li:nth-child(2) { display: none; }
  .story { bottom: max(28px, env(safe-area-inset-bottom)); }
  .shade {
    background: linear-gradient(0deg, rgb(11 10 18 / .92) 0%, rgb(11 10 18 / .6) 50%, transparent 85%);
  }
  .story-phone { flex-direction: column; justify-content: flex-end; gap: 18px; padding-bottom: 32px; }
  .phone-world .story-phone { justify-content: flex-start; align-items: flex-end; padding-top: 110px; }
  .phone-world .chat { font-size: 14px; gap: 6px; }
  /* Hochkant ist wenig Platz über Mias Kopf: die ersten beiden Nachrichten entfallen. */
  .phone-world .chat li:nth-child(-n+2) { display: none; }
  .phone-world .phone-copy { right: 20px; bottom: max(28px, env(safe-area-inset-bottom)); }
  .phone { width: min(300px, 80vw); }
  .chat { min-height: 230px; font-size: 14px; }
  .phone-copy .excerpt { font-size: 17px; }
  .bar-world { visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .cue i, .chat .typing i { animation: none; }
  .chat li, .excerpt .w { transition: none; }
}
