/* ══════════════════════════════════════════════════════════════
   BBS ELECTRIC — base.css
   CSS Token System + Reset + Utilities
   Brand: Primary #166C9D | Secondary #13263F | Tertiary #F45929 | Accent #FBD301
   Fonts: Montserrat (headings) | Roboto (body)
══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Roboto:wght@300;400;500;700&display=swap');

/* Offset anchor jumps so headings clear the fixed site header (top-bar ~40px + navbar ~100px = 140px) */
html {
  scroll-padding-top: 150px;
}

/* ── LAYER 1: COLORS ── */
:root {
  /* Raw primitives */
  --raw-primary: #166C9D;
  --raw-secondary: #13263F;
  --raw-tertiary: #F45929;
  --raw-accent: #FBD301;

  /* Primary — medium blue */
  --color-primary: #166C9D;
  --color-primary-dark: #0d4f75;
  --color-primary-light: #d1e8f5;
  --color-primary-rgb: 22, 108, 157;

  /* Secondary — dark navy */
  --color-secondary: #13263F;
  --color-secondary-dark: #0a1826;
  --color-secondary-light: #c5d4e8;

  /* Tertiary — orange */
  --color-tertiary: #F45929;
  --color-tertiary-dark: #c93e12;
  --color-tertiary-light: #fde3d6;

  /* Accent — yellow */
  --color-accent: #FBD301;
  --color-accent-dark: #c9a500;
  --color-accent-light: #fef7cc;

  /* Neutrals */
  --color-neutral-50: #f9fafb;
  --color-neutral-100: #f3f4f6;
  --color-neutral-200: #e5e7eb;
  --color-neutral-300: #d1d5db;
  --color-neutral-400: #9ca3af;
  --color-neutral-500: #6b7280;
  --color-neutral-600: #4b5563;
  --color-neutral-700: #374151;
  --color-neutral-800: #1f2937;
  --color-neutral-900: #111827;

  /* Backgrounds & Surfaces */
  --color-bg: #ffffff;
  --color-bg-rgb: 255, 255, 255;
  --color-bg-secondary: #F8FAFC;
  --color-bg-surface: #ffffff;
  --color-bg-overlay: rgba(0, 0, 0, 0.6);

  /* Borders */
  --color-border: #E2E8F0;

  /* Text */
  --color-text: #374151;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-text-on-primary: #ffffff;
  --color-text-on-dark: #ffffff;
  --color-text-link: #166C9D;
  --color-text-link-hover: #0d4f75;
  --color-focus-ring: #166C9D;
  --color-heading: #13263F;

  /* Status */
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-info: #0ea5e9;

  /* ── LAYER 2: TYPOGRAPHY ── */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Roboto', sans-serif;
  --font-mono: 'Courier New', monospace;
  --font-accent: 'Montserrat', sans-serif;

  /* Font sizes */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --font-size-6xl: 3.75rem;
  --font-size-7xl: 4.5rem;

  /* Font weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Line heights */
  --line-height-none: 1;
  --line-height-tight: 1.2;
  --line-height-snug: 1.375;
  --line-height-normal: 1.6;
  --line-height-relaxed: 1.75;
  --line-height-loose: 2;

  /* Letter spacing */
  --letter-spacing-tighter: -0.05em;
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0em;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  --letter-spacing-widest: 0.1em;

  /* ── LAYER 3: SPACING (base-4 scale) ── */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-28: 7rem;
  --space-32: 8rem;

  /* ── LAYER 4: LAYOUT ── */
  --container-max-width: 1200px;
  --container-padding: 1.5rem;
  --header-height: 120px; /* top bar + nav combined */
  --navbar-height: 72px;
  --topbar-height: 48px;
  --grid-gutter: 1.5rem;

  /* Z-index scale */
  --z-base: 1;
  --z-sticky: 50;
  --z-drawer: 90;
  --z-drawer-backdrop: 80;
  --z-dropdown: 100;
  --z-modal: 200;
  --z-modal-backdrop: 190;
  --z-toast: 300;
  --z-fixed: 60;

  /* ── LAYER 5: SHAPE ── */
  --radius-none: 0;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-focus-ring: 0 0 0 3px rgba(22, 108, 157, 0.3);

  /* Borders */
  --border-width: 1px;
  --border-radius: var(--radius-md);

  /* ── LAYER 6: MOTION ── */
  --duration-instant: 0ms;
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-moderate: 350ms;
  --duration-slow: 500ms;
  --duration-slower: 800ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);

  /* ── LAYER 7: COMPONENT TOKENS ── */

  /* Buttons */
  --btn-radius: var(--radius-md);
  --btn-padding-y: 0.75rem;
  --btn-padding-x: 1.75rem;
  --btn-sm-padding-y: 0.5rem;
  --btn-sm-padding-x: 1.25rem;
  --btn-lg-padding-y: 1rem;
  --btn-lg-padding-x: 2.25rem;
  --btn-font-weight: var(--font-weight-semibold);
  --btn-font-size: var(--font-size-base);

  /* Cards */
  --card-radius: var(--radius-xl);
  --card-padding: var(--space-6);
  --card-shadow: var(--shadow-md);
  --card-shadow-hover: var(--shadow-xl);
  --card-bg: #ffffff;
  --card-border: 1px solid var(--color-border);

  /* Badges */
  --badge-radius: var(--radius-full);
  --badge-padding-y: 0.25rem;
  --badge-padding-x: 0.875rem;
  --badge-font-size: var(--font-size-xs);
  --badge-font-weight: var(--font-weight-semibold);

  /* Inputs */
  --input-radius: var(--radius-md);
  --input-height: 3rem;
  --input-padding-x: var(--space-4);
  --input-bg: #ffffff;
  --input-border: 1px solid var(--color-border);
  --input-focus-ring: 0 0 0 3px rgba(22, 108, 157, 0.25);

  /* Sections */
  --section-padding-y: 5rem;
  --section-padding-x: 0;

  /* Navigation */
  --nav-link-color: var(--color-heading);
  --nav-link-hover-color: var(--color-primary);
  --nav-link-weight: var(--font-weight-medium);

  /* Dividers */
  --divider-height: 60px;
  --divider-color: var(--color-bg);
  --divider-accent-color: var(--color-tertiary);

  /* Accent lines */
  --accent-line-width: 60px;
  --accent-line-height: 4px;
  --accent-line-color: var(--color-tertiary);
  --accent-line-radius: var(--radius-full);

  /* Images */
  --img-radius: var(--radius-xl);
  --img-radius-avatar: var(--radius-full);

  /* Decorative blobs */
  --blob-size: 400px;
  --blob-opacity: 0.08;
  --blob-color-1: var(--color-primary);
  --blob-color-2: var(--color-tertiary);
}

