/* ==========================================================================
   PolicyScanner - Global CSS Foundation (BEM Methodology)
   Mobile-first design system with Performance-Optimized Shadow System
   ========================================================================== */

/* ==========================================================================
   1. CSS Variables / Design Tokens
   Comprehensive design system for consistent reuse
   ========================================================================== */

:root {
  /* Brand Colors */
  --primary-teal: #3BC5B9;
  --cta-orange: #FF7A2A;
  --cta-hover: #FFA35C;
  
  /* Text Colors */
  --primary-text: #3D4A59;
  --secondary-text: #7C8B97;
  --white-text: #FFFFFF;
  
  /* Background Colors - Enhanced Professional System */
  --bg-white: #FFFFFF;
  --bg-light: #F6F9FA;
  --bg-hero-tint: #F9FEFD;
  --bg-footer: #1A2B32;
  --border-light: #E5E9ED;
  
  /* Professional Background Hierarchy */
  --bg-primary: #FFFFFF;                    /* Pure white - main content */
  --bg-secondary: #F6F9FA;                  /* Professional light - alternating sections */
  --bg-tertiary: #F0F8F7;                   /* Light teal tint - accent sections */
  --bg-quaternary: #FBFEFE;                 /* Subtle cool white - premium sections */

  /* Section-Specific Background Assignments */
  --bg-section-trust-bar: var(--bg-quaternary);
  --bg-section-trust: var(--bg-tertiary);
  --bg-section-how-it-works: var(--bg-primary);
  --bg-section-reviews: var(--bg-tertiary);
  --bg-section-partners: var(--bg-secondary);
  --bg-section-articles: var(--bg-primary);
  --bg-section-faq: var(--bg-secondary);

  /* OKLCH Professional Enhancements - Progressive Enhancement */
  --bg-primary-oklch: oklch(100% 0 0);                    /* Pure white */
  --bg-secondary-oklch: oklch(97.5% 0.008 195);           /* Professional light */
  --bg-tertiary-oklch: oklch(96% 0.015 180);             /* Perfect teal integration */
  --bg-quaternary-oklch: oklch(99% 0.005 180);           /* Subtle cool professional */
  
  /* Footer Color System */
  --footer-text-primary: #FFFFFF;
  --footer-text-secondary: rgba(255, 255, 255, 0.85);
  --footer-text-tertiary: rgba(255, 255, 255, 0.65);
  --footer-border: rgba(255, 255, 255, 0.15);
  --footer-link-hover: var(--primary-teal);
  --footer-social-hover: var(--primary-teal);
  
  /* Functional Colors */
  --success: #28a745;
  --warning: #ffc107;
  --error: #dc3545;
  
 /* Typography Scale - Mobile-First Optimized */
--font-size-xs: 0.75rem;      /* 12px - Micro text (use sparingly!) */
--font-size-sm: 0.875rem;     /* 14px - Small text (minimum for secondary) */
--font-size-base: 1rem;       /* 16px - Body text (mobile standard) */
--font-size-lg: 1.125rem;     /* 18px - Large text */
--font-size-xl: 1.25rem;      /* 20px - Emphasis text */
--font-size-2xl: 1.5rem;      /* 24px - Section headers */
--font-size-3xl: 2rem;        /* 32px - Hero mobile */
--font-size-4xl: 2.5rem;      /* 40px - Hero tablet */
--font-size-5xl: 3.125rem;    /* 50px - Hero desktop */

/* Mobile Typography Sizes - Improved */
--font-size-h1-mobile: 1.625rem;  /* 26px - Hero/Main headlines */
--font-size-h2-mobile: 1.5rem;    /* 24px - Section headers */
--font-size-h3-mobile: 1.25rem;   /* 20px - Subsection headers */
--font-size-h4-mobile: 1.125rem;  /* 18px - Card headers */

/* Tablet Typography Sizes - Enhanced */
--font-size-h1-tablet: 2.5rem;    /* 40px - Better progression */
--font-size-h2-tablet: 1.75rem;   /* 28px - Section headers */
--font-size-h3-tablet: 1.375rem;  /* 22px - Subsection headers */
--font-size-h4-tablet: 1.25rem;   /* 20px - Card headers */

/* Desktop Typography Sizes - Added */
--font-size-h1-desktop: 3.125rem; /* 50px - Hero headlines */
--font-size-h2-desktop: 2rem;     /* 32px - Section headers */
--font-size-h3-desktop: 1.5rem;   /* 24px - Subsection headers */
--font-size-h4-desktop: 1.25rem;  /* 20px - Card headers */

/* CTA Font Sizes - Mobile-First Hierarchy */
--font-size-cta-hero: 1.125rem;     /* 18px - Hero CTAs mobile */
--font-size-cta-primary: 1rem;      /* 16px - Primary CTAs */
--font-size-cta-secondary: 1rem;    /* 16px - Standard CTAs */
--font-size-cta-tertiary: 0.875rem; /* 14px - Small CTAs */

/* Body Text Variants - Added */
--font-size-body-lg: 1.125rem;   /* 18px - Lead paragraphs */
--font-size-body: 1rem;          /* 16px - Standard body */
--font-size-body-sm: 0.875rem;   /* 14px - Secondary text */
--font-size-caption: 0.75rem;    /* 12px - Captions only */

/* Font Weights */
--font-weight-normal: 400;
--font-weight-medium: 500;
--font-weight-semibold: 600;
--font-weight-bold: 700;        /* Added for hero emphasis */

/* Line Heights - Optimized for mobile */
--line-height-tight: 1.1;     /* Hero headings */
--line-height-snug: 1.25;     /* Regular headings */
--line-height-normal: 1.4;    /* UI text, CTAs */
--line-height-relaxed: 1.6;   /* Body text for readability */

  /* ==========================================================================
     SPACING SYSTEM - Clean Standard Scale
     One system for entire website
     ========================================================================== */
  
  /* Base Spacing Scale - 8px Grid */
--space-1: 0.5rem;    /* 8px */
--space-2: 1rem;      /* 16px */
--space-3: 1.5rem;    /* 24px */
--space-4: 2rem;      /* 32px */
--space-5: 2.5rem;    /* 40px */
--space-6: 3.5rem;    /* 56px */

/* Container & Layout */
--container-max-width: 1200px;
--container-max-width-sm: 1280px;        /* Small Desktop: 992px-1365px */
--container-max-width-lg: 1320px;        /* Large Desktop: 1366px+ */
--container-padding-mobile: 1.25rem;   /* 20px */
--container-padding-tablet: 1.5rem;    /* 24px */
--container-padding-desktop: 2.5rem;   /* 40px */

/* Section Spacing - Standard for entire site */
--section-padding-mobile: var(--space-4);     /* 32px */
--section-padding-tablet: var(--space-5);     /* 40px */
--section-padding-desktop: 3.25rem;           /* 52px */

/* Component Spacing */
--card-padding-mobile: var(--space-3);        /* 24px */
--card-padding-tablet: 1.75rem;               /* 28px */
--card-padding-desktop: var(--space-4);       /* 32px */

/* Button Spacing - Updated to Industry Standards */
--button-padding-mobile-v: 0.875rem;          /* 14px vertical */
--button-padding-mobile-h: 1.5rem;            /* 24px horizontal */
--button-padding-desktop-v: 1.125rem;         /* 18px vertical */
--button-padding-desktop-h: 2.5rem;           /* 40px horizontal */

/* Button Heights - Industry Standard */
--button-height-mobile: 3rem;                 /* 48px */
--button-height-mobile-large: 3.25rem;        /* 52px for hero */
--button-height-desktop: 3.5rem;              /* 56px */
--button-height-desktop-large: 3.75rem;       /* 60px for hero */

/* Element Spacing - Content Hierarchy */
--heading-to-text: var(--space-2);            /* 16px */
--text-to-button: 1.25rem;                    /* 20px */
--element-gap: var(--space-1);                /* 8px */

/* Borders & Radius */
--border-radius-sm: 4px;
--border-radius: 8px;
--border-radius-lg: 12px;
--border-radius-pill: 9999px;

/* ==========================================================================
   PERFORMANCE-OPTIMIZED PROFESSIONAL SHADOW SYSTEM
   Replaces complex micropolish system - Single shadows only
   Organic/Soft approach with teal branding - Zero scroll impact
   ========================================================================== */

/* Level 0: No Shadow - Performance First */
--shadow-none: none;

/* Level 1: Micro Elevation - Form inputs, subtle separation */
--shadow-micro: 0 1px 3px rgba(59, 197, 185, 0.06);

/* Level 2: Soft Elevation - Standard cards, components */
--shadow-soft: 0 3px 8px rgba(59, 197, 185, 0.08);

/* Level 3: Medium Elevation - Featured cards, modals */
--shadow-medium: 0 4px 12px rgba(59, 197, 185, 0.10);

/* Level 4: High Elevation - Dropdowns, overlays (rare use) */
--shadow-high: 0 6px 16px rgba(59, 197, 185, 0.12);

/* Organic Border Radius - Pairs with soft shadows */
--radius-organic-sm: 6px;     /* Small components */
--radius-organic: 10px;       /* Standard cards */
--radius-organic-lg: 14px;    /* Large cards, hero elements */

/* Performance-First Alternatives */
--border-soft: 1px solid rgba(59, 197, 185, 0.10);
--border-medium: 1px solid rgba(59, 197, 185, 0.15);
--border-accent: 1px solid rgba(59, 197, 185, 0.25);

/* Background Elevation - Performance-friendly depth */
--bg-elevated-1: rgba(59, 197, 185, 0.02);   /* Subtle lift */
--bg-elevated-2: rgba(59, 197, 185, 0.04);   /* Medium lift */
--bg-elevated-3: rgba(59, 197, 185, 0.06);   /* High lift */

/* Transform-based interactions (GPU accelerated) - NO SHADOW ANIMATIONS */
--transform-subtle: translateY(-1px) translateZ(0);
--transform-medium: translateY(-2px) translateZ(0);
--transform-scale: scale(1.02) translateZ(0);

/* Legacy Shadow Compatibility - Mapped to new system */
--shadow-sm: var(--shadow-micro);     /* 0 1px 3px → Optimized micro */
--shadow-md: var(--shadow-soft);      /* 0 4px 6px → Optimized soft */
--shadow-lg: var(--shadow-medium);    /* 0 10px 15px → Optimized medium */

/* Component-Specific Shadow Assignments */
--shadow-card-default: var(--shadow-soft);        /* Standard cards */
--shadow-card-featured: var(--shadow-medium);     /* Hero/featured cards */
--shadow-card-minimal: var(--border-soft);        /* Performance alternative */

--shadow-button: var(--shadow-none);              /* No shadows on buttons */
--shadow-input: var(--shadow-micro);              /* Minimal input depth */
--shadow-dropdown: var(--shadow-medium);          /* Overlays only */

--shadow-image: var(--shadow-none);               /* Images need no shadows */
--shadow-logo: var(--shadow-none);                /* Logos always clean */

--shadow-nav: var(--shadow-none);                 /* Clean navigation */
--shadow-nav-dropdown: var(--shadow-soft);        /* Dropdown menus only */

/* Section-Specific Optimization */
--shadow-partner-logo: var(--shadow-none);
--border-partner-logo: var(--border-soft);
--shadow-review-card: var(--shadow-soft);
--shadow-article-card: var(--shadow-soft);
--shadow-article-image: var(--shadow-none);
--shadow-faq-item: var(--shadow-none);
--bg-faq-hover: var(--bg-elevated-1);
--shadow-trust-element: var(--shadow-none);

/* Transitions */
--transition-fast: 150ms ease;
--transition-base: 250ms ease;
--transition-slow: 350ms ease;

/* Z-index scale */
--z-0: 0;
--z-10: 10;
--z-20: 20;
--z-30: 30;
--z-40: 40;
--z-50: 50;

/* ==========================================================================
   REMOVED: Complex Micropolish System
   All multi-layered shadows, shadow animations, and complex effects removed
   for optimal scroll performance
   ========================================================================== */

/* ELIMINATED VARIABLES:
   --micropolish-shadow-card-base
   --micropolish-shadow-card-hover  
   --micropolish-shadow-card-premium
   --micropolish-shadow-button-base
   --micropolish-shadow-button-hover
   --micropolish-shadow-text-subtle
   --micropolish-shadow-text-medium
   All performance-heavy shadow systems completely removed
*/
}

