/* ==========================================================================
   Neuro Support — Redesign layer (v2)
   Loads AFTER style.css. Everything here is additive or refinement.
   Move the funder band OFF home, introduce the spine hero, tighten type.
   ========================================================================== */

:root {
  /* Accent intensity — controlled by the Tweaks panel.
     Mute: signal only on numbers + links. Calm: default. Bold: broader. */
  --accent-mode: 1;       /* 0 mute, 1 calm, 2 bold */
  --accent-pop: 1;        /* multiplier on glows */
  --density: 1;           /* 0 compact, 1 comfy */
}

/* ---- Reusable mono tag, used by the spine + new feature tags ---- */
.mono-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--signal);
  line-height: 1;
}
.mono-tag--muted { color: var(--mist-muted); }
.section--dark .mono-tag--muted { color: var(--mist-muted); }

/* ==========================================================================
   Home: Spine hero
   Replaces logo-in-a-box visual with a labelled installation→persistence
   diagram. Two nodes joined by a dotted spine. Lives only in the hero,
   right column.
   ========================================================================== */

.spine {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 0;
  display: grid;
  gap: var(--s-4);
}
.spine__rail {
  position: absolute;
  left: 28px;
  top: 48px;
  bottom: 48px;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(232,113,58,0.0) 0%,
    var(--signal) 15%,
    var(--signal) 85%,
    rgba(232,113,58,0.0) 100%
  );
  border-radius: 2px;
}
.spine__rail::before,
.spine__rail::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 10px;
  height: 10px;
  background: var(--signal);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 5px rgba(232,113,58,0.18);
}
.spine__rail::before { top: -5px; }
.spine__rail::after  { bottom: -5px; }

.spine__node {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--s-4);
  padding: var(--s-5);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
}
.spine__node:hover {
  border-color: rgba(232,113,58,0.45);
  transform: translateX(3px);
  background: rgba(255,255,255,0.06);
}
.spine__index {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: rgba(232,113,58,0.14);
  border: 1px solid rgba(232,113,58,0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--signal);
  font-size: 0.72rem;
  line-height: 1;
  letter-spacing: 0.1em;
  gap: 4px;
}
.spine__index strong {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--signal);
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}
.spine__body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--paper);
  margin: 0 0 6px;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.spine__body p {
  font-size: 0.88rem;
  color: var(--mist-muted);
  margin: 0;
  line-height: 1.5;
}
.spine__meta {
  display: flex;
  gap: var(--s-3);
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.42);
}
.spine__meta strong { color: var(--signal); font-weight: 500; }

@media (max-width: 900px) {
  .hero-visual { max-width: 420px !important; }
}
@media (max-width: 480px) {
  .spine__node { grid-template-columns: 48px 1fr; gap: var(--s-3); padding: var(--s-4); }
  .spine__index { width: 48px; height: 48px; }
  .spine__rail { left: 24px; }
}

/* Allow the redesigned hero to hide the old visual when the spine tweak is on */
.hero.hero--spine .hero-visual > img { display: none; }
.hero.hero--spine .spine { display: grid; }
.hero .spine { display: none; }   /* hidden unless hero--spine is set */

/* ==========================================================================
   Home: new headline treatment ("Willpower isn't the answer")
   ========================================================================== */
.hero h1.hero__headline--new em {
  font-style: italic;
  color: var(--signal);
  font-weight: 400;
}

/* ==========================================================================
   Feature cards — remove emoji box, replace with mono index label.
   Only applies when a .feature-card has .feature-card--indexed.
   ========================================================================== */
.feature-card--indexed {
  position: relative;
  padding-top: calc(var(--s-6) + 8px);
}
.feature-card--indexed .feature-idx {
  position: absolute;
  top: var(--s-5);
  left: var(--s-6);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--signal);
  font-weight: 500;
  letter-spacing: 0.12em;
}

/* ==========================================================================
   Audience triptych (Client / Funder / NASC) — used on Services
   ========================================================================== */
