/* Self-hosted (no Google servers: German courts have fined sites for embedding Google Fonts). OFL licence in fonts/. */
@font-face {
  font-family: "Rubik";
  src: url("fonts/rubik-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
:root {
  --bg: #050505;
  --ink: #f4f4f4;
  --dim: #9a9a9a;
  --line: #222222;
  --card: #111111;
  --accent: #ff4b3e;
  --fill: #ffe14d;
  --radius: 22px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* links like #games stop below the sticky nav (96px on wide screens), not under it */
[id] { scroll-margin-top: 120px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.6 "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: break-word;
}
a { color: var(--accent); }
img, canvas { max-width: 100%; }
/* Pictures are painted onto canvases by site.js (see tools/protect.mjs): nothing to select, drag or long-press-save. */
canvas { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
@media print { canvas { visibility: hidden; } }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.nav-inner {
  max-width: 1440px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.02em; }
.brand img, .brand canvas { width: 46px; height: auto; }
.links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; font-size: 17px; }
.links a { color: var(--ink); text-decoration: none; padding: 4px 0; transition: color .15s; }
.links a:hover { color: var(--accent); }
.links .sep { color: var(--accent); margin: 0 18px; font-weight: 700; }

/* English / German (lang.js): every text is on the page twice, lang="en" and lang="de"; only the chosen one shows.
   Without JavaScript there is no data-lang, so the page is English. */
:root[data-lang="de"] [lang="en"], :root:not([data-lang="de"]) [lang="de"] { display: none !important; }
.lang-switch { display: flex; align-items: center; gap: 6px; margin-left: 28px; }
.lang-switch button { padding: 4px 3px 5px; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer; line-height: 0;
  opacity: .45; filter: saturate(.6); transition: opacity .15s, filter .15s; }
.lang-switch button:hover, .lang-switch button:focus-visible { opacity: .9; filter: none; }
.lang-switch button[aria-pressed="true"] { opacity: 1; filter: none; border-bottom-color: var(--accent); cursor: default; }
/* stepped corners, like the buttons */
.lang-switch svg { display: block; width: 30px; height: 20px;
  clip-path: polygon(0 2px, 2px 2px, 2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px)); }
/* long German words ("Nutzungsbedingungen") are hyphenated on narrow screens instead of broken anywhere */
:root[lang="de"] main { -webkit-hyphens: auto; hyphens: auto; }
/* narrow screens: the flags sit top right on the logo's row, the links get the whole row below */
@media (max-width: 860px) {
  .nav-inner { position: relative; }
  .nav-inner .links { width: 100%; }
  .lang-switch { position: absolute; top: 14px; right: 20px; height: 46px; margin: 0; }
}
@media (min-width: 1024px) {
  .nav-inner { padding: 0 32px; height: 96px; }
}

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; text-align: center; padding: 72px 20px 140px; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 55% at 50% 42%, rgba(255, 75, 62, 0.22), transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 100%, rgba(255, 255, 255, 0.05), transparent 70%);
}
.hero::after {   /* fade into the page */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}
/* The panda cave (hero.js): canvases stacked back to front, each sliding up at its own speed on scroll.
   Without JavaScript the red glow above is all there is. */
