:root {
  color-scheme: dark;
  --bg: #06100d;
  --bg-deep: #020605;
  --panel: rgba(12, 31, 25, 0.78);
  --panel-strong: rgba(18, 45, 36, 0.92);
  --line: rgba(128, 180, 151, 0.22);
  --text: #edf7ef;
  --muted: #a9baaf;
  --accent: #8dffb2;
  --accent-2: #67d7ff;
  --warning: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 80% 5%, rgba(103, 215, 255, 0.14), transparent 28rem),
    radial-gradient(circle at 10% 20%, rgba(141, 255, 178, 0.13), transparent 22rem),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(141, 255, 178, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(141, 255, 178, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

a { color: inherit; }
p { color: var(--muted); line-height: 1.7; }
h1, h2, h3 { margin: 0; line-height: 1.05; letter-spacing: -0.04em; }
h1 { max-width: 10ch; font-size: clamp(3.4rem, 10vw, 7.8rem); }
h2 { font-size: clamp(2.1rem, 5vw, 4.6rem); }
h3 { font-size: 1.35rem; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: #04100b;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 5, 0.72);
  backdrop-filter: blur(18px);
}
.brand, .site-nav { display: flex; align-items: center; gap: 1rem; }
.brand { font-weight: 800; text-decoration: none; letter-spacing: 0.02em; }
.brand-mark {
  width: 0.9rem;
  height: 0.9rem;
  border: 2px solid var(--accent);
  box-shadow: 0 0 24px var(--accent);
  transform: rotate(45deg);
}
.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a:focus { color: var(--text); }
.nav-cta { color: var(--accent) !important; }
.nav-toggle { display: none; }

.section-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4.5rem, 9vw, 8rem) 0;
}
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  min-height: calc(100vh - 74px);
}
.title-hero {
  position: relative;
  min-height: calc(100vh - 74px);
  overflow: hidden;
}
.title-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100vh - 74px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.title-hero h1 {
  max-width: 12ch;
  margin-inline: auto;
  text-align: center;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.72);
}
.typewriter-title { min-height: 2.1em; }
.event-dates {
  margin: 1.4rem 0 0;
  color: rgba(237, 247, 239, 0.72);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0;
  text-transform: uppercase;
  transform: translateY(0.4rem);
  transition: opacity 900ms ease, transform 900ms ease;
}
.event-dates.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.type-line { display: block; }
.type-line + .type-line { margin-top: 0.28em; }
.typewriter-title em.type-line {
  max-width: 16ch;
  margin-inline: auto;
  font-size: 0.52em;
  line-height: 1.08;
}
.type-line::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 0.8em;
  margin-left: 0.08em;
  background: var(--accent);
  animation: cursor-blink 0.9s steps(2, start) infinite;
  vertical-align: -0.04em;
}
.type-line.is-complete::after { content: none; }
@keyframes cursor-blink { 50% { opacity: 0; } }
.hero-video,
.hero-video-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-video,
.hero-video-overlay {
  mask-image: linear-gradient(to bottom, black 0%, black 68%, transparent 100%);
}
.hero-video { object-fit: cover; }
.hero-video-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 5, 0.92), rgba(2, 6, 5, 0.62) 48%, rgba(2, 6, 5, 0.84)),
    linear-gradient(180deg, rgba(2, 6, 5, 0.2), rgba(6, 16, 13, 0.72));
}
.intro-hero {
  align-items: start;
  min-height: auto;
  padding-top: 0;
  scroll-margin-top: 74px;
}
.partner-section {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.partner-section .eyebrow { margin-bottom: 1.5rem; }
.partner-logo-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 7vw, 6rem);
}
.partner-logo-link {
  display: block;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}
