:root {
  color-scheme: dark;
  --ink: #101110;
  --paper: #f2efe4;
  --muted: #babbb0;
  --lime: #d8ff42;
  --cyan: #79f7f1;
  --line: #373a32;
  --display: Impact, "Arial Black", sans-serif;
  --mono: "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 1rem/1.6 system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 5px; }
.skip { position: fixed; z-index: 5; inset: 1rem auto auto 1rem; background: var(--ink); padding: .6rem 1rem; transform: translateY(-200%); }
.skip:focus { transform: none; }
.wrap { width: min(88%, 1260px); margin-inline: auto; }
.bar, .footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.2rem; border-bottom: 1px solid var(--line); }
.bar nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .45rem clamp(.85rem, 4vw, 3rem); }
.bar nav a, .footer a, .label { font: 700 .78rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.bar nav a:hover, .footer a:hover { color: var(--lime); }
.stamp { display: inline-block; background: var(--lime); color: var(--ink); padding: .17rem .55rem; font: 900 1.3rem/1.15 var(--mono); transform: skew(-9deg); }
.stamp span { color: #435100; }
.hero { min-height: min(760px, 90svh); padding-block: clamp(2.5rem, 8vh, 6rem) 3rem; display: grid; align-items: center; grid-template-columns: 1.24fr .76fr; isolation: isolate; position: relative; }
.hero-copy { z-index: 1; }
h1, h2, .roll p, .footer p { margin: 0; font-family: var(--display); text-transform: uppercase; font-weight: 900; line-height: .88; letter-spacing: -.025em; }
h1 { font-size: clamp(3.2rem, 11vw, 10rem); }
h2 { font-size: clamp(2.65rem, 7.5vw, 7rem); }
h1 em, h2 em, .roll em { font-style: normal; color: var(--lime); }
h1 span { color: var(--lime); }
.hero-copy p { font-size: clamp(1.1rem, 2.4vw, 1.55rem); font-weight: 650; margin: 1.5rem 0; }
.button { display: inline-flex; gap: 1.4rem; align-items: center; padding: .8rem 1rem; background: var(--lime); color: var(--ink); font: 800 .85rem/1.2 var(--mono); text-transform: uppercase; }
.button:hover { background: var(--paper); }
.hero-art { justify-self: end; position: relative; width: min(100%, 480px); aspect-ratio: .86; overflow: hidden; background: radial-gradient(ellipse at center, #28351a, transparent 70%), repeating-linear-gradient(0deg, #171a13 0 1px, transparent 1px 6px); border: 1px solid var(--line); }
.hero-art::before, .hero-art::after { content: ""; position: absolute; inset: 12% 14%; transform: rotate(30deg); background: repeating-linear-gradient(90deg, var(--lime) 0 1px, transparent 1px 15px); clip-path: polygon(50% 0, 100% 78%, 50% 100%, 0 78%); opacity: .8; }
.hero-art::after { transform: rotate(-30deg); background: repeating-linear-gradient(0deg, var(--cyan) 0 1px, transparent 1px 13px); mix-blend-mode: screen; opacity: .58; }
.hero-art span { position: absolute; z-index: 1; color: var(--lime); font-size: clamp(1rem, 4vw, 2.5rem); top: 9%; left: 10%; }
.hero-art span:nth-child(2) { top: 78%; left: 76%; }
.hero-art span:nth-child(3) { top: 72%; left: 18%; font-size: 1rem; }
.roll { background: var(--lime); color: var(--ink); min-height: 58svh; }
.roll-stage { position: relative; display: grid; place-items: center; height: 58svh; min-height: 330px; overflow: hidden; isolation: isolate; }
.roll p { position: relative; z-index: 1; text-align: center; font-size: clamp(2.5rem, 8.9vw, 8rem); }
.roll em { color: var(--ink); }
#dice { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.motion .roll { height: 135svh; }
.motion .roll-stage { position: sticky; top: 0; }
.engine, .demo { padding-block: clamp(4rem, 10vw, 9rem); }
.label { color: var(--cyan); margin: 0 0 1rem; }
.intro { max-width: 43ch; color: var(--muted); font-size: clamp(1rem, 2vw, 1.25rem); }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
.features article, .scene { border: 1px solid var(--line); background: #191c17; padding: clamp(1rem, 3vw, 2rem); }
.features article span { color: var(--cyan); font-size: 2rem; }
.features h3 { margin: .6rem 0; font-size: 1.4rem; }
.features p { margin: 0; color: var(--muted); }
.motion [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .65s ease, transform .65s ease; }
.motion [data-reveal].visible { opacity: 1; transform: none; }
.demo { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2rem; }
.scene-opening { margin-top: 0; }
.choices { display: none; flex-wrap: wrap; gap: .55rem; }
.interactive .choices { display: flex; }
.choices button { font: 700 .82rem/1.3 var(--mono); color: var(--paper); background: var(--ink); border: 1px solid var(--muted); padding: .64rem; cursor: pointer; min-height: 44px; }
.choices button:hover, .choices button[aria-pressed="true"] { color: var(--ink); background: var(--lime); border-color: var(--lime); }
#outcome { color: var(--cyan); margin-bottom: 0; border-top: 1px solid var(--line); padding-top: .85rem; }
.footer { border-top: 1px solid var(--line); border-bottom: 0; padding-block: 2rem; }
.footer p { font-size: clamp(1.18rem, 3vw, 2.4rem); }
@media (max-width: 670px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-art { position: absolute; z-index: 0; inset: 7% 0 auto auto; width: 62%; opacity: .42; }
  .features, .demo { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motion [data-reveal] { transition: none; opacity: 1; transform: none; }
}

.turn { margin-top: clamp(2.5rem, 8vw, 5rem); }
.turn h3 { max-width: 23ch; font-size: clamp(1.55rem, 4vw, 3rem); margin: 0 0 1.1rem; line-height: 1.08; }
.turn ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.turn li { border-top: 2px solid var(--cyan); padding-top: .8rem; }
.turn li span { display: block; color: var(--muted); }
.world { border-block: 1px solid var(--line); background: radial-gradient(ellipse at 90% 50%, #213930, transparent 65%), #151a16; }
.world-layout { display: grid; align-items: center; grid-template-columns: 1.3fr .7fr; gap: 2rem; padding-block: clamp(4rem, 10vw, 8rem); }
.world h2 em { color: var(--cyan); }
.world-line { font-weight: 800; font-size: clamp(1rem, 2vw, 1.3rem); }
.world-stats { margin: 0; }
.world-stats div { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: .6rem 0; }
.world-stats dd { min-width: 3ch; margin: 0; color: var(--cyan); font: 700 clamp(1.15rem, 4vw, 2.25rem)/1 var(--mono); }
.world-stats dt { color: var(--muted); }
@media (max-width: 670px) {
  .turn ol, .world-layout { grid-template-columns: 1fr; }
}
