/* ===========================================================
   LOCKED BRAND PALETTE — DARK THEME
   Same palette, flipped: Ink deep is now the page, Paper is now
   the text. Navy becomes the elevated/contrast surface (lighter
   than the page, the correct direction for dark-mode elevation).
   Blue is unchanged either way, it was built to pop on dark.
   Red #D64045, Sky #9ED8DB, Mint #E9FFF9 stay reserved, inside the
   demo animations only, untouched by this flip.
   =========================================================== */
:root {
  --color-bg: #0F1F33;         /* Ink deep — the page */
  --color-bg-dark: #1D3354;    /* Navy — elevated sections (Sneak Peek, Final CTA) */
  --color-sunken: #16283F;     /* between Ink deep and Navy — alternating bands */
  --color-text: #FCFCFA;       /* Paper — main text */
  --color-text-light: #FCFCFA; /* Paper — text on accent/elevated fills */
  --color-accent: #1F77FF;     /* Blue — unchanged, pops on dark */
  --color-accent-light: #2C4E7C; /* Blue mixed lighter — needs to read as a distinct tile against Navy/Ink deep, not blend in */
  --color-border: rgba(252,252,250,0.14);
  --color-muted: #AFC0DB;
  --color-muted-on-dark: #AFC0DB;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max-width: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* 100vw includes scrollbar width; without this, full-bleed elements
   (.hero-bleed, anything using left:50%;margin-left:-50vw) cause a
   phantom horizontal scroll. */
html { overflow-x: hidden; }

/* Anchor targets need room so the sticky header doesn't cover their top
   edge when a nav link scrolls to them. */
#demo, #services, #process, #contact {
  scroll-margin-top: 96px;
}

/* Breaks an element out of its parent's max-width container to run
   edge to edge. Works nested inside .container since it escapes via
   negative margin, not by walking up the DOM. */
.hero-bleed {
  position: relative;
  left: 50%;
  margin-left: -50vw;
  width: 100vw;
}

/* Reusable ambient glow. Drop <span class="bleed-glow"></span> as the
   first child of any position:relative section for the same soft light
   behind its content. Reads as a glow mainly on dark backgrounds. */
.bleed-glow {
  position: absolute;
  top: 0;
  left: 50%;
  width: 900px;
  height: 900px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 20%, transparent) 0%, transparent 66%);
  pointer-events: none;
  z-index: 0;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px; }
h3 { font-size: 1.2rem; margin-bottom: 8px; }

a { color: inherit; text-decoration: none; }

section { padding: 72px 0; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.section-sub { color: var(--color-muted); margin-bottom: 32px; max-width: 560px; }

/* HEADER */
.site-header {
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.logo { font-weight: 700; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { height: 22px; width: auto; display: block; }
.nav { display: flex; gap: 24px; }
.nav a { font-size: 0.95rem; }

/* BUTTONS */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn-small { padding: 10px 20px; font-size: 0.9rem; }
.btn-primary { background: var(--color-accent); color: var(--color-text-light); }
.btn-secondary { background: transparent; border: 1px solid var(--color-border); color: var(--color-text); }

/* HERO */
.hero {
  text-align: center;
  padding: 96px 0 72px;
}
.hero-sub {
  max-width: 620px;
  margin: 20px auto 0;
  font-size: 1.1rem;
  color: var(--color-muted);
}
.hero-top-cta { display: inline-block; margin-top: 28px; }
.hero-ctas { margin-top: 32px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-proof { margin-top: 20px; font-size: 0.9rem; color: var(--color-muted); }
/* Hero embed (#hx) is styled inline in index.html, it's a self-contained
   drop-in component with a fixed-height band (clamp) that covers and crops,
   wrapped in .hero-bleed above to run edge to edge. */

/* THE PROBLEM */
.problem { background: var(--color-sunken); }
.problem-compare {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  margin-top: 40px;
}
.problem-panel { text-align: center; }
/* #nb and #ai embeds are styled inline in index.html, self-contained drop-in components */
.problem-caption { font-size: 0.9rem; color: var(--color-muted); margin-top: 16px; }

/* DEMO
   Section is tuned to fit inside one screen on typical desktop/laptop
   viewports: tighter padding than the default section, and the iframe
   height below is viewport-relative (vh) instead of a flat px value. */
.demo { background: var(--color-bg-dark); color: var(--color-text-light); padding: 40px 0 32px; }
.demo .eyebrow { color: var(--color-accent); margin-bottom: 4px; }
.demo h2 { margin-bottom: 6px; }
.demo .section-sub { color: var(--color-muted-on-dark); margin-bottom: 20px; }
.demo-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.demo-tab {
  background: transparent;
  border: 1px solid rgba(252,252,250,0.3);
  color: var(--color-text-light);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  flex: none;
}
.demo-tab.active { background: var(--color-accent); border-color: var(--color-accent); }
.demo-panel { display: none; }
.demo-panel.active { display: block; }

/* Voice AI demo — self-contained page embedded via iframe, see voice-ai-demo.html.
   Height is a vh-based budget, not a flat px value, so the card (tabs +
   animation + caption) has a real shot at fitting one screen instead of
   always reserving a fixed 680px regardless of how tall the viewport is.
   The demo page itself letterbox-fits its content into whatever height
   it's given, so nothing scrolls or clips inside the iframe either way. */
.voice-embed { width: 100%; }
.voice-embed iframe {
  width: 100%;
  height: clamp(360px, 58vh, 620px);
  border: none;
  border-radius: 12px;
  display: block;
}
.demo p { font-size: 0.95rem; margin-top: 4px; }
@media (max-width: 640px) {
  .demo-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin-left: -24px; margin-right: -24px; padding: 0 24px 4px; }
  .demo-tabs::-webkit-scrollbar { display: none; }
  .voice-embed iframe { height: clamp(460px, 72vh, 680px); }
}


/* FINAL CTA */
.final-cta {
  text-align: center;
  padding: 88px 24px;
}
.final-cta p {
  color: var(--color-muted);
  margin: 12px auto 28px;
  max-width: 480px;
}

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 24px 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .header-inner { flex-wrap: wrap; row-gap: 10px; }
  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    font-size: 0.85rem;
  }
  section { padding: 48px 0; }
}
