/* ============================================================
   Type II — homepage
   Canon direction, executed at full fidelity.
   Craft bar: SpaceX (primary), Anduril, Varda.
   ============================================================ */

@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jbmono-var.woff2') format('woff2');
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --void:   #000000;
  --ink:    #F0F0FA;
  --ink-2:  rgba(240, 240, 250, 0.62);
  --ink-3:  rgba(240, 240, 250, 0.55);
  --rule:   rgba(240, 240, 250, 0.14);
  --rule-2: rgba(240, 240, 250, 0.07);
  --amber:  #FF6A1F;
  --deep:   #B34712;
  --datum:  #A8B4C8;

  --display: 'Archivo', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(20px, 5vw, 76px);
  --stack: clamp(64px, 9vw, 132px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

/* ---------- shared type ---------- */

.display {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.035em;
  line-height: 0.92;
  margin: 0;
  text-wrap: balance;
}

.section-title {
  font-size: clamp(26px, 3.6vw, 46px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
  max-width: 20ch;
  text-wrap: balance;
}

.prose {
  font-size: clamp(16px, 1.35vw, 19px);
  color: var(--ink-2);
  max-width: 68ch;
  margin: 0;
}
.prose + .prose { margin-top: 1.1em; }
.prose strong { color: var(--ink); font-weight: 600; }

.label {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--datum);
  margin: 0;
}

/* ---------- header ---------- */

.masthead {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(18px, 2.4vw, 30px) var(--pad);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3em;
  font-weight: 700;
  font-size: clamp(15px, 1.5vw, 19px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
}
.wordmark .numeral { color: var(--amber); }

.nav {
  margin-left: auto;
  display: flex;
  gap: clamp(16px, 2.4vw, 34px);
}
.nav a {
  font-size: 13px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.78;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: opacity .2s ease, border-color .2s ease;
}
.nav a:hover, .nav a:focus-visible { opacity: 1; border-bottom-color: var(--amber); }

/* Below ~700px the wordmark plus four links exceeds the viewport, which
   widened the document and let overflow-x:hidden CLIP the right edge of
   every paragraph. Stack the masthead and let the nav wrap instead. */
@media (max-width: 700px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .nav {
    margin-left: 0;
    flex-wrap: wrap;
    gap: 8px 18px;
  }
  .nav a { font-size: 13px; letter-spacing: 0.06em; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--pad);
  padding-bottom: clamp(34px, 6vw, 78px);
  overflow: hidden;
}

#swarm {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

/* keeps display type legible over the bright limb of the star */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.55) 26%, rgba(0,0,0,0) 58%);
}

.hero-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 2.2vw, 28px);
  max-width: 1180px;
}

.hero h1 {
  font-size: clamp(34px, 7.4vw, 96px);
  max-width: 15ch;
}

