/* ==========================================================================
   Navire — landing page
   Ported from docs/design_handoff_navire_landing/Navire Landing v2.dc.html
   Tokens are the handoff's token table verbatim.
   ========================================================================== */

@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-var.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/jetbrains-mono-var.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ground: #0a0a10;
  --elevated: #14141e;
  --card: #1a1a28;
  --footer: #0c0c14;
  --text: #e8e8f0;
  --text-2: #9898b0;
  --accent: #4cc2a5;
  --accent-hover: #7fd9c2;
  --cyan: #22d3ee;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --grid: rgba(255, 255, 255, 0.02);
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --sans: 'Geist', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

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

body {
  margin: 0;
  background-color: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    repeating-linear-gradient(to right, var(--grid) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(to bottom, var(--grid) 0 1px, transparent 1px 72px);
  overflow-x: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 700ms var(--ease), border-color 700ms var(--ease), background 700ms var(--ease), transform 700ms var(--ease);
}
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
::selection { background: rgba(76, 194, 165, 0.35); color: #ffffff; }

img { max-width: 100%; }
button { font-family: inherit; }

.mono { font-family: var(--mono); }

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

.skip {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 60;
  padding: 12px 16px;
  border-radius: 9999px;
  background: var(--card);
  color: var(--text);
  transition: top 700ms var(--ease);
}
.skip:focus { top: 16px; color: var(--text); }

.icon {
  display: block;
  flex-shrink: 0;
  fill: currentColor;
}

/* The mark ships as one white PNG and is tinted per use with a mask. */
.mark {
  display: block;
  background: var(--accent);
  -webkit-mask: url('logo-mark.png') center / contain no-repeat;
  mask: url('logo-mark.png') center / contain no-repeat;
}

/* ── Nav ────────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 24px; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.nav__pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 18px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: rgba(20, 20, 30, 0.72);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.nav__home { display: flex; align-items: center; gap: 10px; }
.nav__home .mark { width: 16px; height: 16px; }
.nav__wordmark { display: block; height: 12px; width: auto; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}
.nav__links a { color: var(--text-2); }
.nav__links a:hover { color: var(--accent-hover); }

.nav__cta {
  background: var(--accent);
  color: var(--ground) !important;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 9999px;
}
.nav__cta:hover { background: var(--accent-hover); }

.nav__burger {
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 36px; height: 36px;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
}
.nav__burger span {
  position: absolute;
  width: 14px; height: 1.5px;
  background: var(--text);
  transition: transform 700ms var(--ease);
}
.nav__burger span:nth-child(1) { transform: translateY(-3px); }
.nav__burger span:nth-child(2) { transform: translateY(3px); }
.nav__burger[aria-expanded='true'] span:nth-child(1) { transform: rotate(45deg); }
.nav__burger[aria-expanded='true'] span:nth-child(2) { transform: rotate(-45deg); }

/* ── Mobile menu ────────────────────────────────────────────────────────── */

.menu {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(10, 10, 16, 0.86);
  -webkit-backdrop-filter: blur(48px);
  backdrop-filter: blur(48px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 32px;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms var(--ease), visibility 700ms var(--ease);
}
.menu.is-open { opacity: 1; visibility: visible; }

.menu a {
  font-size: 34px;
  font-weight: 500;
  color: var(--text);
  transform: translateY(48px);
  opacity: 0;
  transition: transform 700ms var(--ease), opacity 700ms var(--ease), color 700ms var(--ease);
}
.menu.is-open a { transform: translateY(0); opacity: 1; }
.menu a:nth-child(2) { transition-delay: 80ms; }
.menu a:nth-child(3) { transition-delay: 130ms; }
.menu a:nth-child(4) { transition-delay: 180ms; }
.menu a:nth-child(5) { transition-delay: 230ms; }
.menu a:nth-child(6) { transition-delay: 280ms; }
.menu a.is-accent { color: var(--accent); }

/* ── Sections ───────────────────────────────────────────────────────────── */

.sect {
  padding: 104px 32px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 96px;
}
.sect--plain { padding: 96px 32px; }

.wrap { max-width: 1240px; margin: 0 auto; }

.h1 {
  font-size: 44px;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 800px;
  margin: 0 0 22px;
  text-wrap: balance;
  background: linear-gradient(90deg, #ffffff, #8a8aa0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h2 {
  font-size: 38px;
  line-height: 1.14;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  text-wrap: balance;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-2);
}

.num {
  font-size: 56px;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
}

.exhibit__head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 24px;
}

.body {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 20px;
  max-width: 480px;
  text-wrap: pretty;
}
.body:last-of-type { margin-bottom: 28px; }

.cmds { display: grid; gap: 12px; }
.cmds div { font-size: 13px; color: var(--text-2); }
.cmds b { color: var(--cyan); font-weight: 400; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 32px 96px;
  border-top: 0;
}
.hero .mark {
  width: min(150px, 32vw);
  height: min(150px, 32vw);
  margin-bottom: 40px;
}
.hero__wordmark {
  display: block;
  width: min(560px, 72vw);
  margin: 0 0 36px;
}

.rule-line {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: center;
  width: 100%;
  max-width: 880px;
  margin-bottom: 40px;
}
.rule-line span:first-child,
.rule-line span:last-child { flex: 1; height: 1px; background: var(--accent); }
.rule-line__text {
  font-size: clamp(10px, 1.6vw, 12px);
  letter-spacing: 0.16em;
  color: var(--accent);
  white-space: nowrap;
}

.lede {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 660px;
  margin: 0 0 40px;
  text-wrap: pretty;
}

.ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 600;
}
.btn--fill { background: var(--accent); color: var(--ground); }
.btn--fill:hover { background: var(--accent-hover); color: var(--ground); transform: scale(1.02); }
.btn--fill:active { transform: scale(0.98); }
.btn--ghost {
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--text); }

