/* ============================================================
   BRIDGEED — base.css
   Foundational Design System:
   1. Design Tokens (CSS Custom Properties)
   2. Reset & Base Elements
   3. Reduced Motion
   4. Accessibility & Focus States
   5. Typography
   6. Layout Primitives
   24. Animations & Reveal
   25. Utilities
   ============================================================ */

/* ===== 1. DESIGN TOKENS (BridgeEd Official Brand Kit) ===== */
:root {
  /* Official Core Palette */
  --primary-blue: #0038A8;
  --primary-green: #39A829;
  --accent-blue: #0084D4;
  --accent-green: #7BC943;
  --neutral-gray: #6B7280;
  --white: #FFFFFF;
  --black: #000000;

  /* Aliased Variables for Full System Alignment */
  --navy: var(--primary-blue);
  --navy-90: rgba(0, 56, 168, 0.9);
  --navy-70: rgba(0, 56, 168, 0.7);
  --navy-60: rgba(0, 56, 168, 0.6);
  --navy-50: rgba(0, 56, 168, 0.5);
  --navy-40: rgba(0, 56, 168, 0.4);
  --navy-20: rgba(0, 56, 168, 0.2);
  --navy-10: rgba(0, 56, 168, 0.1);
  --navy-5: rgba(0, 56, 168, 0.05);

  /* Primary Green Accent Tokens */
  --teal: var(--primary-green);
  --teal-light: var(--accent-green);
  --teal-10: rgba(57, 168, 41, 0.1);
  --teal-20: rgba(57, 168, 41, 0.2);
  --teal-30: rgba(57, 168, 41, 0.3);
  --teal-contrast: #2E8620;
  /* High contrast green for WCAG AA text */

  /* Neutral Backgrounds & Dividers */
  --warm-white: #FAFAFC;
  --off-white: #F3F4F6;
  --border-light: #E5E7EB;

  /* Functional Status Indicators */
  --status-critical: #D32F2F;
  --status-warning: #D97706;
  --status-ok: var(--primary-green);

  /* Typography System (Brand Kit Standards) */
  --font-heading: "Montserrat", sans-serif;
  --font-body: "Source Sans 3", sans-serif;

  /* Border Radii Tokens (Buttons: 8px, Cards: 12px) */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows with Brand Blue/Green Tinting */
  --shadow-sm: 0 1px 3px rgba(0, 56, 168, 0.06), 0 1px 2px rgba(0, 56, 168, 0.04);
  --shadow-md: 0 4px 14px rgba(0, 56, 168, 0.08), 0 2px 4px rgba(0, 56, 168, 0.04);
  --shadow-lg: 0 8px 32px rgba(0, 56, 168, 0.10), 0 4px 8px rgba(0, 56, 168, 0.05);
  --shadow-xl: 0 20px 60px rgba(0, 56, 168, 0.12), 0 8px 16px rgba(0, 56, 168, 0.06);
  --shadow-glow: 0 0 40px rgba(0, 132, 212, 0.22);
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1280px;
}

/* ===== 2. RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

ul {
  list-style: none;
}

section {
  padding: 56px 0;
}

@media (min-width: 1024px) {
  section {
    padding: 120px 0;
  }
}

#ecosystem,
#demo,
#implementation,
#faq {
  background: var(--off-white);
  border-top: 1px solid var(--navy-10);
  border-bottom: 1px solid var(--navy-10);
}

/* ===== 3. REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-scale,
  .reveal-left,
  .reveal-right {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .trust-bar-track {
    animation: none !important;
    overflow-x: auto;
    width: 100%;
  }

  .progress-fill,
  .progress-animate {
    transition: none !important;
  }
}

/* ===== 4. ACCESSIBILITY & FOCUS STATES ===== */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--primary-blue);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  z-index: 9999;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 2px solid var(--accent-blue);
}

.skip-to-content:focus {
  top: 20px;
  outline: none;
}

*:focus-visible {
  outline: 3px solid var(--accent-blue) !important;
  outline-offset: 3px !important;
}

/* Adjust focus visible ring on dark backgrounds */
#cta *:focus-visible,
footer *:focus-visible,
#mobile-menu *:focus-visible,
.signals-list *:focus-visible,
.signal-visual-card *:focus-visible {
  outline-color: var(--accent-blue) !important;
}

/* ===== 5. TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
  font-family: var(--font-heading);
}

.text-display-xl {
  font-family: var(--font-heading);
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-display-lg {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.2vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.text-display-md {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3.8vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.text-display-sm {
  font-family: var(--font-heading);
  font-size: clamp(20px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.25;
}

.text-heading-1 {
  font-family: var(--font-heading);
  font-size: clamp(19px, 2.3vw, 24px);
  font-weight: 600;
  line-height: 1.3;
}

.text-heading-2 {
  font-family: var(--font-heading);
  font-size: clamp(16px, 1.8vw, 20px);
  font-weight: 600;
  line-height: 1.35;
}

.text-body-lg {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.65;
}

.text-body-md {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

.text-body-sm {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
}

.text-label {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ===== 6. LAYOUT ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 40px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 48px;
  }
}

.section-header {
  margin-bottom: 56px;
}

@media (min-width: 1024px) {
  .section-header {
    margin-bottom: 80px;
  }
}


/* ===== 24. ANIMATIONS & REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-22px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(22px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

/* ===== 25. UTILITIES ===== */
.text-teal {
  color: var(--primary-green);
}

.text-center {
  text-align: center;
}

.max-w-prose {
  max-width: 600px;
  margin: 0 auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

