/* ===================================================================
   Aurora — Blueprint redesign (Direction A)
   Scoped to .navbar and .hero. Loads AFTER style.css and overrides
   only nav + hero so mid-page sections keep their current styling
   until they are migrated. See DESIGN.md.
   =================================================================== */

:root {
  /* Surfaces */
  --bp-bg: #fafbfc;
  --bp-surface-1: #ffffff;
  --bp-surface-2: #f4f6f8;

  /* Text */
  --bp-ink: #14171c;
  --bp-text: #2c3138;
  --bp-text-muted: #565e68;
  --bp-text-subtle: #8a929c;

  /* Lines */
  --bp-grid: #e7eaee;
  --bp-border: #dde1e6;

  /* Signal (true blue, hue 256 — NOT indigo) */
  --bp-signal: #1257e0;
  --bp-signal-700: #0e45b0;
  --bp-signal-50: #eef3fe;

  /* Diagram-only accents */
  --bp-secure: #0e9e8a;
  --bp-stop: #d14343;

  /* Type */
  --bp-font-sans: "Geist", "Söhne", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bp-font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --bp-text-hero: clamp(2.5rem, 1.6rem + 4.2vw, 4.25rem);
  --bp-text-lead: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  --bp-text-mono: 0.8125rem;
  --bp-text-mono-cap: 0.6875rem;

  /* Shape */
  --bp-r-sm: 6px;
  --bp-r: 8px;
  --bp-r-panel: 10px;
  --bp-r-lg: 12px;
  --bp-shadow-panel: 0 1px 2px rgba(20, 23, 28, .04), 0 8px 24px -12px rgba(20, 23, 28, .10);

  /* Easing */
  --bp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Navbar ---------- */
.navbar {
  background: rgba(250, 251, 252, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--bp-ease), background .3s var(--bp-ease);
}
.navbar.scrolled {
  border-bottom-color: var(--bp-border);
}
.navbar .nav-wrapper {
  height: 64px;
}
.navbar .logo {
  gap: 9px;
}
.navbar .logo .logo-mark {
  width: 26px;
  height: 26px;
}
.navbar .logo span {
  font-family: var(--bp-font-sans);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--bp-ink);
}
.navbar .nav-links a {
  font-family: var(--bp-font-sans);
  font-weight: 450;
  font-size: 0.9375rem;
  letter-spacing: -0.005em;
  color: var(--bp-text-muted);
  transition: color .18s var(--bp-ease);
}
.navbar .nav-links a:hover {
  color: var(--bp-ink);
}
/* Nav CTA — scoped so other .btn-secondary uses are untouched */
.navbar .nav-links a.btn-secondary {
  background: var(--bp-signal);
  color: #fff;
  border: none;
  border-radius: var(--bp-r);
  padding: 0.5rem 0.95rem;
  font-weight: 500;
  box-shadow: none;
}
.navbar .nav-links a.btn-secondary:hover {
  background: var(--bp-signal-700);
  color: #fff;
}
.navbar .language-switcher .lang-btn {
  font-family: var(--bp-font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--bp-text-subtle);
}
.navbar .language-switcher .lang-btn.active {
  color: var(--bp-ink);
}
.navbar .language-switcher .lang-separator {
  color: var(--bp-border);
}
.navbar .mobile-menu-toggle {
  color: var(--bp-ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--bp-bg);
  padding: clamp(96px, 12vh, 150px) 0 clamp(72px, 10vh, 120px);
  overflow: hidden;
  isolation: isolate;
}
/* Structural blueprint grid, faded toward edges, never behind body text */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--bp-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--bp-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(120% 90% at 70% 0%, #000 35%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 70% 0%, #000 35%, transparent 78%);
  opacity: .7;
}
/* Kill the old gradient orbs from style.css */
.hero .hero-background,
.hero .gradient-orb {
  display: none !important;
}

.hero .hero-content {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}
.hero .hero-text { max-width: 36rem; }

