/* ============================================================
   NeurionForge — design tokens
   ============================================================ */
:root {
  --ink: #0a0908;
  --iron: #17130f;
  --iron-2: #2a231b;
  --ember: #e8531f;
  --ember-2: #ff7a3d;
  --spark: #ffd37a;
  --steel: #9b968c;
  --paper: #f3eee4;
  --paper-dim: rgba(243, 238, 228, 0.62);
  --ion: #38bdf8;
  --violet: #7c3aed;
  --violet-glow: #6d28d9;
  --obsidian: #2a1b5e;

  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-ember: 0 0 0 1px rgba(232, 83, 31, 0.25), 0 0 26px rgba(232, 83, 31, 0.35),
    0 0 56px rgba(232, 83, 31, 0.14);

  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-sans: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }

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

/* ============================================================
   Ambient background — forge canvas + grain
   ============================================================ */
.forge-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px);
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 28px);
  padding: clamp(18px, 3vh, 28px) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark { display: block; flex-shrink: 0; }

.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--paper);
}
.brand-word.small { font-size: 16px; }

.nav-pill {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 10px);
  background: rgba(23, 19, 15, 0.6);
  border: 1px solid rgba(243, 238, 228, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 999px;
  padding: 6px;
  margin-left: auto;
  box-shadow: var(--shadow-soft);
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--paper);
  opacity: 0.55;
  padding: 9px 15px;
  border-radius: 999px;
  transition: opacity 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.nav-link:hover { opacity: 0.85; }
.nav-link.is-active {
  opacity: 1;
  background: rgba(232, 83, 31, 0.14);
  color: var(--spark);
}

.btn-signin {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--paper);
  background: var(--iron-2);
  border: 1px solid rgba(243, 238, 228, 0.1);
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}
.btn-signin:hover {
  background: #352b20;
  border-color: rgba(232, 83, 31, 0.4);
  transform: translateY(-1px);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--iron-2);
  border: 1px solid rgba(243, 238, 228, 0.1);
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}
.burger span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--paper);
  transform: translate(-50%, -50%);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger span:nth-child(1) { transform: translate(-50%, -50%) translateY(-5.5px); }
.burger span:nth-child(3) { transform: translate(-50%, -50%) translateY(5.5px); }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translate(-50%, -50%) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translate(-50%, -50%) rotate(-45deg); }

.overlay {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(10, 9, 8, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: overlayIn 0.28s ease both;
}
.overlay[hidden] { display: none; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.mobile-menu {
  position: fixed;
  z-index: 9;
  top: 84px;
  left: 16px;
  right: 16px;
  background: var(--iron);
  border: 1px solid rgba(243, 238, 228, 0.1);
  border-radius: 24px;
  padding: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: menuIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mobile-menu[hidden] { display: none; }
@keyframes menuIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.m-link, .m-signin {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--paper);
  opacity: 0.7;
}
.m-link.is-active { opacity: 1; color: var(--spark); background: rgba(232, 83, 31, 0.12); }
.m-signin { margin-top: 4px; background: var(--ember); color: var(--ink); font-weight: 600; text-align: center; opacity: 1; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  min-height: 82vh;
  min-height: 82dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6vh 0 4vh;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--steel);
  margin-bottom: clamp(18px, 3vh, 30px);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
}

.headline {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-size: clamp(40px, 8.4vw, 108px);
  max-width: 15ch;
}
.headline .line { display: block; overflow: hidden; }
.headline .accent { color: var(--ember-2); text-shadow: 0 0 40px rgba(232, 83, 31, 0.45); }

.subhead {
  margin-top: clamp(18px, 3vh, 28px);
  max-width: 560px;
  font-size: clamp(15px, 1.6vw, 17.5px);
  line-height: 1.6;
  color: var(--paper-dim);
}

.hero-cta {
  margin-top: clamp(26px, 4vh, 38px);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-primary {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper);
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: var(--shadow-ember);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); }

.btn-ghost {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(243, 238, 228, 0.22);
  padding: 13px 24px;
  border-radius: 999px;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.btn-ghost:hover { border-color: rgba(232, 83, 31, 0.55); background: rgba(232, 83, 31, 0.08); transform: translateY(-2px); }

.scroll-cue {
  margin-top: clamp(40px, 6vh, 64px);
  width: 22px;
  height: 34px;
  border: 1.5px solid rgba(243, 238, 228, 0.3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-cue span {
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--ember-2);
  animation: cueMove 1.8s ease-in-out infinite;
}
@keyframes cueMove { 0%, 100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(8px); opacity: 0.2; } }

/* ============================================================
   Stations (the bench)
   ============================================================ */
.stations { padding: clamp(50px, 10vh, 110px) 0 clamp(30px, 6vh, 60px); }

.stations-head { text-align: center; margin-bottom: clamp(40px, 6vh, 64px); }
.stations-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.01em;
}
.stations-head p {
  margin-top: 10px;
  color: var(--steel);
  font-size: 14.5px;
}