/* ==========================================================================
   Progressive Enhancement for OKLCH Colors
   ========================================================================== */

@supports (color: oklch(99% 0.005 180)) {
  :root {
    --bg-primary: var(--bg-primary-oklch);
    --bg-secondary: var(--bg-secondary-oklch);
    --bg-tertiary: var(--bg-tertiary-oklch);
    --bg-quaternary: var(--bg-quaternary-oklch);
  }
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-relaxed);
  color: var(--primary-text);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--primary-teal);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   3. Typography System - Mobile First - UPDATED
   Consistent across entire website
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--heading-to-text);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--primary-text);
}

/* H1 - Hero Only - UPDATED */
h1 {
  font-size: var(--font-size-h1-mobile); /* 26px mobile */
  font-weight: var(--font-weight-semibold);
}

/* H2 - Section Headings - UPDATED */
h2 {
  font-size: var(--font-size-h2-mobile); /* 20px mobile */
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--heading-to-text);
}

/* H3 - Subsection Headings - UPDATED */
h3 {
  font-size: var(--font-size-h3-mobile); /* 16px mobile */
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--heading-to-text);
}

/* H4 - Component Headings - UPDATED */
h4 {
  font-size: var(--font-size-h4-mobile); /* 14px */
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--heading-to-text);
}

