/* tinimaci.com – gemeinsames Aussehen für Startseite und Unterseiten */

@font-face { font-family: "Syne"; font-weight: 700; font-style: normal; font-display: swap; src: url("/schrift/syne-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Syne"; font-weight: 800; font-style: normal; font-display: swap; src: url("/schrift/syne-latin-800-normal.woff2") format("woff2"); }

:root {
  --nacht: #05070d;
  --tinte: #f4f6fb;                 /* Schriftfarbe auf dem Himmel, wird beim Scrollen umgestellt */
  --himmel-oben: #05070d;
  --himmel-unten: #14182d;
  --akzent: #ffb561;
  --schrift: "Syne", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --rund: 26px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--nacht);
  color: var(--tinte);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; }

/* ---------- Himmel ---------- */
.himmel { position: fixed; inset: 0; z-index: 0; background: linear-gradient(var(--himmel-oben), var(--himmel-unten)); overflow: hidden; pointer-events: none; }
#sterne { position: absolute; inset: 0; width: 100%; height: 100%; }
.sonne, .mond { position: absolute; left: 0; top: 0; border-radius: 50%; will-change: transform, opacity; opacity: 0; }
.sonne { width: 96px; height: 96px; margin: -48px 0 0 -48px; background: radial-gradient(circle, #fffdf2 0 38%, var(--sonne, #ffe9a8) 62%, rgba(255, 220, 150, 0) 72%); box-shadow: 0 0 80px 40px var(--schein, rgba(255, 226, 160, 0.45)); }
.mond { width: 64px; height: 64px; margin: -32px 0 0 -32px; box-shadow: inset -15px 7px 0 0 #e9eeff, 0 0 40px 6px rgba(200, 215, 255, 0.18); }

main, .fuss { position: relative; z-index: 1; }

/* ---------- Leiste ---------- */
.leiste {
  position: fixed;
  left: 12px;
  right: 12px;
  top: max(10px, env(safe-area-inset-top));
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px 9px 18px;
  color: #f4f6fb;
  background: rgba(8, 10, 20, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: translate 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s;
}
.start .leiste { translate: 0 -160%; opacity: 0; }
.start .leiste.da { translate: 0 0; opacity: 1; }
.marke { font-family: var(--schrift); font-weight: 800; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; }
.leiste nav { display: flex; align-items: center; gap: 2px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.leiste nav a, .leiste nav .bald { padding: 7px 10px; border-radius: 999px; text-decoration: none; }
.leiste nav a { padding-left: 14px; padding-right: 14px; margin-right: 4px; background: #f4f6fb; color: #0a0d18; }
.leiste nav a[aria-current="page"] { background: var(--akzent); }
.leiste nav .bald { opacity: 0.45; }

/* ---------- Auftakt ---------- */
.haft { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.auftakt { height: 280vh; height: 280svh; }
.auftakt .haft { background: var(--nacht); }
.auftakt-bild { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
/* Schwarz mal Foto = Schwarz, Weiß mal Foto = Foto: Die Buchstaben werden zum Fenster. */
.maske { position: absolute; inset: 0; display: grid; place-items: center; background: #04050a; mix-blend-mode: multiply; will-change: transform, opacity; }
#wort { margin: 0; color: #fff; font-family: var(--schrift); font-weight: 800; font-size: 14vw; line-height: 1; letter-spacing: -0.06em; white-space: nowrap; }
#wort span { display: inline-block; }
.unterzeile { position: absolute; left: 0; right: 0; top: 58%; margin: 0; text-align: center; color: #c9cfdf; font-size: clamp(14px, 3.8vw, 20px); letter-spacing: 0.22em; text-transform: uppercase; }
.rollhinweis { position: absolute; left: 0; right: 0; bottom: max(26px, env(safe-area-inset-bottom)); margin: 0; text-align: center; color: #8d95aa; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; }
.rollhinweis::after { content: ""; display: block; width: 1px; height: 34px; margin: 10px auto 0; background: linear-gradient(#8d95aa, transparent); animation: tropfen 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes tropfen { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Kapitel ---------- */
.kapitel, .entdecken { padding-top: 16vh; }
.kapitel-kopf { position: relative; max-width: 1100px; margin: 0 auto; padding: 0 22px 9vh; text-shadow: 0 2px 22px var(--schatten, transparent); }
.nr { display: block; text-shadow: none; font-family: var(--schrift); font-weight: 800; font-size: clamp(90px, 30vw, 260px); line-height: 0.8; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1.5px var(--tinte); opacity: 0.28; }
.titel { margin: -0.42em 0 0; font-family: var(--schrift); font-weight: 800; font-size: clamp(46px, 13.5vw, 140px); line-height: 0.95; letter-spacing: -0.05em; overflow: hidden; padding-bottom: 0.12em; }
.titel .z { display: inline-block; translate: 0 115%; transition: translate 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: calc(var(--i) * 45ms); white-space: pre; }
.titel.da .z { translate: 0 0; }
.kapitel-kopf p { max-width: 420px; margin: 14px 0 0; font-size: 18px; opacity: 0; translate: 0 18px; transition: opacity 0.8s 0.35s, translate 0.8s 0.35s; }
.kapitel-kopf .titel.da + p { opacity: 0.85; translate: 0 0; }

figure { margin: 0; }
.gross { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: inherit; overflow: hidden; }
.gross img, .feuer > img { width: 100%; height: 100%; object-fit: cover; }

/* 01: Bahn, die seitwärts läuft */
.quer .haft { display: flex; align-items: center; }
.bahn { display: flex; flex: none; width: max-content; gap: 5vw; padding: 0 9vw; will-change: transform; }
.karte { flex: none; width: min(80vw, 560px); height: 66vh; height: 66svh; border-radius: var(--rund); overflow: hidden; box-shadow: 0 30px 70px rgba(5, 10, 30, 0.35); will-change: transform; }
.karte img { width: 118%; max-width: none; margin-left: -9%; will-change: transform; }

/* 02: Stapel */
.stapel { height: 430vh; height: 430svh; }
.deck { position: absolute; inset: 0; display: grid; place-items: center; }
.blatt { grid-area: 1 / 1; width: min(76vw, 440px); aspect-ratio: 3 / 4; max-height: 74svh; border-radius: var(--rund); overflow: hidden; box-shadow: 0 30px 80px rgba(5, 10, 30, 0.4); border: 6px solid #fff; will-change: transform; }
.stapel-hinweis { position: absolute; left: 0; right: 0; bottom: 5vh; margin: 0; text-align: center; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.6; }

/* 03 und 04: große Bilder */
.weit, .spalten { max-width: 1100px; margin: 0 auto; }
.voll { position: relative; height: 92vh; height: 92svh; margin: 0 12px 12vh; border-radius: var(--rund); overflow: hidden; will-change: clip-path, transform; }
.voll img { will-change: transform; }
.voll.quer-bild { height: auto; aspect-ratio: 4 / 3; max-height: 92svh; }
.paar { display: grid; gap: 14px; padding: 0 12px 12vh; }
.paar figure { aspect-ratio: 4 / 3; border-radius: var(--rund); overflow: hidden; will-change: transform; }
.paar figure:first-child { margin-right: 14%; }
.paar figure:last-child { margin-left: 14%; }
.spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 12px 18vh; }
.spalten figure { aspect-ratio: 3 / 4.6; border-radius: var(--rund); overflow: hidden; will-change: transform; }
.spalten .versetzt { margin-top: 26vh; }

.feuer { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.feuer canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.feuer figcaption { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; color: #ffd9a8; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.8; pointer-events: none; }

/* ---------- Bereiche ---------- */
.entdecken { padding-bottom: 12vh; }
.kacheln { display: grid; gap: 16px; max-width: 1100px; margin: 0 auto; padding: 0 14px; perspective: 1200px; }
.kachel { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 300px; padding: 22px; border-radius: var(--rund); overflow: hidden; color: #fff; text-decoration: none; background: #10142a; border: 1px solid rgba(255, 255, 255, 0.14); transform-style: preserve-3d; transition: transform 0.25s ease-out; }
.kachel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s ease; }
.kachel:hover img { scale: 1.06; }
.kachel::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(5, 7, 13, 0.05) 30%, rgba(5, 7, 13, 0.88)); }
/* Lichtfleck, der dem Finger oder der Maus folgt */
.kachel::after { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.28), transparent 45%); opacity: 0; transition: opacity 0.3s; }
.kachel:hover::after, .kachel.beruehrt::after { opacity: 1; }
.kachel > span { position: relative; z-index: 2; }
.k-marke { align-self: flex-start; margin-bottom: auto; padding: 5px 12px; background: var(--akzent); color: #1b1206; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.k-titel { font-family: var(--schrift); font-weight: 800; font-size: clamp(40px, 11vw, 64px); line-height: 1; letter-spacing: -0.05em; }
.k-text { margin-top: 6px; opacity: 0.85; }
.kachel.bald img { filter: grayscale(0.7) brightness(0.55); }
.kachel.bald .k-marke { background: rgba(255, 255, 255, 0.16); color: #fff; }

.fuss { padding: 8vh 22px max(8vh, env(safe-area-inset-bottom)); text-align: center; color: #aab2c8; }
.fuss .marke { font-size: clamp(40px, 13vw, 150px); color: transparent; -webkit-text-stroke: 1.5px rgba(244, 246, 251, 0.5); letter-spacing: -0.06em; }
.fuss p { margin: 6px 0 0; font-size: 14px; letter-spacing: 0.08em; }

/* ---------- Großansicht ---------- */
.grossbild { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 14px; background: rgba(3, 4, 9, 0.95); cursor: zoom-out; animation: einblenden 0.25s ease; }
.grossbild[hidden] { display: none; }
.grossbild img { max-width: 100%; max-height: 92vh; border-radius: 14px; }
.grossbild button { position: absolute; right: 14px; top: max(12px, env(safe-area-inset-top)); width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
@keyframes einblenden { from { opacity: 0; } }

/* ---------- Unterseiten ---------- */
.unterseite { min-height: 100vh; background: linear-gradient(#04060f, #0c1230 70%, #1a1440); color: #f4f6fb; }
.unterseite main { max-width: 1000px; margin: 0 auto; padding: 150px 18px 10vh; }
.unterseite h1 { margin: 0; font-family: var(--schrift); font-weight: 800; font-size: clamp(48px, 15vw, 170px); line-height: 0.9; letter-spacing: -0.06em; }
.unterseite .vorspann { max-width: 460px; margin: 16px 0 44px; font-size: 18px; opacity: 0.8; }
.spielkarte { display: grid; border-radius: var(--rund); overflow: hidden; background: #10142a; border: 1px solid rgba(255, 255, 255, 0.14); }
.spielkarte img { width: 100%; aspect-ratio: 8 / 7; object-fit: cover; }
.spielkarte .inhalt { padding: 24px 22px 28px; }
.spielkarte h2 { margin: 0; font-family: var(--schrift); font-weight: 800; font-size: clamp(34px, 9vw, 54px); letter-spacing: -0.04em; line-height: 1; }
.spielkarte p { margin: 12px 0 0; opacity: 0.85; }
.spielkarte ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.spielkarte li { padding: 5px 12px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 999px; font-size: 13px; }
.knopf { display: inline-block; margin-top: 22px; padding: 15px 34px; background: var(--akzent); color: #1b1206; font-weight: 700; text-decoration: none; border-radius: 999px; transition: scale 0.2s; }
.knopf:hover { scale: 1.05; }
.mehr { margin-top: 34px; opacity: 0.55; font-size: 15px; }
.fehlerseite main { padding-top: 30vh; text-align: center; }
.fehlerseite .vorspann { margin-left: auto; margin-right: auto; }

@media (min-width: 800px) {
  .leiste { left: 50%; right: auto; translate: -50% 0; min-width: 520px; }
  .start .leiste { translate: -50% -160%; }
  .start .leiste.da { translate: -50% 0; }
  .voll { margin-left: auto; margin-right: auto; max-width: 900px; }
  .paar { grid-template-columns: 1fr 1fr; }
  .paar figure:first-child { margin: 0 0 12vh; }
  .paar figure:last-child { margin: 12vh 0 0; }
  .kacheln { grid-template-columns: 1.4fr 1fr 1fr; }
  .kachel { min-height: 420px; }
  .spielkarte { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .spielkarte img { height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .titel .z { translate: 0 0; transition: none; }
  .kapitel-kopf p { opacity: 0.85; translate: 0 0; }
  .rollhinweis::after { animation: none; }
}
