/* ==============================================
   BASE.CSS — Reset, Root Variables, Typography
   Baxter Site Works
   ============================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ==============================================
   CSS CUSTOM PROPERTIES (ROOT VARIABLES)
   ============================================== */
:root {
  /* Brand Colors */
  --color-primary: var(--primary-500, #EF4444);
  --color-primary-dark: var(--primary-600, #DC2626);
  --color-primary-darker: var(--primary-700, #B91C1C);
  --color-primary-light: var(--primary-100, #FEE2E2);
  --color-primary-rgb: 239, 68, 68;

  /* Secondary — the brand accent/dark color for dark backgrounds and accents */
  /* Note: design vars set secondary=#FFFFFF as the "secondary brand color"     */
  /* but we use the dark variant for UI backgrounds (navbar, footer, dark bgs)  */
  --color-secondary: #111111;
  --color-secondary-dark: #000000;
  --color-secondary-light: #333333;

  /* Neutral / Gray */
  --color-neutral-50: var(--neutral-50, #F9FAFB);
  --color-neutral-100: var(--neutral-100, #F3F4F6);
  --color-neutral-200: var(--neutral-200, #E5E7EB);
  --color-neutral-300: var(--neutral-300, #D1D5DB);
  --color-neutral-400: var(--neutral-400, #9CA3AF);
  --color-neutral-500: var(--neutral-500, #6B7280);
  --color-neutral-600: var(--neutral-600, #4B5563);
  --color-neutral-700: var(--neutral-700, #374151);
  --color-neutral-800: var(--neutral-800, #1F2937);
  --color-neutral-900: var(--neutral-900, #111827);

  /* Background */
  --color-bg: #FFFFFF;
  --color-bg-rgb: 255, 255, 255;
  --color-bg-secondary: #F9FAFB;
  --color-bg-surface: #FFFFFF;
  --color-bg-dark: #111111;
  --color-bg-overlay: rgba(0, 0, 0, 0.6);

  /* Text */
  --color-text: #374151;
  --color-text-secondary: #6B7280;
  --color-text-muted: #9CA3AF;
  --color-text-on-primary: #FFFFFF;
  --color-text-on-dark: #FFFFFF;
  --color-text-link: var(--color-primary);
  --color-text-link-hover: var(--color-primary-dark);

  /* Border */
  --color-border: #E5E7EB;
  --color-border-dark: #374151;

  /* Focus */
  --color-focus-ring: var(--color-primary);

  /* Typography */
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-accent: 'Oswald', 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 Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.2;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

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

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-28: 7rem;
  --space-32: 8rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
  --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-focus-ring: 0 0 0 3px rgba(239, 68, 68, 0.25);

  /* Transitions */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-moderate: 350ms;
  --duration-slow: 500ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: var(--duration-fast) var(--ease-default);
  --transition-normal: var(--duration-normal) var(--ease-default);
  --transition-slow: var(--duration-slow) var(--ease-default);

  /* Z-Index */
  --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;

  /* Layout */
  --container-max-width: 1200px;
  --container-padding: 1.5rem;
  --grid-gutter: 1.5rem;
  --section-padding-y: 100px;
  --section-padding-x: 0;
  --header-height: 112px; /* desktop: top-bar ~42px + navbar 70px */
  --navbar-height: 70px;
  --z-fixed: 70;

  /* Component Tokens */
  --btn-padding-y: 0.75rem;
  --btn-padding-x: 1.75rem;
  --btn-sm-padding-y: 0.5rem;
  --btn-sm-padding-x: 1rem;
  --btn-lg-padding-y: 1rem;
  --btn-lg-padding-x: 2rem;
  --btn-font-weight: 600;
  --btn-font-size: var(--font-size-base);
  --btn-radius: 5px;

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

  --input-height: 3rem;
  --input-padding-x: var(--space-4);
  --input-border: 1px solid var(--color-border);
  --input-radius: var(--radius-md);
  --input-bg: #FFFFFF;
  --input-focus-ring: 0 0 0 3px rgba(239, 68, 68, 0.2);

  --badge-padding-y: 0.25rem;
  --badge-padding-x: 0.75rem;
  --badge-radius: var(--radius-full);
  --badge-font-size: var(--font-size-xs);
  --badge-font-weight: var(--font-weight-semibold);

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

  /* Divider */
  --divider-height: 4px;
  --divider-color: var(--color-primary);
  --divider-accent-color: var(--color-primary);

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

  /* Blob */
  --blob-size: 400px;
  --blob-opacity: 0.08;
  --blob-color-1: var(--color-primary);
  --blob-color-2: #111111;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

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

/* Hero pages that need full-bleed behind header use this class */
.hero-full-bleed {
  margin-top: calc(-1 * var(--header-height));
  padding-top: var(--header-height);
}

/* ==============================================
   TYPOGRAPHY
   ============================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--heading-light, #111111);
}

p {
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-4);
}

p:last-child { margin-bottom: 0; }

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

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

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

input, textarea, select {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
}

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

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-white { color: #FFFFFF; }
.text-dark { color: var(--color-secondary); }
.text-muted { color: var(--color-text-muted); }

.bg-white { background-color: #FFFFFF; }
.bg-light { background-color: var(--color-bg-secondary); }
.bg-dark { background-color: var(--color-bg-dark); }
.bg-primary { background-color: var(--color-primary); }

.hidden { display: none; }
/* Icon sizing utilities — used with Lucide data-lucide icons */
.w-4 { width: 1rem; height: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; height: 1.25rem; }
.w-6 { width: 1.5rem; height: 1.5rem; }
.w-8 { width: 2rem; height: 2rem; }
.w-10 { width: 2.5rem; height: 2.5rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }

/* Desktop nav show/hide */
@media (max-width: 1024px) {
  .lg\:flex { display: none !important; }
  .lg\:hidden { display: flex !important; }
}
@media (min-width: 1025px) {
  .lg\:flex { display: flex !important; }
  .lg\:hidden { display: none !important; }
}

/* Mobile: top-bar is hidden, only navbar height counts */
@media (max-width: 768px) {
  :root {
    --header-height: var(--navbar-height, 70px);
  }
}
