:root {
  --bg: #06080d;
  --bg-soft: rgba(8, 12, 19, 0.76);
  --panel: rgba(8, 14, 24, 0.76);
  --panel-strong: rgba(10, 18, 28, 0.9);
  --line: rgba(179, 205, 255, 0.18);
  --text: #eef3ff;
  --muted: rgba(225, 233, 250, 0.76);
  --openai: #70f2d4;
  --anthropic: #ffb278;
  --accent: #ff4d4d;
  --gold: #ffd66b;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
  --radius: 24px;
  --radius-small: 18px;
  --track: 120px;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Space Grotesk", "Arial", sans-serif;
  --mono: "SFMono-Regular", "Menlo", "Monaco", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(76, 99, 148, 0.15), transparent 35%),
    linear-gradient(180deg, #04060a 0%, #06080d 42%, #030406 100%);
  font-family: var(--body);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.03)),
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.015) 0,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 140px
    );
  opacity: 0.45;
  z-index: 4;
}

a,
button {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  width: 100%;
}

::selection {
  background: rgba(255, 102, 102, 0.38);
  color: #ffffff;
}

.launch-sequence {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(33, 42, 58, 0.35), transparent 40%),
    rgba(2, 4, 8, 0.96);
  z-index: 20;
  transition: opacity 500ms ease, visibility 500ms ease;
}

.launch-sequence.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.launch-sequence__panel {
  width: min(560px, calc(100% - 2rem));
  padding: clamp(2rem, 5vw, 3rem);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: rgba(8, 12, 20, 0.82);
  text-align: center;
  box-shadow: var(--shadow);
}

.launch-sequence h1,
.section__heading h2,
.floating-panel h2,
.floating-panel h3 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.launch-sequence h1 {
  font-size: clamp(3rem, 12vw, 5.8rem);
  line-height: 0.9;
}

.launch-sequence__copy {
  margin: 1rem auto 0;
  max-width: 28rem;
  color: var(--muted);
  line-height: 1.7;
}

.start-lights {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  margin: 2rem 0;
}

