/* ============================================================
   Minecraft Dezember – Onboarding
   Style guide: STYLE_GUIDE.md (project root)
   "Afterglow": dark dusk sky, neon-edged obsidian blocks like the
   DEZEMBER letters, sunset orange only for the download.
   Blocky shapes, black outlines, hard (unblurred) shadows.
   ============================================================ */

@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-petch-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Chakra Petch";
  src: url("../fonts/chakra-petch-700-latin.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("../fonts/nunito-latin.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  /* Colors from the key art (minecraft_dezember_logo_v2.webp) */
  --ink: #050307;          /* logo outline: outlines + hard shadows */
  --void: #0f0b16;         /* page background (letter face) */
  --night: #18121f;        /* alternate bands */
  --dusk: #241b2e;         /* panels */
  --sky: #43364f;          /* raised panels, upper sky */
  --text: #f2ebe6;         /* warm off-white */
  --text-soft: #bfb2c4;
  --mauve: #8c7a94;        /* muted text */
  --stone: #b0a8a4;        /* MINECRAFT letters: keys */
  --magenta: #f03cf0;      /* neon edge, primary accent */
  --indigo: #6b5cff;       /* neon edge, secondary accent */
  --neon: linear-gradient(90deg, var(--magenta), var(--indigo));
  --peach: #f5c195;        /* horizon */
  --sun: #ffad47;          /* sunset: download only */
  --sun-light: #ffdb9a;
  --ember: #7a3210;

  --line: 3px;
  --block: 6px;
  --font-display: "Chakra Petch", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; }
h2 { text-shadow: 3px 3px 0 var(--ink); }
h2::after { content: ""; display: block; width: 72px; height: 8px; margin-top: 14px; background: var(--neon); box-shadow: 3px 3px 0 var(--ink); }
h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 .8em; }
p:last-child { margin-bottom: 0; }
b, strong { font-weight: 800; }

/* Bullet lists in the page text: magenta square bullets */
main ul:not([id]) { list-style: none; padding: 0; margin: 0 0 1em; }
main ul:not([id]) li { position: relative; padding-left: 26px; margin-bottom: .4em; }
main ul:not([id]) li::before {
  content: "";
  position: absolute; left: 2px; top: .5em;
  width: 10px; height: 10px;
  background: var(--magenta);
  box-shadow: 2px 2px 0 var(--ink);
}
/* In the centered intro: keep the list block centered, but its lines left-aligned */
.intro ul:not([id]) { display: inline-block; text-align: left; }
::selection { background: var(--magenta); color: var(--ink); }
:focus-visible { outline: var(--line) solid var(--magenta); outline-offset: 3px; }

code {
  font: .88em var(--font-mono);
  color: var(--peach);
  background: var(--ink);
  border: 2px solid var(--sky);
  padding: 0 .35em;
}
kbd {
  display: inline-block;
  min-width: 1.8em;
  font: 700 .85em/1.6 var(--font-display);
  text-align: center;
  color: var(--ink);
  background: #e4ddd9;
  border: 2px solid var(--ink);
  box-shadow: inset 0 -3px 0 var(--stone);
  padding: 0 .4em;
}

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap--narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.link {
  color: var(--text);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--magenta);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}
.link:hover { background: var(--magenta); color: var(--ink); text-decoration-color: var(--ink); }

/* ---------- Stepped pixel edge (used between bands) ---------- */
.edge-top, .edge-bottom { position: relative; }
.edge-top::before, .edge-bottom::after {
  content: "";
  position: absolute; left: 0; right: 0;
  height: 24px;
  background: inherit;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='24'%3E%3Cpath d='M0 16h12v-8h12v8h12V0h12v8h12v8h12V8h12v16H0z'/%3E%3C/svg%3E") repeat-x bottom / 96px 24px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='24'%3E%3Cpath d='M0 16h12v-8h12v8h12V0h12v8h12v8h12V8h12v16H0z'/%3E%3C/svg%3E") repeat-x bottom / 96px 24px;
}
.edge-top::before { bottom: 100%; }
.edge-bottom::after { top: 100%; transform: scaleY(-1); z-index: 1; }

/* ---------- Hero ---------- */
.hero { background: var(--void); line-height: 0; }
.hero__img {
  width: 100%;
  max-height: 86vh;
  object-fit: cover;
  object-position: center 45%;
}

