/* ChessRogue — « Diorama de guerre »
   Walnut table, pinned parchment sheets, brass and wax. Palette taken from
   the game's art direction (Docs/ARCHITECTURE.md, visual overhaul). */

@font-face { font-family: "Alfa Slab One"; src: url("../fonts/AlfaSlabOne-Regular.woff2?v=6b4773ad") format("woff2"); font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Regular.woff2?v=3279866e") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Italic.woff2?v=34cf32dd") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-SemiBold.woff2?v=5fb1a5f6") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter-Bold.woff2?v=556ac5e6") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("../fonts/Kalam-Regular.woff2?v=ed1eefad") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("../fonts/Kalam-Bold.woff2?v=66b15315") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --walnut-950: #160d07;
  --walnut-900: #1f130a;
  --walnut-800: #2b1b0f;
  --walnut-700: #3e2716;
  --walnut-500: #6b4528;
  --brass: #c9a24a;
  --brass-dark: #8f6a26;
  --gold: #e9a93a;
  --gold-light: #f6dc8c;
  --parchment: #efe2c2;
  --parchment-2: #e6d4a8;
  --ink: #2b1d12;
  --ink-deep: #1e140c;
  --ink-soft: #5a4630;
  --wax: #a8262e;
  --wax-dark: #6e1712;
  --moss: #5e7b4c;
  --cream: #fff1d0;

  --title: "Alfa Slab One", Georgia, serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Kalam", "Comic Sans MS", cursive;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --shadow-lift: 0 22px 50px rgba(0, 0, 0, .55), 0 4px 10px rgba(0, 0, 0, .35);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--parchment);
  font: 400 17px/1.6 var(--body);
  background-color: var(--walnut-800);
  /* wood.webp: the game's T_Wood_Grain, toned to walnut and softened. */
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(233, 169, 58, .10), transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(0, 0, 0, .55), transparent 60%),
    url("../img/wood.webp?v=ad47c913");
  background-size: auto, auto, 1024px 384px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
