/* ============================================================
   agentsformybusiness.com — single shared stylesheet
   FLYNN (K-DESIGNR), 2026-04-28
   Brand DNA: K-Wired house style — black bg, white text, Montserrat
   Single accent: electric cyan #00D4FF
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  --bg: #000000;
  --surface: #0E0E12;
  --surface-2: #14141A;
  --text: #FFFFFF;
  --muted: rgba(255, 255, 255, 0.65);
  --border: rgba(255, 255, 255, 0.08);
  --accent: #00D4FF;
  --accent-dim: #0099BB;
  --accent-glow: rgba(0, 212, 255, 0.18);
  --maxw: 1200px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Base ---------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.25rem, 5.5vw, 4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }
p  { color: var(--text); }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #000; padding: 0.75rem 1rem;
  font-weight: 700; z-index: 1000;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 800; letter-spacing: 0.02em;
  font-size: 1.05rem;
}
.brand-mark {
  width: 28px; height: 28px;
  display: inline-grid; place-items: center;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: 6px;
  font-family: var(--font-mono); font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.brand-name { color: var(--text); }
.brand-name span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav-list { display: flex; gap: 1.5rem; }
.nav-list a {
  font-weight: 600; font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav-list a:hover { color: var(--accent); }
.nav-list a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-cta:hover { background: var(--accent); color: #000; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: center; justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: ""; display: block;
  width: 18px; height: 2px; background: var(--text);
  position: relative; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.55rem;
  padding: 0.95rem 1.4rem;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.05em; text-transform: uppercase;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  border: 1.5px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary {
  background: var(--accent); color: #000;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover { background: #fff; color: #000; transform: translateY(-1px); }
.btn-ghost {
  border-color: var(--accent); color: var(--accent);
}
.btn-ghost:hover { background: var(--accent); color: #000; }
.btn-row {
  display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center;
  margin-top: 1.75rem;
}
.btn-row.left { justify-content: flex-start; }

/* ---------- Sections ---------- */
section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-head {
  max-width: 760px; margin: 0 auto 3rem; text-align: center;
}
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.section-head h2 { margin-bottom: 0.85rem; }
.section-head p  { color: var(--muted); font-size: 1.05rem; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 80% 10%, var(--accent-glow), transparent 60%),
    radial-gradient(700px 500px at 10% 90%, rgba(0,212,255,0.10), transparent 60%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
}
.hero-copy h1 { margin-bottom: 1.25rem; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy p.lead {
  color: var(--muted); font-size: 1.15rem; max-width: 56ch;
  margin-bottom: 1.5rem;
}
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem;
  margin-top: 1.75rem; color: var(--muted);
  font-size: 0.9rem;
}
.hero-meta li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-meta .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

