:root {
  /* Canvas & surfaces */
  --canvas: #000000;
  --surface-soft: #0d0d0d;
  --surface-card: #1a1a1a;
  --surface-elevated: #262626;

  /* Hairlines */
  --hairline: #3c3c3c;
  --hairline-strong: #262626;
  --hairline-emphasis: #4a4a4a;

  /* Text */
  --ink: #ffffff;
  --body: #bbbbbb;
  --body-strong: #e6e6e6;
  --muted: #7e7e7e;

  /* Brand accent — Ivybek blue / cyan, SU indigo */
  --accent-cyan: #7dd3fc;
  --accent-blue: #2f6feb;
  --accent-indigo: #241ea8;
  --accent-text: var(--accent-cyan);

  /* Spacing (4px base) */
  --space-xxs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-xxl: 64px;
  --space-section: 96px;
}

:root[data-theme="light"] {
  --canvas: #ffffff;
  --surface-soft: #f4f4f5;
  --surface-card: #ececee;
  --surface-elevated: #e0e0e3;

  --hairline: #d8d8db;
  --hairline-strong: #c4c4c8;
  --hairline-emphasis: #aeaeb3;

  --ink: #0a0a0a;
  --body: #4a4a4e;
  --body-strong: #222224;
  --muted: #77777c;

  --accent-text: #0a4fb0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  transition: border-color 0.2s;
}
.navbar.scrolled { border-bottom-color: var(--hairline-emphasis); }
.nav-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-icon {
  height: 28px;
  width: auto;
  display: block;
}
.brand-div {
  width: 1px;
  height: 18px;
  background: var(--hairline);
}
.brand-wordmark {
  font-weight: 700;
  font-size: 1rem;
  color: var(--accent-text);
}
.brand-logo--footer {
  height: 64px;
}
.nav-links {
  display: flex;
  gap: 32px;
  margin-left: auto;
  margin-right: 32px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--body);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { flex-shrink: 0; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--ink);
}
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: var(--surface-card);
  border: none;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 16px;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--canvas);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    gap: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-links.open { max-height: 260px; }
  .nav-links a {
    padding: 16px 32px;
    border-bottom: 1px solid var(--hairline);
  }
  .nav-inner .nav-cta { display: none; }
  .nav-toggle { display: flex; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  border-radius: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-primary:hover { background: var(--ink); color: var(--canvas); }
.btn-ghost {
  background: transparent;
  color: var(--body);
  border: 1px solid transparent;
}
.btn-ghost:hover { color: var(--ink); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-outline:hover { border-color: var(--ink); }
.btn-small { height: 40px; padding: 0 20px; font-size: 12px; }
.btn-large { height: 56px; padding: 0 40px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 96px 24px var(--space-xxl);
}
.hero-inner {
  max-width: 780px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* height/margin here are normal flow (simple, predictable, no fragile
   magic-number matching against .hero-content). The hover-tracking fix is
   entirely in the iframe: mask-image instead of overflow:hidden for the visual
   crop, since masks hide pixels without blocking pointer-events — the iframe's
   real (unclipped) box is huge and naturally extends under .hero-content, so
   the cursor keeps reaching the Spline scene while hovering over the text. */
.hero-robot {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 340px;
  margin: 0 auto 16px;
  pointer-events: none;
}
.hero-robot iframe {
  position: absolute;
  width: 1200px;
  height: 1446px;
  left: 50%;
  top: 50%;
  transform: translate(-52%, -37%);
  border: none;
  pointer-events: auto;
  filter: hue-rotate(-30deg) saturate(0.7) brightness(1.05);
  mask-image: radial-gradient(300px 230px at 52% 37%, black 55%, transparent 88%);
  -webkit-mask-image: radial-gradient(300px 230px at 52% 37%, black 55%, transparent 88%);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  pointer-events: none;
}
.hero-content .btn { pointer-events: auto; }
.eyebrow {
  color: var(--body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}
.hero-sub {
  color: var(--body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  max-width: 500px;
  margin: 0 auto var(--space-xl);
}
.hero-sub em { font-style: normal; color: var(--muted); }
.hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

@media (max-width: 560px) {
  .hero-robot { height: 260px; }
}

/* ---------- Sections ---------- */
.section {
  padding: var(--space-section) 24px;
}
.section-alt { background: var(--surface-soft); }
.section-inner {
  max-width: 1120px;
  margin: 0 auto;
}
.label {
  display: inline-block;
  color: var(--body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}
.section h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
  max-width: 720px;
}
.lead {
  color: var(--body-strong);
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6;
  max-width: 640px;
}

/* Signature accent divider */
.m-stripe-divider {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-indigo));
}

/* ---------- Spec grid (Overview stats) ---------- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  margin-top: var(--space-xxl);
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.spec-cell {
  background: var(--surface-soft);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.spec-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.spec-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Program phases ---------- */
.phase-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xxl);
}
.phase-card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  padding: var(--space-lg);
}
.phase-head { margin-bottom: var(--space-lg); }
.phase-num {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--body);
  margin-bottom: var(--space-xs);
}
.phase-head h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}
.phase-date {
  display: block;
  font-size: 14px;
  color: var(--muted);
}
.phase-date em { font-style: normal; color: var(--muted); }
.phase-body {
  color: var(--body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
}
.phase-schedule {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.phase-schedule li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--space-md);
  border-top: 1px solid var(--hairline);
}
.phase-schedule li:first-child { padding-top: 0; border-top: none; }
.ps-day {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--body);
}
.ps-topic { font-size: 16px; font-weight: 300; }
.ps-meta { font-size: 14px; font-weight: 300; color: var(--muted); }
.phase-checklist {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-top: var(--space-md);
}
.phase-checklist li {
  font-size: 14px;
  font-weight: 300;
  color: var(--body);
  padding-left: var(--space-md);
  position: relative;
}
.phase-checklist li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--muted);
}
.phase-footnote {
  margin-top: var(--space-xl);
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  max-width: 640px;
  border-left: 2px solid var(--hairline);
  padding-left: var(--space-md);
}