.hero { z-index: 0; min-height: clamp(620px, 100vh, 1000px); display: flex; flex-direction: column; align-items: center; justify-content: center; }
@media (min-width: 1024px) { .hero { margin-top: -96px; padding-top: 150px; } }
.hero .scene { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
/* scenes.js sets each layer's top and height: they reach past the section so sliding never shows an edge. */
.scene .layer { position: absolute; left: 0; width: 100%; image-rendering: pixelated; will-change: transform; }

/* The other scenes (scenes.js): full-width bands behind a section, faded into the page at the top and bottom. */
.band { position: relative; isolation: isolate; }
.band > .scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.band::before, .band::after { content: ""; position: absolute; left: 0; right: 0; height: 110px; z-index: 0; pointer-events: none; }
.band::before { top: 0; background: linear-gradient(var(--bg), transparent); }
.band::after { bottom: 0; background: linear-gradient(transparent, var(--bg)); }
.band > section { position: relative; z-index: 1; }
/* Plain black between the scenes: more after the hero, the same between the others. The hero is its own stacking
   layer (z-index above), so nothing of it is ever drawn over the next section. */
.band-hall { margin-top: 160px; padding: 60px 0; }
.band-grotto, .band-mouth { margin-top: 120px; }
.band-grotto { padding: 90px 0; }
.band-grotto .about { margin: 0 auto; }
.band-mouth { padding: 130px 0 170px; }
.band-mouth .contact { margin: 0 auto; }
.band-mouth .contact h2, .band-mouth .contact p, .band-grotto .about h2, .band-grotto .about p { text-shadow: 0 3px 0 #000, 0 0 22px rgba(0, 0, 0, .9); }
.hero > .face, .hero > h1, .hero > p { position: relative; z-index: 2; }
.hero::after { z-index: 1; }
.hero h1, .hero p { text-shadow: 0 4px 0 #000, 0 0 28px rgba(0, 0, 0, .85); }
.hero .panda { width: 360px; max-width: 78%; height: auto; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.8)); }
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1; margin: 8px 0 10px; font-weight: 800; letter-spacing: -0.03em; }
.hero p { margin: 0; font-weight: 700; font-size: clamp(20px, 2.6vw, 30px); }
.hero p span { color: var(--accent); display: inline-block; cursor: default; transform-origin: 10% 60%; }
/* The panda roars while the pointer is on him or on "big bite" (site.js): he shakes, and the words snap at you. */
.hero .panda { cursor: default; }
.hero .face.on { animation: roar-shake .16s steps(2) infinite; }
.hero.face-on p span { animation: big-bite .5s steps(5) infinite; text-shadow: 0 4px 0 #000, 0 0 18px rgba(255, 75, 62, .9), 0 0 40px rgba(255, 75, 62, .6); }
@keyframes roar-shake { 0% { transform: translate(-3px, 1px); } 50% { transform: translate(3px, -1px); } 100% { transform: translate(-3px, 1px); } }
@keyframes big-bite {
  0%, 100% { transform: scale(1) rotate(0); }
  20% { transform: scale(1.22) rotate(-4deg); }
  40% { transform: scale(1.06, .9) rotate(2deg); }
  60% { transform: scale(1.26) rotate(3deg); }
  80% { transform: scale(1.04, .92) rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) { .hero .face.on, .hero.face-on p span { animation: none; } }

/* ---------------------------------------------------------------- game grid */
.section { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.section h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 24px; }
.games { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; position: relative; z-index: 2; }
/* Cards in a row stretch to the tallest one; the caption fills the rest and its button sits 20px off the bottom. */
.game { width: 100%; margin: 0; cursor: default; display: flex; flex-direction: column; }
@media (min-width: 640px) { .game { width: calc(50% - 12px); } }
@media (min-width: 1024px) { .game { width: calc(33.333% - 16px); max-width: 464px; } }

/* Three stacked layers, all the size of the card. At rest the background sits 44px low, the art is
   hidden below the card and the logo sits 22px low; on hover all three rise into place.
   The frame itself is see-through: the background picture carries its own rounded corners, so it is
   the picture that slides up, not a black box that it slides into. */
.thumb { display: block; position: relative; width: 100%; aspect-ratio: 464 / 425; overflow: hidden; border-radius: var(--radius); z-index: 0; }
.thumb > * { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .bg   { z-index: 1; border-radius: var(--radius); transform: translateY(10.35%); transition: transform .35s cubic-bezier(.65, 0, .35, 1); }
.thumb .art  { z-index: 2; transform: translateY(100%);   transition: transform .35s cubic-bezier(.32, 0, .67, 0); }
.thumb .logo { z-index: 3; transform: translateY(5.2%);   transition: transform .35s cubic-bezier(.65, 0, .35, 1); }
.game:hover .thumb > *, .game:focus-within .thumb > * {
  transform: translateY(0);
  transition-timing-function: cubic-bezier(.16, 1, .3, 1); transition-duration: .65s;
}
/* Phones and touch screens have no hover: show the finished picture. */
@media (max-width: 1023px), (hover: none), (prefers-reduced-motion: reduce) {
  .thumb > * { transform: none !important; transition: none !important; }
}
.pixel { image-rendering: pixelated; }

figcaption { position: relative; z-index: 1; top: -45px; padding: 18px 18px 20px; background: #000; border-radius: 0 0 var(--radius) var(--radius); }
.game figcaption { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.game figcaption .btn { margin-top: auto; }
figcaption h3 { margin: 0 0 6px; text-transform: uppercase; font-weight: 800; font-size: 21px; letter-spacing: 0.01em; }
figcaption p { margin: 0 0 16px; color: #d6d6d6; font-size: 17px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 46px; min-width: 180px; padding: 0 22px;
  background: var(--ink); color: #000; font-weight: 800; font-size: 20px; text-decoration: none;
  /* chunky stepped corners, like a pixel button */
  clip-path: polygon(0 6px, 6px 6px, 6px 0, calc(100% - 6px) 0, calc(100% - 6px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 6px), 0 calc(100% - 6px));
  transition: background .12s, transform .12s;
}
.btn:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
/* the night-scene text shadow is set on the <p> and would carry over to the button: off at rest, a hard one on hover */
.band-mouth .contact .btn { text-shadow: none; }
.band-mouth .contact .btn:hover { text-shadow: 0 2px 0 #000; }
.btn.off { background: #2a2a2a; color: var(--dim); pointer-events: none; }

/* "coming soon" cards: CSS background + the panda as the rising art */
.soon .bg { background: repeating-linear-gradient(135deg, #141414 0 18px, #101010 18px 36px); }
.soon .art { opacity: 0.9; }
.soon .logo { display: flex; align-items: flex-start; justify-content: center; padding-top: 14%; font-weight: 800; font-size: clamp(28px, 3vw, 40px); letter-spacing: 0.08em; color: var(--ink); text-shadow: 0 4px 0 #000; }

/* The panda's faces (img/panda/): two stacked in a .face, the .then one shown in place of the first when something
   happens. The coming soon cards have one face each (amazed, puzzled). */
.face { position: relative; }
.face canvas { display: block; width: 100%; height: auto; }
.face .then { position: absolute; left: 0; top: 0; visibility: hidden; }
.soon .face canvas { position: absolute; top: 28%; left: 21%; width: 58%; }
/* site.js adds .on while the pointer is on what data-on names: happy -> excited on the email button,
   sad -> crying over the delete steps, shocked -> happy on the way home. */
.contact .face { width: 150px; margin: 0 auto 6px; }
.face.on .then { visibility: visible; }
.face.on canvas:not(.then) { visibility: hidden; }
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-top .face { flex: none; width: 150px; margin-top: 24px; }
@media (max-width: 600px) { .page-top .face { width: 92px; } }
.lost { text-align: center; padding-top: 30px; padding-bottom: 40px; }
.lost .face { width: 220px; margin: 0 auto; }

/* ---------------------------------------------------------------- about / contact */
.about { display: grid; gap: 24px; align-items: center; margin: 72px auto; max-width: 1100px; }
.about img, .about canvas { width: 220px; height: auto; justify-self: center; }
@media (min-width: 900px) { .about { grid-template-columns: 260px 1fr; } }
.about p { color: #dadada; margin: 0 0 12px; }
.contact { text-align: center; margin: 72px auto; }
.contact p { color: #dadada; }

/* ---------------------------------------------------------------- text pages (privacy, impressum, game page) */
.page { max-width: 780px; margin: 0 auto; padding: 8px 20px 0; }
.page h1 { font-size: clamp(32px, 5vw, 46px); line-height: 1.1; margin: 40px 0 8px; font-weight: 800; letter-spacing: -0.02em; }
.page h2 { font-size: 24px; margin: 40px 0 8px; font-weight: 700; }
.page h3 { font-size: 19px; margin: 24px 0 4px; }
.page li { margin-bottom: 4px; }
.dim { color: var(--dim); }
.banner { width: 100%; height: auto; border-radius: var(--radius); margin-top: 24px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 20px; margin: 16px 0; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
th { color: var(--dim); font-weight: 600; }

/* Placeholders still to fill in before publishing - impossible to miss on purpose. */
.fill { background: var(--fill); color: #000; padding: 0 4px; border-radius: 3px; font-weight: 600; }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); margin-top: 72px; }
.foot { max-width: 1440px; margin: 0 auto; padding: 24px 20px 40px; display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 15px; color: var(--dim); }
.foot a { color: var(--dim); }
.foot a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- game pages (video banner, intro, gallery, features) */
/* The banner: the trailer fills it, and the intro sits over its lower part like offbrand.gg's game pages - title,
   text and store button on the left, the key-art card on the right. */
.gp-hero { position: relative; isolation: isolate; min-height: 100vh; margin-top: -96px; overflow: hidden; display: flex; align-items: flex-end; padding: 150px 0 56px; }
.gp-hero video, .gp-hero .poster, .gp-hero .gp-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.gp-hero.pixel video, .gp-hero.pixel .poster, .gp-hero.pixel .gp-video { image-rendering: pixelated; }
.gp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.25) 28%, rgba(0,0,0,.58) 55%, rgba(5,5,5,.9) 85%, var(--bg)); }
/* Phones: the video is a banner at the top, fading out, and the text reads on black below it. */
@media (max-width: 1023px) {
  .gp-hero { margin-top: 0; min-height: 0; padding-top: 44vh; }
  .gp-hero .gp-video { height: 52vh; }
  .gp-hero::before { height: 52vh; background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.1) 40%, var(--bg)); }
}

.gp { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.gp-intro { display: grid; gap: 32px 48px; align-items: end; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 960px) { .gp-intro { grid-template-columns: 1fr 440px; } }
.gp-intro h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1; margin: 0 0 6px; font-weight: 800; letter-spacing: -0.02em; }
.gp-intro .by { color: var(--ink); margin: 0 0 22px; font-size: 20px; }
.gp-intro .by a { color: var(--ink); }
.gp-intro h1, .gp-intro p { text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.gp-intro > div { max-width: 720px; }
.gp-intro p { color: #f0f0f0; font-size: 19px; line-height: 1.5; }
.gp-buttons { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 26px; }
.gp-platforms { color: var(--dim); font-size: 15px; }
.gp-cover { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.gp-cover img, .gp-cover canvas { display: block; width: 100%; height: auto; border-radius: var(--radius) var(--radius) 0 0; }
.gp-cover figcaption { top: 0; background: rgba(0, 0, 0, .88); border-radius: 0 0 var(--radius) var(--radius); display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; }
.chip { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 6px; font-weight: 700; text-transform: uppercase; font-size: 15px; text-decoration: none;
  color: var(--accent); border: 1px solid rgba(255, 75, 62, .7); background: rgba(255, 75, 62, .16); }
.chip:hover { color: #fff; }
.gp-cover .facts { color: var(--dim); font-size: 14px; text-align: right; }

#screenshots { padding-top: 70px; }
.gp h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 22px; text-transform: lowercase; }
.gp h2 span { color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 100px; }
@media (min-width: 1024px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 10px; overflow: hidden; transition: transform .3s; }
.gallery button:hover, .gallery button:focus-visible { transform: scale(1.05); }
.gallery img, .gallery canvas { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery.pixel img, .gallery.pixel canvas, .lightbox.pixel canvas { image-rendering: pixelated; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92); display: none; align-items: center; justify-content: center; padding: 20px; }
.lightbox.open { display: flex; }
/* The big picture fills the screen (up to 1600px), however small the file is: the pixel-art screenshots are
   stored at their native 384x216 and gallery.js scales those by whole numbers so every pixel stays square. */
.lightbox canvas { width: min(1600px, 100%, calc(88vh * 16 / 9)); height: auto; max-height: 88vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.8); }
.lightbox button { position: absolute; background: none; border: 0; color: #fff; font: 800 40px/1 "Rubik", sans-serif; cursor: pointer; padding: 14px; opacity: .8; }
.lightbox button:hover { opacity: 1; color: var(--accent); }
.lightbox .lb-close { top: 10px; right: 14px; }
.lightbox .lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

.features { display: grid; gap: 22px; margin-bottom: 100px; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; }
.feature h3 { margin: 0 0 8px; font-size: 22px; font-weight: 800; text-transform: lowercase; }
.feature h3 span { color: var(--accent); }
.feature p { margin: 0; color: #d0d0d0; }

.gp-cta { text-align: center; margin: 60px 0 40px; }
.gp-cta h2 { margin-bottom: 18px; }
.gp-legal { text-align: center; color: var(--dim); font-size: 15px; }
.gp-legal a { color: var(--dim); }
.values { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.values li { color: #dadada; padding-left: 28px; position: relative; }
.values li::before { content: ""; position: absolute; left: 4px; top: 0.62em; width: 10px; height: 10px; background: var(--accent);
  clip-path: polygon(0 3px, 3px 3px, 3px 0, 7px 0, 7px 3px, 10px 3px, 10px 7px, 7px 7px, 7px 10px, 3px 10px, 3px 7px, 0 7px); }
.values b { color: var(--ink); }
.star { color: var(--accent); text-decoration: none; font-weight: 800; margin-left: 2px; }
.about .footnote { font-size: 14px; color: #a9a9a9; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.about .footnote b { color: #dadada; }
