/* ============================================================
   BGE — bge-main.css
   CSS Variables + Reset (scoped to .bge-scope)
   Brand Guru Engine | Updated August 2026 — Official BGE Brand Identity
   ============================================================ */

/* --------------------------------------------------------
   1. BGE DESIGN TOKENS — scoped to .bge-scope
   Official brand colors from confirmed BGE logo identity.
   -------------------------------------------------------- */
.bge-scope {
  /* === BGE OFFICIAL BRAND COLORS === */
  --bge-navy:               #1B2A4A;   /* Primary background — deep navy */
  --bge-navy-deep:          #0F1D35;   /* Darker surfaces */
  --bge-gold:               #C9A84C;   /* Accent — bars, tagline, highlights */
  --bge-gold-light:         #E8C96D;   /* Hover states */
  --bge-white:              #FFFFFF;   /* Primary text */
  --bge-white-soft:         #E8EDF4;   /* Secondary text */

  /* Surfaces — mapped to official brand */
  --color-bg-primary:       #1B2A4A;   /* BGE navy */
  --color-bg-secondary:     #0F1D35;   /* Deeper navy */
  --color-bg-card:          #162238;   /* Card surface — between primary and deep */
  --color-bg-hero:          #1B2A4A;
  --color-bg-section-alt:   #0F1D35;
  --color-bg-footer:        #0A1526;

  /* Gold — BGE warm gold */
  --color-gold:             #C9A84C;
  --color-gold-light:       #E8C96D;
  --color-gold-soft:        rgba(201, 168, 76, 0.15);
  --color-gold-30:          rgba(201, 168, 76, 0.30);
  --color-gold-glow:        rgba(201, 168, 76, 0.12);

  /* Typography */
  --color-text-primary:     #FFFFFF;   /* Pure white */
  --color-text-secondary:   #E8EDF4;   /* Soft white */
  --color-text-muted:       #8FA3C0;   /* Muted blue-grey */
  --color-text-gold:        #C9A84C;

  /* CTA */
  --color-cta-bg:           #C9A84C;
  --color-cta-text:         #0F1D35;
  --color-cta-hover:        #E8C96D;

  /* Borders */
  --color-border:           rgba(255, 255, 255, 0.08);
  --color-border-gold:      rgba(201, 168, 76, 0.40);

  /* Radius */
  --radius-card:            8px;
  --radius-button:          6px;

  /* Spacing */
  --space-xs:               8px;
  --space-sm:               16px;
  --space-md:               32px;
  --space-lg:               64px;
  --space-xl:               120px;

  /* Layout */
  --max-width-content:      760px;
  --max-width-wide:         1200px;

  /* Transitions */
  --transition-fast:        0.15s ease;
  --transition-base:        0.25s ease;

  /* Form */
  --color-form-surface:     #FFFFFF;
  --color-form-text:        #1A202C;
  --color-gold-rex:         #C9A84C;

  /* Layout */
  --max-width-form:         640px;
}

/* --------------------------------------------------------
   2. BGE SCOPE RESET (applied within .bge-scope body)
   -------------------------------------------------------- */
.bge-scope body,
.bge-scope {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.6;
}

/* Override body background for BGE pages */
html.bge-scope body {
  background-color: var(--color-bg-primary);
}

/* Typography within BGE scope */
.bge-scope h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 6vw, 64px);
  color: var(--color-text-primary);
  line-height: 1.05;
}

.bge-scope h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--color-text-primary);
  line-height: 1.15;
}

.bge-scope h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 2.5vw, 28px);
  color: var(--color-text-primary);
  line-height: 1.3;
}

.bge-scope h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--color-text-primary);
  line-height: 1.4;
}

