/* ================================================================
   FILE: styles/components.css
   PURPOSE: Section + component styles for the "restrained editorial dark"
            system. Flat matte surfaces, hairline borders, bold serif
            display. No orbs, no animated grid, no glassmorphism, no glow.
   CONSUMES: design tokens from styles/base.css (:root)
   SECTION MAP (source order):
     1  Nav + mobile overlay     .nav-*
     2  Hero                      .hero-*
     3  Proof marquee             .marquee-*
     4  7-Layer pipeline          .pipeline-*
     5  Brain & Legs              .bl-*
     6  Segment selector          .seg-*
     7  ROI calculator            .calc-*
     8  Tooltips (shared)         .tooltip-*
     9  Testimonials              .testimonial-*, .logo-placeholder
     10 Risk-Free SLA             .sla-*
     11 Book / Calendly           .book-*, .cta-fallback-*
     12 Footer                    .footer-*
     13 Responsive breakpoints    320 · 768 · 1024 · 1440
   ANIMATION INVENTORY: marquee, overlay-in (kept minimal & subtle)
================================================================ */

/* ============================================================
   1 · NAVIGATION
============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  padding: 18px 0;
  transition: padding var(--dur-fast) var(--ease-out),
              background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  padding: 10px 0;
  background: rgba(12, 12, 14, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.nav__brand {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
}
.nav__logo {
  height: 38px;
  width: auto;
  margin-right: 10px;
  flex: none;
  /* Logo is now a transparent PNG; subtle contrast lift keeps it crisp. */
  filter: contrast(1.05) saturate(0.95);
}
.nav__bracket { color: var(--accent); font-weight: 400; }
.nav__x::after { content: none; }   /* drop the old animated underline */

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav__links a { color: var(--muted); }
.nav__links a:hover { color: var(--ink); }
.nav__cta-link { display: none; }
.nav__cta { font-size: 0.9rem; padding: 0.65em 1.2em; }

.nav__hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__hamburger span {
  width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.nav__hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(10, 10, 12, 0.98);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur-mid) var(--ease-out), visibility var(--dur-mid) var(--ease-out);
}
.nav__overlay.is-open { opacity: 1; visibility: visible; }
.nav__overlay-links {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-4);
  font-family: var(--font-display); font-weight: 600; font-size: 1.6rem;
}
.nav__overlay-links a { color: var(--ink); }
.nav__overlay-links li { opacity: 0; transform: translateY(14px); }
.nav__overlay.is-open .nav__overlay-links li {
  animation: overlay-in var(--dur-mid) var(--ease-out) forwards;
  animation-delay: calc(var(--child-index) * 70ms);
}
@keyframes overlay-in { to { opacity: 1; transform: translateY(0); } }

/* ============================================================
   2 · HERO  (editorial split: copy left · signal waterfall right)
============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--nav-h) + var(--space-4)) var(--space-3) var(--space-5);
  overflow: visible;
}
.hero__inner {
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-6);
  align-items: center;
}
.hero__copy { max-width: 560px; }
.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.hero__headline {
  font-size: var(--fs-h1);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-4);
  line-height: 1.08;
}
.hero__headline em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.hero__subhead {
  font-size: var(--fs-lede);
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 var(--space-5);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}
.hero__sla {
  margin-top: var(--space-4);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.hero__sla::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

/* --- Signal Waterfall Collector (Idea 5) ---
   Right column: living canvas of falling intent triggers that the cursor
   pulls into an "Ingestion Chamber" collector card. */
.waterfall-collector {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  border: 1.5px solid var(--accent-line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color var(--dur-mid) var(--ease-out),
              box-shadow var(--dur-mid) var(--ease-out);
}
.waterfall-collector:hover,
.waterfall-collector:focus-within {
  border-color: var(--accent);
  box-shadow: var(--accent-glow);
}
.waterfall-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.waterfall-collector > *:not(.waterfall-canvas) { position: relative; z-index: 1; }
.waterfall-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.waterfall-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--ink);
}
.waterfall-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  max-width: 42ch;
}
/* The ingestion chamber strip at the base of the collector. */
.waterfall-chamber {
  margin-top: var(--space-2);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-sm);
  background: rgba(116, 194, 179, 0.06);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-dim);
}
.waterfall-chamber::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  flex: none;
}
/* Ingest burst - fires each time a falling signal is consumed. */
.waterfall-chamber--flash {
  border-color: var(--accent);
  background: rgba(116, 194, 179, 0.22);
  box-shadow: 0 0 18px rgba(116, 194, 179, 0.4);
  transition: border-color 0.06s var(--ease-out),
              background-color 0.06s var(--ease-out),
              box-shadow 0.18s var(--ease-out);
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.7;
  z-index: 10;
  pointer-events: none;
}
.hero__scroll::after {
  content: "";
  display: block;
  width: 1px; height: 32px;
  margin: 8px auto 0;
  background: linear-gradient(var(--muted), transparent);
}

