:root {
  --bg: #120809;
  --paper: #efe3c8;
  --paper-dim: #b9ab8e;
  --red: #c2271b;
  --ember: #ffb347;
  --font: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--font);
  overflow: hidden;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

#flash {
  position: fixed;
  inset: 0;
  background: #fff4dc;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-out;
}
#flash.on {
  opacity: 1;
  transition: none;
}

#reveal {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
  pointer-events: none;
}
#reveal > * { pointer-events: auto; }

#reveal h1 {
  margin: 0;
  font-weight: 900;
  font-size: clamp(64px, 17vw, 240px);
  line-height: 0.9;
  letter-spacing: 0.01em;
  color: var(--paper);
  text-shadow: 0 0 40px rgba(255, 140, 40, 0.35), 0 2px 0 rgba(0, 0, 0, 0.5);
  animation: slam 0.7s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}

#replay {
  position: fixed;
  right: 20px;
  bottom: 20px;
  font: inherit;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--paper-dim);
  background: transparent;
  border: 1px solid rgba(239, 227, 200, 0.25);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  animation: rise 0.6s ease-out 0.9s both;
}
#replay:hover,
#replay:focus-visible {
  color: var(--paper);
  border-color: var(--ember);
  outline: none;
}

.static {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.static h1 { font-size: clamp(64px, 17vw, 240px); font-weight: 900; margin: 0; line-height: 0.9; }

@keyframes slam {
  from { opacity: 0; transform: scale(1.7); filter: blur(14px); }
  to   { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  #reveal h1, #replay { animation: none; }
  #flash { transition: none; }
}