.partner-logo-link-codemetal {
  width: min(560px, 78vw);
  transform: translateX(-10%);
}
.partner-logo-link-irongate { width: min(230px, 46vw); }
.partner-logo-link-codemetal:hover,
.partner-logo-link-codemetal:focus-visible {
  filter: drop-shadow(0 18px 48px rgba(0, 0, 0, 0.42));
  transform: translateX(-10%) scale(1.04);
}
.partner-logo-link-irongate:hover,
.partner-logo-link-irongate:focus-visible {
  filter: drop-shadow(0 18px 48px rgba(0, 0, 0, 0.42));
  transform: scale(1.04);
}
.partner-logo {
  display: block;
  width: 100%;
  height: auto;
}
.teams-intro {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: clamp(0.92rem, 1.1vw, 1.05rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.subtitle { max-width: 760px; color: var(--text); font-size: clamp(1.35rem, 3vw, 2.25rem); }
.lede { max-width: 670px; font-size: 1.1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}
.button-primary { background: var(--accent); color: #04100b; border-color: transparent; }
.button-secondary { background: rgba(103, 215, 255, 0.1); color: var(--text); }
.button-ghost { color: var(--muted); }

.system-panel, .lane-card, .challenge-grid article, .split-panel, .success, .final-cta, .benefit-grid article, .visual-placeholder {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel-strong), rgba(5, 14, 12, 0.88));
  box-shadow: var(--shadow);
}
.system-panel { position: relative; overflow: hidden; min-height: 520px; padding: 1.25rem; border-radius: 1.5rem; }
.system-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(141, 255, 178, 0.08), transparent);
  transform: translateX(-100%);
  animation: scan 7s infinite;
}
@keyframes scan { 60%, 100% { transform: translateX(100%); } }
.panel-header, .status-list div, .timeline li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
.panel-header { padding-top: 0; color: var(--muted); font-size: 0.78rem; letter-spacing: 0.14em; }
.panel-header strong { color: var(--accent); }
.node-map { position: relative; height: 300px; margin: 1rem 0; border: 1px solid var(--line); border-radius: 1rem; background: rgba(0,0,0,0.18); }
.node { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 30px var(--accent); }
.node-a { left: 18%; top: 22%; } .node-b { left: 68%; top: 18%; } .node-c { left: 50%; top: 54%; } .node-d { left: 24%; top: 75%; background: var(--accent-2); }
.link { position: absolute; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); transform-origin: left; opacity: 0.7; }
.link-1 { left: 21%; top: 25%; width: 48%; transform: rotate(-4deg); }
.link-2 { left: 52%; top: 57%; width: 28%; transform: rotate(-50deg); }
.link-3 { left: 27%; top: 76%; width: 31%; transform: rotate(-38deg); }
.status-list { margin: 0; }
.status-list dt { color: var(--text); font-weight: 800; }
.status-list dd { margin: 0; color: var(--muted); }

