:root {
  --bg: #07090d;
  --bg-2: #0d1118;
  --panel: rgba(19, 24, 33, 0.82);
  --panel-strong: #121923;
  --line: rgba(174, 199, 214, 0.16);
  --text: #f3f7f8;
  --muted: #9aa9b2;
  --soft: #d5dee2;
  --cyan: #55d7e8;
  --amber: #ffb85c;
  --green: #74f0a5;
  --red: #ff7168;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 8%, rgba(85, 215, 232, 0.14), transparent 28rem),
    radial-gradient(circle at 10% 18%, rgba(255, 184, 92, 0.11), transparent 24rem),
    linear-gradient(180deg, #05070a 0%, var(--bg) 34%, #080b10 100%);
  color: var(--text);
  font-family: "Aptos", "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.72), transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 13, 0.76);
  backdrop-filter: blur(18px);
}

.brand,
.site-header nav,
.hero-actions,
.stage-topline,
.versus-strip,
.stage-metrics,
.agent-header,
.brief-toolbar,
.browser-bar,
.site-footer {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(85, 215, 232, 0.55);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(85, 215, 232, 0.24), rgba(255, 184, 92, 0.12));
  color: var(--cyan);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.site-header nav {
  gap: clamp(12px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.93rem;
}

.site-header nav a,
.header-cta {
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.site-header nav a:hover {
  color: var(--text);
}

.header-cta {
  padding: 9px 13px;
  border: 1px solid rgba(85, 215, 232, 0.35);
  border-radius: 6px;
  color: var(--cyan);
  font-size: 0.92rem;
  font-weight: 700;
}

.header-cta:hover {
  background: rgba(85, 215, 232, 0.1);
}

.section-shell {
  width: min(1180px, calc(100% - 36px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(420px, 1.14fr);
  gap: clamp(28px, 5vw, 66px);
  align-items: center;
  min-height: min(820px, calc(100svh - 72px));
  padding: 58px 0 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--cyan);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 0 22px rgba(255, 184, 92, 0.9);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  letter-spacing: 0;
  line-height: 0.95;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 6vw, 5.8rem);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

h3 {
  margin-bottom: 8px;
}

.hero-text,
.section-heading p,
.challenge-panel p,
.final-cta p {
  max-width: 620px;
  color: var(--soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.button.primary {
  border-color: rgba(85, 215, 232, 0.68);
  background: var(--cyan);
  color: #041014;
}

.button.secondary {
  border-color: rgba(255, 184, 92, 0.52);
  color: var(--amber);
}

.button.ghost {
  color: var(--soft);
}

.broadcast-stage,
.agent-panel,
.brief-card,
.scoreboard,
.preview-frame,
.artifact-card,
.judge-panel,
.result-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 25, 35, 0.94), rgba(11, 15, 22, 0.92));
  box-shadow: var(--shadow);
}

.broadcast-stage,
.terminal-window,
.brief-card,
.preview-frame {
  min-width: 0;
}

.broadcast-stage {
  position: relative;
  overflow: hidden;
  padding: clamp(16px, 2vw, 24px);
}

.broadcast-stage::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(115deg, rgba(85, 215, 232, 0.14), transparent 38%),
    linear-gradient(250deg, rgba(255, 184, 92, 0.12), transparent 40%);
  pointer-events: none;
}

.broadcast-stage > * {
  position: relative;
}

.stage-topline,
.versus-strip,
.stage-metrics {
  justify-content: space-between;
  gap: 16px;
}

.stage-topline {
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.85rem;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 18px rgba(255, 113, 104, 0.95);
  animation: pulse 1.4s ease-in-out infinite;
}

.stage-topline strong {
  margin-left: auto;
  color: var(--text);
}

.versus-strip {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(5, 8, 12, 0.62);
}

.versus-strip div:last-child {
  text-align: right;
}

.versus-strip small,
.agent-kicker,
.agent-stats span,
.artifact-card span,
.result-item span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.versus-strip > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 184, 92, 0.48);
  border-radius: 999px;
  color: var(--amber);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-weight: 900;
}

.mini-arena {
  display: grid;
  grid-template-columns: 1fr 0.72fr 1fr;
  gap: 14px;
  min-height: 260px;
}

.mini-terminal,
.mini-output {
  border: 1px solid rgba(174, 199, 214, 0.13);
  border-radius: 7px;
  background: rgba(2, 5, 8, 0.74);
}

.mini-terminal {
  padding: 16px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
}

.mini-terminal p {
  margin-bottom: 13px;
}

.mini-terminal .good {
  color: var(--green);
}

.mini-terminal .warn {
  color: var(--amber);
}

.mini-output {
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 14px;
}

.mini-output span {
  display: block;
  height: 34px;
  border-radius: 5px;
  background: linear-gradient(90deg, rgba(85, 215, 232, 0.24), rgba(255, 184, 92, 0.18));
}

.mini-output span:nth-child(2) {
  width: 72%;
}

.mini-output span:nth-child(3) {
  width: 88%;
}

.mini-output span:nth-child(4) {
  width: 58%;
}

.stage-metrics {
  margin-top: 16px;
}