.audiences {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  max-width: 1000px;
}
.audience-card {
  padding: var(--s-6);
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.audience-card:hover {
  border-color: var(--signal);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.section--dark .audience-card {
  background: var(--void-2);
  border-color: var(--void-3);
}
.section--dark .audience-card:hover {
  border-color: var(--signal);
}
.section--dark .audience-card h3 { color: var(--paper); }
.section--dark .audience-card p { color: var(--mist-muted); }
.audience-card h3 { font-size: var(--step-1); margin: 0; font-weight: 600; }
.audience-card > p { color: var(--ink-muted); font-size: 0.95rem; line-height: 1.6; flex: 1; margin: 0; }
.audience-card__cta {
  margin-top: var(--s-3);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--signal);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 500;
}
.audience-card__cta::after { content: '→'; transition: transform 0.2s var(--ease); }
.audience-card:hover .audience-card__cta::after { transform: translateX(3px); }
@media (max-width: 820px) { .audiences { grid-template-columns: 1fr; } }

/* ==========================================================================
   Funder/NASC strip — now only appears on Services (not home).
   Scannable mono band with IF threshold + host list.
   ========================================================================== */
.funder-strip {
  background: var(--void);
  color: var(--mist);
  border-top: 1px solid var(--void-3);
  border-bottom: 1px solid var(--void-3);
  padding: var(--s-6) 0;
  font-family: var(--font-mono);
}
.funder-strip__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--s-6);
  align-items: center;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-5);
}
.funder-strip__label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--signal);
  white-space: nowrap;
}
.funder-strip__rows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
  font-size: 0.82rem;
  color: var(--mist);
}
.funder-strip__rows strong {
  display: block;
  color: var(--paper);
  font-weight: 600;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.funder-strip__rows span {
  color: var(--mist-muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}
.funder-strip__cta {
  font-size: 0.78rem;
  color: var(--signal);
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.funder-strip__cta::after { content: ' →'; }
@media (max-width: 860px) {
  .funder-strip__inner { grid-template-columns: 1fr; gap: var(--s-4); }
  .funder-strip__rows { grid-template-columns: 1fr; gap: var(--s-3); }
}

/* ==========================================================================
   Tweaks panel
   ========================================================================== */
.tweaks-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  width: 300px;
  background: var(--void);
  color: var(--mist);
  border: 1px solid var(--void-3);
  border-radius: var(--r);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.5), 0 8px 24px -8px rgba(0,0,0,0.3);
  font-family: var(--font-body);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.tweaks-panel.active {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.tweaks-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-bottom: 1px solid var(--void-3);
}
.tweaks-panel__title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--paper);
}
.tweaks-panel__close {
  background: transparent;
  border: none;
  color: var(--mist-muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.tweaks-panel__close:hover { color: var(--paper); background: rgba(255,255,255,0.06); }
.tweaks-panel__body { padding: var(--s-4) var(--s-5); display: grid; gap: var(--s-4); }
.tweak {
  display: grid;
  gap: var(--s-2);
}
.tweak__label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--mist-muted);
}
.tweak__seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 2px;
  background: var(--void-2);
  border: 1px solid var(--void-3);
  border-radius: 8px;
}
.tweak__seg button {
  background: transparent;
  border: none;
  padding: 6px 8px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--mist-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.tweak__seg button.active {
  background: var(--signal);
  color: var(--paper);
}
.tweak__seg button:not(.active):hover { color: var(--paper); background: rgba(255,255,255,0.04); }

/* Accent-intensity modes (mute/calm/bold) */
body[data-accent="mute"] .eyebrow::before { background: var(--ink-muted); }
body[data-accent="mute"] .eyebrow { color: var(--ink-muted); }
body[data-accent="mute"] .section--dark .eyebrow { color: var(--mist-muted); }
body[data-accent="mute"] .mono-tag { color: var(--mist-muted); }
body[data-accent="mute"] .hero h1 em,
body[data-accent="mute"] em { color: var(--paper); font-style: italic; }
body[data-accent="mute"] .section--light em,
body[data-accent="mute"] .section:not(.section--dark) em { color: var(--ink); }

body[data-accent="bold"] .hero::before {
  background:
    radial-gradient(ellipse 65% 50% at 88% 18%, rgba(232,113,58,0.24), transparent 60%),
    radial-gradient(ellipse 60% 48% at 12% 88%, rgba(232,113,58,0.12), transparent 55%);
}
body[data-accent="bold"] .spine__node { border-color: rgba(232,113,58,0.25); }

/* Density compact */
body[data-density="compact"] .section { padding: clamp(48px, 7vw, 88px) 0; }
body[data-density="compact"] .section-header { margin-bottom: var(--s-6); }
body[data-density="compact"] .features-grid,
body[data-density="compact"] .audiences { gap: var(--s-3); }
body[data-density="compact"] .feature-card,
body[data-density="compact"] .audience-card { padding: var(--s-5); }

/* Hero variant: none (show just the statement, drop the visual column) */
body[data-hero="none"] .hero-inner { grid-template-columns: 1fr; }
body[data-hero="none"] .hero-visual { display: none; }
body[data-hero="none"] .hero-content { max-width: 780px; }

/* Funder band visibility (Services only) */
body[data-funder-band="off"] .funder-strip { display: none; }
