:root {
  color-scheme: dark;
  --bg: #030303;
  --fg: #f7f7f4;
  --line: rgba(247, 247, 244, 0.16);
  --glass: rgba(10, 10, 12, 0.42);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; background: var(--bg); }
body {
  overflow: hidden;
  color: var(--fg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.02em;
}
button { font: inherit; }

.experience {
  position: relative;
  width: 100vw;
  height: 100dvh;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 50% 46%, rgba(56, 78, 103, 0.10), transparent 34%),
    #030303;
}

#warp-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -4;
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 27%, rgba(0,0,0,.25) 58%, rgba(0,0,0,.90) 100%);
}

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 8;
  opacity: .065;
  pointer-events: none;
  mix-blend-mode: soft-light;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.08) 0 1px, transparent 1px 4px);
}

.flash {
  position: absolute;
  inset: 0;
  z-index: 30;
  opacity: 0;
  pointer-events: none;
  background: white;
}

.topbar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  padding: max(22px, env(safe-area-inset-top)) clamp(20px, 4vw, 64px) 0 0;
}

.skip {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
  color: rgba(255,255,255,.64);
  background: rgba(0,0,0,.14);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.skip:hover,
.skip:focus-visible {
  color: white;
  border-color: rgba(255,255,255,.38);
  background: rgba(255,255,255,.08);
  outline: none;
}

.message-stage {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  align-content: center;
  justify-items: center;
  width: min(1160px, calc(100% - 40px));
  height: 100%;
  margin-inline: auto;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.message {
  max-width: 1120px;
  margin: 0;
  font-size: clamp(42px, 8.2vw, 122px);
  line-height: .88;
  letter-spacing: -.072em;
  font-weight: 800;
  text-transform: uppercase;
  text-wrap: balance;
  text-shadow: 0 0 46px rgba(180,220,255,.08);
  will-change: transform, filter, opacity;
}

.hud {
  position: absolute;
  left: clamp(18px, 4vw, 64px);
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 18px));
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(155px, auto) auto;
  gap: clamp(14px, 2.4vw, 30px);
  align-items: center;
  padding: 11px 14px 11px 10px;
  border: 1px solid rgba(255,255,255,.105);
  border-radius: 15px;
  background: var(--glass);
  box-shadow: 0 18px 70px rgba(0,0,0,.24);
  backdrop-filter: blur(18px) saturate(118%);
}

.hud-pulse {
  width: 34px;
  height: 34px;
  opacity: .86;
  overflow: hidden;
}
.hud-pulse lottie-player { width: 100%; height: 100%; }

.hud-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 112px;
  text-align: right;
}
.hud-stat-main {
  min-width: 176px;
  text-align: left;
}
.hud-label {
  color: rgba(255,255,255,.34);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .18em;
}
.hud strong {
  color: rgba(255,255,255,.86);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .055em;
  white-space: nowrap;
}

.no-webgl .experience {
  background:
    radial-gradient(circle at 50% 50%, rgba(80, 103, 128, .16), transparent 24%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.04), transparent 44%),
    #030303;
}

@media (max-width: 720px) {
  .experience { min-height: 440px; }
  .topbar { padding-right: 18px; }
  .message-stage { width: calc(100% - 30px); padding-bottom: 34px; }
  .message { font-size: clamp(40px, 13.4vw, 76px); line-height: .90; letter-spacing: -.065em; }
  .hud {
    left: 14px;
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 14px));
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
    padding: 9px 11px 9px 8px;
  }
  .hud-pulse {
    grid-row: 1 / 3;
    width: 30px;
    height: 30px;
  }
  .hud-stat,
  .hud-stat-main {
    min-width: 0;
    text-align: left;
  }
  .hud-stat:last-child {
    display: none;
  }
  .hud strong { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .scanlines { display: none; }
  .hud { display: none; }
}