.stage-metrics span {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

.stage-metrics strong {
  display: block;
  color: var(--text);
  font-size: 1.8rem;
}

.signal-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto 84px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.signal-band div {
  padding: 20px;
  background: rgba(13, 17, 24, 0.82);
}

.signal-band span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.hero-copy,
.hero-copy h1,
.hero-copy p,
.section-heading,
.challenge-panel {
  min-width: 0;
  max-width: 100%;
}

.section-heading {
  margin-bottom: 30px;
}

.dashboard-section,
.split-section,
.timeline-section,
.score-section,
.artifacts-section,
.judge-section,
.results-section,
.final-cta {
  padding: 72px 0;
}

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

.agent-panel {
  padding: 20px;
}

.agent-header {
  justify-content: space-between;
  margin-bottom: 18px;
}

.agent-header h3 {
  margin: 0;
  font-size: 1.6rem;
}

.status {
  padding: 7px 10px;
  border-radius: 999px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
}

.status.planning {
  background: rgba(255, 184, 92, 0.12);
  color: var(--amber);
}

.status.building {
  background: rgba(85, 215, 232, 0.12);
  color: var(--cyan);
}

.terminal-window {
  min-height: 190px;
  padding: 18px;
  border: 1px solid rgba(116, 240, 165, 0.15);
  border-radius: 7px;
  background: #020508;
  color: #b9c8c1;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.84rem;
}

.terminal-window p {
  margin-bottom: 12px;
}

.terminal-window span {
  color: var(--green);
}

.agent-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.agent-stats div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.agent-stats strong {
  font-size: 1.25rem;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 34px;
  align-items: center;
}

.brief-card {
  overflow: hidden;
}

.brief-toolbar {
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
}

pre {
  margin: 0;
  padding: clamp(18px, 4vw, 34px);
  overflow-x: auto;
  white-space: pre-wrap;
}

code {
  color: #d7e4df;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.timeline {
  display: grid;
  gap: 14px;
}

.event {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.event time {
  color: var(--cyan);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.event h3 {
  margin-bottom: 5px;
}

.event p {
  margin-bottom: 0;
  color: var(--muted);
}

.event.active h3 {
  color: var(--amber);
}

.scoreboard {
  overflow: hidden;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) 1fr 1fr;
  gap: 18px;
  align-items: center;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.score-row:last-child {
  border-bottom: 0;
}

.score-row.header {
  background: rgba(85, 215, 232, 0.06);
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
}

meter {
  width: 100%;
  height: 12px;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

meter::-moz-meter-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--green));
}

.artifact-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
  align-items: stretch;
}

.preview-frame {
  overflow: hidden;
}

.browser-bar {
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--red);
}

.browser-bar span:nth-child(2) {
  background: var(--amber);
}

.browser-bar span:nth-child(3) {
  background: var(--green);
}

.browser-bar strong {
  margin-left: 8px;
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
}

.mock-page {
  min-height: 390px;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(85, 215, 232, 0.1), transparent 45%),
    #05080c;
}

.mock-hero {
  height: 116px;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.18) 38%, transparent 39%),
    linear-gradient(135deg, rgba(85, 215, 232, 0.3), rgba(255, 184, 92, 0.12));
}

.mock-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.mock-grid span,
.mock-code {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.045);
}

.mock-grid span {
  height: 86px;
}

.mock-code {
  display: grid;
  gap: 11px;
  padding: 18px;
}

.mock-code span {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: rgba(116, 240, 165, 0.28);
}

.mock-code span:nth-child(2) {
  width: 82%;
}

.mock-code span:nth-child(3) {
  width: 64%;
}

.mock-code span:nth-child(4) {
  width: 91%;
}

.mock-code span:nth-child(5) {
  width: 72%;
}

.artifact-stack {
  display: grid;
  gap: 14px;
}

.artifact-card {
  padding: 20px;
}

.artifact-card strong {
  display: block;
  margin-top: 8px;
}

.judge-panel {
  padding: clamp(22px, 4vw, 42px);
}

.judge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}

.judge-grid div {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.judge-grid span {
  color: var(--amber);
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.judge-grid strong {
  display: block;
  margin: 8px 0;
}

.judge-grid p,
.result-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.results-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.result-item {
  padding: 20px;
}

.result-item strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.2rem;
}

.final-cta {
  text-align: center;
}

.final-cta .eyebrow,
.final-cta .hero-actions {
  justify-content: center;
}

.final-cta p {
  margin-inline: auto;
}

.site-footer {
  justify-content: space-between;
  gap: 18px;
  padding: 30px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.45);
    opacity: 0.55;
  }
}

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

@media (max-width: 920px) {
  .site-header {
    position: static;
    flex-wrap: wrap;
  }

  .site-header nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
  }

  .hero,
  .split-section,
  .artifact-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 50px;
  }

  .battle-grid,
  .signal-band,
  .judge-grid,
  .results-list {
    grid-template-columns: 1fr;
  }

  .mini-arena {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: clamp(2.35rem, 10.7vw, 2.75rem);
    overflow-wrap: break-word;
  }

  h2 {
    font-size: clamp(2rem, 12vw, 3.1rem);
  }

  .section-shell,
  .signal-band {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    gap: 14px;
    padding: 18px 14px;
  }

  .site-header nav {
    gap: 20px;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .header-cta {
    display: none;
  }

  .hero-copy,
  .hero-copy h1,
  .hero-actions,
  .broadcast-stage {
    width: calc(100vw - 28px);
    max-width: calc(100vw - 28px);
  }

  .hero-copy p {
    width: min(31ch, calc(100vw - 28px));
    max-width: min(31ch, calc(100vw - 28px));
  }

  .broadcast-stage {
    overflow: hidden;
  }

  .stage-topline {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .stage-topline strong {
    margin-left: 0;
  }

  .hero-actions,
  .stage-metrics,
  .agent-stats {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .versus-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .versus-strip div:last-child {
    text-align: left;
  }

  .score-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .score-row.header {
    display: none;
  }

  .event {
    grid-template-columns: 1fr;
    gap: 7px;
  }

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

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