/* Body Text */
p {
  margin-top: 0;
  margin-bottom: var(--space-2);
  line-height: var(--line-height-relaxed);
}

/* Text Variants */
.text-large {
  font-size: var(--font-size-sm); /* 14px mobile hero subtext */
  line-height: var(--line-height-relaxed);
}

.text-small {
  font-size: var(--font-size-sm); /* 14px mobile hero subtext */
  line-height: var(--line-height-normal);
}

.text-micro {
  font-size: var(--font-size-xs); /* 12px */
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-snug);
}

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

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

/* ==========================================================================
   4. Layout System (BEM) - Mobile First
   Flexible grid for entire website
   ========================================================================== */

.layout {
  width: 100%;
}

.layout__container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--container-padding-mobile);
  padding-left: var(--container-padding-mobile);
}

.layout__section {
  padding-top: var(--section-padding-mobile);
  padding-bottom: var(--section-padding-mobile);
}

.layout__grid {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--space-2) * -1);
  margin-left: calc(var(--space-2) * -1);
}

.layout__grid-item {
  flex: 1 0 0%;
  padding-right: var(--space-2);
  padding-left: var(--space-2);
}

/* Grid Item Sizes */
.layout__grid-item--full { flex: 0 0 100%; max-width: 100%; }
.layout__grid-item--half { flex: 0 0 50%; max-width: 50%; }
.layout__grid-item--third { flex: 0 0 33.333333%; max-width: 33.333333%; }
.layout__grid-item--quarter { flex: 0 0 25%; max-width: 25%; }
.layout__grid-item--two-thirds { flex: 0 0 66.666667%; max-width: 66.666667%; }
.layout__grid-item--three-quarters { flex: 0 0 75%; max-width: 75%; }
.layout__grid-item--seven-twelfths { flex: 0 0 58.333333%; max-width: 58.333333%; }

