/* Ballochet website. Colours follow the game's sunset palette and UI (ink outlines, paper panels, gold). */
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("fonts/Fredoka-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/Nunito-ExtraBold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --ink: #2a2140;
  --ink-2: #3a2d5c;
  --plum: #4a2944;
  --sky-0: #67559a;
  --sky-1: #b36b93;
  --sky-2: #f09d76;
  --paper: #f8f5fc;
  --paper-2: #ebe4f3;
  --gold: #f2b62a;
  --gold-2: #ffd36b;
  --text: #2a2140;
  --muted: #5d5275;
  --light: #fdf8ff;
  --light-muted: #d9cfe8;
  --radius: 18px;
  --shadow: 0 6px 0 var(--ink);
  --wrap: 1120px;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--ink); color: var(--light); font-family: var(--body); font-weight: 500; font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.15; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.6rem); margin-bottom: 1.1rem; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1rem; text-wrap: pretty; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.small { font-size: 0.875rem; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 20; background: var(--gold); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-weight: 800; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons (the game's chunky outlined style) ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5em; font-family: var(--display); font-weight: 700; font-size: 1.1rem; line-height: 1; text-decoration: none; padding: 0.85em 1.4em; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; cursor: pointer; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-small { font-size: 0.95rem; padding: 0.6em 1em; box-shadow: 0 4px 0 var(--ink); }
.btn[aria-disabled="true"] { cursor: default; }
.btn[aria-disabled="true"]:hover { transform: none; box-shadow: 0 5px 0 var(--ink); }
.btn-small[aria-disabled="true"]:hover { box-shadow: 0 4px 0 var(--ink); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 10px max(16px, (100% - var(--wrap)) / 2); background: rgba(42, 33, 64, 0.88); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.35rem; }
.brand img { width: 36px; height: 36px; }
.topbar nav { display: flex; gap: 22px; margin-left: auto; }
.topbar nav a { text-decoration: none; font-weight: 700; color: var(--light-muted); }
.topbar nav a:hover { color: var(--light); }

/* ---------- hero ---------- */
.hero { position: relative; background: linear-gradient(180deg, var(--sky-0) 0%, #7b5a9e 45%, #8a5f9c 100%); text-align: center; overflow: hidden; }
.hero-copy { padding: clamp(36px, 6vw, 72px) 16px 8px; position: relative; z-index: 1; }
.logo { width: min(620px, 88vw); margin: 0 auto; filter: drop-shadow(0 10px 24px rgba(255, 214, 150, 0.35)); }
.tagline { font-family: var(--display); font-weight: 600; font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem); margin: 18px auto 6px; }
.lede { max-width: 36em; margin: 0 auto 26px; color: var(--light-muted); font-size: 1.15rem; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.hero-art { display: block; margin-top: clamp(-40px, -2vw, 0px); }
.hero-art img { width: 100%; min-height: 240px; object-fit: cover; object-position: 46% 70%; }

/* ---------- bands ---------- */
.band { padding: clamp(56px, 8vw, 96px) 0; }
.band-ink { background: var(--ink); color: var(--light); }
.band-paper { background: var(--paper); color: var(--text); }
.band-plum { background: var(--plum); color: var(--light); }
.band-sky { background: linear-gradient(180deg, var(--sky-0), var(--sky-1) 70%, var(--sky-2)); color: var(--light); }
.band-paper a:not(.btn) { color: var(--ink-2); }
.section-lede { font-size: 1.2rem; max-width: 34em; margin-bottom: 2rem; }
.note { color: var(--light-muted); font-size: 0.95rem; margin-top: 16px; }
.note a { color: var(--gold-2); }

/* ---------- trailer ---------- */
.video { position: relative; aspect-ratio: 16 / 9; border: 4px solid var(--light); border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 10px 0 rgba(0, 0, 0, 0.35); }
.video iframe, .video-play, .video-play img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-play { padding: 0; margin: 0; background: none; cursor: pointer; }
.video-play img { object-fit: cover; }
.play-icon { position: absolute; left: 50%; top: 50%; width: 112px; height: 112px; margin: -56px 0 0 -56px; border-radius: 50%; background: var(--gold); border: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink); transition: transform 0.15s ease; }
.play-icon::after { content: ""; position: absolute; left: 41px; top: 31px; border-style: solid; border-width: 23px 0 23px 38px; border-color: transparent transparent transparent var(--ink); }
.video-play:hover .play-icon, .video-play:focus-visible .play-icon { transform: scale(1.08); }
.video-fallback { position: absolute; inset: auto 0 0 0; margin: 0; padding: 12px; background: rgba(0, 0, 0, 0.7); text-align: center; }

/* ---------- game ---------- */
.about { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px 40px; font-size: 1.12rem; color: var(--muted); margin-bottom: 40px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.card { background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: linear-gradient(#dcebf6, #eef6fb); border-bottom: 3px solid var(--ink); }
.card h3 { margin: 14px 16px 4px; }
.card p { margin: 0 16px 16px; color: var(--muted); font-size: 0.98rem; }

/* ---------- cast ---------- */
.cast { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; text-align: center; }
.cast li { display: flex; flex-direction: column; align-items: center; }
.cast img { width: min(160px, 100%); filter: drop-shadow(0 8px 0 rgba(42, 33, 64, 0.35)); }
.cast li:nth-child(odd) img { transform: rotate(-4deg); }
.cast li:nth-child(even) img { transform: rotate(4deg); }
.cast .name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; margin-top: 10px; }
.cast .points { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); background: var(--gold); border: 3px solid var(--ink); border-radius: 999px; padding: 2px 14px; margin-top: 4px; }

/* ---------- chapters ---------- */
.chapters { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.chapters li { flex: 1 1 300px; max-width: 360px; background: var(--ink-2); border-radius: var(--radius); overflow: hidden; border: 3px solid rgba(255, 255, 255, 0.12); }
.chapters img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.chapters h3 { margin: 16px 18px 4px; font-size: 1.35rem; }
.chapters h3 span { display: block; font-family: var(--body); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 2px; }
.chapters p { margin: 0 18px 18px; color: var(--light-muted); }

/* ---------- runs, press ---------- */
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.band-paper .split p { color: var(--muted); font-size: 1.1rem; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.facts li { background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; color: var(--muted); font-weight: 700; }
.facts strong { display: block; font-family: var(--display); font-size: 2rem; color: var(--ink); line-height: 1.1; }
.band-plum p { color: var(--light-muted); }
.factsheet { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; background: rgba(0, 0, 0, 0.18); border-radius: var(--radius); padding: 24px 26px; }
.factsheet dt { font-weight: 800; color: var(--gold-2); }
.factsheet dd { margin: 0; }

/* ---------- footer ---------- */
.footer { background: #1d1630; color: var(--light-muted); padding: 40px 0 48px; text-align: center; }
.footer p { margin: 0 0 8px; }
.footer-steam { margin-bottom: 18px !important; }
.footer a:not(.btn) { color: var(--light); }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 32px 16px; background: linear-gradient(180deg, var(--sky-0), var(--sky-1) 70%, var(--sky-2)); }
.lost img { width: 140px; margin: 0 auto 18px; transform: rotate(-8deg); }
.lost h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.2rem); margin-bottom: 10px; }
.lost p { font-size: 1.15rem; margin-bottom: 26px; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .cast { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
}
@media (max-width: 760px) {
  .topbar nav { display: none; }
  .topbar .btn-small { margin-left: auto; }
  .hero-art img { min-height: 220px; object-position: 47% 72%; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card h3 { font-size: 1.02rem; margin: 10px 10px 2px; }
  .card p { font-size: 0.88rem; margin: 0 10px 12px; line-height: 1.45; }
  .card img { border-bottom-width: 2px; }
}
@media (max-width: 480px) {
  .cast { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cast .name { font-size: 1.15rem; }
  .actions .btn { width: 100%; }
  .play-icon { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
  .play-icon::after { left: 30px; top: 22px; border-width: 18px 0 18px 30px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts strong { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .play-icon { transition: none; }
}