.bge-scope p {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.bge-scope .mono {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
}

.bge-scope .text-gold {
  color: var(--color-gold);
}

/* --------------------------------------------------------
   3. BGE LAYOUT UTILITIES
   -------------------------------------------------------- */
.bge-scope .container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.bge-scope .container--narrow {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.bge-scope .section {
  padding: var(--space-lg) 0;
}

.bge-scope .section--xl {
  padding: var(--space-xl) 0;
}

/* --------------------------------------------------------
   4. BGE SECTION LABELS + DIVIDERS
   -------------------------------------------------------- */
.bge-scope .section-label {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.bge-scope .section-label--gold {
  color: var(--color-gold);
}

.bge-scope .divider {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: var(--space-lg) 0;
}

.bge-scope .divider--gold {
  background: var(--color-gold);
  height: 2px;
  width: 60px;
  margin: var(--space-sm) 0 var(--space-md) 0;
}

/* --------------------------------------------------------
   5. BGE GRID PATTERN (subtle — hero bg)
   -------------------------------------------------------- */
.bge-scope .bg-grid {
  position: relative;
  overflow: hidden;
}

.bge-scope .bg-grid::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.bge-scope .bg-grid > * {
  position: relative;
  z-index: 1;
}

/* Gold glow radial behind hero content */
.bge-scope .bg-glow::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(200, 154, 42, 0.07) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --------------------------------------------------------
   5a. BGE UTILITY CLASSES (used in HTML but not yet defined)
   -------------------------------------------------------- */

/* Section alt background */
.section--alt {
  background-color: var(--color-bg-secondary);
}

/* Typography utilities */
.label-caps {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.mono-number {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
}

.primary {
  color: var(--color-text-primary);
}

/* Section diagnostic heading */
.section-diagnostic {
  border-left: 4px solid var(--color-gold);
  padding-left: 20px;
  /* Prevent flush-left stripe artifact at certain viewport widths */
  margin-left: 2px;
}

/* Step layout */
.step-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-md);
  align-items: start;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--color-border);
}

.step-item:last-child {
  border-bottom: none;
}

.step-number {
  font-family: 'JetBrains Mono', monospace;
  font-size: 56px;
  color: rgba(200, 154, 42, 0.18);
  line-height: 1;
  user-select: none;
  font-weight: 400;
}

/* Cards */
.card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-gold);
  border-radius: var(--radius-card);
  padding: var(--space-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 0 0 1px rgba(200, 154, 42, 0.15);
}

/* Proof bar */
.proof-bar {
  border-top: 1px solid var(--color-gold-30);
  border-bottom: 1px solid var(--color-gold-30);
  background: var(--color-bg-secondary);
  padding: var(--space-sm) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.proof-divider {
  color: var(--color-gold-30);
  font-weight: 300;
}

/* Thin gold vertical divider for proof bar */
.proof-divider--gold {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: var(--color-gold);
  opacity: 0.45;
  vertical-align: middle;
  margin: 0 4px;
  font-size: 0;
  line-height: 0;
}

/* CTA Button (gold for BGE) */
.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-button);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  min-height: 48px;
  line-height: 1;
}

.cta-button:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
  color: var(--color-cta-text);
}

/* Testimonial */
.testimonial-card {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-card);
  padding: var(--space-md);
}

.testimonial-attribution {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--color-text-secondary);
}

@media (max-width: 600px) {
  .step-item {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  .step-number {
    font-size: 36px;
  }
}

/* --------------------------------------------------------
   5b. BGE NAV / HEADER — shared nav styles for BGE pages
   -------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 27, 62, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-sm) 0;
}

.nav-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

/* Left section (breadcrumb + logo) */
.nav-container > div:first-child {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Breadcrumb — small back link */
.nav-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--color-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
  border-right: 1px solid var(--color-border);
  padding-right: var(--space-sm);
}

.nav-breadcrumb:hover {
  color: var(--color-text-primary);
}

/* Nav logo — 60px height, never layout-breaking */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo img {
  height: 36px;
  width: auto;
  display: block;
}

/* Nav links — horizontal row */
.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links a {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

.nav-links a[aria-current="page"] {
  color: var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
}

/* Right CTA */
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  background: var(--color-cta-bg);
  color: var(--color-cta-text);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: var(--radius-button);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  min-height: 40px;
}

.nav-cta:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
  color: var(--color-cta-text);
}