/* ==========================================================================
   5. Button System (BEM) - PERFORMANCE OPTIMIZED - NO SHADOWS
   Consistent button styling across website
   ========================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--button-padding-mobile-v) var(--button-padding-mobile-h);
  font-size: var(--font-size-cta-secondary); /* 16px base */
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-snug);
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-organic-sm);        /* Organic radius */
  cursor: pointer;
  box-shadow: var(--shadow-button);               /* No shadows */
  transition: transform var(--transition-fast);   /* Transform only */
  min-height: 44px; /* Touch-friendly minimum */
}

.button:hover {
  transform: var(--transform-subtle);             /* GPU-accelerated only */
  text-decoration: none;
  /* NO SHADOW ANIMATIONS - Removed for performance */
}

.button:active {
  transform: scale(0.98) translateZ(0);          /* GPU-accelerated press */
}

/* Button Variants */
.button--primary {
  background-color: var(--primary-teal);
  color: var(--white-text);
  border: 1px solid var(--primary-teal);
}

.button--primary:hover,
.button--primary:focus {
  background-color: var(--cta-hover);
  border-color: var(--cta-hover);
  color: var(--white-text);
}

.button--outline {
  background-color: transparent;
  color: var(--primary-teal);
  border: 1px solid var(--primary-teal);
}