/* ============================================================
   3 · PROOF MARQUEE  (#proof-strip) - restrained stat band
============================================================ */
.marquee {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
  overflow: hidden;
  padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 52s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; gap: var(--space-3); padding-right: var(--space-3); }
.marquee__item { font-size: 0.95rem; color: var(--muted); white-space: nowrap; }
.marquee__item b { font-family: var(--font-display); color: var(--ink); font-weight: 600; margin-right: 8px; }
.marquee__sep { color: var(--line-2); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   4 · 7-LAYER PIPELINE  (#how-it-works)
============================================================ */
.pipeline { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-5); align-items: start; }
.pipeline__nodes { position: relative; display: flex; flex-direction: column; gap: 10px; }
/* Connection path (vertical hairline) + scroll-traveled signal dot. */
.pipeline__nodes::before {
  content: ""; position: absolute; left: calc(var(--space-2) + 23px); top: 30px; bottom: 30px; width: 1px;
  background: var(--line-2);
}
/* Scroll-traveled signal: a single glowing dot rides the path as the section
   sweeps the viewport (js/main.js → initPipeline scrollDrive). Hidden until
   .is-driven, fades out once the section leaves. Calm by default - only moves
   when the user scrolls. Gated off on the low QUALITY tier. */
.pipeline__pulse {
  position: absolute; left: calc(var(--space-2) + 23px); top: 2%;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(116, 194, 179, 0.7), 0 0 4px rgba(116, 194, 179, 0.9);
  transform: translateX(-50%);
  z-index: 3; pointer-events: none; opacity: 0;
  transition: top 0.25s var(--ease-out), opacity 0.4s var(--ease-out);
}
.pipeline.is-driven .pipeline__pulse { opacity: 1; }
.pipeline__node {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--space-2);
  align-items: center;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  z-index: 2;
  transition: background-color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}