.nav-cta[aria-current="page"] {
  opacity: 0.75;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text-primary);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile menu */
.mobile-menu {
  background: var(--color-bg-secondary);
  padding: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-md) 0;
}

.mobile-menu li {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu a {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--color-text-primary);
  text-decoration: none;
  display: block;
  padding: 4px 0;
}

/* Footer */
.site-footer {
  background: var(--color-bg-footer);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
}

.footer-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-logo {
  text-decoration: none;
  display: inline-block;
}

.footer-logo:hover {
  opacity: 0.85;
}

.footer-tagline {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text-primary);
  margin: 4px 0;
}

.footer-sub {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.footer-jdv-link {
  color: var(--color-gold);
  text-decoration: none;
  font-size: 13px;
}

.footer-jdv-link:hover {
  color: var(--color-gold-light);
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-nav a {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: var(--color-gold);
}

.footer-heading {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-sm);
}

.footer-copy {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: var(--space-xs);
  line-height: 1.5;
}

/* --------------------------------------------------------
   6. RESPONSIVE
   -------------------------------------------------------- */
@media (max-width: 768px) {
  html.bge-scope {
    background-attachment: scroll;
  }

  .bge-scope .container,
  .bge-scope .container--narrow {
    padding: 0 var(--space-sm);
  }

  .bge-scope .section {
    padding: var(--space-md) 0;
  }

  .bge-scope .section--xl {
    padding: var(--space-lg) 0;
  }

  /* Nav mobile */
  .nav-links { display: none; }
  .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  .footer-container {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .bge-scope .container,
  .bge-scope .container--narrow {
    padding: 0 20px;
  }
}

/* ----------------------------------------
   BGE BACKGROUND TREATMENT — v4
   Uses bge-hero-bg.jpg (B&W silhouette).
   Applied to html.bge-scope so all subpages
   inherit consistent brand background.
   Updated: 2026-08-09 — SIP fix
   ---------------------------------------- */
html.bge-scope {
  background: var(--bge-navy, #1B2A4A);
  background-image: url('/images/bge-hero-bg.jpg');
  background-size: 90% auto;
  background-repeat: no-repeat;
  background-position: center bottom;
  background-attachment: fixed;
  background-blend-mode: overlay;
}

html.bge-scope body {
  background-color: transparent;
  position: relative;
  z-index: 1;
}

/* Mobile override — must come AFTER the VibeCoding block above.
   Equal specificity (html.bge-scope), so source order decides.
   This rule wins because it appears last. */
@media (max-width: 768px) {
  html.bge-scope {
    background-attachment: scroll; /* iOS/mobile: fixed bg causes jank */
  }
}

/* --------------------------------------------------------
   SABLE FIXES — August 2026
   Step connector + section header padding + card heights
   -------------------------------------------------------- */

/* Connecting gold vertical line between process steps */
.bge-scope .step-item:not(:last-child) {
  position: relative;
}
.bge-scope .step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 38px;
  bottom: 0;
  width: 1px;
  height: var(--space-md);
  background: linear-gradient(to bottom, rgba(201, 168, 76, 0.5), transparent);
  pointer-events: none;
}

/* Consistent section header top padding (prevents clipping) */
.bge-scope .section-header-block {
  padding-top: var(--space-xl);
}

/* Equalize card heights in grid */
.bge-scope .card-grid {
  align-items: stretch;
}
.bge-scope .card-grid .card {
  display: flex;
  flex-direction: column;
}
.bge-scope .card-grid .card > p:last-of-type,
.bge-scope .card-grid .card > div[style*="border-top"] {
  margin-top: auto;
}