.button--outline:hover,
.button--outline:focus {
  background-color: rgba(59, 197, 185, 0.1);
  color: var(--primary-teal);
}

/* Button Sizes - CTA Hierarchy */
.button--hero {
  padding: calc(var(--button-padding-mobile-v) + 2px) calc(var(--button-padding-mobile-h) + 4px);
  font-size: var(--font-size-cta-hero); /* 20px */
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-organic);           /* Larger organic radius */
}

.button--large {
  padding: calc(var(--button-padding-mobile-v) + 1px) calc(var(--button-padding-mobile-h) + 2px);
  font-size: var(--font-size-cta-primary); /* 18px */
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-organic);           /* Larger organic radius */
}

.button--navbar {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-cta-tertiary); /* 14px */
  font-weight: var(--font-weight-medium);
  min-height: 36px; /* Smaller for navbar */
}

.button--small {
  padding: calc(var(--button-padding-mobile-v) - 2px) calc(var(--button-padding-mobile-h) - 4px);
  font-size: var(--font-size-cta-tertiary); /* 14px */
  font-weight: var(--font-weight-medium);
}

/* Mobile-only hero button - MATHEMATICALLY OPTIMIZED: 52px */
@media (max-width: 767.98px) {
  .button--mobile-hero {
    padding: 1.125rem 1.5rem !important;        /* Mathematical: (52px-16px)÷2 = 18px = 1.125rem */
    font-size: var(--font-size-cta-tertiary) !important; /* 14px */
    font-weight: var(--font-weight-medium) !important;
    min-height: 52px !important;                /* MATHEMATICAL: Golden ratio 16px×3.25 = 52px */
    border-radius: 26px !important;             /* MATHEMATICAL: Perfect pill 52px÷2 = 26px */
  }
}

/* ==========================================================================
   6. Card Component (BEM) - PERFORMANCE OPTIMIZED
   ========================================================================== */

.card {
  background-color: var(--bg-white);
  border-radius: var(--radius-organic);           /* Organic radius */
  box-shadow: var(--shadow-card-default);        /* Single soft shadow */
  border: var(--border-soft);                    /* Performance alternative */
  padding: var(--card-padding-mobile);
  transition: transform var(--transition-base);   /* Transform only, no shadow */
}

.card:hover {
  transform: var(--transform-subtle);             /* GPU-accelerated only */
  /* box-shadow: REMOVED - No shadow animations for performance */
}

.card--featured {
  box-shadow: var(--shadow-card-featured);       /* Slightly more elevation */
  border-radius: var(--radius-organic-lg);       /* Larger organic radius */
}

.card--minimal {
  box-shadow: var(--shadow-none);                /* Shadow-free alternative */
  border: var(--border-medium);                  /* Performance-first depth */
  background: var(--bg-elevated-1);              /* Subtle background lift */
}

.card__header {
  margin-bottom: var(--space-4);
}

.card__title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--heading-to-text);
  color: var(--primary-text);
}

.card__subtitle {
  font-size: var(--font-size-sm);
  color: var(--secondary-text);
  margin-bottom: 0;
}

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

