:root {
  color-scheme: dark;
  --bg: #020813;
  --panel: rgba(4, 13, 26, 0.82);
  --ink: #e8eef6;
  --muted: #8fa1b6;
  --quiet: #5f7289;
  --line: rgba(173, 205, 239, 0.16);
  --blue: #71c7ff;
  --amber: #ff8a54;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 62% 18%, rgba(33, 100, 168, 0.16), transparent 34rem),
    linear-gradient(180deg, #061426 0%, var(--bg) 78%);
  color: var(--ink);
}

button,
summary {
  font: inherit;
}

.experience {
  display: grid;
  width: min(1680px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(0.75rem, 2vw, 1.5rem);
  grid-template-rows: auto 1fr auto;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.topbar,
footer {
  display: flex;
  min-height: 2rem;
  align-items: center;
  gap: 0.8rem;
  color: var(--quiet);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumb {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  white-space: nowrap;
}

.live i {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 16px rgba(113, 199, 255, 0.72);
}

main {
  display: grid;
  align-content: center;
  gap: 0.85rem;
}

.viewport {
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid var(--line);
  aspect-ratio: 1680 / 900;
  background: #04101e;
  box-shadow: 0 2rem 7rem rgba(0, 0, 0, 0.48);
  isolation: isolate;
}

.poster,
.motion {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster {
  z-index: 0;
}

.motion {
  z-index: 1;
  opacity: 0;
  transition: opacity 700ms ease;
}

.motion.is-visible {
  opacity: 1;
}

.atmosphere {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(1, 7, 15, 0.46), transparent 32%, transparent 72%, rgba(1, 6, 13, 0.2)),
    linear-gradient(0deg, rgba(1, 6, 13, 0.52), transparent 40%);
}

.scanline {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(188, 220, 255, 0.055) 4px);
  mix-blend-mode: screen;
}

.scene-copy {
  position: absolute;
  z-index: 4;
  bottom: clamp(1rem, 4vw, 3.4rem);
  left: clamp(1rem, 4vw, 3.6rem);
  max-width: min(32rem, 66%);
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.88);
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--blue);
  font-size: clamp(0.58rem, 1vw, 0.72rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.3rem, 8vw, 7.5rem);
  font-weight: 570;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.lede {
  max-width: 30rem;
  margin: clamp(0.7rem, 1.8vw, 1.3rem) 0 0;
  color: rgba(232, 238, 246, 0.78);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(0.78rem, 1.35vw, 1.08rem);
  line-height: 1.5;
}

.telemetry {
  position: absolute;
  z-index: 4;
  top: clamp(0.8rem, 2vw, 1.5rem);
  right: clamp(0.8rem, 2vw, 1.5rem);
  display: flex;
  gap: 0.8rem;
  color: rgba(232, 238, 246, 0.58);
  font-size: clamp(0.5rem, 0.8vw, 0.66rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.console {
  display: grid;
  border: 1px solid var(--line);
  background: var(--panel);
  grid-template-columns: auto minmax(15rem, 1fr) auto;
  backdrop-filter: blur(14px);
}

.controls {
  display: flex;
}

.control {
  display: grid;
  min-width: 12.5rem;
  min-height: 4.4rem;
  padding: 0.8rem 1rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  grid-template-columns: 2rem 1fr;
  gap: 0.6rem;
  transition: background 160ms ease, color 160ms ease;
}

.control:hover,
.control:focus-visible,
.control[aria-pressed="true"] {
  outline: none;
  background: rgba(113, 199, 255, 0.09);
  color: #fff;
}

.control[aria-pressed="true"] .control-key {
  color: var(--blue);
}

.control-key {
  color: var(--quiet);
  font-size: 0.64rem;
}

.control b,
.control small {
  display: block;
}

.control b {
  font-size: 0.77rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.control small {
  margin-top: 0.35rem;
  color: var(--quiet);
  font-size: 0.6rem;
  white-space: nowrap;
}

.system-copy {
  align-self: center;
  min-width: 0;
  padding: 0.7rem 1rem;
  color: var(--quiet);
  font-size: 0.6rem;
  line-height: 1.5;
}

.system-copy p {
  overflow: hidden;
  margin: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#system-status {
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.notes {
  align-self: stretch;
  width: min(19rem, 26vw);
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.55;
}

.notes summary {
  display: flex;
  min-height: 4.4rem;
  padding: 0 1rem;
  align-items: center;
  cursor: pointer;
  letter-spacing: 0.05em;
  list-style: none;
  text-transform: uppercase;
}

.notes summary::-webkit-details-marker {
  display: none;
}

.notes summary::after {
  margin-left: auto;
  color: var(--blue);
  content: "+";
}

.notes[open] summary::after {
  content: "−";
}

.notes p {
  margin: 0;
  padding: 0 1rem 1rem;
}

footer {
  justify-content: space-between;
}

kbd {
  padding: 0.12rem 0.28rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
}

@media (max-width: 860px) {
  .viewport {
    aspect-ratio: 4 / 3;
  }

  .poster,
  .motion {
    object-position: 55% center;
  }

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

  .controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .control {
    min-width: 0;
    border-bottom: 1px solid var(--line);
  }

  .system-copy {
    min-height: 4rem;
  }

  .notes {
    width: auto;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 560px) {
  .breadcrumb,
  .telemetry,
  footer span:last-child {
    display: none;
  }

  .viewport {
    min-height: 58svh;
    aspect-ratio: auto;
  }

  .scene-copy {
    max-width: calc(100% - 2rem);
  }

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

  .control {
    min-height: 3.8rem;
  }
}

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