/* ══════════════════════════════════════════════════════════════
   RESET
══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-height);
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-text-link);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
  color: var(--color-text-link-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: var(--line-height-tight);
}

/* ══════════════════════════════════════════════════════════════
   CUSTOM SCROLLBAR
══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-neutral-100);
}

::-webkit-scrollbar-thumb {
  background: var(--color-neutral-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-neutral-700);
}

/* ══════════════════════════════════════════════════════════════
   UTILITY CLASSES
══════════════════════════════════════════════════════════════ */

/* Text alignment */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* Screen reader only */
.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;
}

/* Icon sizing (Lucide) */
.w-5  { width: 20px;  height: 20px; }
.w-6  { width: 24px;  height: 24px; }
.w-8  { width: 32px;  height: 32px; }
.w-10 { width: 40px;  height: 40px; }
.h-5  { height: 20px; }
.h-6  { height: 24px; }
.h-8  { height: 32px; }
.h-10 { height: 40px; }

/* Display */
.hidden { display: none !important; }
.flex   { display: flex; }

/* Flex helpers */
.items-center { align-items: center; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }

/* Spacing helpers */
.mt-2  { margin-top: var(--space-2); }
.mt-4  { margin-top: var(--space-4); }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }
.pt-0  { padding-top: 0; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE OVERRIDES
══════════════════════════════════════════════════════════════ */

/* Space for mobile CTA bar on tablet and below */
@media (max-width: 1024px) {
  body {
    padding-bottom: 70px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --section-padding-y: 3.5rem;
    --header-height: 108px;
    --navbar-height: 64px;
    --topbar-height: 44px;
  }

  body {
    font-size: var(--font-size-base);
  }
}