@media (max-width: 860px) {
  .phase-list { grid-template-columns: 1fr; }
}

/* ---------- Prizes ---------- */
.prize-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-top: var(--space-xxl);
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.prize-cell {
  background: var(--surface-soft);
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
}
.prize-rank {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--body);
}
.prize-amount {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.5px;
}
.prize-currency {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: var(--muted);
}

@media (max-width: 560px) {
  .prize-grid { grid-template-columns: 1fr; }
}

/* ---------- CTA / Registration ---------- */
.section-cta {
  text-align: center;
  background: var(--surface-soft);
}
.section-cta .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-cta .lead { margin: 0 auto var(--space-xl); }

/* ---------- Closed-state notice ---------- */
.closed-notice {
  display: inline-block;
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---------- Forms ---------- */
.form {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  text-align: left;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.form-field--full { grid-column: 1 / -1; }
.form-field span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
}
.form-field input,
.form-field textarea,
.form-field select {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 300;
  padding: 0 var(--space-md);
  height: 48px;
  transition: border-color 0.15s ease;
}
.form-field textarea {
  height: auto;
  padding: var(--space-sm) var(--space-md);
  resize: vertical;
}
.form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) center, calc(100% - 17px) center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.form-field select:invalid { color: var(--muted); }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--ink);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); }
.form-field .form-hint {
  font-size: 13px;
  font-weight: 300;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
}
.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  cursor: pointer;
}
.form-checkbox[hidden] { display: none; }
.form-checkbox input {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: 0;
  cursor: pointer;
  position: relative;
}
.form-checkbox input:checked {
  background: var(--ink);
  border-color: var(--ink);
}
.form-checkbox input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--canvas);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-checkbox span {
  font-size: 14px;
  font-weight: 300;
  color: var(--body);
  text-transform: none;
  letter-spacing: 0;
}
.form-submit { align-self: flex-start; }
.form-status {
  font-size: 14px;
  font-weight: 300;
  min-height: 20px;
}
.form-status[data-state="ok"] { color: var(--accent-blue); }
.form-status[data-state="error"] { color: #e2483d; }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  margin-top: var(--space-xxl);
}
.faq-list details {
  background: var(--canvas);
  padding: var(--space-lg);
}
.section-alt .faq-list details { background: var(--surface-soft); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 300;
  color: var(--muted);
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list details p {
  margin-top: var(--space-md);
  color: var(--body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  max-width: 640px;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--hairline);
  padding: var(--space-xxl) 24px;
}
.footer-about {
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 0 var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--hairline);
}
.footer-about strong { color: var(--body); font-weight: 700; }
.footer-about a {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-copy {
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
}
.footer-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 300;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--ink); }
