/* ============================================================
   BGE — bge-main.css
   CSS Variables + Reset (scoped to .bge-scope)
   BGE section of jdvlabs.tech | Built July 2026
   ============================================================ */

/* --------------------------------------------------------
   1. BGE DESIGN TOKENS — scoped to .bge-scope
   These do NOT bleed to JDV Labs pages.
   -------------------------------------------------------- */
.bge-scope {
  /* Surfaces */
  --color-bg-primary:       #0D1B3E;   /* Deep navy */
  --color-bg-secondary:     #091229;   /* Darker navy */
  --color-bg-card:          #0D1B3E;
  --color-bg-hero:          #0D1B3E;
  --color-bg-section-alt:   #091229;
  --color-bg-footer:        #04090F;

  /* Gold */
  --color-gold:             #C89A2A;
  --color-gold-light:       #E2C95A;
  --color-gold-soft:        rgba(200, 154, 42, 0.15);
  --color-gold-30:          rgba(200, 154, 42, 0.30);
  --color-gold-glow:        rgba(200, 154, 42, 0.12);

  /* Typography */
  --color-text-primary:     #F0EDE6;   /* Near-white warm */
  --color-text-secondary:   #9FA8B5;   /* Slate muted */
  --color-text-gold:        #C89A2A;

  /* CTA */
  --color-cta-bg:           #C89A2A;
  --color-cta-text:         #0D1B3E;
  --color-cta-hover:        #d4a82e;

  /* Borders */
  --color-border:           rgba(255, 255, 255, 0.07);
  --color-border-gold:      rgba(200, 154, 42, 0.35);

  /* 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:         #D4A83A;

  /* 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;
}

/* 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.12);
  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;
}

/* 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: 60px !important;
  width: auto !important;
  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) {
  .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;
  }
}