.versions {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  margin: 22px 0 0;
}
.versions a { color: var(--text-2); border-bottom: 1px solid var(--border-strong); }
.versions a:hover { color: var(--accent-hover); border-color: var(--accent); }

/* ── Waitlist form ──────────────────────────────────────────────────────── */

.signup { width: 100%; max-width: 520px; margin: 0 auto; }

.signup__row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.signup__input {
  flex: 1 1 260px;
  min-width: 0;
  height: 50px;
  padding: 0 22px;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 700ms var(--ease);
}
.signup__input::placeholder { color: var(--text-2); }
.signup__input:hover { border-color: rgba(255, 255, 255, 0.2); }
.signup__input:focus { border-color: var(--accent); }
.signup__input:disabled { opacity: 0.55; }

.signup .btn { flex: 0 0 auto; border: 0; cursor: pointer; }
.signup .btn:disabled { opacity: 0.55; cursor: default; transform: none; }

/* Off-screen rather than display:none — a headless bot fills what it can see
   in the DOM, and display:none is the one thing they all skip. */
.signup__decoy {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.signup__status {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-2);
  min-height: 18px;
  margin: 14px 0 0;
  text-align: center;
}
.signup__status.is-ok { color: var(--accent); }
.signup__status.is-error { color: #f87171; }

/* ── Thesis & tagline ───────────────────────────────────────────────────── */

.thesis {
  max-width: 720px;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-2);
  text-align: center;
  text-wrap: pretty;
}
.thesis span { color: var(--accent); }