/* ---------- Intro ---------- */
.intro { padding: 48px 0 8px; text-align: center; background: var(--void); }
.intro__date {
  display: inline-block;
  font: 700 1.1rem var(--font-display);
  color: var(--ink);
  background: var(--peach);
  border: var(--line) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 4px 14px;
  margin-bottom: 20px;
}
.intro__text { font-size: 1.15rem; color: var(--text-soft); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--shade { background: var(--night); }
.section--night { background: var(--night); }
.section__head { margin-bottom: 44px; max-width: 640px; }
.section__lead { font-size: 1.1rem; color: var(--text-soft); }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  font: 700 .8rem/1 var(--font-display);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink);
  border: 2px solid var(--ink);
  padding: 4px 8px;
  margin-bottom: 12px;
}
.tag--new { background: var(--magenta); }
.tag--changed { background: var(--peach); }

/* ---------- Block panel (shared look) ---------- */
.card, .rules li, .feature, .download, .note {
  border: var(--line) solid var(--ink);
  box-shadow: var(--block) var(--block) 0 var(--ink);
}

/* ---------- Rules ---------- */
.rules {
  list-style: none; margin: 0; padding: 0;
  counter-reset: rule;
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.rules li {
  counter-increment: rule;
  background: var(--dusk);
  padding: 24px 24px 24px 88px;
  position: relative;
}
.rules li::before {
  content: counter(rule);
  position: absolute; left: 20px; top: 22px;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  font: 700 1.6rem/1 var(--font-display);
  color: var(--text);
  background: var(--ink);
  border: var(--line) solid var(--magenta);
  box-shadow: inset 0 0 0 2px var(--indigo);
}
.rules p { color: var(--text-soft); }

/* ---------- Info cards ---------- */
.cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card { background: var(--dusk); padding: 24px; }
.card__icon {
  width: 56px; height: 56px;
  padding: 6px;
  margin-bottom: 14px;
  background: var(--sky);
  border: var(--line) solid var(--ink);
}
.card__icon img { width: 100%; height: 100%; image-rendering: pixelated; }
.card p { color: var(--text-soft); }
.keys { display: flex; flex-wrap: wrap; gap: 8px 18px; font-weight: 600; }
.keys span { white-space: nowrap; }

/* ---------- Image placeholders ---------- */
.feature__media, .shot__media { position: relative; aspect-ratio: 16 / 9; background: var(--dusk); overflow: hidden; }
.feature__media img, .feature__media video, .shot__media img { width: 100%; height: 100%; object-fit: cover; }
.is-missing {
  display: grid; place-items: center;
  background:
    repeating-conic-gradient(var(--dusk) 0 25%, var(--night) 0 50%) 0 0 / 32px 32px;
}
.is-missing::after {
  content: attr(data-missing);
  font: 600 .8rem var(--font-display);
  color: var(--text-soft);
  background: var(--ink);
  border: 2px solid var(--sky);
  padding: 4px 8px;
  margin: 0 12px;
  text-align: center;
}

/* ---------- Features ---------- */
/* Stacked card: wide image banner on top, text below at a readable width */
.features { display: grid; gap: 48px; }
.feature { background: var(--dusk); }
.feature__media { aspect-ratio: 21 / 9; border-bottom: var(--line) solid var(--ink); }
.feature__body { padding: 28px 36px 32px; }
.feature__body > * { max-width: 96ch; }
.feature__body h3 { font-size: 1.8rem; }
.feature__body p { color: var(--text); }

/* 1) Hintergrund: collapsed "spoiler" */
.feature__why {
  margin: 0 0 18px;
  background: var(--ink);
  border: 2px dashed var(--sky);
}
.feature__why summary {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  font: 700 .9rem var(--font-display);
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-soft);
  cursor: pointer;
  list-style: none;
}
.feature__why summary::-webkit-details-marker { display: none; }
.feature__why summary::before {   /* pixel arrow, turns when open */
  content: "";
  width: 10px; height: 10px;
  background: var(--magenta);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transition: transform .1s steps(2);
}
.feature__why summary::after { content: "aufklappen"; margin-left: auto; font: .8rem var(--font-body); text-transform: none; letter-spacing: 0; color: var(--mauve); }
.feature__why[open] summary::after { content: "zuklappen"; }
.feature__why[open] summary::before { transform: rotate(90deg); }
.feature__why summary:hover { color: var(--text); }
.feature__why[open] { border-style: solid; border-color: var(--magenta); }
.feature__why p { color: var(--text-soft); padding: 0 14px; margin-bottom: 12px; font-size: .95rem; }
/* Open/close animation: height slides (Chrome/Edge 131+, Safari 18.2+),
   text fades in everywhere. Other browsers simply open without the slide. */