/* Mono kicker (single, deliberate) */
.hero .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 22px;
  font-family: var(--bp-font-mono);
  font-size: var(--bp-text-mono-cap);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bp-text-muted);
}
.hero .hero-badge i { display: none; }
.hero .hero-badge::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--bp-signal);
  border-radius: 1px;
}

.hero .hero-headline {
  font-family: var(--bp-font-sans);
  font-weight: 600;
  font-size: var(--bp-text-hero);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--bp-ink);
  text-wrap: balance;
  margin: 0 0 20px;
}
/* Neutralize any leftover gradient-text span */
.hero .hero-headline .gradient-text {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: var(--bp-signal) !important;
  color: var(--bp-signal) !important;
}

.hero .hero-subheadline {
  font-family: var(--bp-font-sans);
  font-size: var(--bp-text-lead);
  line-height: 1.5;
  color: var(--bp-text);
  max-width: 40ch;
  text-wrap: pretty;
  margin: 0 0 28px;
}

/* Trust chips (reuses .hero-features / .hero-feature markup) */
.hero .hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 34px;
}
.hero .hero-feature {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--bp-font-mono);
  font-size: var(--bp-text-mono);
  letter-spacing: 0.01em;
  color: var(--bp-text-muted);
}
.hero .hero-feature i { display: none; }
.hero .hero-feature::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--bp-signal);
  border-radius: 1px;
  flex: none;
}

/* CTAs */
.hero .hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .hero-cta .btn-primary,
.hero .hero-cta .btn-outline {
  font-family: var(--bp-font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: var(--bp-r);
  padding: 0.72rem 1.15rem;
  letter-spacing: -0.005em;
  transition: background .18s var(--bp-ease), border-color .18s var(--bp-ease), transform .18s var(--bp-ease);
}
.hero .hero-cta .btn-primary {
  background: var(--bp-signal);
  color: #fff;
  border: 1px solid var(--bp-signal);
  box-shadow: none;
}
.hero .hero-cta .btn-primary:hover {
  background: var(--bp-signal-700);
  border-color: var(--bp-signal-700);
  transform: translateY(-1px);
}
.hero .hero-cta .btn-primary i {
  transition: transform .18s var(--bp-ease);
}
.hero .hero-cta .btn-primary:hover i { transform: translateX(3px); }
.hero .hero-cta .btn-outline {
  background: transparent;
  color: var(--bp-ink);
  border: 1px solid var(--bp-border);
}
.hero .hero-cta .btn-outline:hover {
  border-color: var(--bp-ink);
  background: transparent;
}

/* ---------- Blueprint diagram (hero visual) ---------- */
.hero .hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero .architecture-diagram { display: none; } /* old vertical icon diagram */

.bp-diagram {
  width: 100%;
  max-width: 420px;
  margin: 0;
  padding: 24px 22px 18px;
  background: var(--bp-surface-1);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-r-lg);
  box-shadow: var(--bp-shadow-panel);
}
.bp-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.bp-node {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--bp-surface-1);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-r-panel);
}
.bp-node__tag {
  font-family: var(--bp-font-mono);
  font-size: var(--bp-text-mono-cap);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--bp-text-subtle);
}
.bp-node__name {
  font-family: var(--bp-font-sans);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--bp-ink);
}
.bp-node__sub,
.bp-node__sample {
  font-family: var(--bp-font-mono);
  font-size: var(--bp-text-mono);
  color: var(--bp-text-muted);
}
.bp-node--secure {
  border-color: color-mix(in srgb, var(--bp-secure) 45%, var(--bp-border));
  box-shadow: inset 3px 0 0 var(--bp-secure);
}
.bp-node--secure .bp-node__tag { color: var(--bp-secure); }
.bp-node--ext {
  background: var(--bp-surface-2);
  border-style: dashed;
}
.bp-node--ext .bp-node__name { color: var(--bp-text); }
.bp-node__sample s { color: var(--bp-stop); text-decoration-thickness: 1px; }

