/* VOICE occasion: a dark hall where one board is lit
   IDEA the pieces stay, the board under them changes; the page alternates dark and marble like its squares
   PICTURE the rendered board, full width
   COLOUR near-black, marble, gold; the light comes from the chosen board
   TYPE Cinzel, like the lettering carved on the boards + Figtree
   LAYOUT laptop: board right, title left, board choice below; phone: title, board, choice */
:root { color-scheme: dark; --bg: #020307; --ink: #eef0f6; --soft: #a9b1c6; --gold: #f1c672; --glow: #4d9bff; --marble: #e6e7ea; }
[data-board=Lion] { --glow: #b06bff; }
[data-board=Sapphire] { --glow: #4c8dff; }
[data-board=Crystal] { --glow: #a8d3ff; }
[data-board=Classic] { --glow: #6fd0ff; }
* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 Figtree, "Segoe UI", sans-serif; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
h1, h2 { font-family: Cinzel, Georgia, serif; font-weight: 800; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(44px, 6.4vw, 100px); }
h2 { font-size: clamp(30px, 3.6vw, 50px); }
p { margin: 0; max-width: 62ch; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 20; background: #000; padding: 8px 12px; }
.band { padding: clamp(56px, 8vw, 120px) max(5vw, 16px); }
.band > * { max-width: 1240px; margin-inline: auto; }
.marble { background: var(--marble) linear-gradient(115deg, #f7f7f8, #d9dbe0 45%, #eeeff1 70%, #d3d6dc); color: #12141c; --soft: #454b5c; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; padding: 12px max(3vw, 16px); background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; font: 600 19px Cinzel, Georgia, serif; text-decoration: none; white-space: nowrap; }
nav { display: flex; gap: 26px; margin-left: auto; }
nav a, footer a { text-decoration: none; color: var(--soft); }
nav a:hover, footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.lang { font: 700 15px Figtree, sans-serif; min-width: 44px; min-height: 40px; color: var(--ink); background: none; border: 1px solid #39405a; border-radius: 8px; cursor: pointer; }
.lang:hover { border-color: var(--ink); }

.button { display: inline-block; font: 700 18px/1.2 Figtree, sans-serif; color: #1b1203; background: linear-gradient(#ffdf9b, #dfa643); border: 0; border-radius: 10px; padding: 16px 24px; text-decoration: none; cursor: pointer; transition: filter .15s; }
.button:hover { filter: brightness(1.12); }
.button:active { filter: brightness(.9); }
.quiet { font: 600 17px Figtree, sans-serif; color: var(--ink); background: none; border: 0; padding: 14px 4px; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; color: var(--soft); }

.hero { position: relative; overflow: hidden; aspect-ratio: 16 / 9; max-height: calc(100svh - 64px); min-height: 560px; width: 100%; }
.scene img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.scene.changing img { transition: opacity .9s; }
.scene img.on { opacity: 1; }
.pitch { position: absolute; left: max(5vw, 16px); top: 12%; width: min(34vw, 520px); display: grid; gap: 20px; }
.pitch p { font-size: clamp(17px, 1.5vw, 22px); color: #d5daea; max-width: 25ch; }
.pitch .actions { flex-direction: column; align-items: flex-start; gap: 8px; }
.boards { position: absolute; left: max(5vw, 16px); bottom: 6%; display: grid; gap: 2px; width: 230px; }
.boards button { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 6px 14px; font: 600 17px Figtree, sans-serif; color: var(--soft); background: none; border: 0; border-left: 3px solid #2a3046; text-align: left; cursor: pointer; }
.boards button:hover { color: var(--ink); }
.boards button[aria-pressed=true] { color: var(--ink); border-color: var(--glow); background: linear-gradient(90deg, color-mix(in srgb, var(--glow) 26%, transparent), transparent); }
.boards small { font-size: 14px; font-weight: 400; }

.puzzle { padding-block: 24px 48px; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: center; max-width: 1400px; margin-inline: auto; }
.puzzle .side { display: grid; gap: 20px; margin: 0; }
.side p { color: var(--soft); }
.side .status { min-height: 3.2em; font-size: 20px; font-weight: 600; color: var(--ink); }
.side h2 { white-space: nowrap; font-size: clamp(27px, 2.7vw, 42px); }
.table { position: relative; width: min(100%, 100svh - 90px); min-width: min(100%, 420px); aspect-ratio: 1; margin: 0 auto; }
.cloth, .cloth img { position: absolute; inset: 0; width: 100%; }
.squares { position: absolute; inset: 20.15%; display: grid; grid-template: repeat(8, 1fr) / repeat(8, 1fr); }
.squares button { position: relative; padding: 0; border: 0; background: none; cursor: pointer; }
.squares button:focus-visible { outline-offset: -3px; z-index: 2; }
.squares img { position: absolute; left: -32%; top: -55%; width: 164%; max-width: none; pointer-events: none; }
.squares .from { box-shadow: inset 0 0 0 4px var(--glow); }
.squares .to::after { content: ""; position: absolute; inset: 34%; border-radius: 50%; background: var(--glow); box-shadow: 0 0 12px var(--glow); }
.squares .to.take::after { inset: 4px; background: none; border: 4px solid var(--glow); }
.squares .last { background: rgb(255 205 110 / .42); }
.squares .mate { background: rgb(255 60 40 / .55); }

.head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px 48px; align-items: end; margin-bottom: 40px; }
.head p { color: var(--soft); font-size: 19px; }
.ladder { list-style: none; padding: 0; margin-block: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; }
.ladder li { text-align: center; }
.ladder img { width: 118%; max-width: none; margin: 0 -9% -14px; position: relative; }
.ladder div { background: linear-gradient(#171b2b, #05060c); color: #f3f4f8; padding: 26px 6px 12px; height: calc(92px + var(--i) * 30px); border-top: 4px solid #c99a45; }
.ladder b { display: block; font: 800 clamp(13px, 1.15vw, 17px) Cinzel, Georgia, serif; }
.ladder span { font-size: 14px; line-height: 1.3; display: block; margin-top: 4px; color: #c4cadb; }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 44px; margin-bottom: 0; }
dt { font-weight: 700; font-size: 20px; margin-bottom: 4px; }
dd { margin: 0; color: var(--soft); }

.shot { width: 100%; border-radius: 14px; }
.facts { list-style: none; padding: 0; margin-top: 32px; margin-bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.facts b { display: block; font-size: 19px; color: var(--gold); }
.facts span { color: var(--soft); }

.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px 48px; padding-inline: max(5vw, 16px, calc((100vw - 1240px) / 2)); }
.faq > * { width: 100%; }
details { border-bottom: 1px solid #a9adb8; }
summary { font-weight: 700; font-size: 20px; padding: 18px 0; cursor: pointer; }
details p { color: var(--soft); padding-bottom: 20px; }

.finale { position: relative; }
.finale img { width: 100%; min-height: 420px; object-fit: cover; }
.finale div { position: absolute; inset: 7% 0 auto; display: grid; gap: 22px; justify-items: center; text-align: center; padding-inline: 16px; }
footer { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 28px max(5vw, 16px); color: var(--soft); }
footer span { margin-right: auto; font-family: Cinzel, Georgia, serif; }
.owner { flex-basis: 100%; font-size: 15px; color: var(--soft); }
.paper + footer { max-width: 760px; margin-inline: auto; padding-inline: 16px; }

.paper { max-width: 760px; margin-inline: auto; padding: 48px 16px 96px; }
.paper h1 { font-size: clamp(34px, 5vw, 52px); margin-bottom: 20px; }
.paper h2 { font-size: 24px; margin: 36px 0 8px; }
.paper li { margin-bottom: 6px; }
.paper .updated { color: var(--soft); font-size: 15px; margin-bottom: 16px; }
.todo { background: #ffd97a; color: #1b1203; padding: 1px 6px; border-radius: 4px; }

@media (max-width: 900px) {
  nav { display: none; }
  .lang { margin-left: auto; }
  .hero { aspect-ratio: auto; max-height: none; min-height: 0; padding: 22px 16px 28px; display: grid; gap: 18px; }
  .scene { order: 2; position: relative; aspect-ratio: 10 / 9; margin-inline: -16px; }
  .pitch, .boards { position: static; width: 100%; }
  .pitch { gap: 14px; }
  .pitch p { max-width: 40ch; }
  .boards { order: 3; grid-template-columns: repeat(5, 1fr); }
  .boards button { justify-content: center; padding: 8px 2px; font-size: 15px; border-left: 0; border-top: 3px solid #2a3046; }
  .boards small { display: none; }
  .head, .faq { grid-template-columns: minmax(0, 1fr); }
  .rules, .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ladder { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ladder li { display: grid; grid-template-columns: 76px minmax(0, 1fr); align-items: center; text-align: left; order: calc(-1 * var(--i)); }
  .ladder img { width: 76px; margin: 0; }
  .ladder div { height: auto; padding: 12px 16px; border-top: 0; border-left: 4px solid #c99a45; }
  .ladder b { font-size: 18px; }
}
@media (max-width: 700px) {
  .puzzle { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .table { margin-top: 26px; }
  .cloth { overflow: hidden; border: 2px solid #c99a45; aspect-ratio: 1; }
  .cloth img { inset: -33.75%; width: 167.5%; max-width: none; }
  .squares { inset: 2px; }
  .rules, .facts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .finale { display: flex; flex-direction: column-reverse; }
  .finale div { position: static; padding-top: 48px; }
  .finale img { object-position: 8% 100%; min-height: 420px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
