:root {
  --bg: #050404;
  --bg-soft: #0d0b09;
  --ink: #fff8eb;
  --muted: #bfb3a0;
  --gold: #b08a45;
  --gold-soft: #d8bd79;
  --line: rgba(255, 248, 235, 0.13);
  --panel: rgba(16, 13, 10, 0.74);
  --shadow: rgba(0, 0, 0, 0.7);
  --stage-width: min(94vw, 780px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 50% 6%, rgba(176, 138, 69, 0.13), transparent 30rem),
    radial-gradient(circle at 16% 18%, rgba(255, 248, 235, 0.06), transparent 24rem),
    linear-gradient(180deg, #080706 0%, #030303 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 28px;
}

.hero-panel {
  display: grid;
  grid-template-columns: 0.76fr 1.24fr;
  gap: clamp(24px, 4vw, 58px);
  align-items: center;
  min-height: calc(100vh - 176px);
}

.copy-block {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--gold-soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(3.6rem, 8vw, 7.8rem);
  line-height: 0.83;
  letter-spacing: -0.08em;
  font-weight: 800;
  text-transform: uppercase;
}

h1 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 248, 235, 0.74);
  text-shadow: 0 0 26px rgba(176, 138, 69, 0.22);
}

.lead {
  max-width: 41rem;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.16rem);
  line-height: 1.72;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(216, 189, 121, 0.34);
  border-radius: 999px;
  background: rgba(176, 138, 69, 0.09);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill.is-live::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--gold-soft);
  box-shadow: 0 0 18px var(--gold-soft);
}

.pill.ghost {
  color: var(--muted);
  border-color: rgba(255, 248, 235, 0.16);
  background: rgba(255, 248, 235, 0.045);
}

.stage-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(92vh, 790px);
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 50% 8%, rgba(255, 248, 235, 0.09), transparent 40%),
    radial-gradient(ellipse at 50% 82%, rgba(176, 138, 69, 0.18), transparent 48%),
    linear-gradient(180deg, rgba(15, 12, 10, 0.9), rgba(4, 4, 4, 0.88));
  box-shadow: 0 32px 90px var(--shadow), inset 0 0 80px rgba(176, 138, 69, 0.05);
  overflow: hidden;
}

.spotlight {
  position: absolute;
  top: -12%;
  left: 50%;
  width: min(80%, 540px);
  height: 112%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 248, 235, 0.28), rgba(176, 138, 69, 0.08) 34%, transparent 70%);
  clip-path: polygon(34% 0, 66% 0, 92% 100%, 8% 100%);
  filter: blur(16px);
  opacity: 0.72;
  animation: breatheLight 6.4s ease-in-out infinite;
}

.ascii-stage {
  position: relative;
  z-index: 3;
  width: min(100%, var(--stage-width));
  min-height: 0;
  margin: 0;
  color: var(--ink);
  font-family: "Courier New", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(5.1px, 0.74vw, 8.35px);
  line-height: 0.74;
  letter-spacing: -0.055em;
  text-align: center;
  white-space: pre;
  text-shadow:
    0 0 7px rgba(255, 248, 235, 0.2),
    0 0 24px rgba(176, 138, 69, 0.16);
  filter: contrast(1.1);
  user-select: none;
}

#motionCanvas {
  position: absolute;
  width: 264px;
  height: 336px;
  opacity: 0;
  pointer-events: none;
}

.stage-floor {
  position: absolute;
  z-index: 1;
  left: 8%;
  right: 8%;
  bottom: 9%;
  height: 22%;
  background:
    radial-gradient(ellipse at 50% 55%, rgba(216, 189, 121, 0.16), transparent 60%),
    linear-gradient(90deg, transparent, rgba(255, 248, 235, 0.12), transparent);
  transform: perspective(260px) rotateX(62deg);
  filter: blur(2px);
  opacity: 0.72;
}

.particle-field {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.particle-field i {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(216, 189, 121, 0.48);
  box-shadow: 0 0 14px rgba(216, 189, 121, 0.6);
  opacity: 0.32;
  animation: dustFloat 9s linear infinite;
}

.particle-field i:nth-child(1) { left: 14%; top: 72%; animation-delay: -1.4s; }
.particle-field i:nth-child(2) { left: 26%; top: 34%; animation-delay: -4.1s; }
.particle-field i:nth-child(3) { left: 42%; top: 80%; animation-delay: -2.2s; }
.particle-field i:nth-child(4) { left: 55%; top: 30%; animation-delay: -5.8s; }
.particle-field i:nth-child(5) { left: 69%; top: 62%; animation-delay: -0.8s; }
.particle-field i:nth-child(6) { left: 84%; top: 48%; animation-delay: -6.5s; }
.particle-field i:nth-child(7) { left: 34%; top: 58%; animation-delay: -7.4s; }
.particle-field i:nth-child(8) { left: 74%; top: 22%; animation-delay: -3.2s; }
.particle-field i:nth-child(9) { left: 18%; top: 20%; animation-delay: -8.1s; }
.particle-field i:nth-child(10) { left: 90%; top: 76%; animation-delay: -4.8s; }

.control-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.7fr) 1.3fr;
  gap: 22px;
  align-items: start;
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.controls-copy h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.controls-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

button {
  appearance: none;
  border: 1px solid rgba(255, 248, 235, 0.16);
  border-radius: 14px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 248, 235, 0.045);
  font: inherit;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

button:hover,
button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(216, 189, 121, 0.65);
  background: rgba(176, 138, 69, 0.14);
  box-shadow: 0 12px 30px rgba(176, 138, 69, 0.08);
  outline: none;
}

button.is-selected {
  border-color: rgba(216, 189, 121, 0.9);
  background: rgba(176, 138, 69, 0.2);
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  margin-right: 7px;
  padding: 0 6px;
  border: 1px solid rgba(216, 189, 121, 0.32);
  border-radius: 7px;
  color: var(--gold-soft);
  background: rgba(0, 0, 0, 0.28);
  font-family: inherit;
  font-size: 0.73rem;
}

.legal-note {
  margin: 18px auto 0;
  color: rgba(191, 179, 160, 0.82);
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.55;
}

@keyframes breatheLight {
  0%, 100% { opacity: 0.54; transform: translateX(-50%) scaleX(0.98); }
  50% { opacity: 0.78; transform: translateX(-50%) scaleX(1.04); }
}

@keyframes dustFloat {
  0% { transform: translate3d(0, 18px, 0) scale(0.7); opacity: 0; }
  18% { opacity: 0.36; }
  78% { opacity: 0.26; }
  100% { transform: translate3d(12px, -80px, 0) scale(1.1); opacity: 0; }
}

@media (max-width: 980px) {
  .hero-panel,
  .control-panel {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    min-height: 0;
  }

  .copy-block {
    text-align: center;
  }

  .lead,
  .status-row {
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }

  .stage-wrap {
    min-height: auto;
  }

  .button-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 22px;
  }

  h1 {
    font-size: clamp(3.05rem, 18vw, 4.2rem);
  }

  .stage-wrap {
    padding: 12px 6px;
    border-radius: 22px;
  }

  .ascii-stage {
    font-size: clamp(3.7px, 1.05vw, 5.1px);
    line-height: 0.78;
    letter-spacing: -0.08em;
  }

  .control-panel {
    padding: 16px;
  }

  .button-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