/* request-path connector — chevron step (centered, aligned, no box/text overlap) */
.bp-diagram .bp-step {
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.bp-step__chev {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border-right: 1px solid var(--bp-text-subtle);
  border-bottom: 1px solid var(--bp-text-subtle);
}
.bp-step__label {
  font-family: var(--bp-font-mono);
  font-size: var(--bp-text-mono-cap);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bp-text-muted);
  text-align: center;
  white-space: nowrap;
}
/* encrypted hop (Cortex → Nexus) reads secure */
.bp-step--secure .bp-step__chev { border-color: var(--bp-secure); }
.bp-step--secure .bp-step__label { color: var(--bp-secure); }

/* the one critical annotation */
.bp-boundary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  font-family: var(--bp-font-mono);
  font-size: var(--bp-text-mono-cap);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bp-stop);
}
.bp-boundary::before,
.bp-boundary::after {
  content: "";
  flex: 1;
  height: 0;
  border-top: 1px dashed color-mix(in srgb, var(--bp-stop) 55%, transparent);
}

.bp-diagram figcaption {
  margin-top: 14px;
  font-family: var(--bp-font-mono);
  font-size: var(--bp-text-mono-cap);
  letter-spacing: 0.03em;
  color: var(--bp-text-subtle);
  text-align: center;
}

/* ---------- Hero diagram: local-first multi-LLM orchestration (fan-out) ---------- */
.bp-diagram .o1 { display: flex; flex-direction: column; gap: 14px; }
.bp-diagram .o1-edge { display: flex; flex-direction: column; align-items: center; gap: 5px; min-height: 30px; justify-content: center; }
.bp-diagram .o1-chev { width: 8px; height: 8px; transform: rotate(45deg); border-right: 1px solid var(--bp-text-subtle); border-bottom: 1px solid var(--bp-text-subtle); }
.bp-diagram .o1-elabel { font-family: var(--bp-font-mono); font-size: var(--bp-text-mono-cap); letter-spacing: 0.05em; text-transform: uppercase; color: var(--bp-text-muted); text-align: center; }
.bp-diagram .o1-fan__label { display: block; text-align: center; margin: 6px 0 10px; font-family: var(--bp-font-mono); font-size: var(--bp-text-mono-cap); letter-spacing: 0.05em; text-transform: uppercase; color: var(--bp-text-muted); }
.bp-diagram .o1-models { list-style: none; margin: 0; padding: 0 0 0 20px; position: relative; display: flex; flex-direction: column; gap: 8px; }
.bp-diagram .o1-models::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 16px; width: 1px; background: var(--bp-border); }
.bp-diagram .o1-model { position: relative; }
.bp-diagram .o1-model::before { content: ""; position: absolute; left: -14px; top: 19px; width: 10px; height: 1px; background: var(--bp-border); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .hero-content {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .hero .hero-text { max-width: 100%; text-align: left; }
  .hero .hero-headline,
  .hero .hero-subheadline { text-align: left; }
  .hero .hero-subheadline { max-width: 52ch; }
  .hero .hero-visual { justify-content: flex-start; }
  .bp-diagram { max-width: 460px; }
}
@media (max-width: 520px) {
  .bp-diagram { padding: 20px 16px 14px; }
  .hero .hero-cta .btn-primary,
  .hero .hero-cta .btn-outline { width: 100%; justify-content: center; }
}

/* Override the runtime-injected .navbar.scrolled (higher specificity wins
   over main.js's appended <style>): blueprint uses a hairline, not a heavy shadow */
body .navbar.scrolled {
  box-shadow: none;
  background: rgba(250, 251, 252, .9);
  border-bottom-color: var(--bp-border);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero .hero-cta .btn-primary,
  .hero .hero-cta .btn-primary:hover,
  .hero .hero-cta .btn-primary i { transition: none; transform: none; }
  /* hero entrance fades: show immediately, no animation */
  .hero .fade-in,
  .hero .fade-in-delay-1,
  .hero .fade-in-delay-2,
  .hero .fade-in-delay-3,
  .hero .fade-in-delay-4 { animation: none !important; opacity: 1 !important; }
}
