:root {
  color-scheme: dark;
  --ink: #f7f0e5;
  --muted: #b9afa1;
  --paper: #100e13;
  --panel: #19151e;
  --line: #3a3041;
  --gold: #f3b95f;
  --violet: #a884ff;
  --rose: #ef6d91;
}

* { box-sizing: border-box; }

html { background: var(--paper); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(168, 132, 255, .18), transparent 34rem),
    radial-gradient(circle at 90% 30%, rgba(239, 109, 145, .11), transparent 28rem),
    var(--paper);
  font: 400 16px/1.65 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.grain {
  position: fixed;
  inset: 0;
  opacity: .15;
  pointer-events: none;
  background-image: url("/assets/noise.svg");
  mix-blend-mode: soft-light;
}

.site-header, main, footer { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand img { filter: drop-shadow(0 8px 16px rgba(168, 132, 255, .25)); }
.live { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: .84rem; text-transform: uppercase; letter-spacing: .14em; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #73d69b; box-shadow: 0 0 0 5px rgba(115, 214, 155, .1); }

.hero { padding: clamp(72px, 11vw, 148px) 0 72px; max-width: 930px; }
.kicker, .label { margin: 0 0 14px; color: var(--gold); text-transform: uppercase; letter-spacing: .18em; font-size: .74rem; font-weight: 800; }
h1, h2, p { text-wrap: pretty; }
h1 { margin: 0; max-width: 920px; font: 780 clamp(3.4rem, 9vw, 7.8rem)/.91 ui-serif, Georgia, serif; letter-spacing: -.065em; }
h1 em { color: var(--violet); font-style: italic; font-weight: 520; }
.intro { max-width: 700px; margin: 32px 0 0; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
button { border: 1px solid var(--gold); background: var(--gold); color: #1a1309; min-height: 52px; padding: 0 22px; font: inherit; font-weight: 800; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
button:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(243, 185, 95, .14); }
button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.die-value { display: inline-grid; place-items: center; min-width: 28px; margin-right: 6px; color: var(--violet); }

.oracle { position: relative; padding: clamp(28px, 6vw, 64px); background: linear-gradient(145deg, rgba(32, 25, 39, .96), rgba(19, 16, 23, .96)); border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0,0,0,.28); overflow: hidden; }
.oracle::after { content: ""; position: absolute; width: 360px; height: 360px; right: -200px; top: -220px; border: 1px solid rgba(168,132,255,.25); transform: rotate(45deg); }
.oracle-heading { display: flex; justify-content: space-between; gap: 32px; align-items: start; }
.oracle h2, .about h2 { margin: 0; font: 700 clamp(2rem, 5vw, 4rem)/1 ui-serif, Georgia, serif; letter-spacing: -.04em; }
#roll-result { flex: none; color: var(--violet); font: 700 .8rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--line); padding: 10px 12px; }
#hook { max-width: 790px; margin: 30px 0 0; color: #ddd3c7; font-size: clamp(1.05rem, 2vw, 1.3rem); }
.details { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 42px; background: var(--line); border: 1px solid var(--line); }
.details span { display: flex; flex-direction: column; gap: 5px; min-height: 112px; padding: 22px; background: var(--panel); }
.details small { color: var(--muted); text-transform: uppercase; letter-spacing: .13em; }
.details strong { font-family: ui-serif, Georgia, serif; font-size: 1.12rem; }

.about { display: grid; grid-template-columns: 1fr 2fr; gap: 48px; padding: 120px 0; border-bottom: 1px solid var(--line); }
.about h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.about p:not(.kicker) { color: var(--muted); max-width: 680px; }
footer { min-height: 100px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .82rem; }

@media (max-width: 680px) {
  .site-header, main, footer { width: min(100% - 28px, 1120px); }
  .site-header { min-height: 74px; }
  .live { font-size: 0; }
  .live i { display: block; }
  .hero { padding-top: 64px; }
  h1 { font-size: clamp(3rem, 16vw, 5.4rem); }
  .oracle-heading { display: block; }
  #roll-result { display: inline-block; margin-top: 22px; }
  .details { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; gap: 20px; padding: 82px 0; }
  footer { align-items: start; flex-direction: column; justify-content: center; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