.card__content > *:last-child {
  margin-bottom: 0;
}

.card__footer {
  margin-top: var(--text-to-button);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   7. Form Components (BEM) - PERFORMANCE OPTIMIZED
   ========================================================================== */

.form {
  width: 100%;
}

.form__group {
  margin-bottom: var(--space-3);
}

.form__label {
  display: block;
  margin-bottom: var(--element-gap);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--primary-text);
}

.form__control {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--primary-text);
  background-color: var(--bg-white);
  border: var(--border-soft);                    /* Primary depth method */
  border-radius: var(--radius-organic-sm);       /* Organic radius */
  box-shadow: var(--shadow-input);               /* Minimal depth only */
  transition: border-color var(--transition-base); /* Border animation only */
  min-height: 44px; /* Touch-friendly */
}

.form__control:focus {
  border-color: var(--primary-teal);
  outline: 0;
  box-shadow: var(--shadow-input);               /* No shadow change on focus */
  /* Shadow stays constant for performance */
}

/* ==========================================================================
   8. Utility Classes (Minimal)
   ========================================================================== */

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

/* Display Utilities */
.u-hidden { display: none; }
.u-block { display: block; }
.u-inline { display: inline; }
.u-inline-block { display: inline-block; }
.u-flex { display: flex; }

/* Flex Utilities */
.u-flex-column { flex-direction: column; }
.u-flex-row { flex-direction: row; }
.u-justify-start { justify-content: flex-start; }
.u-justify-center { justify-content: center; }
.u-justify-end { justify-content: flex-end; }
.u-justify-between { justify-content: space-between; }
.u-align-start { align-items: flex-start; }
.u-align-center { align-items: center; }
.u-align-end { align-items: flex-end; }

/* Font Weight Utilities */
.u-font-normal { font-weight: var(--font-weight-normal); }
.u-font-medium { font-weight: var(--font-weight-medium); }
.u-font-semibold { font-weight: var(--font-weight-semibold); }

/* ==========================================================================
   9. Accessibility
   ========================================================================== */

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

.u-skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-teal);
  color: var(--white-text);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-organic-sm);       /* Organic radius */
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  text-decoration: none;
  z-index: var(--z-50);
  transition: top var(--transition-fast);
  opacity: 0;
  visibility: hidden;
}

