/* ==========================================================================
   NCRWP — design system for the front door (index.html) and the 404 page.
   Standalone: no Bootstrap, no Font Awesome, no style.css.
   Legacy pages under OLD/ keep using style.css + responsive.css untouched.
   ========================================================================== */

:root {
  /* Base — recycled from the original palette (#020230 navy) */
  --bg: #020230;
  --panel: rgba(6, 8, 52, 0.78);
  --panel-hover: rgba(11, 16, 68, 0.88);
  --line: rgba(120, 150, 220, 0.18);
  --line-strong: rgba(120, 180, 235, 0.42);

  /* Accents — the same hues the nexus canvas draws with */
  --cyan: #4fd3f4;
  --cyan-deep: #03a7d3;
  --amber: #f5c451;

  /* Text */
  --text: #e9edfb;
  --muted: #a6b0d4;
  --dim: #7b86ad;

  --radius: 14px;
  --maxw: 1180px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: #fff;
}

/* Visible focus for keyboard users */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

h1 {
  line-height: 1.15;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Copy that sits directly on the nexus needs a halo, otherwise the traces
   run through the letterforms. */
.lockup,
.statement,
.page-head h1,
.lede,
.eyebrow {
  text-shadow: 0 1px 3px rgba(2, 2, 48, 0.92), 0 0 14px rgba(2, 2, 48, 0.75);
}

/* --------------------------------------------------------------------------
   Nexus canvas — fixed behind the whole page
   -------------------------------------------------------------------------- */

.nexus-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: var(--bg);
}

.nexus-bg canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Vignette + top glow so text stays readable over the traces */
.nexus-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(115% 75% at 50% 0%, rgba(3, 167, 211, 0.16), transparent 60%),
    radial-gradient(100% 60% at 50% 100%, rgba(2, 2, 48, 0.7), transparent 70%),
    linear-gradient(to bottom, rgba(2, 2, 48, 0.12), rgba(2, 2, 48, 0.42));
}

/* --------------------------------------------------------------------------
   Front door (index.html) — one screen, no scrolling
   -------------------------------------------------------------------------- */

/* dvh, not vh, so mobile browser chrome doesn't push the footer out of view.
   min-height rather than height: on a very short viewport, or when the user
   has scaled text up, the page is still allowed to scroll instead of
   clipping the content. */
.stage {
  min-height: calc(100dvh - 74px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 8px;
}

.stage-inner {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2.4vw, 20px);
  margin: 0 0 16px;
  font-size: clamp(2.4rem, 8vw, 3.9rem);
  letter-spacing: 0.02em;
  color: #fff;
}

.lockup-mark {
  width: clamp(38px, 8vw, 60px);
  height: clamp(38px, 8vw, 60px);
  flex: none;
  color: var(--cyan);
}

/* One declarative sentence. It states what NCRWP is for a reader, and gives
   the crawler something to build a snippet from — the page is otherwise a
   name and two links. */
.statement {
  margin: 0 0 clamp(28px, 5.5vh, 46px);
  font-size: clamp(0.98rem, 2.2vw, 1.12rem);
  color: var(--muted);
}

.doors {
  display: grid;
  gap: 12px;
  width: min(100%, 320px);
  margin-inline: auto;
}

.door {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(8px);
  color: var(--text);
  text-align: left;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
    background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

a.door:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  background: var(--panel-hover);
  box-shadow: 0 16px 34px -20px rgba(3, 167, 211, 0.8);
  color: #fff;
}

.door-dot {
  position: relative;
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(79, 211, 244, 0.14);
}

.door-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  opacity: 0;
  animation: door-pulse 2.6s var(--ease) infinite;
}

@keyframes door-pulse {
  0% { transform: scale(0.7); opacity: 0.85; }
  70% { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}

.door-name {
  flex: 1;
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.door-go {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--cyan);
  transition: transform 0.22s var(--ease);
}

a.door:hover .door-go {
  transform: translateX(4px);
}

/* Not-yet-shipped section: visible, clearly inert */
.door--wip {
  border-style: dashed;
  opacity: 0.66;
}

.door--wip .door-dot {
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 196, 81, 0.14);
}

.door--wip .door-dot::after {
  border-color: var(--amber);
}

.door-soon {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.stage-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
  padding: 18px 24px 26px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--dim);
  text-align: center;
}

.stage-footer a {
  color: var(--muted);
}

.stage-footer a:hover {
  color: var(--cyan);
}

@media (max-width: 420px) {
  .stage {
    padding-inline: 18px;
  }

  .door {
    padding: 16px 18px;
  }
}

/* --------------------------------------------------------------------------
   404 page
   -------------------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(2, 2, 48, 0.72);
  backdrop-filter: blur(10px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  color: #fff;
  text-transform: uppercase;
}

.brand:hover {
  color: #fff;
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--cyan);
}

.page-head {
  padding-block: clamp(48px, 7vw, 84px);
}

.page-head h1 {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  margin-bottom: 14px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--line-strong);
}

.lede {
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition: all 0.22s var(--ease);
}

.btn--primary {
  background: var(--cyan-deep);
  border-color: var(--cyan-deep);
  color: #01121a;
  font-weight: 700;
}

.btn--primary:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #01121a;
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -10px rgba(79, 211, 244, 0.7);
}

/* --------------------------------------------------------------------------
   Reduced motion — kill every animation, including the node pulse
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