/* AIOS visual (CSS-only, no images) */
.aios {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), #08080B);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.aios-header {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--muted); margin-bottom: 1rem;
  padding-bottom: 0.85rem; border-bottom: 1px dashed var(--border);
}
.aios-dots { display: inline-flex; gap: 0.35rem; }
.aios-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.aios-dots span:first-child { background: var(--accent); }
.aios-core {
  text-align: center; padding: 1rem 0 1.25rem;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 1.25rem;
}
.aios-core .label {
  display: inline-block; padding: 0.35rem 0.7rem;
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; font-family: var(--font-mono);
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.aios-core h3 { font-weight: 800; }
.aios-core p { color: var(--muted); font-size: 0.9rem; margin-top: 0.35rem; }
.aios-agents {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.aios-agent {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.aios-agent .pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
  flex: 0 0 auto;
}

/* ---------- Pain block ---------- */
.pain {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.pain-quote {
  max-width: 880px; margin: 0 auto; text-align: center;
}
.pain-quote .eyebrow { color: var(--muted); }
.pain-quote h2 {
  font-style: italic; font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
}
.pain-quote h2 span { color: var(--accent); font-style: normal; }
.pain-quote p {
  color: var(--muted); margin-top: 1.25rem; font-size: 1.05rem;
}

/* ---------- Pillars ---------- */
.pillars {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
}
.pillar {
  padding: 2rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.pillar:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}
.pillar .icon {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1.5px solid var(--accent); color: var(--accent);
  border-radius: var(--radius-sm); margin-bottom: 1.1rem;
}
.pillar h3 { margin-bottom: 0.5rem; }
.pillar p  { color: var(--muted); }

/* ---------- What we build (2-col list) ---------- */
.builds {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
.build-row {
  display: flex; gap: 1rem; align-items: flex-start;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.build-row .check {
  flex: 0 0 auto; width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-glow);
  color: var(--accent);
}
.build-row h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.build-row p  { color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* ---------- How it works (numbered steps) ---------- */
.steps {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}
.step {
  position: relative;
  padding: 2rem 1.5rem 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step .num {
  position: absolute; top: -16px; left: 1.5rem;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: var(--bg); color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 50%; font-weight: 800; font-size: 0.95rem;
}
.step h3 { margin-bottom: 0.4rem; font-size: 1.05rem; }
.step p  { color: var(--muted); font-size: 0.92rem; }

/* ---------- Sample cards ---------- */
.samples-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.sample {
  display: flex; flex-direction: column;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.sample:hover { transform: translateY(-3px); border-color: var(--accent); }
.sample-tag {
  display: inline-block; align-self: flex-start;
  padding: 0.25rem 0.6rem; margin-bottom: 1rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent);
  border-radius: 999px;
}
.sample h3 { margin-bottom: 0.6rem; }
.sample p  { color: var(--muted); margin-bottom: 1.25rem; flex: 1; }
.sample-outcome {
  padding-top: 1rem; border-top: 1px dashed var(--border);
  font-size: 0.88rem; color: var(--text);
}
.sample-outcome strong { color: var(--accent); display: block; margin-bottom: 0.2rem; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; }

/* ---------- Split hero (used by About, Samples, Contact) ---------- */
.hero-split {
  display: grid; gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
}
.hero-split h1 span { color: var(--accent); }
.hero-split p { color: var(--muted); font-size: 1.1rem; }
.about-stats {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 2rem;
}
.about-stat {
  padding: 1.25rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.about-stat .num {
  font-size: 1.85rem; font-weight: 800; color: var(--accent);
  line-height: 1; margin-bottom: 0.4rem;
}
.about-stat .label { color: var(--muted); font-size: 0.85rem; }

.values {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
}
.value {
  padding: 1.85rem 1.65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.value h3 { color: var(--accent); margin-bottom: 0.5rem; font-size: 1.1rem; }
.value p  { color: var(--muted); font-size: 0.94rem; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1.5fr 1fr;
  align-items: stretch;
}
.calendly-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column;
}
.calendly-card .calendly-inline-widget {
  flex: 1; min-height: 700px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #fff; /* Calendly renders light by default */
}
.calendly-fallback {
  margin-top: 1rem; color: var(--muted); font-size: 0.85rem;
  text-align: center;
}
.contact-card { gap: 1.25rem; }
.contact-method {
  display: flex; gap: 0.9rem; align-items: flex-start;
  padding: 1.1rem 1.2rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.contact-method .icon {
  flex: 0 0 auto; width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1.5px solid var(--accent); color: var(--accent);
  border-radius: var(--radius-sm);
}
.contact-method h3 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.contact-method a {
  color: var(--accent); font-weight: 700;
  word-break: break-all;
}
.contact-method a:hover { text-decoration: underline; }
.contact-method p { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }

/* ---------- CTA strip (bottom of every page) ---------- */
.cta-strip {
  background: linear-gradient(135deg, var(--surface) 0%, #07070A 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.cta-strip h2 {
  max-width: 760px; margin: 0 auto 0.85rem;
}
.cta-strip h2 span { color: var(--accent); }
.cta-strip p { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.88rem;
}
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
}
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .pillars,
  .builds,
  .steps,
  .values,
  .hero-split,
  .contact-grid { grid-template-columns: 1fr; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(0, 0, 0, 0.96);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform 0.25s ease;
    padding: 0.5rem 0;
  }
  .nav-list.is-open { transform: translateY(0); }
  .nav-list a {
    display: block; padding: 0.95rem var(--pad);
    border-bottom: 1px solid var(--border);
  }
  .nav-list a.is-active { border-bottom-color: var(--border); background: var(--surface); }
  .nav-cta { display: none; }
}

@media (max-width: 560px) {
  .aios-agents { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .footer-inner { justify-content: center; text-align: center; }
}

/* ---------- Hero circuit background (homepage only) ---------- */
/* Sits behind the hero content, in front of the hero gradient overlay.
   Stays inside .hero (overflow: hidden) so it never escapes the section.
   Subtle by design — meant to compliment, not compete. */
.circuit-bg {
  position: absolute;
  /* Oversized vertically so the parallax translate never shows an edge.
     Hero has overflow: hidden, so the bleed gets clipped cleanly.
     Bleed (±220px) must exceed JS CLAMP (±200px) by a small margin. */
  inset: -220px 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.75;
  transform: translate3d(0, var(--circuit-y, 0px), 0);
  will-change: transform;
}
.circuit-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}
.circuit-bg .trace {
  fill: none;
  stroke: rgba(0, 212, 255, 0.18);
  stroke-width: 1;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.circuit-bg .node {
  fill: rgba(0, 212, 255, 0.45);
}
.circuit-bg .node-glow {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
  animation: circuit-node-pulse 4s ease-in-out infinite;
  transform-origin: center;
}
.circuit-bg .pulse {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 4 100;
  stroke-dashoffset: 100;
  filter: drop-shadow(0 0 6px var(--accent));
  opacity: 0;
  animation: circuit-pulse-flow 4s linear infinite;
}
.circuit-bg .pulse-2 { animation-delay: 1s; }
.circuit-bg .pulse-3 { animation-delay: 2s; }
.circuit-bg .pulse-4 { animation-delay: 3s; }

/* Make sure hero content always sits above the circuit layer */
.hero-grid { z-index: 1; }

@keyframes circuit-pulse-flow {
  0%   { stroke-dashoffset: 100; opacity: 0; }
  6%   { opacity: 1; }
  94%  { opacity: 1; }
  100% { stroke-dashoffset: -4; opacity: 0; }
}
@keyframes circuit-node-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}

/* Phones / small tablets: kill parallax so we never battle touch scroll
   or chew battery. JS also gates on (pointer: coarse), this is the
   belt-and-suspenders CSS reset. */
@media (max-width: 768px) {
  .circuit-bg {
    inset: 0;
    transform: none;
    will-change: auto;
  }
}

@media (max-width: 560px) {
  .circuit-bg { opacity: 0.55; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
  .circuit-bg {
    transform: none;
    will-change: auto;
  }
  .circuit-bg .pulse { opacity: 0.6; stroke-dashoffset: 50; }
  .circuit-bg .node-glow { opacity: 0.7; }
}

/* ============================================================
   SAMPLES PAGE — grid breathing room + clickable card CTA
   Added 2026-04-29 with per-agent detail pages (samples/*.html)
   ============================================================ */

/* Tighten the gap between the samples hero and the card grid.
   Was inline padding-top:0 (cards touched the hero). Spec is "20px or so"
   of breathing room — 1.25rem == 20px. */
.samples-section { padding-top: 1.25rem; }

/* Cards on samples.html are now <a> elements that link to per-agent pages.
   Inherit color/text-decoration is already handled globally; this just
   teaches the card it is a link and gives a hover affordance for the CTA. */
a.sample { cursor: pointer; }
.sample-cta {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  transition: transform 0.2s ease;
}
.sample:hover .sample-cta { transform: translateX(3px); }

/* ============================================================
   PER-AGENT DEMO — shared component library
   Added 2026-04-29 — used by samples/*.html pages.

   Architecture:
   - .demo               = section wrapper
   - .demo-stage         = positioning context for frame + dots
   - .demo-frame         = stylized "device/window" chrome
   - .demo-screens       = grid stack of steps (CSS grid overlay technique)
   - .demo-step          = each individual step (one shown at a time)
   - .demo-progress      = clickable dot indicators
   - mock UI components  = chat bubbles, KPI cards, calendar slots, etc.

   Slideshow technique: all steps share grid cell 1/1 so the parent sizes
   to the tallest step automatically. Active step is opacity:1 + visible,
   inactive are opacity:0 + visibility:hidden. Smooth crossfade.

   Internal "moving parts" (typing cursor, pulse dots, thinking dots,
   click cursor) are CSS-only animations baked into each step's HTML.
   They run continuously regardless of which step is active — JS only
   controls which step is visible.

   Reduced-motion: the global prefers-reduced-motion rule already kills
   animations (line ~635). The slideshow JS also exposes all steps
   stacked when reduced motion is on (see initDemo in main.js).
   ============================================================ */

/* ---------- Section + intro ---------- */
.demo { padding-top: clamp(2.5rem, 6vw, 4.5rem); }
.demo-head {
  max-width: 720px; margin: 0 auto 2.5rem; text-align: center;
}
.demo-head h2 { margin-bottom: 0.85rem; }
.demo-head p  { color: var(--muted); font-size: 1.05rem; }

/* ---------- Stage + frame ---------- */
.demo-stage {
  max-width: 760px; margin: 0 auto;
  position: relative;
}
.demo-frame {
  position: relative;
  background: linear-gradient(180deg, var(--surface), #08080B);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.demo-frame-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(0,0,0,0.45);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem; color: var(--muted);
  letter-spacing: 0.06em;
}
.demo-frame-bar .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
}
.demo-frame-bar .dot:first-child { background: var(--accent); }
.demo-frame-title {
  margin-left: 0.65rem;
  text-transform: uppercase; letter-spacing: 0.14em;
}
.demo-frame-tag {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--accent);
  font-family: var(--font-mono); font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.16em;
}
.demo-frame-tag::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-glow); }
  50%      { box-shadow: 0 0 0 6px rgba(0,212,255,0.05); }
}

/* ---------- Screens (grid stack) ---------- */
.demo-screens {
  display: grid;
  position: relative;
  padding: 1.5rem;
}
.demo-step {
  grid-column: 1; grid-row: 1;
  opacity: 0; visibility: hidden;
  transition: opacity 0.45s ease;
}
.demo-step.is-active { opacity: 1; visibility: visible; }

.step-label {
  display: block;
  font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.9rem;
}
.step-label strong {
  color: var(--accent); font-weight: 700; margin-right: 0.4rem;
}

/* ---------- Progress dots ---------- */
.demo-progress {
  display: flex; justify-content: center; gap: 0.6rem;
  margin-top: 1.4rem;
}
.demo-dot {
  width: 36px; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.15);
  border: none; padding: 0; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.demo-dot:hover { background: rgba(255,255,255,0.3); }
.demo-dot:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.demo-dot.is-active { background: var(--accent); }

/* ============================================================
   MOCK UI COMPONENTS — used inside .demo-step
   ============================================================ */

/* ---------- Chat window (used by Front Desk, Reviews, Knowledge) ---------- */
.chat-window {
  display: flex; flex-direction: column; gap: 0.75rem;
  min-height: 320px;
}
.chat-row {
  display: flex; flex-direction: column; max-width: 80%;
}
.chat-row.from-customer { align-self: flex-start; align-items: flex-start; }
.chat-row.from-agent    { align-self: flex-end;   align-items: flex-end; }
.chat-meta {
  font-family: var(--font-mono); font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.chat-bubble {
  padding: 0.75rem 1rem;
  border-radius: 14px;
  font-size: 0.92rem; line-height: 1.45;
  border: 1px solid var(--border);
}
.from-customer .chat-bubble {
  background: var(--surface-2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.from-agent .chat-bubble {
  background: rgba(0,212,255,0.10);
  color: var(--text);
  border-color: rgba(0,212,255,0.30);
  border-bottom-right-radius: 4px;
}

/* ---------- Typing indicator (3 pulsing dots) ---------- */
.typing-dots {
  display: inline-flex; gap: 5px; padding: 0.55rem 0.9rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 14px; border-bottom-left-radius: 4px;
}
.typing-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  animation: typing-bounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* ---------- Blinking text cursor (end of typed line) ---------- */
.blink-cursor::after {
  content: "▋";
  display: inline-block;
  margin-left: 2px;
  color: var(--accent);
  animation: cursor-blink 1.05s steps(2) infinite;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ---------- Animated click cursor (mouse pointer) ---------- */
/* Triangle/arrow drawn in CSS that animates toward a target button.
   Used to show "the agent clicks send / books / etc." */
.click-cursor {
  position: absolute;
  width: 18px; height: 22px;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
  animation: cursor-fly 4s ease-in-out infinite;
}
.click-cursor svg { width: 100%; height: 100%; display: block; }
@keyframes cursor-fly {
  0%   { transform: translate(0, 0) scale(1); opacity: 0; }
  20%  { opacity: 1; }
  60%  { transform: translate(var(--cur-x, 80px), var(--cur-y, -10px)) scale(1); opacity: 1; }
  68%  { transform: translate(var(--cur-x, 80px), var(--cur-y, -10px)) scale(0.85); }
  76%  { transform: translate(var(--cur-x, 80px), var(--cur-y, -10px)) scale(1); }
  100% { transform: translate(var(--cur-x, 80px), var(--cur-y, -10px)) scale(1); opacity: 0; }
}

/* ---------- Lead intake card (Lead Follow-Up, Quote) ---------- */
.lead-card {
  padding: 1.1rem 1.2rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.lead-card .lead-source {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--accent); letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 0.5rem; display: block;
}
.lead-card h4 { font-size: 1rem; margin-bottom: 0.3rem; }
.lead-card .lead-meta {
  display: flex; flex-wrap: wrap; gap: 0.85rem;
  margin-top: 0.6rem;
  color: var(--muted); font-size: 0.82rem;
}
.lead-card .lead-meta span {
  display: inline-flex; align-items: center; gap: 0.35rem;
}
.lead-card .lead-note {
  margin-top: 0.7rem; padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
  color: var(--muted); font-size: 0.88rem; line-height: 1.5;
}

/* ---------- KPI grid (Daily Operations, Reporting) ---------- */
.kpi-grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(3, 1fr);
}
.kpi-card {
  padding: 0.95rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.kpi-card .kpi-label {
  font-family: var(--font-mono); font-size: 0.66rem;
  color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase;
  display: block; margin-bottom: 0.35rem;
}
.kpi-card .kpi-value {
  font-size: 1.4rem; font-weight: 800; color: var(--text); line-height: 1;
}
.kpi-card .kpi-delta {
  display: inline-block; margin-top: 0.4rem;
  font-size: 0.78rem; font-weight: 600;
}
.kpi-card .kpi-delta.up   { color: var(--accent); }
.kpi-card .kpi-delta.down { color: #FF6B6B; }

/* ---------- Briefing list (Daily Operations) ---------- */
.briefing-list { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 1rem; }
.briefing-item {
  display: flex; gap: 0.7rem; align-items: flex-start;
  padding: 0.7rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
}
.briefing-item .icon {
  flex: 0 0 auto; width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-glow); color: var(--accent);
  font-size: 0.72rem; font-weight: 800;
}
.briefing-item .briefing-meta {
  display: block; color: var(--muted); font-size: 0.76rem;
  margin-top: 0.15rem;
}

/* ---------- Calendar / time slot grid (Scheduler) ---------- */
.slot-day-head {
  display: flex; align-items: baseline; gap: 0.7rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed var(--border);
}
.slot-day-head h4 { font-size: 1rem; }
.slot-day-head .slot-day-meta {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase;
}
.slot-grid {
  display: grid; gap: 0.55rem;
  grid-template-columns: repeat(4, 1fr);
}
.slot {
  padding: 0.7rem 0.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.85rem; font-weight: 600;
  color: var(--text);
}
.slot.is-taken { color: var(--muted); text-decoration: line-through; opacity: 0.55; }
.slot.is-selected {
  background: rgba(0,212,255,0.18);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ---------- Confirmed booking card (Scheduler) ---------- */
.booking-card {
  padding: 1.1rem 1.2rem;
  background: rgba(0,212,255,0.06);
  border: 1px solid rgba(0,212,255,0.30);
  border-radius: var(--radius-sm);
}
.booking-card .booking-status {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--accent); letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.booking-card .booking-status::before {
  content: "✓"; display: inline-grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #000;
  font-size: 0.7rem; font-weight: 800;
}
.booking-card h4 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.booking-card .booking-meta {
  margin-top: 0.5rem; color: var(--muted); font-size: 0.85rem;
}

/* ---------- Quote document mock (Quote agent) ---------- */
.quote-doc {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem;
}
.quote-doc-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 0.75rem; margin-bottom: 0.85rem;
  border-bottom: 1px dashed var(--border);
}
.quote-doc-head h4 { font-size: 1rem; }
.quote-doc-head .quote-num {
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--muted); letter-spacing: 0.12em;
}
.quote-line {
  display: flex; justify-content: space-between; gap: 0.85rem;
  padding: 0.5rem 0;
  font-size: 0.88rem;
}
.quote-line + .quote-line { border-top: 1px dashed var(--border); }
.quote-line .quote-desc { color: var(--text); }
.quote-line .quote-amt  { color: var(--text); font-weight: 600; }
.quote-total {
  display: flex; justify-content: space-between;
  margin-top: 0.85rem; padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 1rem; font-weight: 800;
}
.quote-total .quote-amt { color: var(--accent); }
.quote-doc-actions {
  display: flex; gap: 0.5rem; margin-top: 1rem;
}
.quote-mini-btn {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}
.quote-mini-btn.is-primary {
  background: var(--accent); color: #000; border-color: var(--accent);
  position: relative;
}

/* ---------- Q&A / knowledge result card (Knowledge agent) ---------- */
.kb-result {
  padding: 1rem 1.15rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.kb-result .kb-source {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.5rem; display: block;
}
.kb-result h4 { font-size: 0.95rem; margin-bottom: 0.45rem; }
.kb-result p  { color: var(--muted); font-size: 0.88rem; line-height: 1.55; }

/* Knowledge "searching" loader */
.kb-search {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.65rem 0.95rem;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--muted); letter-spacing: 0.08em;
}
.kb-search-spin {
  width: 12px; height: 12px;
  border: 2px solid rgba(0,212,255,0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: kb-spin 0.9s linear infinite;
}
@keyframes kb-spin {
  to { transform: rotate(360deg); }
}

/* ---------- Review card (Reviews agent) ---------- */
.review-card {
  padding: 1.1rem 1.2rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.review-head {
  display: flex; align-items: center; gap: 0.7rem;
  margin-bottom: 0.5rem;
}
.review-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #000; display: grid; place-items: center;
  font-weight: 800; font-size: 0.85rem;
}
.review-name { font-weight: 700; font-size: 0.92rem; }
.review-source {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--muted); letter-spacing: 0.12em;
}
.stars { display: inline-flex; gap: 2px; color: var(--accent); margin-bottom: 0.4rem; }
.stars span { font-size: 0.95rem; }
.review-body { color: var(--text); font-size: 0.9rem; line-height: 1.5; }
.review-reply {
  margin-top: 0.85rem; padding: 0.7rem 0.95rem;
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.25);
  border-radius: var(--radius-sm);
}
.review-reply .reply-from {
  font-family: var(--font-mono); font-size: 0.68rem;
  color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 0.3rem; display: block;
}
.review-reply p { font-size: 0.85rem; color: var(--text); line-height: 1.5; }

/* ---------- Anomaly / alert card (Reporting agent) ---------- */
.alert-card {
  padding: 1.1rem 1.2rem;
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(0,212,255,0.02));
  border: 1px solid rgba(0,212,255,0.30);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.alert-card .alert-flag {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--accent); letter-spacing: 0.16em; text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.alert-card .alert-flag::before {
  content: "!"; display: inline-grid; place-items: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: #000;
  font-size: 0.78rem; font-weight: 800;
}
.alert-card h4 { font-size: 1rem; margin-bottom: 0.35rem; }
.alert-card p  { color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.alert-card .alert-action {
  margin-top: 0.7rem; padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem; color: var(--text);
}
.alert-card .alert-action strong { color: var(--accent); }

/* ---------- Mini sparkline (Reporting agent) ---------- */
.sparkline {
  display: block; width: 100%; height: 60px;
  margin: 0.6rem 0 0.4rem;
}
.sparkline path { fill: none; stroke: var(--accent); stroke-width: 2; }
.sparkline .spark-fill { fill: rgba(0,212,255,0.10); stroke: none; }
.sparkline .spark-pulse {
  fill: var(--accent);
  filter: drop-shadow(0 0 6px var(--accent));
  animation: live-pulse 1.6s ease-in-out infinite;
}

/* ---------- Tool sync row (Daily Operations step 1) ---------- */
.sync-row {
  display: flex; flex-wrap: wrap; gap: 0.55rem;
  margin-top: 0.75rem;
}
.sync-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem; color: var(--text);
}
.sync-pill::before {
  content: "✓"; width: 16px; height: 16px;
  display: inline-grid; place-items: center;
  background: var(--accent); color: #000;
  border-radius: 50%; font-size: 0.65rem; font-weight: 800;
}
.sync-pill.is-pending::before {
  content: ""; background: transparent;
  border: 2px solid rgba(0,212,255,0.25); border-top-color: var(--accent);
  animation: kb-spin 0.9s linear infinite;
}

/* ---------- Sequence list (Lead Follow-Up step 3) ---------- */
.sequence {
  display: flex; flex-direction: column; gap: 0.55rem;
}
.sequence-item {
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: 0.75rem 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
}
.sequence-item.is-done { opacity: 0.65; }
.sequence-item .seq-day {
  flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 0.66rem;
  color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase;
  min-width: 56px;
}
.sequence-item .seq-body { flex: 1; line-height: 1.45; }
.sequence-item.is-booked {
  background: rgba(0,212,255,0.10);
  border-color: rgba(0,212,255,0.30);
}
.sequence-item.is-booked .seq-day { color: var(--accent); }

/* ---------- Per-agent benefit cards (small 3-up) ---------- */
.agent-benefits {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 1.5rem;
}
.benefit {
  padding: 1.5rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.benefit h3 {
  font-size: 1rem; color: var(--accent); margin-bottom: 0.5rem;
}
.benefit p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* ---------- Compact agent hero (per-agent pages) ---------- */
.agent-hero { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.agent-hero .eyebrow + h1 { margin-bottom: 1rem; }
.agent-hero p.lead {
  color: var(--muted); font-size: 1.1rem; max-width: 60ch;
}
.agent-back {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono); font-size: 0.74rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s ease;
}
.agent-back:hover { color: var(--accent); }

/* ---------- Demo responsive ---------- */
@media (max-width: 640px) {
  .demo-screens { padding: 1rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .slot-grid { grid-template-columns: repeat(3, 1fr); }
  .chat-row { max-width: 92%; }
  .agent-benefits { grid-template-columns: 1fr; }
  .demo-frame-title { display: none; }
}
@media (max-width: 960px) {
  .agent-benefits { grid-template-columns: 1fr; gap: 0.85rem; }
}