.start-lights span {
  width: clamp(2.4rem, 6vw, 3.4rem);
  aspect-ratio: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(88, 15, 15, 0.28);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
  transition: background 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.start-lights span.is-on {
  background: #ff3b3b;
  box-shadow: 0 0 30px rgba(255, 59, 59, 0.7);
  transform: translateY(-3px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 2.8vw, 2rem);
  background: linear-gradient(180deg, rgba(5, 8, 13, 0.94), rgba(5, 8, 13, 0.7));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar__brand {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.topbar__nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.topbar__nav a,
.topbar__status,
.kicker,
.hud-label,
.driver-card__team,
.pit-card__index,
.market-footnote,
.race-track__value,
.tracker__note {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar__nav a {
  color: var(--muted);
  text-decoration: none;
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.status-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  background: #ff4d4d;
  box-shadow: 0 0 14px rgba(255, 77, 77, 0.72);
  animation: pulse-dot 1.4s infinite;
}

.scroll-lap {
  position: fixed;
  top: 50%;
  right: 1rem;
  z-index: 14;
  width: 12px;
  height: 180px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.scroll-lap__fill {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, #ffe07f 0%, #ff4d4d 100%);
}

.scroll-lap__label {
  position: absolute;
  top: -1.6rem;
  right: -0.25rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  transform: rotate(90deg);
  transform-origin: right top;
}

main {
  padding: clamp(1rem, 2vw, 1.8rem);
  padding-bottom: 5rem;
}

.hero,
.section {
  margin-bottom: clamp(3rem, 5vw, 4.4rem);
}

.section__heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0 0.4rem;
}

.section__heading h2 {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
}

.frame {
  position: relative;
  width: min(1440px, 100%);
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  overflow: hidden;
  aspect-ratio: 21 / 9;
  box-shadow: var(--shadow);
  background: rgba(255, 255, 255, 0.04);
}

.frame__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.floating-panel {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(6, 10, 18, 0.8), rgba(8, 15, 25, 0.92));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.floating-panel--hero-copy {
  left: 2%;
  top: 5%;
  width: min(34rem, 42%);
  padding: clamp(1.2rem, 2.5vw, 2rem);
  z-index: 2;
}

.floating-panel--hero-copy h2 {
  font-size: clamp(4rem, 9vw, 6.8rem);
  line-height: 0.86;
}

.headline {
  margin: 0.9rem 0 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.body-copy {
  color: var(--muted);
  line-height: 1.72;
  font-size: clamp(1rem, 1.15vw, 1.12rem);
}

.kicker {
  margin: 0 0 0.7rem;
  color: rgba(255, 255, 255, 0.74);
}

.button-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

.button {
  position: relative;
  padding: 0.95rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 48%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-120%);
  transition: transform 320ms ease;
}

.button:hover::before,
.button:focus-visible::before {
  transform: translateX(120%);
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button--primary {
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.96), rgba(255, 166, 102, 0.92));
  border-color: rgba(255, 178, 120, 0.45);
  color: #111;
  box-shadow: 0 0 0 1px rgba(255, 120, 120, 0.15), 0 12px 30px rgba(255, 77, 77, 0.26);
}

.button--ghost {
  background: rgba(255, 255, 255, 0.05);
}

.button--small {
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
}

.button--launch {
  min-width: 220px;
}

.floating-panel--hero-hud {
  right: 2%;
  top: 5%;
  width: min(22rem, 27%);
  padding: 1.2rem;
}

.hud-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.hud-grid strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1rem;
}

.hud-label {
  color: rgba(255, 255, 255, 0.6);
}

.floating-panel--tracker {
  left: 2%;
  right: 2%;
  bottom: 5%;
  width: min(62rem, 66%);
  padding: 1.2rem;
  z-index: 1;
}

.tracker__header,
.dashboard__header,
.race-control__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.toggle-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.toggle-group__button {
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toggle-group__button.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.race-track {
  display: grid;
  gap: 0.9rem;
}

.race-track__lane {
  display: grid;
  grid-template-columns: 90px 1fr max-content;
  gap: 0.8rem;
  align-items: center;
}

.race-track__bar {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 16px,
      rgba(255, 255, 255, 0.02) 16px,
      rgba(255, 255, 255, 0.02) 32px
    );
  border: 1px solid rgba(255, 255, 255, 0.09);
}

.race-track__car {
  position: absolute;
  top: 50%;
  left: 0;
  width: var(--track);
  height: 12px;
  border-radius: 999px;
  transform: translateY(-50%);
  transition: left 900ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease;
}

.race-track__car--openai {
  background: linear-gradient(90deg, rgba(112, 242, 212, 0.4), var(--openai));
  box-shadow: 0 0 24px rgba(112, 242, 212, 0.54);
}

.race-track__car--anthropic {
  background: linear-gradient(90deg, rgba(255, 178, 120, 0.4), var(--anthropic));
  box-shadow: 0 0 24px rgba(255, 178, 120, 0.54);
}

.tracker__note {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.floating-panel--rivalry,
.floating-panel--dashboard,
.floating-panel--pit,
.floating-panel--ipo,
.floating-panel--final {
  inset: auto;
  left: 2%;
  right: 2%;
  bottom: 5%;
  padding: clamp(1rem, 2vw, 1.4rem);
}

.floating-panel--rivalry {
  top: auto;
}

.rivalry-grid,
.pit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.driver-card,
.pit-card,
.meter-card,
.market-box {
  position: relative;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.04);
}

.driver-card h3 {
  font-size: clamp(1.6rem, 2vw, 2.2rem);
}

.driver-card--openai {
  box-shadow: inset 0 0 0 1px rgba(112, 242, 212, 0.12);
}

.driver-card--anthropic {
  box-shadow: inset 0 0 0 1px rgba(255, 178, 120, 0.12);
}

.driver-meta {
  display: grid;
  gap: 0.8rem;
  margin: 1rem 0 0;
}

.driver-meta div {
  display: grid;
  gap: 0.25rem;
}

.driver-meta dt {
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.driver-meta dd {
  margin: 0;
  color: #fff;
  font-size: 0.96rem;
}

.strategy-note {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.driver-card:hover .strategy-note,
.driver-card:focus-within .strategy-note {
  opacity: 1;
  transform: translateY(0);
}

.meter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.meter-card__top,
.value-stack div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.meter {
  margin-top: 0.8rem;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #70f2d4 0%, #ffd66b 58%, #ff6161 100%);
  transition: width 900ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dashboard__warning {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.7);
}

.pit-card {
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}

.pit-card:hover,
.pit-card.is-active {
  transform: translateY(-3px);
  border-color: rgba(255, 214, 107, 0.4);
  background: rgba(255, 255, 255, 0.08);
}

.pit-detail {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-small);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.76);
}

.ipo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.market-box h3 {
  font-size: clamp(1.4rem, 2.1vw, 2rem);
}

.market-box--wide {
  grid-column: 1 / -1;
}

.value-stack {
  display: grid;
  gap: 1rem;
}

.value-stack strong {
  font-size: clamp(1.1rem, 1.7vw, 1.6rem);
}

.market-footnote {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.signal-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.signal-columns h4 {
  margin: 0 0 0.8rem;
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.82);
}

.signal-list a {
  color: inherit;
}

.floating-panel--final {
  left: 2%;
  bottom: 6%;
  width: min(34rem, 44%);
  right: auto;
}

.floating-panel--final h3 {
  font-size: clamp(3rem, 7vw, 5.2rem);
}

.ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 13;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(6, 10, 18, 0.95);
}

.ticker__track {
  display: inline-flex;
  gap: 2.4rem;
  padding: 0.9rem 0;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-scroll 22s linear infinite;
}

.ticker__track span {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.drs-toast,
.radio-stack {
  position: fixed;
  left: 1rem;
  z-index: 15;
  display: grid;
  gap: 0.7rem;
  pointer-events: none;
}

.drs-toast {
  top: 6rem;
}

.radio-stack {
  bottom: 5.5rem;
  width: min(22rem, calc(100% - 2rem));
}

.drs-toast__item,
.radio-message {
  max-width: 24rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(7, 13, 22, 0.88);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26);
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: message-in 360ms ease, message-out 360ms ease 4.2s forwards;
}

.drs-toast__item {
  color: var(--gold);
}

.radio-message {
  color: rgba(255, 255, 255, 0.88);
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.55;
    transform: scale(0.88);
  }
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes message-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes message-out {
  to {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (max-width: 1180px) {
  .frame {
    aspect-ratio: auto;
  }

  .frame__image {
    aspect-ratio: 21 / 9;
    height: auto;
  }

  .floating-panel,
  .floating-panel--hero-copy,
  .floating-panel--hero-hud,
  .floating-panel--tracker,
  .floating-panel--final {
    position: static;
    width: auto;
    margin: 1rem;
  }

  .hero .frame,
  .section .frame {
    padding-bottom: 1rem;
  }

  .ipo-grid,
  .signal-columns,
  .meter-grid,
  .rivalry-grid,
  .pit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    flex-direction: column;
    align-items: start;
  }

  .topbar__nav {
    gap: 0.8rem;
  }

  .section__heading {
    flex-direction: column;
    align-items: start;
  }

  .race-track__lane {
    grid-template-columns: 1fr;
  }

  .scroll-lap {
    top: auto;
    bottom: 6rem;
    right: 1rem;
    width: 160px;
    height: 12px;
  }

  .scroll-lap__fill {
    top: 0;
    bottom: auto;
    left: 0;
    height: 100%;
    width: 0;
  }

  .scroll-lap__label {
    top: -1.4rem;
    right: 0;
    transform: none;
  }
}

@media (max-width: 560px) {
  main {
    padding: 0.75rem;
    padding-bottom: 5.5rem;
  }

  .frame {
    border-radius: 22px;
  }

  .floating-panel,
  .floating-panel--hero-copy,
  .floating-panel--hero-hud,
  .floating-panel--tracker,
  .floating-panel--final {
    margin: 0.75rem;
    border-radius: 20px;
  }

  .button-row {
    flex-direction: column;
  }

  .button {
    width: 100%;
    text-align: center;
  }
}