.feature__why { interpolate-size: allow-keywords; }
.feature__why::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size .28s ease, content-visibility .28s allow-discrete;
}
.feature__why[open]::details-content { block-size: auto; }
.feature__why[open] p { animation: why-in .3s ease both; }
@keyframes why-in { from { opacity: 0; transform: translateY(-6px); } }
.feature__why { transition: border-color .2s; }

/* 3) Fussnote */
.feature__body .feature__note {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 2px dashed var(--sky);
  font-size: .88rem;
  color: var(--mauve);
}
.feature__body .feature__note::before { content: "* "; color: var(--peach); font-weight: 800; }
@media (max-width: 760px) {
  .feature__media { aspect-ratio: 16 / 9; }
  .feature__body { padding: 20px; }
}

/* ---------- Shader gallery (2x2) ---------- */
.gallery { margin-bottom: 36px; }
.gallery__label { font: 600 1.15rem var(--font-display); margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.gallery__label b { color: var(--magenta); }
.gallery__label span { font: .9rem var(--font-body); color: var(--mauve); }
.gallery__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shot {
  position: relative;
  display: block;
  padding: 0;
  font: inherit;
  background: var(--dusk);
  border: var(--line) solid var(--ink);
  box-shadow: var(--block) var(--block) 0 var(--ink);
  cursor: zoom-in;
  transition: transform .08s, box-shadow .08s;
}
.shot:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.shot__media { display: block; }
.shot__media.is-missing { cursor: default; }
.shot__label {
  position: absolute; left: 0; bottom: 0;
  font: 700 .85rem var(--font-display);
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--text);
  background: var(--ink);
  border-top: var(--line) solid var(--ink);
  border-right: var(--line) solid var(--ink);
  padding: 3px 10px;
}
@media (max-width: 560px) {
  .gallery__grid { gap: 10px; }
  .shot__label { font-size: .7rem; padding: 2px 6px; }
  .is-missing::after { font-size: .6rem; }
}

/* ---------- Lightbox ---------- */
.no-scroll { overflow: hidden; }
.lightbox {
  max-width: none; max-height: none;
  width: 100vw; height: 100vh;
  margin: 0; padding: 16px;
  border: 0;
  background: transparent;
  display: none;
  place-items: center;
  cursor: zoom-out;
}
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(5, 3, 7, .94); }
.lightbox figure { margin: 0; max-width: min(1600px, 100%); }
.lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 90px);
  border: var(--line) solid var(--ink);
  box-shadow: var(--block) var(--block) 0 var(--magenta);
}
.lightbox figcaption {
  margin-top: 14px;
  text-align: center;
  font: 700 1.1rem var(--font-display);
  color: var(--text);
}

