/* GoNAD — gonad.ai
   Palette: rack-midnight blue slate + amber phosphor.
   Type: Archivo (display) · IBM Plex Sans (body) · IBM Plex Mono (utility). */

:root {
  --bg: #0c131e;
  --bg-raise: #111a28;
  --panel: #16202f;
  --panel-edge: rgba(147, 165, 188, 0.14);
  --ink: #e9eff7;
  --muted: #93a5bc;
  --faint: #5c6d84;
  --amber: #ffb454;
  --amber-deep: #d97e15;
  --ok: #4ade80;
  --warn: #fbbf24;
  --info: #60a5fa;
  --font-display: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shell: 74rem;
}

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

html { scroll-behavior: smooth; }

body {
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.shell { max-width: var(--shell); margin: 0 auto; padding: 0 1.5rem; }

a { color: inherit; }

::selection { background: var(--amber); color: #201302; }

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

.skip-link {
  position: absolute;
  left: 1rem; top: -3rem;
  background: var(--amber); color: #201302;
  padding: 0.5rem 1rem; border-radius: 0 0 6px 6px;
  font-weight: 600; text-decoration: none;
  transition: top 0.15s ease;
  z-index: 99;
}
.skip-link:focus { top: 0; }

/* ---------- primitives ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 1.25rem;
}
.eyebrow__dim { color: var(--faint); }

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

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.75rem, 3.6vw, 2.625rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 40ch;
}

.section-lede { color: var(--muted); max-width: 56ch; margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.9375rem;
  text-decoration: none;
  padding: 0.75rem 1.375rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--amber); color: #201302;
}
.btn--primary:hover { background: #ffc477; }
.btn--ghost {
  border-color: var(--panel-edge); color: var(--ink);
}
.btn--ghost:hover { border-color: var(--muted); background: var(--bg-raise); }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.875rem; }

.install-chip {
  display: inline-flex; align-items: center; gap: 0.5ch;
  font-family: var(--font-mono); font-size: 0.875rem;
  color: var(--muted);
  background: var(--bg-raise);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  padding: 0.75rem 1.125rem;
  white-space: nowrap;
}
.install-chip__soon { color: var(--faint); }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-edge);
}
.nav__inner {
  display: flex; align-items: center; gap: 2rem;
  height: 4rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
}
.wordmark__glyph { width: 1.5rem; height: 1.5rem; color: var(--ink); }
.glyph-pane { fill: var(--amber); }
.nav__links { display: flex; gap: 1.5rem; }
.nav__links a {
  font-size: 0.9375rem; color: var(--muted); text-decoration: none;
}
.nav__links a:hover { color: var(--ink); }

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

.hero { padding: 5rem 0 4rem; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 3.5rem;
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.125rem, 4.4vw, 3.375rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}
.hero__acronym b { color: var(--amber); font-weight: 900; }
.hero__kicker {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.6em;
  letter-spacing: -0.01em;
}
.hero__lede {
  color: var(--muted);
  margin: 1.5rem 0 2rem;
  max-width: 52ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.875rem; align-items: center; }

.hero__grid > *, .why__grid > *, .steps > .step { min-width: 0; }

.hero__demo-caption {
  font-size: 0.8125rem; color: var(--faint);
  margin-top: 0.875rem; text-align: center;
}

/* ---------- app window (signature) ---------- */

.appwin {
  background: var(--bg-raise);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  box-shadow: 0 24px 64px -24px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  min-height: 23.5rem;
  display: flex;
  flex-direction: column;
}
.appwin__titlebar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--panel-edge);
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted);
}
.appwin__dots { display: flex; gap: 0.375rem; }
.appwin__dots i {
  width: 0.625rem; height: 0.625rem; border-radius: 50%;
  background: var(--faint); opacity: 0.5;
}
.appwin__title { font-weight: 500; color: var(--ink); }
.appwin__status { margin-left: auto; display: inline-flex; align-items: center; gap: 0.5ch; }