.u-skip-link:focus {
  top: 6px;
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Focus Management - FIXED FOR KEYBOARD-ONLY FOCUS
   Only shows focus outline for keyboard navigation, not mouse clicks
   ========================================================================== */

/* Remove default focus outline for all interactive elements */
a,
button,
input,
select,
textarea,
.button {
  outline: none;
}

/* Show focus outline ONLY for keyboard navigation (not mouse clicks) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--primary-teal);
  outline-offset: 2px;
}

.button:focus-visible {
  outline-offset: 4px;
}

/* Fallback for browsers that don't support :focus-visible */
@supports not selector(:focus-visible) {
  a:focus,
  button:focus,
  input:focus,
  select:focus,
  textarea:focus,
  .button:focus {
    outline: 2px solid var(--primary-teal);
    outline-offset: 2px;
  }
  
  .button:focus {
    outline-offset: 4px;
  }
}

/* ==========================================================================
   10. Responsive Breakpoints - UPDATED TYPOGRAPHY
   ========================================================================== */

/* Small devices (576px+) */
@media (min-width: 576px) {
  .layout__grid-item--sm-half { flex: 0 0 50%; max-width: 50%; }
  .layout__grid-item--sm-third { flex: 0 0 33.333333%; max-width: 33.333333%; }
  
  .u-sm-hidden { display: none; }
  .u-sm-block { display: block; }
}

/* Medium devices (768px+) */
@media (min-width: 768px) {
  /* Container adjustments */
  .layout__container {
    padding-right: var(--container-padding-tablet);
    padding-left: var(--container-padding-tablet);
  }
  
  .layout__section {
    padding-top: var(--section-padding-tablet);
    padding-bottom: var(--section-padding-tablet);
  }
  
  /* Typography scaling - UPDATED */
  h1 { font-size: var(--font-size-h1-tablet); } /* 30px tablet */
  h2 { font-size: var(--font-size-2xl); } /* 28px */
  h3 { font-size: var(--font-size-lg); } /* 18px */
  /* H4 stays 14px */
  
  .text-large { font-size: 1rem; } /* 16px tablet hero subtext */
  
  /* Components */
  .card {
    padding: var(--card-padding-tablet);
  }
  
  /* Grid responsive classes */
  .layout__grid-item--md-half { flex: 0 0 50%; max-width: 50%; }
  .layout__grid-item--md-third { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .layout__grid-item--md-quarter { flex: 0 0 25%; max-width: 25%; }
  .layout__grid-item--md-two-thirds { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .layout__grid-item--md-seven-twelfths { flex: 0 0 58.333333%; max-width: 58.333333%; }
  
  /* Utilities */
  .u-md-hidden { display: none; }
  .u-md-block { display: block; }
  .u-md-flex { display: flex; }
}

/* iPad Pro specific fix (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .layout__container {
    max-width: 1240px; /* Wider container specifically for tablets like iPad Pro */
  }
  
  /* Give more width to the content area on tablets */
  .layout__grid-item--md-two-thirds { 
    flex: 0 0 75%; 
    max-width: 75%; 
  }
}

/* Large devices (992px+) */
@media (min-width: 992px) {
  /* Desktop spacing */
  .layout__container {
    padding-right: var(--container-padding-desktop);
    padding-left: var(--container-padding-desktop);
    max-width: var(--container-max-width-sm);  /* ADDED: Progressive scaling */
  }
  
  .layout__section {
    padding-top: var(--section-padding-desktop);
    padding-bottom: var(--section-padding-desktop);
  }
  
  .card {
    padding: var(--card-padding-desktop);
  }
  
  .button {
    padding: var(--button-padding-desktop-v) var(--button-padding-desktop-h);
  }
  
  .button--hero {
    padding: calc(var(--button-padding-desktop-v) + 2px) calc(var(--button-padding-desktop-h) + 8px);
  }
  
  .button--large {
    padding: calc(var(--button-padding-desktop-v) + 1px) calc(var(--button-padding-desktop-h) + 4px);
  }
  
  /* Typography scaling - UPDATED */
  h1 { font-size: var(--font-size-3xl); } /* 50px desktop */
  h2 { font-size: var(--font-size-2xl); } /* 28px desktop (same as tablet) */
  h3 { font-size: var(--font-size-lg); } /* 18px desktop (same as tablet) */
  /* H4 stays 14px */
  
  .text-large { font-size: var(--font-size-lg); } /* 18px desktop hero subtext */
  
  /* Grid responsive classes */
  .layout__grid-item--lg-half { flex: 0 0 50%; max-width: 50%; }
  .layout__grid-item--lg-third { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .layout__grid-item--lg-quarter { flex: 0 0 25%; max-width: 25%; }
  .layout__grid-item--lg-two-thirds { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .layout__grid-item--lg-seven-twelfths { flex: 0 0 58.333333%; max-width: 58.333333%; }
  
  /* Utilities */
  .u-lg-hidden { display: none; }
  .u-lg-block { display: block; }
  .u-lg-flex { display: flex; }
}

/* Large Desktop (1366px+) - Progressive Scaling */
@media (min-width: 1366px) {
  .layout__container {
    max-width: var(--container-max-width-lg);  /* 1320px */
  }
}

/* ==========================================================================
   11. Performance Optimizations - Reduced Motion Support
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .card,
  .button,
  .form__control {
    transition: none;                            /* No animations */
  }
  
  .card:hover,
  .button:hover {
    transform: none;                             /* No transform animations */
  }
}

/* ==========================================================================
   12. Print Styles
   ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.5;
  }
  
  h1, h2, h3 {
    page-break-after: avoid;
  }
  
  .u-no-print {
    display: none !important;
  }
}