/* ---------- Shader selector ---------- */
.shaders { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.shader {
  position: relative;
  display: flex; flex-direction: column;
  text-align: left;
  font: inherit; color: var(--text);
  background: var(--dusk);
  border: var(--line) solid var(--ink);
  box-shadow: var(--block) var(--block) 0 var(--ink);
  padding: 0;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.shader:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.shader:active { transform: translate(var(--block), var(--block)); box-shadow: 0 0 0 var(--ink); }
.shader.is-selected {
  background: var(--ink);
  border-color: var(--magenta);
  box-shadow: inset 0 0 0 2px var(--indigo), var(--block) var(--block) 0 var(--magenta);
}
.shader { padding: 20px 22px 22px; }
.shader h3 { font-size: 1.5rem; }
.shader p { color: var(--text-soft); flex: 1; }
.shader__check {
  position: absolute; top: -14px; right: -14px;
  width: 40px; height: 40px;
  background: var(--magenta) center / 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'%3E%3Cpath fill='%231b1535' d='M6 1h1v2H6zM5 3h1v1H5zM4 4h1v1H4zM3 5h1v1H3zM2 4h1v1H2zM1 3h1v1H1z'/%3E%3C/svg%3E");
  border: var(--line) solid var(--ink);
  transform: scale(0);
  transition: transform .1s steps(3);
}
.shader.is-selected .shader__check { transform: scale(1); }

/* Performance bar: 5 blocks, like a hunger/XP bar */
.perf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; font: 600 .85rem var(--font-display); color: var(--text-soft); }
.perf__bar { display: flex; gap: 4px; }
.perf__bar i { width: 18px; height: 18px; border: 2px solid var(--ink); background: var(--void); }
.perf[data-level="1"], .perf[data-level="2"] { --fill: var(--indigo); }
.perf[data-level="3"] { --fill: var(--magenta); }
.perf[data-level="4"], .perf[data-level="5"] { --fill: var(--sun); }
.perf[data-level="1"] i:nth-child(-n+1),
.perf[data-level="2"] i:nth-child(-n+2),
.perf[data-level="3"] i:nth-child(-n+3),
.perf[data-level="4"] i:nth-child(-n+4),
.perf[data-level="5"] i:nth-child(-n+5) { background: var(--fill); box-shadow: inset 0 3px 0 rgba(255,255,255,.45); }

/* ---------- Notes ---------- */
.note {
  margin-top: 40px;
  padding: 16px 20px;
  background: var(--dusk);
  border-left: 8px solid var(--peach);
}
.note--light { background: var(--dusk); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font: 700 1.1rem var(--font-display);
  text-transform: uppercase; letter-spacing: .04em;
  text-decoration: none;
  color: var(--ink);
  background: var(--magenta);
  border: var(--line) solid var(--ink);
  box-shadow: inset 0 4px 0 #ff9cff, inset 0 -5px 0 #9a1fa0, var(--block) var(--block) 0 var(--ink);
  padding: 12px 22px 14px;
  cursor: pointer;
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: inset 0 4px 0 #ff9cff, inset 0 -5px 0 #9a1fa0, 8px 8px 0 var(--ink); }
.btn:active { transform: translate(var(--block), var(--block)); box-shadow: inset 0 4px 0 #ff9cff, inset 0 -5px 0 #9a1fa0; }
.btn--lantern {
  width: 100%;
  font-size: 1.7rem;
  padding: 20px 24px 24px;
  background: var(--sun);
  box-shadow: inset 0 5px 0 var(--sun-light), inset 0 -7px 0 #c46a1c, var(--block) var(--block) 0 var(--ember);
}
.btn--lantern:hover { box-shadow: inset 0 5px 0 var(--sun-light), inset 0 -7px 0 #c46a1c, 8px 8px 0 var(--ember); }
.btn--lantern:active { box-shadow: inset 0 5px 0 var(--sun-light), inset 0 -7px 0 #c46a1c; }
.btn small { font: 600 .8rem var(--font-mono); text-transform: none; letter-spacing: 0; opacity: .8; word-break: break-all; }
.btn.is-disabled { pointer-events: none; filter: grayscale(1); opacity: .5; }

/* ---------- Download ---------- */
.section--download { padding-top: 120px; }
.download {
  background: var(--ink);
  border-color: var(--sky);
  padding: 28px;
  margin-bottom: 96px;
}
.download__choice { font: 600 1.15rem var(--font-display); margin-bottom: 20px; }
.download__choice b { color: var(--peach); }
.download__empty { padding: 24px; text-align: center; border: var(--line) dashed var(--sky); color: var(--text-soft); }
.download__meta { margin-top: 12px; font: .75rem var(--font-mono); color: var(--mauve); word-break: break-all; }
.download__meta:empty { display: none; }
.download__missing { margin-top: 14px; color: var(--peach); font-weight: 800; }
.download__others { margin-top: 22px; color: var(--text-soft); font-size: .95rem; }
.download__others summary { cursor: pointer; font-family: var(--font-display); }
.download__others ul { margin: 10px 0 0; padding-left: 20px; }
.download__others a { color: var(--text); }

/* ---------- Guide steps ---------- */
.guide__title { margin-bottom: .2em; }
.steps { list-style: none; padding: 0; margin: 32px 0 0; counter-reset: step; }
.step {
  counter-increment: step;
  padding: 22px 0;
  border-bottom: var(--line) dashed var(--dusk);
}
.step:last-child { border-bottom: 0; }
.step h3::before { content: counter(step) ". "; color: var(--magenta); }
.step p { color: var(--text-soft); }
/* Screenshot inside a guide step (click = lightbox) */
.guide-shot { margin: 16px 0 0; max-width: 100%; }
.guide-shot img {
  width: 100%; height: auto;
  border: var(--line) solid var(--ink);
  box-shadow: var(--block) var(--block) 0 var(--ink);
  cursor: zoom-in;
  transition: transform .08s, box-shadow .08s;
}
.guide-shot img:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.guide-shot figcaption { margin-top: 10px; font-size: .8rem; color: var(--mauve); }

/* ---------- Footer ---------- */
.footer {
  background: var(--night);
  color: var(--text-soft);
  text-align: center;
  padding: 48px 16px 40px;
  font-family: var(--font-display);
}
.footer__small { font: .85rem var(--font-body); color: var(--mauve); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shader, .btn, .shader__check { transition: none; }
  .feature__why::details-content { transition: none; }
  .feature__why[open] p { animation: none; }
}