.dot {
  display: inline-block; flex: none;
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--faint);
}
.dot--ok { background: var(--ok); }
.dot--warn { background: var(--warn); }
.dot--scan { background: var(--amber); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

.appwin__term {
  padding: 1.25rem 1.25rem;
  font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.8;
}
.term__line--cmd { color: var(--ink); }
.term__out { color: var(--muted); white-space: pre-wrap; }
.term__out .ok { color: var(--ok); }
.caret {
  display: inline-block; width: 0.55em; height: 1.1em;
  background: var(--amber); vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.appwin__ui { display: flex; flex-direction: column; flex: 1; }

.appwin__tabs {
  display: flex; gap: 0.125rem;
  padding: 0.5rem 0.75rem 0;
  border-bottom: 1px solid var(--panel-edge);
  overflow-x: auto;
  scrollbar-width: none;
}
.tab {
  font-family: var(--font-body); font-size: 0.8125rem; font-weight: 500;
  color: var(--muted);
  background: none; border: none; cursor: pointer;
  padding: 0.5rem 0.875rem;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active {
  color: var(--amber);
  border-bottom-color: var(--amber);
}

.panel { padding: 1.25rem; display: none; flex-direction: column; gap: 1rem; }
.panel.is-active { display: flex; animation: panel-in 0.3s ease; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.statrow {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
}
.stat {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  padding: 0.75rem 0.875rem;
  display: flex; flex-direction: column; gap: 0.125rem;
}
.stat__label {
  font-family: var(--font-mono); font-size: 0.6875rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--faint);
}
.stat__value {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.625rem; line-height: 1.15; letter-spacing: -0.02em;
}
.stat__value small { font-size: 0.55em; font-weight: 600; color: var(--muted); }
.stat__value--ok { color: var(--ok); }
.stat__value--warn { color: var(--warn); }
.stat__sub { font-size: 0.75rem; color: var(--muted); }

.feed { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.feed li {
  display: flex; align-items: baseline; gap: 0.625rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted);
}
.feed .dot { transform: translateY(-0.1em); }

.spark {
  width: 100%; height: 3rem;
}
.spark polyline {
  fill: none; stroke: var(--amber); stroke-width: 2;
  stroke-linejoin: round; stroke-linecap: round;
}
.panel__caption {
  font-family: var(--font-mono); font-size: 0.6875rem; color: var(--faint);
}

/* ---------- graveyard ---------- */

.graveyard {
  border-top: 1px solid var(--panel-edge);
  border-bottom: 1px solid var(--panel-edge);
  background: var(--bg-raise);
  padding: 3rem 0;
}
.graveyard__title {
  font-family: var(--font-mono); font-weight: 500;
  font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--faint);
  margin-bottom: 1.25rem;
}
.graveyard__tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.deadtab {
  display: inline-flex; align-items: center; gap: 0.625rem;
  font-size: 0.8125rem; color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 0.4375rem 0.875rem;
  position: relative;
  transition: opacity 0.5s ease, color 0.5s ease;
}
.deadtab i { font-style: normal; color: var(--faint); }
.deadtab::after {
  content: "";
  position: absolute; left: 0.6rem; right: 0.6rem; top: 50%;
  height: 1px; background: var(--amber);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.45s ease;
}
.graveyard__tabs.is-closed .deadtab { opacity: 0.45; }
.graveyard__tabs.is-closed .deadtab::after { transform: scaleX(1); }
.graveyard__tabs.is-closed .deadtab:nth-child(2n)::after { transition-delay: 0.2s; }
.graveyard__tabs.is-closed .deadtab:nth-child(3n)::after { transition-delay: 0.4s; }
.graveyard__caption {
  margin-top: 1.25rem;
  font-size: 0.9375rem; color: var(--muted); font-style: italic;
}

/* ---------- how ---------- */

.how { padding: 5.5rem 0; }
.steps {
  list-style: none; counter-reset: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  margin-top: 2.5rem;
}
.step {
  background: var(--bg-raise);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.step__num {
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--amber);
  border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent);
  border-radius: 50%;
  width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center;
}
.step__title {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.1875rem; letter-spacing: -0.01em;
}
.step p { color: var(--muted); font-size: 0.9375rem; flex: 1; }
.snippet {
  background: var(--bg);
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
}
.snippet code {
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink);
  white-space: nowrap;
}
.snippet__comment { color: var(--faint); }

/* ---------- coverage ---------- */

.coverage { padding: 1rem 0 5.5rem; }
.envrow {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  margin: 1.75rem 0;
}
.envrow li {
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--amber);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent);
  border-radius: 999px;
  padding: 0.375rem 1rem;
}
.grid {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem;
}
.cell {
  background: var(--bg-raise);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 1.125rem 1.25rem;
  display: flex; flex-direction: column; gap: 0.25rem;
}
.cell b { font-weight: 600; font-size: 0.9375rem; }
.cell span { font-family: var(--font-mono); font-size: 0.75rem; color: var(--faint); }
.cell--open { border-style: dashed; }
.cell--open b { color: var(--amber); }

/* ---------- why ---------- */

.why {
  border-top: 1px solid var(--panel-edge);
  background: var(--bg-raise);
  padding: 5.5rem 0;
}
.why__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 3.5rem;
  align-items: start;
}
.why__body { color: var(--muted); margin-top: 1.25rem; }
.why__cards {
  list-style: none;
  display: flex; flex-direction: column; gap: 1rem;
}
.card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 10px;
  padding: 1.375rem 1.5rem;
}
.card h3 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.0625rem; letter-spacing: -0.01em;
  margin-bottom: 0.375rem;
}
.card p { color: var(--muted); font-size: 0.9375rem; }

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

.cta { padding: 5.5rem 0; text-align: center; }
.cta__inner { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.cta__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(1.875rem, 4vw, 2.875rem);
  letter-spacing: -0.025em; line-height: 1.1;
}
.cta__sub { color: var(--muted); max-width: 46ch; }
.cta .hero__cta { justify-content: center; }

.footer {
  border-top: 1px solid var(--panel-edge);
  padding: 1.75rem 0;
}
.footer__inner {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.8125rem; color: var(--faint);
}
.footer__mono { font-family: var(--font-mono); font-size: 0.75rem; }

/* ---------- reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 56rem) {
  .hero { padding: 3rem 0; }
  .hero__grid, .why__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .steps, .grid { grid-template-columns: 1fr 1fr; }
  .nav__links { display: none; }
}

@media (max-width: 38rem) {
  body { font-size: 1rem; }
  .steps, .grid, .statrow { grid-template-columns: 1fr; }
  .statrow { grid-template-columns: 1fr 1fr; }
  .hero__title { font-size: 1.875rem; }
  .install-chip { font-size: 0.78rem; white-space: normal; }
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