.pipeline__node.is-active { transform: translateX(4px); }
.pipeline__circle {
  grid-row: 1 / 3;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  z-index: 1;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.pipeline__label { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.pipeline__sub { font-size: var(--fs-small); color: var(--muted); grid-column: 2; }

/* "Passed" nodes - already swept by the traveling signal - take a subtle
   completed-state circle. Sits below the hover/active rule so an active node
   still reads strongest. */
.pipeline__node.is-passed .pipeline__circle { border-color: var(--accent-line); color: var(--accent); }

.pipeline__node:hover .pipeline__circle,
.pipeline__node:focus-visible .pipeline__circle,
.pipeline__node.is-active .pipeline__circle {
  border-color: var(--accent); color: var(--accent); background: var(--accent-dim);
  box-shadow: 0 0 12px rgba(116, 194, 179, 0.4);
}
.pipeline__node:hover, .pipeline__node.is-active { background: var(--surface); }
.pipeline.is-hovering .pipeline__node:not(.is-active) { opacity: 0.4; }

.pipeline__detail {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  padding: var(--space-4);
  min-height: 260px;
  display: flex; flex-direction: column; gap: var(--space-4);
  border-color: var(--accent-line);
  box-shadow: var(--accent-glow);
}
.pipeline__detail-step { font-family: var(--font-mono); font-size: 2.4rem; color: var(--accent-line); line-height: 1; }
.pipeline__detail-title { font-size: 1.6rem; margin: 0; }
.pipeline__detail-desc { color: var(--ink-dim); }
.pipeline__detail-hint {
  margin-top: var(--space-3); font-family: var(--font-mono);
  font-size: var(--fs-small); color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
/* Telemetry terminal inside the detail card (spec §3.D). */
.pipeline__terminal-head {
  font-family: var(--font-mono); font-size: var(--fs-small);
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}
.pipeline__terminal {
  background: var(--telemetry-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--ink-dim);
  min-height: 160px;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.pipeline__terminal::-webkit-scrollbar { width: 6px; }
.pipeline__terminal::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
/* Log lines fade/slide in as they're appended (reveal-on-scroll feel). */
.pipeline__log {
  margin-bottom: 10px;
  animation: pipeline-log-in 0.45s var(--ease-out) both;
}
@keyframes pipeline-log-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.pipeline__log::before { content: "[+] "; color: var(--accent); font-weight: 700; }
.pipeline__log--cursor::after {
  content: "▋"; color: var(--accent); margin-left: 2px;
  animation: log-blink 0.8s steps(1) infinite;
}
@keyframes log-blink { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.pipeline__dots { display: none; }

/* ============================================================
   5 · BRAIN & LEGS  (#brain-legs)
============================================================ */
.bl__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.bl__card { padding: var(--space-5); display: flex; flex-direction: column; }
.bl__card-tag {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}
.bl__card-title {
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: var(--space-3);
  max-width: 22ch;
}
.bl__list { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.bl__list li { position: relative; padding-left: var(--space-3); color: var(--muted); font-size: 0.97rem; }
.bl__list b { color: var(--ink); font-weight: 600; }
.bl__list li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: 0.8;
}
.bl__under {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  color: var(--muted);
  opacity: 0.85;
}

/* ============================================================
   6 · SEGMENT SELECTOR  (#segments)
============================================================ */
.segment-tip { max-width: 60ch; margin: 0 auto var(--space-5); text-align: center; color: var(--muted); }
.seg__wrap { display: grid; grid-template-columns: 300px 1fr; gap: var(--space-4); align-items: start; }
.seg__tablist { display: flex; flex-direction: column; gap: 4px; }
.seg__tab {
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  padding: 0.85em 1em;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.96rem;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.seg__tab-num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); flex: none; }
.seg__tab:hover { background: var(--surface); color: var(--ink); }
.seg__tab[aria-selected="true"] {
  background: var(--surface); color: var(--ink);
  border-left-color: var(--accent);
}
.seg__tab[aria-selected="true"] .seg__tab-num { color: var(--accent); }

.seg__panel { padding: var(--space-5); min-height: 320px; transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.seg__panel.is-swapping { opacity: 0; transform: translateY(6px); }
.seg__panel-name { font-size: 1.6rem; margin-bottom: var(--space-4); color: var(--ink); }
.seg__row { margin-bottom: var(--space-3); }
.seg__row-label {
  font-family: var(--font-mono); font-size: var(--fs-small);
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 6px;
}
.seg__row-text { color: var(--ink-dim); }
.seg__offer {
  border-left: 2px solid var(--accent);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink);
}
.seg__fallback { color: var(--muted); }

/* ============================================================
   7 · ROI CALCULATOR  (#roi-calculator)
============================================================ */
.calc__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-3); align-items: start; }
.calc__inputs { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.calc__field { position: relative; }
.calc__label {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; color: var(--ink); margin-bottom: 12px;
}
.calc__value { margin-left: auto; font-family: var(--font-mono); color: var(--accent); }

.calc__slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--line-2) var(--fill, 50%));
  outline-offset: 6px; cursor: pointer;
}
.calc__slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--accent);
  transition: transform var(--dur-fast) var(--ease-out);
}
.calc__slider::-webkit-slider-thumb:hover { transform: scale(1.1); }
.calc__slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 4px solid var(--accent); }
.calc__slider::-moz-range-track { height: 4px; border-radius: var(--radius-pill); background: transparent; }

