/* Startseite (alle Sprachen). Überschriften: Pixelify Sans (Marke), Lesetext: Figtree.
   Farben aus der Wiese bei Dämmerung: Nacht, Dämmer, Koralle, Mond, Gras. */
@font-face { font-family: 'Pixelify Sans'; font-weight: 400; font-display: swap; src: url(fonts/pixelify-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Pixelify Sans'; font-weight: 700; font-display: swap; src: url(fonts/pixelify-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 300 900; font-display: swap; src: url(fonts/figtree-latin-wght-normal.woff2) format('woff2'); }

:root {
  --night: #0d0820; --dusk: #1a1136; --plum: #2b1b52; --line: rgba(255,255,255,.13);
  --ink: #f6f1ff; --mute: #b9aedb; --coral: #ff5470; --coral-d: #a61d4a; --moon: #ffd36b; --grass: #6fe07c; --ice: #6fdcff;
  --px: 'Pixelify Sans', ui-monospace, monospace;
  --txt: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --pad: clamp(20px, 5vw, 56px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--night); color: var(--ink); font-family: var(--txt); font-size: 17px; line-height: 1.55; overflow-x: hidden; touch-action: manipulation;
  font-variant-ligatures: none; font-feature-settings: 'liga' 0, 'clig' 0; -webkit-font-smoothing: antialiased; }
button { font-variant-ligatures: none; font-feature-settings: 'liga' 0, 'clig' 0; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--moon); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 60; padding: 10px 16px; background: var(--moon); color: #2a1600; font-weight: 700; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ── Knöpfe ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; padding: 13px 22px; border-radius: 12px; border: 2px solid rgba(255,255,255,.2); background: rgba(27,17,54,.72); color: var(--ink);
  font: 700 18px/1.1 var(--px); letter-spacing: .04em; text-decoration: none; cursor: pointer; box-shadow: 0 4px 0 rgba(0,0,0,.55); transition: transform .08s, background .12s, border-color .12s; backdrop-filter: blur(6px); }
.btn:hover, .btn:focus-visible { transform: translateY(-2px); border-color: var(--moon); background: #3d2c6e; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.55); }
.btn-acc { background: linear-gradient(180deg, #ffe9a6, var(--moon) 48%, #f0ad2e); color: #2a1600; border-color: #fff4cf; backdrop-filter: none;
  box-shadow: 0 6px 0 #9a6410, 0 14px 40px rgba(255,190,70,.35); }
.btn-acc:hover, .btn-acc:focus-visible { background: linear-gradient(180deg, #fff6d6, #ffe08a 48%, #ffc04a); border-color: #fff; }
.btn-acc:active { box-shadow: 0 2px 0 #9a6410; }
.btn-play { font-size: clamp(22px, 2.6vw, 32px); padding: 20px 44px; letter-spacing: .06em; border-radius: 16px; }
.btn-sm { font-size: 15px; padding: 9px 16px; border-radius: 10px; box-shadow: 0 3px 0 rgba(0,0,0,.55); }

/* ── Kopfzeile über dem Hero ── */
.top { position: absolute; z-index: 5; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(14px, env(safe-area-inset-top)) max(var(--pad), env(safe-area-inset-right)) 14px max(var(--pad), env(safe-area-inset-left)); }
.top .langs { display: flex; gap: 2px; font: 700 14px/1 var(--px); letter-spacing: .06em; }
.top .langs a { padding: 10px 9px; border-radius: 8px; text-decoration: none; color: rgba(255,255,255,.72); }
.top .langs a:hover, .top .langs a:focus-visible { color: #fff; background: rgba(255,255,255,.12); }
.top .langs a[aria-current] { color: var(--moon); }
.top .right { display: flex; align-items: center; gap: 10px; }

/* ── Hero: Logo in der Mitte über der Titelszene (im echten Spiel gerendert, läuft als Schleife) ── */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; justify-content: center; isolation: isolate; overflow: hidden; background: #171a44; }
.hero .bg { position: absolute; inset: 0; z-index: -2; }
.hero .bg img, .hero .bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; image-rendering: pixelated; }
.hero .bg video { opacity: 0; transition: opacity .6s; }
.hero .bg video.on { opacity: 1; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(13,8,32,.5) 0, rgba(13,8,32,0) 16%, rgba(13,8,32,0) 84%, var(--night) 100%); }
.hero .in { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(76px, 11vh, 120px) 16px 0; width: 100%; }
.logo { display: grid; justify-items: center; line-height: .86; font-family: var(--px); font-weight: 700; position: relative; width: max-content; max-width: 100%; }
.logo span { --o: #1a0f33; }
.logo .a { font-size: clamp(16px, 2.2vh, 26px); letter-spacing: .6em; margin-right: -.6em; color: #fff; text-shadow: 0 3px 0 var(--o); margin-bottom: .5em; }
.logo .b { font-size: clamp(74px, min(20.5vw, 25vh), 240px); color: var(--coral); letter-spacing: -.01em;
  text-shadow: .03em 0 0 var(--coral-d), .06em .06em 0 var(--o), -.03em -.03em 0 var(--o), .03em -.03em 0 var(--o), -.03em .03em 0 var(--o), .09em .12em 0 rgba(13,8,32,.55); }
.logo .c { font-size: clamp(33.5px, min(9.3vw, 11.3vh), 109px); color: #fff; margin-top: .12em;
  text-shadow: .05em .05em 0 var(--o), -.04em -.04em 0 var(--o), .04em -.04em 0 var(--o), -.04em .04em 0 var(--o), .1em .13em 0 rgba(13,8,32,.55); }
.logo .v { position: absolute; right: 0; top: clamp(4px, 2.2vh, 24px); transform: translate(45%, 0) rotate(8deg); font-size: clamp(15px, 2.3vh, 24px); line-height: 1; padding: .3em .55em; border-radius: 8px; background: var(--moon); color: #2a1600; box-shadow: 0 4px 0 rgba(0,0,0,.5); }
.tag { margin-top: clamp(12px, 2.4vh, 26px); font: 700 clamp(19px, min(2.4vw, 3.6vh), 32px)/1.2 var(--px); color: #fff; text-shadow: 0 3px 0 #1a0f33, 0 0 18px rgba(26,15,51,.8); }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 18px; margin-top: clamp(16px, 3.2vh, 34px); }
.note { margin-top: 14px; font-size: 15.5px; font-weight: 600; color: #fff; text-shadow: 0 1px 0 #1a0f33, 0 0 14px rgba(26,15,51,.95); }

@media (prefers-reduced-motion: no-preference) {
  .logo span, .hero .tag, .hero .cta, .hero .note { animation: land .5s cubic-bezier(.2,1.4,.4,1) both; }
  .logo .b { animation-delay: .08s; } .logo .c { animation-delay: .16s; } .logo .v { animation: stamp .35s .55s both; }
  .hero .tag { animation-delay: .3s; } .hero .cta { animation-delay: .4s; } .hero .note { animation-delay: .5s; }
  @keyframes land { from { opacity: 0; transform: translateY(-28px); } to { opacity: 1; transform: none; } }
  @keyframes stamp { from { opacity: 0; transform: translate(45%, 0) rotate(8deg) scale(2.2); } to { opacity: 1; transform: translate(45%, 0) rotate(8deg) scale(1); } }
}

/* ── Darunter: ein Satz, das Spiel im Rahmen, die Fakten ── */
.intro { text-align: center; padding-top: clamp(40px, 6vw, 80px); }
.lead { margin: 0 auto; max-width: 27em; font-size: clamp(21px, 2.3vw, 32px); line-height: 1.35; font-weight: 500; color: #ece5ff; }
.lead b { color: var(--moon); font-weight: 700; }
.screen { position: relative; margin: clamp(28px, 4vw, 52px) auto 0; max-width: 1040px; aspect-ratio: 16/9; border-radius: 18px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 3px #3b2a78, 0 0 0 10px #150e2e, 0 30px 100px rgba(120,80,255,.35), 0 0 120px rgba(255,84,112,.18); }
.screen video { width: 100%; height: 100%; object-fit: cover; }
.lbl { position: absolute; left: 14px; bottom: 12px; padding: 5px 11px; border-radius: 7px; background: rgba(8,5,18,.72); font: 700 14px/1 var(--px); letter-spacing: .05em; color: #fff; }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: clamp(26px, 3.4vw, 40px); font-size: 16.5px; font-weight: 600; color: #d8cff3; }
.badge.ok { color: var(--grass); } .badge.gold { color: var(--moon); }

/* ── Abschnitte ── */
.sec { padding: clamp(56px, 9vw, 120px) 0; }
.sec h2, .final h2 { font: 700 clamp(34px, 5vw, 64px)/1 var(--px); letter-spacing: .01em; text-shadow: .05em .05em 0 rgba(0,0,0,.5); }
.sec .sub { margin-top: 12px; color: var(--mute); font-size: clamp(17px, 1.4vw, 20px); max-width: 36em; }
.sec .head { margin-bottom: clamp(24px, 4vw, 44px); }
.new { display: inline-block; padding: 2px 8px; margin-left: 6px; border-radius: 6px; background: #d62a50; color: #fff; font: 700 12px/1.3 var(--px); letter-spacing: .06em; vertical-align: middle; }

/* ── Welten: echte Bilder aus dem Spiel ── */
.worlds { display: grid; gap: clamp(10px, 1.4vw, 18px); grid-template-columns: repeat(3, 1fr); }
.world { position: relative; display: block; border-radius: 16px; overflow: hidden; background: #000; text-decoration: none; aspect-ratio: 16/9; box-shadow: 0 6px 0 rgba(0,0,0,.5); outline: 2px solid var(--line); outline-offset: -2px; }
.world:first-child { grid-column: span 2; grid-row: span 2; }
.world img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.world div { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 13px; background: linear-gradient(180deg, transparent, rgba(8,4,20,.9)); }
.world b { display: block; font: 700 clamp(17px, 1.7vw, 24px)/1.15 var(--px); }
.world:first-child b { font-size: clamp(22px, 3vw, 40px); }
.world span:not(.new) { display: block; margin-top: 2px; font-size: 14.5px; color: #d5cbf2; }
.world:first-child span:not(.new) { font-size: clamp(15px, 1.4vw, 19px); }
.world:hover img, .world:focus-visible img { transform: scale(1.05); }
.world:hover, .world:focus-visible { outline-color: var(--moon); }
/* Welten 10–29: dieselben Karten, klein, fünf in einer Reihe; die letzte Reihe steht mittig */
.worlds.more { --g: clamp(8px, 1.1vw, 14px); --n: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--g); margin-top: clamp(10px, 1.4vw, 18px); }
.worlds.more .world { flex: 0 0 calc((100% - (var(--n) - 1) * var(--g)) / var(--n)); border-radius: 12px; box-shadow: 0 4px 0 rgba(0,0,0,.5); }
.worlds.more .world div { padding: 28px 11px 9px; }
.worlds.more .world b { font-size: clamp(14px, 1.2vw, 17px); }

/* ── Was drin ist ── */
.feat { background: linear-gradient(180deg, var(--night), var(--dusk) 30%, var(--dusk) 70%, var(--night)); }
.grid { display: grid; gap: clamp(26px, 3.4vw, 48px) clamp(24px, 4vw, 56px); grid-template-columns: repeat(3, 1fr); }
.card { padding-top: 18px; border-top: 3px solid var(--coral); }
.card:nth-child(3n+2) { border-top-color: var(--moon); } .card:nth-child(3n) { border-top-color: var(--ice); }
.card .ic { font-size: 30px; line-height: 1; }
.card h3 { font: 700 clamp(21px, 1.9vw, 26px)/1.15 var(--px); margin: 12px 0 8px; }
.card p { color: #cfc5ee; font-size: 16.5px; }

/* ── Fallen ── */
.traps { columns: 3 260px; column-gap: clamp(24px, 4vw, 56px); }
.trap { break-inside: avoid; display: flex; gap: 14px; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line); font: 700 18px/1.25 var(--px); }
.trap .s { flex: 0 0 26px; text-align: center; color: var(--coral); font-size: 19px; }
.trap.n .s { color: var(--ice); }
.trap small { display: block; margin-top: 3px; font: 400 15px/1.4 var(--txt); color: var(--mute); }

/* ── Schluss ── */
.final { position: relative; isolation: isolate; text-align: center; padding: clamp(80px, 13vw, 170px) 0; overflow: hidden; }
.final .bgi { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.final::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, var(--night), rgba(13,8,32,.55) 35%, rgba(13,8,32,.6) 65%, var(--night)); }
.final h2 { font-size: clamp(40px, 7vw, 96px); }
.final .sub { margin-left: auto; margin-right: auto; color: #e2daf9; }
.final .cta { justify-content: center; }

#store-app { text-align: center; padding: 40px 0; }
#store-app h2 { font: 700 30px/1.1 var(--px); } #store-app .sub { color: var(--mute); margin: 8px auto 18px; max-width: 34em; }

footer { padding: 34px 0 max(96px, env(safe-area-inset-bottom)); text-align: center; color: var(--mute); font-size: 15px; border-top: 1px solid var(--line); }
footer a { color: var(--moon); text-decoration: none; } footer a:hover { text-decoration: underline; }
footer p a { text-decoration: underline; text-underline-offset: 3px; }
footer p { margin-bottom: 6px; } footer .host { font-size: 14px; }
footer .legal { margin-top: 10px; } footer .legal a { display: inline-block; padding: 8px 4px; }
.foot-install { background: none; border: 0; padding: 8px 4px; color: var(--moon); font: inherit; cursor: pointer; text-decoration: underline; }
.foot-install:hover, .foot-install:focus-visible { color: #fff; }

/* ── Spielen-Leiste, sobald der Hero-Knopf aus dem Bild ist ── */
.bar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 10px 16px max(10px, env(safe-area-inset-bottom)); background: rgba(13,8,32,.9); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform .25s; }
.bar.on { transform: none; }
.bar span { font: 700 16px/1.2 var(--px); color: var(--moon); }
.bar .btn { font-size: 18px; padding: 12px 26px; }

/* ── Dialoge (App installieren) ── */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: rgba(6,3,14,.85); backdrop-filter: blur(4px); }
.modal.show { display: flex; }
.mbox { position: relative; max-width: 440px; width: 100%; max-height: calc(100vh - 32px); overflow: auto; padding: 26px; border-radius: 16px; background: linear-gradient(180deg, #221842, var(--dusk)); border: 2px solid var(--line); }
.mbox h3 { font: 700 22px/1.2 var(--px); color: var(--moon); margin-bottom: 12px; padding-right: 36px; }
.mbox ol { padding-left: 22px; display: grid; gap: 8px; color: #ddd3f5; }
.mbox code { background: rgba(255,255,255,.1); padding: 1px 6px; border-radius: 4px; font-family: inherit; color: var(--moon); }
.mbox .x { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--mute); font: inherit; font-size: 18px; cursor: pointer; }
.mbox .btn { margin-top: 16px; width: 100%; font-size: 16px; }
.mbox .steps { list-style: none; padding: 0; display: grid; gap: 10px; margin: 6px 0 4px; }
.steps li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,.25); color: #ddd3f5; }
.sn { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--moon); color: #2a1600; font-weight: 700; }
.ios-share { width: 22px; height: 22px; vertical-align: -5px; color: #4fa3ff; display: inline-block; }
.mnote { margin-top: 12px; font-size: 14px; color: var(--mute); }
.hint-arrow { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 40px; color: var(--moon); animation: hop 1s ease-in-out infinite; pointer-events: none; display: none; }
.modal.show .hint-arrow.on { display: block; }
@keyframes hop { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 10px); } }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .worlds { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(n) { border-top-color: var(--coral); } .card:nth-child(even) { border-top-color: var(--moon); }
}
@media (max-width: 620px) {
  body { font-size: 16.5px; }
  .hero .bg img, .hero .bg video { object-position: 27% 100%; }
  .top .right .btn { display: none; }
  .logo .v { transform: translate(6%, -70%) rotate(8deg); }
  @keyframes stamp { from { opacity: 0; } to { opacity: 1; } }
  .hero .cta { width: 100%; max-width: 360px; } .hero .btn-play { width: 100%; padding: 18px 20px; }
  .badges { gap: 8px 16px; font-size: 15px; }
  .grid { grid-template-columns: 1fr; }
  .worlds { grid-template-columns: 1fr; }
  .world:first-child { grid-column: auto; grid-row: auto; }
  .world:first-child b { font-size: 22px; }
  .bar span { display: none; } .bar .btn { width: 100%; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hero .in { padding-top: 54px; } .hero .note { display: none; } .btn-play { padding: 14px 34px; font-size: 22px; }
}
@media (max-width: 900px) { .worlds.more { --n: 4; } }
@media (max-width: 620px) { .worlds.more { --n: 2; } }
/* Finger-Bedienung: Sprachwahl und Fußzeilen-Links mindestens 44 px groß */
@media (pointer: coarse) {
  .top .langs a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  footer .legal a, .foot-install { min-height: 44px; line-height: 28px; }
  .btn-sm { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .world img, .btn, .bar { transition: none; } .hint-arrow { animation: none; } }