.bench {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
}

.bench-line {
  position: absolute;
  top: -22px;
  left: 0;
  width: 100%;
  height: 4px;
  overflow: visible;
}
.bench-fill {
  stroke-dasharray: 1200;
  stroke-dashoffset: 1200;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.bench-fill.is-lit { stroke-dashoffset: 0; }

.station {
  position: relative;
  background: linear-gradient(180deg, rgba(42, 35, 27, 0.55), rgba(23, 19, 15, 0.55));
  border: 1px solid rgba(243, 238, 228, 0.08);
  border-radius: 20px;
  padding: clamp(20px, 2.2vw, 26px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}
.station:hover {
  border-color: rgba(232, 83, 31, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(232, 83, 31, 0.12);
}

.station.station-highlight {
  background: linear-gradient(180deg, rgba(42, 27, 94, 0.45), rgba(23, 19, 25, 0.65));
  border-color: rgba(124, 58, 237, 0.35);
}
.station.station-highlight:hover {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4), 0 0 32px rgba(124, 58, 237, 0.25);
}

.station-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.station-num { font-family: var(--font-mono); font-size: 13px; color: var(--steel); letter-spacing: 0.06em; }
.station-glyph { color: var(--ember-2); font-size: 15px; }
.station.station-highlight .station-glyph { color: var(--ion); }

.badge-live {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(56, 189, 248, 0.18);
  color: var(--ion);
  border: 1px solid rgba(56, 189, 248, 0.4);
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 5px;
  display: inline-block;
  vertical-align: middle;
}

.badge-station-live {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(56, 189, 248, 0.15);
  color: var(--ion);
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-station-live::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ion);
  box-shadow: 0 0 6px var(--ion);
}

.station h3 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.station p {
  color: var(--paper-dim);
  font-size: 13.5px;
  line-height: 1.55;
  min-height: 5.2em;
  flex-grow: 1;
}

.station-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--spark);
  border-bottom: 1px solid rgba(255, 211, 122, 0.3);
  padding-bottom: 2px;
  transition: gap 0.25s ease, border-color 0.25s ease;
  align-self: flex-start;
}
.station.station-highlight .station-link {
  color: var(--ion);
  border-color: rgba(56, 189, 248, 0.4);
}
.station-link:hover { gap: 10px; border-color: var(--spark); }
.station.station-highlight .station-link:hover { border-color: var(--ion); }
.station-link .arrow { transition: transform 0.25s ease; }
.station-link:hover { gap: 10px; border-color: var(--spark); }
.station-link .arrow { transition: transform 0.25s ease; }

/* ============================================================
   Principles strip
   ============================================================ */
.principles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 2vw, 16px);
  padding: clamp(30px, 5vh, 50px) 0 clamp(60px, 10vh, 100px);
  border-top: 1px solid rgba(243, 238, 228, 0.08);
  margin-top: clamp(20px, 4vh, 40px);
}
.principle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--steel);
  padding: 9px 16px;
  border: 1px solid rgba(243, 238, 228, 0.08);
  border-radius: 999px;
}
.p-icon { color: var(--ember); font-size: 8px; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 40px;
  border-top: 1px solid rgba(243, 238, 228, 0.08);
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-copy { font-size: 12.5px; color: var(--steel); }
.footer-links { display: flex; gap: clamp(14px, 2.5vw, 26px); flex-wrap: wrap; }
.footer-links a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--paper-dim);
  transition: color 0.25s ease;
}
.footer-links a:hover { color: var(--spark); }

/* ============================================================
   Entrance animation
   ============================================================ */
.anim {
  opacity: 0;
  transform: translateY(20px);
  animation: reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(20px); filter: blur(6px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.stations .anim, .principles .anim {
  animation: none;
  opacity: 0;
  transform: translateY(20px);
}
.stations.in-view .anim, .principles.in-view .anim {
  animation: reveal 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .anim, .stations .anim, .principles .anim { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .scroll-cue span { animation: none; }
  .bench-fill { transition: none; stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .bench { grid-template-columns: repeat(2, 1fr); }
  .bench-line { display: none; }
}

@media (max-width: 720px) {
  .nav-pill, .btn-signin { display: none; }
  .burger { display: block; }
  .headline { max-width: 12ch; }
  .hero { min-height: 88vh; min-height: 88dvh; }
}

@media (max-width: 620px) {
  .bench { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .headline { font-size: clamp(34px, 11vw, 52px); letter-spacing: -0.02em; }
  .station p { min-height: 0; }
}

