/* Diceborn website. Tokens follow the game's HUD (dist/style.css): dark teal stone, carved gold,
   cream ink, cyan rune light, chamfered panels and the game's UI face, Noto Sans Mono. */
@font-face { font-family: "Diceborn Mono"; src: url("assets/fonts/NotoSansMono-Regular-Latin.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Diceborn Mono"; src: url("assets/fonts/NotoSansMono-Bold-Latin.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --void: #031013;
  --teal-0: #061417;
  --teal-1: #0a2226;
  --teal-2: #123638;
  --line: #9e8447;
  --line-soft: #4c573c;
  --gold: #e2bd6a;
  --gold-hi: #f4da93;
  --gold-deep: #8b622a;
  --ink: #f1e6c4;
  --muted: #b4c6a9;
  --cyan: #7ee4d6;
  --cut: 8px;
  --beat: 0;
  --pad: clamp(20px, 5vw, 72px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--void); font: 400 15px/1.7 "Diceborn Mono", ui-monospace, monospace; }
img { max-width: 100%; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff3c4; }
:focus-visible { outline: 3px solid #fff0a9; outline-offset: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 14px; background: var(--gold); color: #241a0b; font-weight: 700; }
.skip:focus { top: 12px; }
.chamfer { clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }

/* ---------- Top bar ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 10px var(--pad); background: linear-gradient(#030f12f2, #030f1200); pointer-events: none; }
.bar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold-hi); margin-right: auto; }
.brand img { width: 34px; height: 34px; border: 1px solid var(--line); box-shadow: 0 0 0 2px #02171b; }
.brand-name { font-weight: 700; letter-spacing: .32em; text-transform: uppercase; font-size: 13px; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--gold-hi); }
.lang select { appearance: none; font: 700 12px/1 "Diceborn Mono", monospace; letter-spacing: .12em; color: var(--gold-hi); background: #08232dcc; border: 1px solid var(--line); padding: 9px 12px; min-height: 36px; cursor: pointer; }

/* ---------- The stage (sticky behind hero and beats) ---------- */
.story { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; margin-bottom: -100vh; margin-bottom: -100svh; overflow: hidden; z-index: 0; background: #0a1925; }
.stage-still, .stage-canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.stage-still { object-fit: cover; object-position: 50% 52%; transform: scale(calc(1.04 + var(--beat) * .035)); transform-origin: 62% 70%; transition: opacity .8s ease; }
.stage-canvas { opacity: 0; transition: opacity .9s ease; }
.stage-canvas.over-die { cursor: pointer; }
.scene-live .stage-canvas { opacity: 1; }
.scene-live .stage-still { opacity: 0; }
.stage-shade { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, #031013f0 0, #031013c8 26%, #0310134d 46%, transparent 62%),
    linear-gradient(#031013b3, transparent 16%, transparent 78%, #031013d9),
    radial-gradient(ellipse at 66% 55%, transparent 40%, #02090c80 100%); }
.stage-foot { position: absolute; right: var(--pad); bottom: 18px; z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; max-width: min(560px, calc(100% - 2 * var(--pad))); }
.prov { margin: 0; padding: 5px 10px; font-size: 11px; line-height: 1.45; letter-spacing: .04em; color: #d8e3cf; background: #031317c7; border: 1px solid #47604f; }
.prov-live, .scene-live .prov-still { display: none; }
.scene-live .prov-live { display: block; }
.chip-button { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 12px; font: 700 11px/1.2 "Diceborn Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-hi); background: #08232de6; border: 1px solid var(--line); cursor: pointer; }
.chip-button:hover { background: #123a3f; }
.chip-button[hidden] { display: none; }
.glyph { width: 10px; height: 12px; display: inline-block; }
.glyph-pause { border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.glyph-play, .paused .glyph-pause { border: 0; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid currentColor; }
.live-only { display: none; }
.scene-live .live-only { display: block; }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 92px var(--pad) 84px; pointer-events: none; }
.hero-copy { max-width: 35rem; pointer-events: auto; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 14px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #cad0a8; }
.status-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; color: var(--cyan); border: 1px solid #2f6d68; background: #062226cc; letter-spacing: .14em; }
.rune { width: 8px; height: 8px; background: var(--cyan); transform: rotate(45deg); box-shadow: 0 0 8px #58e0d0; }
h1 { margin: 0; line-height: 0; }
.wordmark { width: min(560px, 100%); height: auto; filter: drop-shadow(0 6px 0 #02101480) drop-shadow(0 14px 22px #000a); }
.tagline { margin: 14px 0 10px; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; font-weight: 700; color: var(--gold-hi); text-shadow: 0 2px #021316; }
.lead { margin: 0 0 22px; color: #d3dcc4; text-shadow: 0 1px #021316; }

.roll-card { position: relative; padding: 16px 18px 14px; background: linear-gradient(160deg, #123638f2, #07191df2); border: 1px solid var(--line); box-shadow: inset 0 0 0 2px #041820, 0 18px 40px #0009;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.roll-card::before { content: ""; position: absolute; top: 0; left: 16%; right: 16%; height: 2px; background: linear-gradient(90deg, transparent, #c9a658, transparent); }
.heroes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; border: 0; }
.heroes legend { float: left; margin: 0 10px 0 0; padding: 7px 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.heroes label { position: relative; display: inline-flex; cursor: pointer; }
.heroes input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.heroes label span { padding: 6px 10px; font-size: 12px; color: #cfd8c0; border: 1px solid #405a4b; background: #061c22; }
.heroes label:hover span { border-color: var(--line); }
.heroes input:checked + span { color: #2b2214; background: linear-gradient(#efd080, #c79c4a); border-color: #ffe4a3; font-weight: 700; }
.heroes input:focus-visible + span { outline: 3px solid #fff0a9; outline-offset: 2px; }
.roll-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.roll-button { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 22px 10px 14px; cursor: pointer; font: 700 15px/1.1 "Diceborn Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: #332714; text-shadow: 0 1px #ffdd9770;
  background: linear-gradient(#efd080 0 6%, #d5ae5a 6% 52%, #ba8b39 52% 94%, #84601e 94%); border: 1px solid #ffe4a3; box-shadow: inset 0 0 0 3px #c29847, 0 4px 0 #5b3f1b;
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px); }
.roll-button:hover { filter: brightness(1.08); }
.roll-button:active { transform: translateY(2px); }
.roll-button:disabled, .roll-button[aria-disabled="true"] { filter: saturate(.55) brightness(.85); cursor: progress; }
.roll-die { position: relative; width: 28px; height: 28px; background: #2a2316; border: 2px solid #4b3a1c; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 3px; }
.roll-die i { width: 5px; height: 5px; background: var(--gold-hi); place-self: center; }
.roll-die i:nth-child(1) { grid-area: 1 / 1; } .roll-die i:nth-child(2) { grid-area: 1 / 3; } .roll-die i:nth-child(3) { grid-area: 2 / 2; } .roll-die i:nth-child(4) { grid-area: 3 / 1; } .roll-die i:nth-child(5) { grid-area: 3 / 3; }
.rolling .roll-die { animation: tumble .5s steps(4) infinite; }
.roll-key { margin: 0; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8ba99b; }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; font: 700 11px/1.6 "Diceborn Mono", monospace; color: var(--gold-hi); border: 1px solid var(--line); border-bottom-width: 3px; background: #061c22; text-align: center; }

.faces { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0 10px; padding: 0; }
.face { min-width: 0; text-align: center; }
.face-art { --face: #97bad4; position: relative; display: block; aspect-ratio: 1; background: var(--face); border: 1px solid #ffffff55;
  box-shadow: inset 3px 3px 0 #ffffff26, inset -4px -4px 0 #00000040, 0 3px 0 #02101480; image-rendering: pixelated; transition: transform .25s ease; }
.face .face-art { background: var(--face); }
.face-icon { position: absolute; left: 7%; top: 7%; width: 24%; height: 24%; padding: 2%; background: #09212a; fill: #fff0c9; }
.face-pips { position: absolute; inset: 22% 22% 18% 22%; display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); }
.face-pips i { width: 62%; aspect-ratio: 1; place-self: center; background: #fff0c9; box-shadow: 1px 1px 0 #29433e; }
.face-pips .c1 { grid-column: 1; } .face-pips .c2 { grid-column: 2; } .face-pips .c3 { grid-column: 3; }
.face-pips .r1 { grid-row: 1; } .face-pips .r2 { grid-row: 2; } .face-pips .r3 { grid-row: 3; }
.face-e { grid-area: 1 / 1 / 4 / 4; place-self: center; font-size: clamp(18px, 2.6vw, 30px); line-height: 1; color: #fff0c9; text-shadow: 2px 2px 0 #29433e; }
.face-label { display: block; margin-top: 5px; font-size: 10px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.face.matched .face-art { outline: 2px solid var(--gold-hi); outline-offset: 2px; transform: translateY(-3px); }
.face.matched .face-label { color: var(--gold-hi); }
.rolling .face-art { animation: tumble .45s steps(3) infinite; }
.result { min-height: 3.4em; margin: 0; font-size: 14px; line-height: 1.55; color: #d3dcc4; }
.result strong { color: var(--gold-hi); font-size: 17px; }
.result-mult { color: var(--cyan); white-space: nowrap; }
.result-wild { display: inline-block; font-size: 12px; color: #c2b37c; }
.roll-note { margin: 4px 0 0; font-size: 11px; line-height: 1.5; color: #7f9d8f; }
.stage-hint { margin: 12px 0 0; font-size: 12px; letter-spacing: .08em; color: #9fb9a9; }
@keyframes tumble { 25% { transform: rotate(8deg) translateY(-3px); } 50% { transform: rotate(-6deg); } 75% { transform: rotate(4deg) translateY(-2px); } }

.scroll-cue { position: absolute; left: var(--pad); bottom: 22px; display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: #cad0a8; text-decoration: none; pointer-events: auto; }
.cue-line { width: 2px; height: 36px; background: linear-gradient(var(--gold), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(6px); opacity: .55; } }

/* ---------- Beats ---------- */
.run { position: relative; z-index: 1; padding: 0 var(--pad); pointer-events: none; }
.run-head { padding-top: 12vh; max-width: 30rem; pointer-events: auto; }
.eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); }
h2 { margin: 0; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.15; letter-spacing: .04em; color: var(--gold-hi); text-shadow: 0 3px 0 #02131780; }
.beat { position: relative; display: block; max-width: 30rem; margin: 0 0 0; padding: 22px 24px 20px; min-height: 0; pointer-events: auto;
  background: linear-gradient(160deg, #102f32eb, #06171bf0); border: 1px solid var(--line-soft); box-shadow: inset 0 0 0 2px #03141a, 0 18px 40px #0008;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.beat + .beat, .run-head + .beat { margin-top: 62vh; }
.beat:last-child { margin-bottom: 70vh; }
.beat h3 { margin: 12px 0 8px; font-size: 20px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-hi); }
.beat p { margin: 0; color: #d3dcc4; }
.beat .note { margin-top: 12px; font-size: 12px; color: var(--cyan); }
.pips { display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); width: 42px; height: 42px; padding: 6px; background: #c9a658; border: 1px solid #ffe4a3; box-shadow: inset 2px 2px 0 #ffffff40, inset -3px -3px 0 #00000040; }
.pips i { width: 7px; height: 7px; background: #241a0b; place-self: center; }
.pips-1 i { grid-area: 2 / 2; }
.pips-2 i:nth-child(1) { grid-area: 1 / 1; } .pips-2 i:nth-child(2) { grid-area: 3 / 3; }
.pips-3 i:nth-child(1) { grid-area: 1 / 1; } .pips-3 i:nth-child(2) { grid-area: 2 / 2; } .pips-3 i:nth-child(3) { grid-area: 3 / 3; }
.hands { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.hands li { display: flex; align-items: baseline; gap: 10px; padding: 3px 0; border-bottom: 1px dashed #2f4a40; }
.hands span { flex: 1; color: #d3dcc4; }
.hands b { color: var(--gold-hi); }

/* ---------- Status and footer ---------- */
.showcase, .roster, .platforms { position: relative; z-index: 2; padding: clamp(72px, 8vw, 136px) var(--pad); border-top: 1px solid #42543d; background: radial-gradient(ellipse at 80% 10%, #123638 0, #061417 58%, #031013 100%); }
.roster { background: radial-gradient(ellipse at 18% 40%, #182b31 0, #061417 64%); }
.platforms { background: radial-gradient(ellipse at 50% 0, #123638 0, #061417 70%); }
.section-intro { max-width: 72rem; margin: 0 auto 34px; }
.section-intro > p:last-child { max-width: 48rem; margin: 16px 0 0; color: #d3dcc4; font-size: clamp(15px, 1.4vw, 18px); }
.feature-grid { max-width: 72rem; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.capture { min-width: 0; margin: 0; overflow: hidden; background: linear-gradient(160deg, #123638, #07191d); border: 1px solid var(--line); box-shadow: inset 0 0 0 2px #041820, 0 18px 40px #0008; clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut)); }
.capture img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; image-rendering: pixelated; }
.capture figcaption { padding: 15px 18px 18px; color: #d3dcc4; font-size: 13px; line-height: 1.55; }
.capture figcaption strong { color: var(--gold-hi); }
.capture-tag { display: inline-block; margin-right: 12px; padding: 3px 7px; border: 1px solid #2f6d68; color: var(--cyan); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; white-space: nowrap; }
.feature-wide { grid-column: 1 / -1; }
.feature-wide img { max-height: 610px; object-position: center 56%; }
.roster-layout { max-width: 72rem; margin: 0 auto; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 1.5fr); align-items: center; gap: clamp(24px, 5vw, 70px); }
.hero-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-soft); }
.hero-list li { display: flex; gap: 22px; align-items: baseline; padding: 18px 8px; border-bottom: 1px solid var(--line-soft); }
.hero-list span { color: var(--cyan); font-size: 12px; }
.hero-list strong { color: var(--gold-hi); font-size: clamp(16px, 1.7vw, 22px); }
.roster-note { max-width: 32rem; margin: 26px 0 0; color: #b4c6a9; }
.platform-list { list-style: none; max-width: 72rem; margin: 0 auto 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.platform-list li { padding: 10px 18px; border: 1px solid var(--line); background: #0a2226; color: var(--gold-hi); font-size: 13px; font-weight: 700; }
.platform-capture { max-width: 72rem; margin: 0 auto; }
.platform-capture img { max-height: 600px; }
.status { position: relative; z-index: 2; padding: 96px var(--pad); background: radial-gradient(ellipse at 50% 0, #123638 0, var(--teal-0) 70%); border-top: 1px solid var(--line); }
.status::before { content: ""; position: absolute; top: -6px; left: 50%; width: 10px; height: 10px; background: var(--gold); transform: translateX(-50%) rotate(45deg); box-shadow: 0 0 0 3px var(--void); }
.status-card { max-width: 40rem; margin: 0 auto; text-align: center; }
.status-card p { color: #d3dcc4; }
.contact { margin-top: 18px; }
.contact a { font-weight: 700; }
.foot { position: relative; z-index: 2; background: var(--void); border-top: 1px solid #22342f; padding: 36px var(--pad) 40px; font-size: 12px; color: #8ba99b; }
.foot-in { max-width: 64rem; margin: 0 auto; display: grid; gap: 14px; }
.foot h2 { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-shadow: none; }
.foot p { margin: 4px 0 0; line-height: 1.6; }
.to-top { justify-self: start; }
.footer-pages { display: flex; gap: 22px; flex-wrap: wrap; }

/* Store information pages use the same panels, type and colour tokens. */
.info-page .bar { position: relative; background: #031013; border-bottom: 1px solid var(--line-soft); }
.info-main { max-width: 66rem; min-height: 70vh; margin: 0 auto; padding: clamp(64px, 8vw, 120px) var(--pad); }
.info-main h1 { margin: 0 0 26px; color: var(--gold-hi); font-size: clamp(32px, 5vw, 58px); line-height: 1.1; }
.info-main h2 { margin: 0 0 12px; font-size: clamp(20px, 2.6vw, 30px); }
.info-main p, .info-main li { color: #d3dcc4; }
.info-main > p { max-width: 48rem; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.info-card { padding: 24px; background: linear-gradient(160deg, #123638, #07191d); border: 1px solid var(--line-soft); box-shadow: inset 0 0 0 2px #041820; }
.info-card p:last-child { margin-bottom: 0; }
.owner-todo { color: var(--cyan) !important; font-weight: 700; }

/* ---------- Narrow and portrait: scene on top, copy below ---------- */
@media (max-width: 899px), (max-aspect-ratio: 19/20) {
  .bar { padding: 8px 16px; gap: 10px; }
  .nav { display: none; }
  .stage-shade { background:
    linear-gradient(0deg, #031013f5 0, #031013e0 42%, #0310134d 62%, transparent 74%),
    linear-gradient(#031013b3, transparent 14%); }
  .stage-still { object-position: 38% 50%; }
  .stage-foot { left: 16px; right: auto; top: 58px; bottom: auto; justify-content: flex-start; max-width: calc(100% - 32px); }
  .prov { font-size: 10px; }
  .hero { justify-content: flex-end; padding: 44vh 18px 72px; padding-top: 44svh; }
  .run { padding: 0 18px; }
  .run-head { padding-top: 30vh; }
  .beat + .beat, .run-head + .beat { margin-top: 48vh; }
  .beat { padding: 18px 18px 16px; }
  .roll-card { padding: 14px 14px 12px; }
  .faces { gap: 6px; }
  .face-label { font-size: 9px; }
  .roster-layout, .info-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .feature-grid { grid-template-columns: 1fr; } .feature-wide { grid-column: auto; } .capture-tag { display: block; width: max-content; margin-bottom: 7px; } .showcase, .roster, .platforms { padding: 72px 18px; } .platform-list li { flex: 1 1 130px; text-align: center; } }
@media (max-width: 420px) { .heroes legend { float: none; width: 100%; padding: 0 0 4px; } .roll-key { display: none; } }

/* Reduced motion: no transitions, no ambient animation, no scroll-driven still zoom. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .stage-still { transform: none; }
}