.calc__outputs { display: flex; flex-direction: column; gap: var(--space-2); }
.calc__out { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-3); }
.calc__out-label { color: var(--muted); font-size: 0.92rem; }
.calc__out-value { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.calc__out-value--muted { color: var(--muted); }
.calc__out-value--accent { color: var(--accent); }
.calc__out--hero { border-color: var(--accent-line); background: var(--accent-dim); }
.calc__out--hero .calc__out-value { font-size: 1.8rem; }
/* Scope-the-build CTA card (fills the slot that used to show Mervex cost). */
.calc__out--scope { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: var(--space-3); text-decoration: none; border-color: var(--accent-line); transition: border-color 0.2s var(--ease-out); }
.calc__out--scope:hover { border-color: var(--accent); }
.calc__scope-body { color: var(--ink-dim); font-size: 0.92rem; line-height: 1.55; }
.calc__scope-cta { color: var(--accent); font-family: var(--font-mono); font-size: var(--fs-small); letter-spacing: 0.04em; margin-top: auto; }
.calc__footnote { font-size: var(--fs-small); color: var(--muted); margin-top: var(--space-1); }
.calc__cta { margin-top: var(--space-5); display: flex; flex-direction: column; align-items: center; gap: var(--space-1); }
.calc__cta .risk-anchor { justify-content: center; }
/* Non-price reassurance line (replaces the old risk-anchor trio). */
.risk-line { color: var(--muted); font-size: var(--fs-small); margin-top: var(--space-2); }

/* ============================================================
   8 · TOOLTIPS (shared)
============================================================ */
.tooltip-trigger {
  width: 18px; height: 18px; flex: none;
  border-radius: 50%; border: 1px solid var(--line-2);
  color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1;
  display: inline-grid; place-items: center;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.tooltip-trigger:hover, .tooltip-trigger:focus-visible { border-color: var(--accent); color: var(--accent); }
.tooltip-panel {
  position: absolute; z-index: 1000; top: calc(100% + 8px); left: 0;
  max-width: 260px; padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  font-size: 12px; line-height: 1.5; color: var(--ink-dim);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), visibility var(--dur-fast) var(--ease-out);
}
.tooltip-panel.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

/* ============================================================
   9 · TESTIMONIALS  (#social-proof)
============================================================ */
.proof__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.testimonial { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
/* Intentional, labelled placeholder (not a fake blurred smear) */
.logo-placeholder {
  width: 104px; height: 30px;
  border: 1px dashed var(--line-2);
  border-radius: 6px;
  position: relative;
}
.logo-placeholder::after {
  content: "LOGO";
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.15em; color: var(--muted);
}
.testimonial__quote {
  margin: 0; flex: 1;
  font-family: var(--font-display);
  font-size: 1.08rem; font-style: italic; line-height: 1.5;
  color: var(--ink-dim);
}
.testimonial__attr { font-weight: 600; font-size: 0.875rem; color: var(--ink); }
.testimonial__badge {
  align-self: flex-start;
  font-family: var(--font-mono); font-size: 11px; color: var(--accent);
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill); padding: 5px 12px;
}

/* ============================================================
   10 · RISK-FREE SLA  (#risk-free)
============================================================ */
.sla__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.sla__card { padding: var(--space-4); }
.sla__card--mid { border-color: var(--accent-line); background: var(--accent-dim); }
.sla__icon { color: var(--accent); margin-bottom: var(--space-3); }
.sla__title { font-size: 1.3rem; color: var(--ink); margin-bottom: var(--space-2); }
.sla__body { color: var(--muted); font-size: 0.97rem; }
.sla__body b { color: var(--ink); }
.sla__stamp {
  display: inline-block; margin-top: var(--space-3);
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent);
  border-radius: var(--radius-pill); padding: 5px 12px;
}

/* ============================================================
   11 · BOOK / CALENDLY  (#book)
============================================================ */
.book__widget { max-width: 760px; margin: 0 auto; padding: var(--space-2); overflow: hidden; }
.calendly-inline-widget { border-radius: var(--radius); overflow: hidden; }
.cta-fallback { text-align: center; padding: var(--space-6) var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.cta-fallback__logo {
  width: 28px;
  height: 28px;
  flex: none;
  filter: contrast(1.05) saturate(0.95);
  margin-bottom: var(--space-2);
}
.cta-fallback__pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-bottom: var(--space-2); }
.cta-fallback__lead { font-family: var(--font-display); font-size: 1.5rem; color: var(--ink); }
.cta-fallback__sub { color: var(--muted); max-width: 46ch; }
.cta-fallback .btn { margin-top: var(--space-2); }
.cta-fallback .risk-anchor { justify-content: center; }