.two-column, .split-panel { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.rich-copy p:first-child { margin-top: 0; }
.feature > p:not(.eyebrow) { max-width: 840px; font-size: 1.2rem; }
.challenge-grid, .lane-grid, .success-grid { display: grid; gap: 1rem; }
.challenge-grid { grid-template-columns: repeat(3, 1fr); margin-top: 2rem; }
.previous-relay .section-heading > p {
  max-width: 440px;
  margin: 0;
  font-size: 1.05rem;
}
.relay-photo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 180px;
  gap: 1rem;
}
.relay-photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(0, 0, 0, 0.2);
  box-shadow: var(--shadow);
}
.relay-photo-grid img:nth-child(1),
.relay-photo-grid img:nth-child(6) { grid-column: span 2; grid-row: span 2; }
.relay-photo-grid img:nth-child(2),
.relay-photo-grid img:nth-child(3),
.relay-photo-grid img:nth-child(4),
.relay-photo-grid img:nth-child(5),
.relay-photo-grid img:nth-child(7),
.relay-photo-grid img:nth-child(8),
.relay-photo-grid img:nth-child(9) { grid-column: span 2; }
.challenge-grid article, .lane-card { border-radius: 1.2rem; padding: 1.3rem; }
.lane-card { display: flex; flex-direction: column; }
.lane-card .button { align-self: flex-end; margin-top: auto; }
.challenge-grid span { color: var(--accent-2); font-weight: 900; }
.section-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section-heading h2 { max-width: 820px; }
.lane-grid { grid-template-columns: repeat(4, 1fr); }
.lane-card p { min-height: 6.5rem; }
.general-application {
  display: flex;
  min-height: 55vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding-block: 0;
  text-align: center;
}
.general-application .eyebrow { margin: 0; }
.team-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(4.5rem, 8vw, 7rem) 1rem;
  scroll-margin-top: 74px;
}
.team-content {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.team-content > div,
.team-apply { grid-column: 1; }
.visual-placeholder {
  grid-column: 2;
  grid-row: 1 / span 2;
}
.team-section:nth-of-type(odd) .team-content > div,
.team-section:nth-of-type(odd) .team-apply { grid-column: 2; }
.team-section:nth-of-type(odd) .visual-placeholder { grid-column: 1; }
.team-apply { justify-self: start; align-self: start; }
.team-content p { max-width: 620px; font-size: 1.18rem; }
.team-content ul { margin: 1.5rem 0 0; }
.visual-placeholder {
  position: relative;
  min-height: min(62vh, 620px);
  margin: 0;
  overflow: hidden;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}
.visual-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(141,255,178,0.18), transparent 45%),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 18px);
  z-index: -1;
}
.visual-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.visual-placeholder::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(2, 6, 5, 0.86), transparent);
}
.visual-placeholder figcaption {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1;
  color: var(--muted);
}
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.benefit-grid article { border-radius: 1.2rem; padding: 1.3rem; }
ul { padding-left: 1.1rem; color: var(--muted); line-height: 1.8; }
.timeline { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.timeline li { align-items: flex-start; }
.timeline strong { color: var(--text); }
.timeline span { flex: 0 1 540px; color: var(--muted); line-height: 1.6; }
.split-panel, .success, .final-cta { border-radius: 1.5rem; padding: clamp(1.5rem, 4vw, 3rem); }
.check-list { margin: 0; list-style: none; padding: 0; }
.check-list li { padding: 0.75rem 0 0.75rem 2rem; border-bottom: 1px solid var(--line); position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.success-grid { grid-template-columns: repeat(3, 1fr); margin-top: 2rem; }
.success-grid span { padding: 1rem; border: 1px solid var(--line); border-radius: 0.9rem; color: var(--muted); background: rgba(255,255,255,0.03); }
.final-cta {
  margin-top: clamp(1rem, 3vw, 2rem);
  margin-bottom: clamp(2rem, 5vw, 4rem);
  text-align: center;
}
.final-cta p { max-width: 760px; margin-inline: auto; }
.final-cta .cta-row { justify-content: center; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--text);
    padding: 0.55rem 0.85rem;
  }
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(2, 6, 5, 0.96);
    border-bottom: 1px solid var(--line);
  }
  .site-nav.is-open { display: flex; }
  .hero, .two-column, .split-panel, .team-content { grid-template-columns: 1fr; }
  .team-content > div,
  .team-apply,
  .team-section:nth-of-type(odd) .team-content > div,
  .team-section:nth-of-type(odd) .team-apply,
  .visual-placeholder,
  .team-section:nth-of-type(odd) .visual-placeholder {
    grid-column: 1;
    grid-row: auto;
  }
  .hero { min-height: auto; }
  .intro-hero .hero-copy { display: contents; }
  .intro-hero .system-panel { order: 1; }
  .intro-hero .cta-row {
    order: 2;
    justify-content: center;
    margin-top: 0;
  }
  .title-hero, .intro-hero, .team-section { min-height: auto; }
  .section-heading { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .lane-card p { min-height: auto; }
  .challenge-grid, .lane-grid, .success-grid, .benefit-grid { grid-template-columns: 1fr 1fr; }
  .relay-photo-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
  .relay-photo-grid img,
  .relay-photo-grid img:nth-child(1),
  .relay-photo-grid img:nth-child(6) { grid-column: span 1; grid-row: span 1; }
}

@media (max-width: 620px) {
  .section-shell { width: min(100% - 2rem, 1180px); padding-block: 4rem; }
  .title-hero-content { padding-block: 0; }
  .typewriter-title { font-size: clamp(3rem, 13vw, 3.4rem); }
  .challenge-grid, .lane-grid, .success-grid, .benefit-grid { grid-template-columns: 1fr; }
  .relay-photo-grid { grid-template-columns: 1fr; grid-auto-rows: 260px; }
  .team-section { padding: 4rem 1rem; }
  .visual-placeholder { min-height: 380px; }
  .system-panel { min-height: 430px; }
  .node-map { height: 220px; }
  .timeline li, .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .system-panel::after,
  .type-line::after { animation: none; }
}