a:hover { color: var(--gold-light); }
code { font: 600 .9em/1 ui-monospace, "SFMono-Regular", Menlo, monospace; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.center { text-align: center; }
.hand { font-family: var(--hand); }
.muted { opacity: .7; }
.small { font-size: .85rem; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- Titles ---------- */

.title { font: 400 clamp(30px, 4.4vw, 52px)/1.08 var(--title); margin: 0 0 .45em; letter-spacing: .01em; }
.title.gold {
  color: var(--gold-light);
  background: linear-gradient(180deg, #fbe6a2 0%, #e9b956 55%, #b9812d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 var(--ink-deep)) drop-shadow(0 0 1px var(--ink-deep)) drop-shadow(0 8px 14px rgba(0, 0, 0, .5));
}
.title.ink { color: var(--ink); }
.title.ink::after {
  content: ""; display: block; width: 84px; height: 6px; margin-top: 14px;
  background: var(--wax); border-radius: 3px;
  clip-path: polygon(0 40%, 8% 0, 100% 30%, 96% 100%, 4% 85%);
}
.center.title.ink::after { margin-inline: auto; }

.lead { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; max-width: 62ch; margin: 0 0 1.6em; }
.lead.light { color: var(--parchment-2); }
.kicker { margin: 0 0 .3em; color: var(--wax); font: 600 .78rem/1.2 var(--body); letter-spacing: .14em; text-transform: uppercase; }
.kicker.hand { font: 700 1.15rem/1.1 var(--hand); letter-spacing: 0; text-transform: none; }

.section { padding-block: clamp(56px, 8vw, 110px); position: relative; }
.section-head { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head .lead { margin-inline: auto; }

/* ---------- Surfaces ---------- */

.parchment {
  color: var(--ink);
  background-color: var(--parchment);
  background-image:
    radial-gradient(ellipse at center, transparent 55%, rgba(150, 100, 40, .28) 100%),
    url("../img/paper.webp?v=5e22850f");
  background-blend-mode: normal, multiply;
  background-size: 100% 100%, 380px;
  border: 3px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px rgba(255, 248, 225, .55), inset 0 0 50px rgba(120, 75, 25, .28), var(--shadow-lift);
}
.wood {
  color: var(--parchment);
  background-color: var(--walnut-700);
  background-image:
    linear-gradient(180deg, rgba(255, 220, 160, .07), transparent 40%),
    url("../img/wood.webp?v=ad47c913");
  background-size: auto, 1024px 384px;
  border: 3px solid var(--ink-deep);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px var(--brass-dark), inset 0 0 0 5px var(--ink-deep), inset 0 0 60px rgba(0, 0, 0, .45), var(--shadow-lift);
}
.sheet { position: relative; padding: clamp(28px, 5vw, 64px); }

/* Brass pins holding the sheets to the table */
.pin { position: absolute; top: 14px; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4 0 12%, var(--brass) 35%, var(--brass-dark) 80%, #4b3410 100%);
  box-shadow: 0 3px 4px rgba(0, 0, 0, .45), 0 0 0 2px var(--ink); }
.pin-tl { left: 14px; } .pin-tr { right: 14px; }

/* Icon discs: walnut by default, red wax for the mode cards */
.disc { display: inline-grid; place-items: center; width: 88px; height: 88px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #7a5232, var(--walnut-700) 60%, var(--walnut-900));
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 6px var(--brass), 0 0 0 8px var(--ink), 0 10px 18px rgba(0, 0, 0, .35); }
.disc img { width: 58%; }
.disc.wax { width: 78px; height: 78px; border-radius: 47% 53% 50% 50% / 52% 48% 52% 48%;
  background: radial-gradient(circle at 40% 34%, #c2423a, #9b2620 55%, var(--wax-dark));
  box-shadow: inset 0 0 0 5px rgba(0, 0, 0, .14), inset 0 0 0 7px rgba(255, 180, 160, .12), 0 6px 0 rgba(0, 0, 0, .25), 0 12px 18px rgba(0, 0, 0, .35); }

/* ---------- Top bar ---------- */

.topbar { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s; }
.topbar-inner { display: flex; align-items: center; gap: 24px; width: min(100% - 2 * var(--gutter), 1320px); margin-inline: auto; height: 68px; }
.topbar.scrolled { background: rgba(31, 19, 10, .92); box-shadow: 0 1px 0 var(--brass-dark), 0 8px 24px rgba(0, 0, 0, .45); backdrop-filter: blur(8px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold-light); text-decoration: none; font: 400 22px/1 var(--title); }
.brand img { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.brand span { text-shadow: 0 2px 0 var(--ink-deep); }
.nav { display: flex; gap: 6px; margin-left: 12px; }
.nav a, .lang { color: var(--parchment); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 6px; text-shadow: 0 1px 2px rgba(0, 0, 0, .8); }
.nav a:hover, .lang:hover { background: rgba(255, 241, 208, .1); color: var(--gold-light); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.btn-mini { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 12px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px;
  background: linear-gradient(180deg, #f5d98e, var(--brass) 60%, #a77e2f); border: 2px solid var(--ink-deep); border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 0 var(--ink-deep); }
.btn-mini:hover { color: var(--ink); filter: brightness(1.07); }
.btn-mini img { width: 20px; }

/* ---------- Hero ---------- */

.hero { position: relative; min-height: max(680px, 100svh); display: grid; align-items: end; padding: 120px 0 clamp(56px, 8vh, 96px); isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; transform: scale(1.04); animation: hero-drift 24s ease-out both; }
.hero-bg::after { content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(22, 13, 7, .78) 0%, rgba(22, 13, 7, .1) 22%, rgba(22, 13, 7, .15) 45%, rgba(22, 13, 7, .9) 82%, var(--walnut-800) 100%),
    radial-gradient(ellipse 60% 55% at 50% 62%, rgba(22, 13, 7, .62), transparent 72%); }
@keyframes hero-drift { from { transform: scale(1.12); } to { transform: scale(1.03); } }
.hero-inner { text-align: center; }
.hero-logo { margin: 0 auto 6px; max-width: min(760px, 92vw); filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .65)); animation: stamp .7s cubic-bezier(.2, 1.5, .4, 1) .15s both; }
@keyframes stamp { from { opacity: 0; transform: scale(1.25) rotate(-2deg); } to { opacity: 1; transform: none; } }
.hero-tagline { margin: 0 0 10px; font: 700 clamp(26px, 3.6vw, 44px)/1.15 var(--hand); color: var(--cream); text-shadow: 0 2px 0 var(--ink-deep), 0 0 24px rgba(0, 0, 0, .8); transform: rotate(-1.2deg); animation: fade-up .8s ease .45s both; }
.hero-sub { max-width: 64ch; margin: 0 auto 30px; font-size: clamp(16px, 1.5vw, 19px); color: #f3e7cc; text-shadow: 0 1px 3px rgba(0, 0, 0, .9); animation: fade-up .8s ease .6s both; }
.hero .dl-buttons { animation: fade-up .8s ease .75s both; }
.hero-note { margin: 22px 0 0; font-size: 14px; color: var(--parchment-2); text-shadow: 0 1px 2px #000; animation: fade-up .8s ease .9s both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Download buttons: brass plaques with a wax seal ---------- */

.dl-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 22px; }
.btn-dl { position: relative; display: flex; align-items: center; gap: 14px; min-width: 300px; padding: 12px 26px 12px 12px; text-align: left; text-decoration: none; color: var(--ink);
  background: linear-gradient(180deg, #f8e3a6 0%, #dfb760 45%, var(--brass) 60%, #9c7329 100%);
  border: 3px solid var(--ink-deep); border-radius: 14px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -3px 0 rgba(80, 50, 10, .35), 0 6px 0 var(--ink-deep), 0 16px 28px rgba(0, 0, 0, .5);
  transition: transform .12s ease, box-shadow .12s ease, filter .2s; }
.btn-dl:hover { color: var(--ink); transform: translateY(-2px); filter: brightness(1.06) saturate(1.05);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -3px 0 rgba(80, 50, 10, .35), 0 8px 0 var(--ink-deep), 0 22px 34px rgba(0, 0, 0, .55), 0 0 30px rgba(233, 169, 58, .35); }
.btn-dl:active { transform: translateY(5px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 1px 0 var(--ink-deep), 0 6px 12px rgba(0, 0, 0, .5); }
.btn-dl-seal { flex: none; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 47% 53% 51% 49% / 52% 47% 53% 48%;
  background: radial-gradient(circle at 40% 34%, #c8463d, #9b2620 55%, var(--wax-dark));
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .15), 0 3px 6px rgba(0, 0, 0, .4); }
.btn-dl-seal img { width: 34px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .4)); }
.btn-dl-text { display: grid; gap: 2px; }
.btn-dl-label { font-size: 17px; line-height: 1.2; }
.btn-dl-label strong { font: 400 22px/1 var(--title); letter-spacing: .01em; }
.btn-dl-meta { font-size: 13px; font-weight: 600; color: #4a3518; }
.btn-dl-hint { position: absolute; top: -14px; right: 14px; padding: 2px 10px; font: 700 14px/1.4 var(--hand); color: var(--cream); background: var(--wax); border: 2px solid var(--ink-deep); border-radius: 6px; transform: rotate(3deg); display: none; }
.btn-dl.recommended .btn-dl-hint { display: block; }
.btn-dl.is-disabled { cursor: default; filter: grayscale(.85) brightness(.75); box-shadow: 0 4px 0 var(--ink-deep); }
.btn-dl.is-disabled:hover { transform: none; }

/* ---------- Pitch ---------- */

.pitch { text-align: center; }
.pitch .lead { margin-inline: auto; }
.pitch .title.ink::after, .bestiary .title.ink::after { margin-inline: auto; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); margin-top: 12px; text-align: center; }
.pillar h3 { margin: 22px 0 8px; font: 400 23px/1.15 var(--title); color: var(--ink); }
.pillar p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* ---------- Modes ---------- */

.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 34px); }
.mode-card { position: relative; padding: 30px 28px 26px; transition: transform .25s ease, box-shadow .25s ease; }
.mode-card:nth-child(3n+1) { transform: rotate(-.6deg); }
.mode-card:nth-child(3n+2) { transform: rotate(.4deg) translateY(10px); }
.mode-card:nth-child(3n) { transform: rotate(.8deg); }
.mode-card:hover { transform: translateY(-6px) rotate(0); box-shadow: inset 0 0 0 2px rgba(255, 248, 225, .55), inset 0 0 50px rgba(120, 75, 25, .28), 0 30px 60px rgba(0, 0, 0, .6); }
.mode-card .disc { position: absolute; top: -26px; right: 22px; }
.mode-card h3 { margin: 0 0 10px; font: 400 27px/1.1 var(--title); }
.mode-card p { margin: 0 0 16px; font-size: 15.5px; color: var(--ink-soft); }
.mode-card .kicker.hand { padding-right: 80px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; font-size: 12.5px; font-weight: 700; color: var(--ink); background: rgba(201, 162, 74, .28); border: 1.5px solid rgba(43, 29, 18, .45); border-radius: 999px; }

/* ---------- Features ---------- */

.features .title { margin-bottom: clamp(36px, 5vw, 64px); }
.feature { display: grid; grid-template-columns: 1.45fr 1fr; gap: clamp(26px, 4vw, 56px); align-items: center; margin-bottom: clamp(56px, 8vw, 100px); }
.feature.flipped { grid-template-columns: 1fr 1.45fr; }
.feature.flipped .frame { order: 2; }
.frame { position: relative; margin: 0; padding: 10px; border-radius: 12px;
  background: linear-gradient(145deg, #8a6236, var(--walnut-700) 45%, var(--walnut-900));
  box-shadow: inset 0 0 0 2px var(--ink-deep), inset 0 0 0 4px var(--brass-dark), inset 0 0 0 6px var(--ink-deep), var(--shadow-lift); }
.frame img { border-radius: 4px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.feature .frame { transform: rotate(-.5deg); }
.feature.flipped .frame { transform: rotate(.5deg); }
.note { position: absolute; bottom: -22px; left: 28px; max-width: 70%; padding: 6px 16px 8px; font-size: 21px; line-height: 1.2; color: var(--wax);
  background: var(--parchment) url("../img/paper.webp?v=5e22850f") center / 300px; background-blend-mode: multiply;
  border: 2px solid var(--ink); border-radius: 4px; transform: rotate(-3deg); box-shadow: 0 8px 16px rgba(0, 0, 0, .45); }
.feature.flipped .note { left: auto; right: 28px; transform: rotate(2.5deg); }
.note:empty { display: none; }
.feature-text h3 { margin: 0 0 14px; font: 400 clamp(28px, 3vw, 38px)/1.1 var(--title); color: var(--gold-light); text-shadow: 0 3px 0 var(--ink-deep), 0 8px 18px rgba(0, 0, 0, .5); }
.feature-text .kicker { color: var(--gold); }
.feature-text > p { color: #ead9b4; margin: 0 0 18px; }
.points { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.points li { position: relative; padding-left: 30px; color: var(--parchment); font-size: 15.5px; }
.points li::before { content: ""; position: absolute; left: 0; top: .25em; width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #c8463d, var(--wax) 55%, var(--wax-dark)); box-shadow: 0 0 0 2px var(--ink-deep); }

/* ---------- Bestiary ---------- */

.bestiary { text-align: center; }
.bestiary .lead { margin-inline: auto; }
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 0 0 40px; }
.stats div { display: flex; flex-direction: column-reverse; align-items: center; padding: 14px 6px; border-radius: 8px; background: rgba(107, 69, 40, .1); border: 1.5px dashed rgba(43, 29, 18, .35); }
.stats dd { margin: 0; font: 400 clamp(30px, 3.4vw, 44px)/1 var(--title); color: var(--wax); }
.stats dt { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.icon-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 18px 10px; margin: 0; padding: 0; list-style: none; }
.icon-strip li { display: grid; justify-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.icon-strip img { width: 56px; transition: transform .2s; }
.icon-strip li:hover img { transform: translateY(-4px) rotate(-6deg) scale(1.08); }

/* ---------- Gallery ---------- */

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 26px); margin: 0; padding: 0; list-style: none; }
.thumb { display: block; padding: 7px; transition: transform .2s ease, box-shadow .2s ease; }
.thumb:hover { transform: translateY(-4px) scale(1.015); box-shadow: inset 0 0 0 2px var(--ink-deep), inset 0 0 0 4px var(--gold), inset 0 0 0 6px var(--ink-deep), 0 26px 50px rgba(0, 0, 0, .6); }
.gallery li:nth-child(4n+1) .thumb { rotate: -.6deg; }
.gallery li:nth-child(4n+3) .thumb { rotate: .5deg; }

.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: clamp(12px, 3vw, 40px); border: 0; background: transparent; color: var(--parchment); }
.lightbox::backdrop { background: rgba(14, 8, 4, .92); backdrop-filter: blur(4px); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; max-width: 100%; max-height: 100%; }
.lightbox img { max-height: calc(100dvh - 120px); width: auto; border: 3px solid var(--ink-deep); border-radius: 6px; box-shadow: 0 0 0 3px var(--brass-dark), 0 30px 80px #000; }
.lightbox figcaption { font: 400 22px/1.3 var(--hand); color: var(--cream); text-align: center; }
.lb-btn { position: fixed; display: grid; place-items: center; width: 52px; height: 52px; font: 400 32px/1 var(--title); color: var(--ink); cursor: pointer;
  background: linear-gradient(180deg, #f5d98e, var(--brass) 60%, #a77e2f); border: 2px solid var(--ink-deep); border-radius: 50%; box-shadow: 0 4px 0 var(--ink-deep); }
.lb-btn:hover { filter: brightness(1.08); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; translate: 0 -50%; }
.lb-next { right: 18px; top: 50%; translate: 0 -50%; }

/* ---------- Download & changelog ---------- */

.download .wood { text-align: center; padding-top: clamp(64px, 7vw, 84px); margin-top: 40px; }
.download .seal { position: absolute; top: -56px; left: 50%; translate: -50% 0; width: 112px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)); }
.download .lead { margin-inline: auto; }
.dl-info { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(20px, 4vw, 56px); margin-top: 44px; padding-top: 34px; border-top: 2px dashed rgba(201, 162, 74, .4); text-align: left; }
.dl-info h3 { margin: 0 0 10px; font: 400 21px/1.2 var(--title); color: var(--gold-light); }
.dl-info h3 + p, .dl-info ul + h3 { margin-top: 0; }
.dl-info ul + h3 { margin-top: 24px; }
.dl-info ul { margin: 0; padding-left: 20px; display: grid; gap: 10px; color: #ead9b4; font-size: 15.5px; }
.dl-info p { color: #ead9b4; font-size: 15.5px; margin: 0; }
.dl-info code { color: var(--gold-light); }

.changelog { margin-top: clamp(40px, 6vw, 70px); }
.release { border-top: 2px solid rgba(43, 29, 18, .25); }
.release:first-of-type { border-top: 0; }
.release summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 18px 0; cursor: pointer; list-style: none; }
.release summary::-webkit-details-marker { display: none; }
.release summary::before { content: "▸"; color: var(--wax); font-size: 18px; transition: rotate .2s; }
.release[open] summary::before { rotate: 90deg; }
.release-version { font: 400 26px/1 var(--title); color: var(--ink); }
.release-date { font-size: 19px; color: var(--ink-soft); }
.release-notes { padding: 0 0 6px 24px; color: var(--ink); }
.release-notes h3, .release-notes h4, .release-notes h5 { font: 400 19px/1.2 var(--title); margin: 18px 0 8px; color: var(--ink); }
.release-notes h5 { font-size: 16px; }
.release-notes ul, .release-notes ol { padding-left: 22px; margin: 6px 0 12px; }
.release-notes li { margin: 4px 0; }
.release-notes li::marker { color: var(--wax); }
.release-notes p { margin: 8px 0; }
.release-notes code { background: rgba(107, 69, 40, .14); padding: 2px 5px; border-radius: 4px; font-size: .85em; }
.release-notes a { color: var(--wax); }
.release-files { list-style: none; margin: 8px 0 22px 24px; padding: 0; display: grid; gap: 8px; }
.release-files a { color: var(--wax); font-weight: 700; }
.sha { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--ink-soft); background: rgba(107, 69, 40, .1); padding: 2px 6px; border-radius: 4px; }
.empty { font-size: 22px; color: var(--ink-soft); margin: 0; }

/* ---------- Brass button (forms, shared with the admin) ---------- */

.btn-brass { display: inline-block; padding: 13px 24px; font: 700 16px/1 var(--body); color: var(--ink); text-decoration: none; cursor: pointer; border-radius: 9px;
  background: linear-gradient(180deg, #f8e3a6, #dfb760 45%, var(--brass) 60%, #9c7329); border: 2.5px solid var(--ink-deep);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--ink-deep); }
.btn-brass:hover { color: var(--ink); filter: brightness(1.06); }
.btn-brass:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink-deep); }
.btn-brass:disabled { filter: grayscale(.7) brightness(.85); cursor: progress; }

/* ---------- Feedback form ---------- */

.feedback { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.fb-intro .lead { font-size: 17px; }
.fb-note { margin: 0; font-size: 21px; color: var(--wax); transform: rotate(-2deg); }
.fb-note::before { content: "✎ "; }
.fb-form { display: grid; gap: 16px; }
.fb-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fb-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; border: 0; }
.fb-kinds legend { padding: 0; margin-bottom: 8px; font-weight: 700; font-size: 14px; color: var(--ink); }
.fb-kind { position: relative; cursor: pointer; }
.fb-kind input { position: absolute; opacity: 0; }
.fb-kind span { display: grid; gap: 2px; height: 100%; padding: 10px 12px; border: 2px solid rgba(43, 29, 18, .45); border-radius: 10px; background: rgba(255, 252, 240, .45); transition: background .15s, border-color .15s; }
.fb-kind strong { font: 400 17px/1.15 var(--title); color: var(--ink); }
.fb-kind small { font-size: 13px; color: var(--ink-soft); }
.fb-kind:hover span { background: rgba(201, 162, 74, .2); }
.fb-kind input:checked + span { border-color: var(--ink); background: rgba(201, 162, 74, .35); box-shadow: inset 0 0 0 2px var(--ink); }
.fb-kind-bug input:checked + span { background: rgba(168, 38, 46, .16); }
.fb-kind-improvement input:checked + span { background: rgba(94, 123, 76, .2); }
.fb-kind input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.fb-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.fb-field { display: grid; gap: 6px; font-weight: 700; font-size: 14px; color: var(--ink); }
.fb-field input, .fb-field select, .fb-field textarea { width: 100%; padding: 10px 12px; font: 400 16px/1.45 var(--body); color: var(--ink); background: rgba(255, 252, 240, .8); border: 2px solid var(--ink); border-radius: 8px; }
.fb-field textarea { resize: vertical; min-height: 140px; }
.fb-field input:focus, .fb-field select:focus, .fb-field textarea:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.fb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.fb-status { margin: 0; font-weight: 600; color: var(--ink); }
.fb-status.err { color: var(--wax); }
.fb-done { display: grid; justify-items: center; gap: 14px; padding: 24px 0; text-align: center; }
.fb-done p { margin: 0; font-size: 26px; color: var(--ink); }
.fb-done[hidden], .fb-form[hidden] { display: none; }

/* ---------- Footer ---------- */

.footer { padding: 46px 0 56px; border-top: 2px solid rgba(201, 162, 74, .3); background: linear-gradient(180deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, .5)); }
.footer-inner { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--parchment-2); }
.footer p { margin: 0; }
.footer .small { opacity: .75; }

/* ---------- Scroll reveal (only when JavaScript runs) ---------- */

.js .reveal { opacity: 0; translate: 0 26px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.visible { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; transition: none; }
  .hero-bg img, .hero-logo, .hero-tagline, .hero-sub, .hero .dl-buttons, .hero-note { animation: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .feature, .feature.flipped { grid-template-columns: 1fr; }
  .feature.flipped .frame { order: 0; }
  .mode-grid { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .mode-card:nth-child(n) { transform: none; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .icon-strip { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .dl-info { grid-template-columns: 1fr; }
  .feedback { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .brand span { display: none; }
  .pillars, .mode-grid { grid-template-columns: 1fr; }
  .btn-dl { min-width: 0; width: 100%; }
  .gallery { grid-template-columns: 1fr; }
  .note { font-size: 18px; bottom: -18px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .lb-prev, .lb-next { top: auto; bottom: 18px; translate: none; }
  .fb-kinds, .fb-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* The text covers most of a phone screen: darken the whole picture. */
  .hero-bg::after { background: linear-gradient(180deg, rgba(22, 13, 7, .7), rgba(22, 13, 7, .55) 30%, rgba(22, 13, 7, .8) 75%, var(--walnut-800)); }
}