/* ============================================================
   12.5 · FAQ  (#faq)
   Native <details> accordion. No JS. Reuses glass-card surface.
============================================================ */
.faq__list {
  max-width: var(--maxw-narrow);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.faq__item { padding: 0; overflow: hidden; }
.faq__q {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  font-family: var(--font-display);
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--ink);
  transition: color var(--dur-fast) var(--ease-out);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q-text { flex: 1; }
.faq__icon {
  flex: none;
  position: relative;
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 1.5px;
  background: currentColor;
  transform: translate(-50%, -50%);
  transition: transform var(--dur-fast) var(--ease-out);
}
.faq__icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item[open] .faq__icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.faq__item[open] .faq__q,
.faq__item:hover .faq__q,
.faq__item:focus-within .faq__q { color: var(--accent); }
.faq__a {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--ink-dim);
  line-height: 1.65;
  max-width: 68ch;
}
.faq__a p { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .faq__q,
  .faq__icon::before,
  .faq__icon::after,
  .faq__item[open] .faq__icon::after { transition: none; }
}

/* ============================================================
   13 · FOOTER
============================================================ */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: var(--space-6) var(--space-3) var(--space-5); }
.footer__inner { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; }
.footer__brand { font-size: 1.35rem; margin-bottom: var(--space-2); }
.footer__logo {
  height: 36px;
  width: auto;
  margin-right: 10px;
  flex: none;
  filter: contrast(1.05) saturate(0.95);
}
.footer__prop { color: var(--muted); max-width: 40ch; margin-bottom: var(--space-3); font-size: 0.95rem; }
.footer__legal { color: var(--muted); font-size: var(--fs-small); }
.footer__right { display: flex; flex-direction: column; gap: var(--space-2); align-items: flex-start; }
.footer__nav { color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.footer__nav a:hover { color: var(--ink); }
.footer__div { color: var(--line-2); }
.footer__br { display: none; }
.footer__email { color: var(--accent); font-family: var(--font-mono); font-size: 0.92rem; }
.footer__email:hover { text-decoration: underline; }
.footer__emails { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.footer__social { display: flex; gap: 10px; margin-top: var(--space-1); }
.footer__social-link {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line); color: var(--muted);
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.footer__social-link:hover { color: var(--accent); border-color: var(--accent-line); }

/* ============================================================
   12.5 · DSPy PROMPT OPTIMIZER DECK  (#optimizer-deck)  (Idea 2)
   Tabbed IDE panel: raw generic template (left, diff-stripped) vs
   self-improving DSPy compiler output (right, typed line-by-line).
============================================================ */
.opt__tabs {
  display: flex; gap: 10px; margin-bottom: var(--space-3);
  overflow-x: auto; scrollbar-width: none;
}
.opt__tabs::-webkit-scrollbar { display: none; }
.opt__tab {
  flex: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.opt__tab:hover { color: var(--ink); border-color: var(--line-2); }
.opt__tab[aria-selected="true"] {
  border-color: var(--accent); color: var(--ink); background: var(--surface-2);
}
.opt__ide {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 460px;
  overflow: hidden;
  transition: box-shadow 1s var(--ease-out);
}
/* Compiled-glow settle: once the DSPy compile finishes (js adds is-compiled),
   a soft accent halo fades in over 1s and holds - a calm "done" state, no pulsing. */
.opt__ide.is-compiled { box-shadow: var(--shadow-soft), var(--accent-glow); }
.opt__ide-head {
  background: var(--bg-2);
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-2);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
}
.opt__ide-dots { display: flex; gap: 6px; }
.opt__ide-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(244, 241, 234, 0.15); }
.opt__ide-dot--accent { background: var(--accent); }
.opt__ide-title { flex: 1; text-align: center; }
/* Compile-quality meter + score badge (right of the IDE header). */
.opt__ide-meter {
  display: flex; align-items: center; gap: 10px; min-width: 30px;
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted);
}
.opt__score { white-space: nowrap; letter-spacing: 0.04em; color: var(--accent); transition: color var(--dur-fast) var(--ease-out); }
.opt__meter {
  width: 70px; height: 5px; border-radius: var(--radius-pill);
  background: var(--line-2); overflow: hidden; flex: none;
}
.opt__meter-fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), #9ad9cc);
  border-radius: var(--radius-pill);
  transition: none; /* JS drives: instant during typing, slow ease on final settle */
}
/* Output pane line-number gutter via CSS counter. */
.opt__pane--output { counter-reset: optline; }
.opt__pane--output .opt__line { counter-increment: optline; }
.opt__pane--output .opt__line .opt__text { margin-left: 0; }
.opt__pane--output .opt__line::before {
  content: counter(optline);
  display: inline-block; width: 20px; flex: none;
  margin-right: 6px; color: var(--muted); opacity: 0.5;
  font-variant-numeric: tabular-nums; text-align: right;
}
.opt__layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  font-family: var(--font-mono);
  font-size: 0.85rem; line-height: 1.55;
}
.opt__pane { padding: var(--space-4); overflow-y: auto; height: 100%; }
.opt__pane--input { background: var(--bg-2); border-right: 1px solid var(--line); }
.opt__pane-tag {
  font-size: 0.7rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.opt__line { display: flex; gap: 6px; margin-bottom: 8px; animation: opt-line-in 0.4s var(--ease-out) both; }
@keyframes opt-line-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.opt__sign { width: 18px; flex: none; color: var(--muted); }
.opt__text { word-break: break-word; }
.opt__line--del { color: #df6e6e; background: rgba(223, 110, 110, 0.08); padding: 2px 6px; border-radius: 4px; }
.opt__line--del .opt__sign { color: #df6e6e; }
/* Additions highlighted in soft green (spec §3.E). */
.opt__line--add { color: var(--accent); background: var(--accent-dim); padding: 2px 6px; border-radius: 4px; }
.opt__line--add .opt__sign { color: var(--accent); }
.opt__sign--add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex: none;
  align-self: center;
  /* Match the line's line-height so the glyph centers vertically with text. */
  height: 1.55em;
}
.opt__sign--add::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  background-image: url('../assets/icons/final_logo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex: none;
  filter: contrast(1.05) saturate(0.95);
}
.opt__cursor {
  display: inline-block; width: 6px; height: 14px;
  background: var(--accent); margin-left: 2px; vertical-align: middle;
  animation: opt-blink 0.8s steps(1) infinite;
}
@keyframes opt-blink { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* ============================================================
   12.6 · EXPANDING TELEMETRY RADAR  (#radar-widget)  (Idea 10)
   Sticky bottom-right pulse badge → expands into glassmorphic terminal.
============================================================ */
.radar {
  position: fixed; bottom: 30px; right: 30px; z-index: 1100;
  background: rgba(22, 22, 25, 0.85);
  border: 1px solid var(--accent-line);
  border-radius: 30px;
  padding: 10px 18px;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), var(--accent-glow);
  opacity: 0; transform: translateY(20px) scale(0.95);
  pointer-events: none;
  width: 240px; height: 44px; overflow: hidden;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out),
              border-radius var(--dur-mid) var(--ease-out),
              padding var(--dur-mid) var(--ease-out),
              width var(--dur-mid) var(--ease-out),
              height var(--dur-mid) var(--ease-out);
}
.radar.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.radar.is-expanded {
  border-radius: var(--radius); padding: 18px;
  width: 380px; height: 320px; cursor: default;
}
.radar__head {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; height: 24px; flex: none;
}
.radar__trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  /* Do not consume the close-button space; let the title truncate instead. */
  width: auto;
  max-width: calc(100% - 28px);
}
.radar__logo {
  width: 21px;
  height: 21px;
  flex: none;
  /* Treat the image as a block to remove inline-baseline drift. */
  display: block;
  filter: contrast(1.05) saturate(0.95);
}
.radar__pulse { position: relative; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; flex: none; }
.radar__pulse::after {
  content: ""; position: absolute; inset: -6px;
  border: 1px solid var(--accent); border-radius: 50%;
  opacity: 0; animation: radar-ping 1.8s ease-out infinite;
}
/* Idle-closed breathing: the ping slows while the page is at rest. */
.radar.is-idle .radar__pulse::after { animation-duration: 3.6s; }
@keyframes radar-ping { 0% { transform: scale(0.6); opacity: 0.8; } 100% { transform: scale(1.9); opacity: 0; } }
.radar__title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity var(--dur-fast) var(--ease-out);
  line-height: 1;
  /* Vertically center the text with the 21 px logo / 10 px pulse. */
  padding-top: 2px;
}
.radar__close {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-family: var(--font-mono); font-size: 0.78rem; display: none; padding: 2px 6px;
  flex: none;
}
.radar.is-expanded .radar__close { display: block; }
.radar__close:hover { color: var(--ink); }
.radar__logs {
  display: none; flex-grow: 1;
  background: var(--telemetry-bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; margin-top: 6px;
  font-family: var(--font-mono); font-size: 0.68rem; line-height: 1.45;
  color: var(--ink-dim); overflow-y: auto; flex-direction: column; gap: 6px;
}
.radar.is-expanded .radar__logs { display: flex; }
/* New log lines fade/slide in as appended (liquid append, not a pop). */
.radar__log { line-height: 1.4; animation: radar-log-in 0.4s var(--ease-out) both; }
@keyframes radar-log-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
.radar__log::before { content: ""; }
.radar__log--accent { color: var(--accent); }
/* Layer-coded log lines - distinct hue per L1–L7 backend stage. */
.radar__log--l1 { color: #74c2b3; }   /* signal scraper - teal */
.radar__log--l2 { color: #9ad9cc; }   /* enrichment - light teal */
.radar__log--l3 { color: #c9b6e8; }   /* DSPy - lavender */
.radar__log--l4 { color: #f4f1ea; }   /* outbound - ink */
.radar__log--l5 { color: #e3c77a; }   /* booking - amber */
.radar__log--l6 { color: #8fb6c9; }   /* CRM - steel */
.radar__log--l7 { color: #df9a6e; }   /* billing - warm */
.radar__log--l0 { color: var(--ink-dim); }

/* ============================================================
   13 · RESPONSIVE BREAKPOINTS  (mobile-first; collapse at 768)
============================================================ */
@media (max-width: 768px) {
  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .nav__cta-link { display: block; }

  /* Hero split → stacked; waterfall collector shrinks. */
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-5); }
  .waterfall-collector { min-height: 320px; }
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }

  .bl__grid { grid-template-columns: 1fr; }
  .seg__wrap { grid-template-columns: 1fr; }
  .calc__grid { grid-template-columns: 1fr; }
  .proof__grid { grid-template-columns: 1fr; }
  .sla__grid { grid-template-columns: 1fr; }

  /* Optimizer IDE → single column. */
  .opt__layout { grid-template-columns: 1fr; }
  .opt__pane--input { border-right: none; border-bottom: 1px solid var(--line); }

  /* Pipeline → horizontal scroll-snap carousel */
  .pipeline { grid-template-columns: 1fr; gap: var(--space-3); }
  .pipeline__detail { display: none; }
  .pipeline__nodes {
    flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: var(--space-2); padding-bottom: var(--space-2); -webkit-overflow-scrolling: touch;
  }
  .pipeline__nodes::before { display: none; }
  .pipeline__pulse { display: none; }
  .pipeline__node {
    scroll-snap-align: center; flex: 0 0 82%;
    background: var(--surface); border: 1px solid var(--line);
  }
  .pipeline.is-hovering .pipeline__node:not(.is-active) { opacity: 1; }
  .pipeline__dots { display: flex; justify-content: center; gap: 8px; margin-top: var(--space-3); }
  .pipeline__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
  .pipeline__dot.is-active { background: var(--accent); transform: scale(1.3); }

  /* Radar → hidden on mobile (keeps small screens clean; re-enables ≥769px). */
  .radar { display: none; }
  .radar.is-expanded { width: calc(100vw - 32px); max-width: 380px; }

  .footer__inner { flex-direction: column; gap: var(--space-4); }
  .footer__br { display: inline; }
}

@media (min-width: 1024px) { .section { padding-inline: var(--space-4); } }
@media (min-width: 1440px) { :root { --maxw: 1180px; } }

@media (max-width: 380px) {
  .section { padding-inline: var(--space-2); }
  .pipeline__node { flex-basis: 90%; }
  .nav__inner { padding-inline: var(--space-2); }
  .nav__logo { height: 30px; }
}