.hero .prose { max-width: 56ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 24px;
  border: 1px solid rgba(240, 240, 250, 0.34);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--ink);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, color .2s ease;
}
.btn:hover, .btn:focus-visible { border-color: var(--amber); background: rgba(255, 106, 31, 0.10); }
.btn:active { border-color: var(--deep); background: rgba(179, 71, 18, 0.20); }
.btn .arrow { color: var(--amber); transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-quiet {
  border-color: transparent;
  background: none;
  padding-left: 0;
  color: var(--ink-2);
}
.btn-quiet:hover, .btn-quiet:focus-visible {
  background: none;
  border-color: transparent;
  color: var(--ink);
}

/* ---------- sections ---------- */

.section {
  padding: var(--stack) var(--pad);
  border-top: 1px solid var(--rule-2);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

.section-body {
  max-width: 1180px;
  margin: clamp(38px, 5vw, 64px) auto 0;
}

@media (min-width: 900px) {
  .section-head {
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: clamp(40px, 5vw, 84px);
    align-items: start;
  }
}

/* ---------- beachhead comparison ---------- */

.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.compare caption {
  text-align: left;
  padding-bottom: 20px;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: normal;
  max-width: 62ch;
}
.compare th, .compare td {
  text-align: left;
  padding: 20px 20px 20px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.compare thead th {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--datum);
  padding-bottom: 16px;
}
.compare tbody th {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  width: 26%;
  white-space: nowrap;
}
.compare td { color: var(--ink-2); }
.compare .verdict {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.compare .no  { color: var(--datum); }
.compare .yes { color: var(--amber); }

.compare tr.match th { color: var(--ink); }
.compare tr.match td { color: var(--ink); }

/* Wide content scrolls inside its own box; the page body never does. */
.tablewrap { overflow-x: auto; }

/* At phone widths the three-column comparison cannot fit, and it is the
   centrepiece of the argument, so it restructures into stacked blocks
   rather than becoming a horizontal scroll the reader has to discover. */
@media (max-width: 700px) {
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare thead { display: none; }
  .compare caption { padding-bottom: 14px; }
  .compare tr {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 22px 0;
    border-bottom: 1px solid var(--rule);
  }
  .compare th, .compare td {
    border: 0;
    padding: 0;
    white-space: normal;
  }
  .compare tbody th { font-size: 21px; order: 0; }
  .compare td.verdict { order: 1; }
  .compare td:not(.verdict) { order: 2; }
}

/* ---------- sequence ---------- */

.phases {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.phase {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 8px 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}
@media (min-width: 860px) {
  .phase {
    grid-template-columns: 62px minmax(0, 300px) minmax(0, 1fr);
    align-items: baseline;
  }
}
.phase-no {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--amber);
  padding-top: 4px;
}
.phase-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  margin: 0;
}
.phase-note { color: var(--ink-2); font-size: 15px; margin: 0; max-width: 62ch; }
.phase-horizon {
  grid-column: 2 / -1;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--datum);
  margin: 0;
}
@media (min-width: 860px) {
  .phase-horizon { grid-column: 2; margin-top: 6px; }
}

/* ---------- programs ---------- */

.programs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.program {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 24px 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.program-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.program-role { color: var(--ink-2); font-size: 15px; line-height: 1.45; }

@media (max-width: 900px) { .programs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .programs { grid-template-columns: minmax(0, 1fr); } }

/* Placeholder affordances must be visibly inert AND legible. Blanket
   opacity took the placeholder to ~1.9:1; the floor requires >=4.5:1 with
   no disabled exemption, so the inert state is styled explicitly. */
.subscribe input:disabled {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--rule);
  color: var(--ink-3);
  cursor: not-allowed;
}
.subscribe input:disabled::placeholder { color: var(--ink-3); }
.subscribe button:disabled {
  background: none;
  border-color: var(--rule);
  color: var(--ink-3);
  cursor: not-allowed;
}
.placeholder-note {
  font-size: 14px;
  color: var(--amber);
  margin: 12px 0 0;
  font-family: var(--display);
  letter-spacing: normal;
}

/* ---------- close ---------- */

.close-grid {
  display: grid;
  gap: clamp(46px, 6vw, 84px);
  max-width: 1180px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .close-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); }
}

.subscribe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.subscribe input {
  flex: 1 1 220px;
  height: 50px;
  min-width: 0;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 15px;
}
.subscribe input::placeholder { color: var(--ink-3); }
.subscribe input:focus-visible { border-color: var(--amber); }

.form-note { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; }

/* ---------- status band: the honesty statement ---------- */

.status {
  max-width: 1180px;
  margin: 0 auto;
  border: 1px solid var(--rule);
  border-left: 1px solid var(--amber);
  padding: clamp(22px, 3vw, 32px);
}
.status p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 74ch; }
.status p + p { margin-top: 10px; }
.status strong { color: var(--ink); font-weight: 600; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--rule-2);
  padding: 34px var(--pad) 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: baseline;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--datum);
}
.footer a { text-decoration: none; color: var(--ink-3); transition: color .2s ease; }
.footer a:hover, .footer a:focus-visible { color: var(--ink); }
.footer .spacer { margin-left: auto; }

/* ---------- utility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .btn, .btn .arrow, .nav a { transition: none; }
}