.tagline {
  max-width: 760px;
  margin: 0 auto;
  font-size: 44px;
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.tagline span { color: rgba(232, 232, 240, 0.22); transition: color 700ms var(--ease); }
.tagline span.is-lit { color: var(--text); }

/* ── Exhibits ───────────────────────────────────────────────────────────── */

.exhibit {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.12fr;
  gap: 72px;
  align-items: center;
}
.exhibit--art-left { grid-template-columns: 1.12fr 1fr; }

.panel {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.panel--pad { padding: 32px; }
.panel svg { display: block; }

.term__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.term__dot { width: 6px; height: 6px; border-radius: 9999px; background: var(--accent); display: block; }
.term__bar span:not(.term__dot) { font-size: 12px; letter-spacing: 0.1em; color: var(--text-2); }
.term__bar span:last-child { margin-left: auto; letter-spacing: 0; }

.term__body {
  padding: 24px 20px;
  font-size: 13px;
  line-height: 2;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
}
.term__body i { color: var(--accent); font-style: normal; }
.term__body b { color: var(--cyan); font-weight: 400; }
.term__body em { color: var(--text-2); font-style: normal; }
.term__gap { height: 14px; }

.three { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
}
.card__label {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
}
.card p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0;
  text-wrap: pretty;
}

.note { margin-top: 24px; font-size: 13px; color: var(--text-2); }

/* ── Architecture ───────────────────────────────────────────────────────── */

.arch { background: var(--elevated); border: 1px solid var(--border); border-radius: 16px; padding: 40px 32px; }

/* ── Backronym ──────────────────────────────────────────────────────────── */

.backronym { max-width: 760px; margin: 0 auto; }
.backronym__rule { height: 1px; background: rgba(255, 255, 255, 0.14); }
.backline {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}
.backline__letter {
  font-size: 52px;
  line-height: 1;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
}
.backline__desc { display: grid; gap: 6px; }
.backline__word {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
}
.backline__desc p {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
  text-wrap: pretty;
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */

.faq { max-width: 720px; margin: 0 auto; }
.faq h2 { margin-bottom: 44px; }
.faq__item { border-top: 1px solid var(--border); }
.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
  padding: 22px 0;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: color 700ms var(--ease);
}
.faq__q:hover { color: var(--accent); }
.faq__q .icon {
  margin-left: auto;
  color: var(--text-2);
  transition: transform 700ms var(--ease);
}
.faq__q[aria-expanded='true'] .icon { transform: rotate(45deg); }
.faq__a {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 700ms var(--ease), opacity 700ms var(--ease);
}
.faq__a p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 22px;
  max-width: 640px;
  text-wrap: pretty;
}

/* ── Download ───────────────────────────────────────────────────────────── */

.download { padding: 112px 32px; text-align: center; }
.download .mark { width: 44px; height: 44px; margin: 0 auto 28px; }
.download h2 { font-size: 42px; margin-bottom: 16px; }
.download p.lede { max-width: 560px; margin: 0 auto 36px; font-size: 17px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--border); padding: 64px 32px 32px; background: var(--footer); }
.foot-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.foot .mark { width: 20px; height: 20px; margin-bottom: 16px; }
.foot__blurb { font-size: 14px; line-height: 1.7; color: var(--text-2); margin: 0; max-width: 300px; }
.foot nav { display: grid; gap: 10px; font-size: 14px; align-content: start; }
.foot__head { font-size: 12px; letter-spacing: 0.12em; color: var(--text-2); font-weight: 700; }
.foot nav a { color: var(--text); }
.foot nav a:hover { color: var(--accent-hover); }
.foot__sig {
  max-width: 1240px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--text-2);
}

/* ── Reveal ─────────────────────────────────────────────────────────────── */

/* No-JS and reduced-motion both leave content in its final state. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(56px);
  filter: blur(6px);
  transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease);
}
.js [data-reveal].is-shown {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
  .tagline span { color: var(--text); transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .exhibit, .exhibit--art-left { grid-template-columns: 1fr; gap: 32px; }
  .exhibit__art { order: 2; }
  .exhibit__text { order: 1; }
  .three { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .arch { overflow-x: auto; }
  .arch svg { min-width: 860px; }
}

@media (max-width: 620px) {
  .h1 { font-size: 34px; }
  .h2, .download h2 { font-size: 28px; }
  .num { font-size: 40px; }
  .tagline { font-size: 28px; }
  /* "INTEROPERABLE RUNTIME ENVIRONMENT" cannot hold one line at this width.
     Wrap it and drop the flanking rules rather than let the page scroll. */
  /* The button wraps under the input at this width; a centred half-width pill
     under a full-width field reads as unfinished, so let it span. */
  .signup .btn { flex: 1 1 100%; justify-content: center; }
  .rule-line { gap: 0; }
  .rule-line span:first-child,
  .rule-line span:last-child { display: none; }
  .rule-line__text { white-space: normal; text-align: center; line-height: 1.8; }
  .backline { grid-template-columns: 44px 1fr; row-gap: 2px; }
  .backline__desc { grid-column: 2; }
  .sect, .hero, .download { padding-left: 20px; padding-right: 20px; }
  .foot-grid { grid-template-columns: 1fr; }
}
