/* ── RESET & VARIABLES ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #FFFFFF;
  --fg:        #0A0A0A;
  --blue:      #2563EB;
  --blue-muted: rgba(37, 99, 235, 0.45);
  --muted:     #888888;
  --border:    rgba(0, 0, 0, 0.12);
  --mono:      'JetBrains Mono', 'Courier New', monospace;
  --sans:      'Space Grotesk', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 400;
  overflow-x: hidden;
  cursor: auto;
}

/* ── ASCII CANVAS ───────────────────────────────── */
#ascii-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ── ABOVE CANVAS ───────────────────────────────── */
.above-canvas { position: relative; z-index: 1; }

/* ── NAVBAR ─────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.3s, backdrop-filter 0.3s;
}
nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
@media (max-width: 640px) {
  nav.scrolled {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}
.logo img {
  height: 28px;
  width: auto;
  display: block;
}
.btn-ghost {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg);
  border: 1px solid rgba(0,0,0,0.22);
  background: transparent;
  padding: 9px 20px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover {
  border-color: var(--fg);
  background: rgba(0,0,0,0.03);
}

/* ── HERO ───────────────────────────────────────── */
#hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: stretch;
}
.hero-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 40px 60px;
  text-align: center;
  gap: 0;
}
.hero-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 36px;
}

/* ── HERO SENTENCE (countdown + headline as one) ── */
.hero-sentence {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 40px; /* overridden by fitHeroSentence() */
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--fg);
  width: 100%;
  max-width: 960px;
  margin-top: 40px;
  margin-bottom: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
#hero-headline-text {
  white-space: nowrap;
  display: inline-block;
}
.cd-number {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  color: var(--fg);
  line-height: inherit;
  letter-spacing: inherit;
}
.cd-number.tick {
  animation: tick-flash 0.12s ease-out;
}
@keyframes tick-flash {
  0%   { opacity: 0.4; }
  100% { opacity: 1; }
}
.cd-sep {
  font-family: inherit;
  font-size: inherit;
  color: rgba(0,0,0,0.2);
  user-select: none;
  padding: 0 0.1em;
}
.hero-sub-wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 520px;
  margin-top: 8px;
}
.hero-sub {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(14px, 1.3vw, 16px);
  font-style: italic;
  color: var(--muted);
  line-height: 1.78;
  text-align: center;
  text-wrap: balance;
}
.hero-sub--close {
  color: rgba(10,10,10,0.45);
  font-size: clamp(13px, 1.1vw, 15px);
  letter-spacing: 0.01em;
  padding-top: 4px;
  border-top: 1px solid rgba(0,0,0,0.07);
}

/* ── HERO SEQUENTIAL REVEAL ─────────────────────── */
.hero-reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.hero-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── DIVIDER ────────────────────────────────────── */
.section-divider {
  width: 60px;
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 0 auto;
}

/* ── MANIFESTO ──────────────────────────────────── */
.manifesto-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 100px 40px;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.manifesto-section.visible {
  opacity: 1;
  transform: translateY(0);
}
.act-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.7;
  margin-bottom: 36px;
  display: block;
}
.manifesto-section p {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.78;
  color: rgba(10, 10, 10, 0.8);
  margin-bottom: 22px;
  text-wrap: balance;
}
.manifesto-section p:last-child { margin-bottom: 0; }
.manifesto-section em {
  font-style: italic;
  color: rgba(10, 10, 10, 0.5);
}

/* ── WAITLIST ───────────────────────────────────── */
#waitlist {
  padding: 140px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.waitlist-heading {
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(26px, 3.5vw, 44px);
  letter-spacing: -0.03em;
  color: var(--fg);
  text-align: center;
  margin-bottom: 10px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.waitlist-heading.visible { opacity: 1; transform: translateY(0); }
.waitlist-sub {
  font-size: 15px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 56px;
  font-family: var(--mono);
  opacity: 0;
  transition: opacity 0.6s ease 0.12s;
}
.waitlist-sub.visible { opacity: 1; }

#waitlist-form {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.22s, transform 0.6s ease 0.22s;
}
#waitlist-form.visible { opacity: 1; transform: translateY(0); }

.form-field {
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.form-field:first-child { border-top: 1px solid var(--border); }

.form-input {
  font-family: var(--mono);
  font-size: 14px;
  background: transparent;
  border: none;
  color: var(--fg);
  padding: 18px 0;
  outline: none;
  transition: color 0.2s;
  width: 100%;
}
.form-input::placeholder {
  color: rgba(10,10,10,0.28);
  font-family: var(--mono);
}
.form-input:focus::placeholder {
  color: rgba(10,10,10,0.14);
}
input[type="number"].form-input::-webkit-inner-spin-button,
input[type="number"].form-input::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type="number"].form-input { -moz-appearance: textfield; }

.form-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(10,10,10,0.3)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 24px;
}
.form-select option { background: #fff; color: var(--fg); }

.btn-submit:disabled {
  background: rgba(10,10,10,0.12);
  color: rgba(10,10,10,0.28);
  cursor: not-allowed;
}
.ngmi-msg {
  display: none;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: rgba(10,10,10,0.38);
  text-align: center;
  margin-top: 14px;
  text-transform: lowercase;
}

.btn-submit {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--fg);
  color: var(--bg);
  border: none;
  border-radius: 0;
  padding: 20px 24px;
  width: 100%;
  margin-top: 28px;
  transition: background 0.2s;
}
.btn-submit:hover { background: #1a1a1a; }

#form-success {
  display: none;
  font-family: var(--mono);
  font-size: 17px;
  color: var(--fg);
  text-align: center;
  padding: 48px 0;
}

/* ── FOOTER ─────────────────────────────────────── */
footer {
  padding: 36px 40px;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.06);
}
footer p {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(10,10,10,0.28);
  letter-spacing: 0.06em;
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 640px) {
  nav { padding: 16px 20px; }
  .logo img { height: 22px; }
  .hero-inner { padding: 90px 20px 50px; }
  .hero-sentence {
    margin-top: 28px;
    font-size: clamp(28px, 8.5vw, 40px);
    white-space: normal;
    overflow: visible;
    line-height: 1.22;
  }
  #hero-headline-text {
    white-space: normal;
    display: block;
  }
  .manifesto-section { padding: 70px 20px; }
  #waitlist { padding: 90px 20px; }
  footer { padding: 28px 20px; }
}
