/* ==========================================================================
   Glowing Pixels - Modern CSS Theme System
   Production-ready, semantic, and maintainable

   Built with modern CSS features:
   - CSS Custom Properties (Design Tokens)
   - Cascade Layers (@layer) for better organization
   - Logical Properties (padding-inline, margin-inline) for RTL support
   - Modern CSS Reset with :where() for low specificity
   - Accessibility-first (prefers-reduced-motion support)

   Architecture:
   - Design tokens in :root for easy theming
   - Layer-based organization for maintainability
   - Component-based styling with semantic naming
   - Utility classes for common patterns
   ========================================================================== */

/* ===== LAYER ORGANIZATION ===== */
@layer
  reset,           /* Modern CSS reset */
  theme,           /* Design tokens and variables */
  base,            /* Base element styles */
  layout,          /* Layout utilities */
  typography,      /* Typography utilities */
  components,      /* Component styles */
  utilities;       /* Utility classes */

/* ===== DESIGN TOKENS ===== */
@layer theme {
  :root {
    /* Typography */
    --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* Line Heights */
    --leading-none: 1;
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;

    /* Spacing (only what's used) */
    --space-1: 0.25rem;    /* 4px */
    --space-2: 0.5rem;     /* 8px */
    --space-1\.5: 0.375rem; /* 6px */
    --space-3: 0.75rem;    /* 12px */
    --space-4: 1rem;       /* 16px */
    --space-5: 1.25rem;    /* 20px */
    --space-6: 1.5rem;     /* 24px */
    --space-8: 2rem;       /* 32px */
    --space-10: 2.5rem;    /* 40px */
    --space-12: 3rem;      /* 48px */
    --space-14: 3.5rem;    /* 56px */
    --space-16: 4rem;      /* 64px */
    --space-20: 5rem;      /* 80px */
    --space-24: 6rem;      /* 96px */
    --space-3\.5: 0.875rem; /* 14px */

    /* Borders */
    --radius-md: 0.375rem; /* 6px */
    --radius-lg: 0.5rem;   /* 8px */
    --radius-xl: 0.75rem;  /* 12px */
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --easing-standard: cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Z-index */
    --z-modal: 1050;
    --z-modal-backdrop: 1040;

    /* Modal specific */
    --modal-backdrop-opacity: 0.5;
    --modal-max-height: 90vh;

    /* Component dimensions */
    --btn-height: 2.75rem;

    /* Colors - only what's actually used */
    --color-white: #fff;
    --color-black: #000;
    --color-gray-50: #f8fafc;
    --color-gray-100: #f1f5f9;
    --color-gray-200: #e2e8f0;
    --color-gray-300: #cbd5e1;
    --color-gray-500: #64748b;
    --color-gray-800: #1e293b;
    --color-gray-900: #0f172a;

    /* Brand colors */
    --color-primary: #0ea5e9;
    --color-accent: #8b5cf6;

    /* Semantic colors */
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;

    /* Theme system */
    --color-background: var(--color-white);
    --color-foreground: var(--color-gray-900);
    --color-muted: var(--color-gray-100);
    --color-muted-foreground: var(--color-gray-500);
    --color-border: var(--color-gray-200);
    --color-input: var(--color-gray-200);
    --color-ring: var(--color-primary);
    --color-card: var(--color-white);
    --color-card-foreground: var(--color-gray-900);
    --color-secondary: var(--color-gray-100);
    --color-secondary-foreground: var(--color-gray-900);

    /* Link colors */
    --color-link: var(--color-primary);
    --color-link-hover: var(--color-accent);

    /* Button hover states */
    --color-primary-hover: #0284c7;

    /* Foreground colors for colored backgrounds */
    --color-primary-foreground: var(--color-white);
    --color-success-foreground: var(--color-white);
    --color-accent-foreground: var(--color-white);
    --color-error-foreground: var(--color-white);
    --color-warning-foreground: var(--color-gray-900);
    --color-info-foreground: var(--color-white);

    /* Footer colors - high contrast for dark background */
    --color-footer-bg-start: var(--color-gray-800);
    --color-footer-bg-end: var(--color-gray-900);
    --color-footer-text: var(--color-white);
    --color-footer-text-muted: #cbd5e1;
    --color-footer-link: #e2e8f0;
    --color-footer-link-hover: var(--color-primary);
    --color-footer-border: rgba(255, 255, 255, 0.1);

    /* Semantic color variants */
    --color-success-border: rgba(16, 185, 129, 0.3);
    --color-success-bg: rgba(16, 185, 129, 0.1);
    --color-error-border: rgba(239, 68, 68, 0.3);
    --color-error-bg: rgba(239, 68, 68, 0.1);
    --color-warning-border: rgba(245, 158, 11, 0.3);
    --color-warning-bg: rgba(245, 158, 11, 0.1);
    --color-info-border: rgba(59, 130, 246, 0.3);
    --color-info-border-strong: rgba(59, 130, 246, 0.5);
    --color-info-bg: rgba(59, 130, 246, 0.1);
    --color-accent-50: rgba(139, 92, 246, 0.1);
  }
}

/* ===== MODERN CSS RESET ===== */
@layer reset {
  /* Remove default margins and paddings */
  :where(*, *::before, *::after) {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
  }

  /* Reset typography */
  :where(html) {
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    color-scheme: light dark;
  }

  /* Reset body and common elements */
  :where(body) {
    margin: 0;
    font-family: inherit;
    line-height: inherit;
    background-color: var(--color-background);
    color: var(--color-foreground);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Smooth scrolling and scroll snap */
  :where(html) {
    scroll-behavior: smooth;
    scroll-snap-type: y proximity;
    scroll-padding-top: 0;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
  }

  @media (prefers-reduced-motion: reduce) {
    :where(html) {
      scroll-behavior: auto;
      scroll-snap-type: none;
    }
  }

  /* Reset headings */
  :where(h1, h2, h3, h4, h5, h6) {
    overflow-wrap: break-word;
    word-break: break-word;
    font-weight: 600;
    line-height: 1.25;
    text-wrap: balance;
    hyphens: auto;
  }

  /* Reset lists */
  :where(ul, ol) {
    list-style: none;
  }

  /* Reset links */
  :where(a) {
    color: inherit;
    text-decoration: none;
  }

  /* Reset buttons */
  :where(button) {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
  }

  /* Reset images */
  :where(img, svg) {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* Form elements - minimal reset, full styling in base layer */
  :where(input, textarea, select) {
    font: inherit;
    margin: 0;
    color: inherit;
  }

  /* Checkboxes and radios should not inherit color for their background */
  :where(input[type="checkbox"],
         input[type="radio"]) {
    color: var(--color-primary);
  }
}

/* ===== BASE ELEMENT STYLES ===== */
@layer base {
  /* Typography - Base paragraph */
  :where(p) {
    margin: 0;
    line-height: 1.5;
    color: var(--color-foreground);
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Headings - Base sizes and spacing */
  :where(h1) {
    font-size: 2.25rem;
    line-height: 1.25;
    font-weight: 700;
    margin: 0;
    color: var(--color-foreground);
  }

  :where(h2) {
    font-size: 1.875rem;
    line-height: 1.3;
    font-weight: 600;
    margin: 0;
    color: var(--color-foreground);
  }

  :where(h3) {
    font-size: 1.5rem;
    line-height: 1.35;
    font-weight: 600;
    margin: 0;
    color: var(--color-foreground);
  }

  :where(h4) {
    font-size: 1.25rem;
    line-height: 1.4;
    font-weight: 600;
    margin: 0;
    color: var(--color-foreground);
  }

  :where(h5) {
    font-size: 1.125rem;
    line-height: 1.45;
    font-weight: 600;
    margin: 0;
    color: var(--color-foreground);
  }

  :where(h6) {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
    margin: 0;
    color: var(--color-foreground);
  }

  /* Links - Base link styling */
  :where(a) {
    color: var(--color-link);
    text-decoration: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    :where(a) {
      transition: color var(--transition-fast);
    }
  }

  :where(a:hover, a:focus-visible) {
    color: var(--color-link-hover);
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  :where(a:focus-visible) {
    outline: 3px solid var(--color-ring);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
  }

  /* Lists - Base list styling */
  :where(ul, ol) {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  :where(li) {
    margin: 0;
    padding: 0;
  }

  /* Text elements */
  :where(strong, b) {
    font-weight: 700;
    color: var(--color-foreground);
  }

  :where(em, i) {
    font-style: italic;
  }

  :where(code) {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background-color: var(--color-muted);
    padding: 0.125em 0.25em;
    border-radius: var(--radius-md);
    color: var(--color-foreground);
  }

  :where(pre) {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: var(--color-muted);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    color: var(--color-foreground);
  }

  :where(pre code) {
    background-color: transparent;
    padding: 0;
  }

  :where(blockquote) {
    margin: 0;
    padding-inline-start: var(--space-4);
    border-inline-start: 3px solid var(--color-border);
    color: var(--color-muted-foreground);
    font-style: italic;
  }

  :where(hr) {
    margin: var(--space-8) 0;
    border: none;
    border-top: 1px solid var(--color-border);
    height: 0;
  }

  /* Tables */
  :where(table) {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
  }

  :where(thead) {
    background-color: var(--color-muted);
  }

  :where(th) {
    padding: var(--space-2) var(--space-4);
    text-align: left;
    font-weight: 600;
    color: var(--color-foreground);
    border-bottom: 2px solid var(--color-border);
  }

  :where(td) {
    padding: var(--space-2) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-foreground);
  }

  :where(tbody tr:hover) {
    background-color: var(--color-muted);
  }

  /* Form elements - Base styling */
  :where(label) {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-foreground);
    margin-bottom: var(--space-3);
  }

  :where(input[type="text"],
         input[type="email"],
         input[type="password"],
         input[type="number"],
         input[type="tel"],
         input[type="url"],
         input[type="search"],
         input[type="date"],
         input[type="time"],
         input[type="datetime-local"]) {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    min-height: 44px;
    border: 1px solid var(--color-input);
    border-radius: var(--radius-lg);
    background-color: var(--color-background);
    color: var(--color-foreground);
    font: inherit;
    font-size: 1rem;
    outline: none;
  }

  @media (min-width: 640px) {
    :where(input[type="text"],
           input[type="email"],
           input[type="password"],
           input[type="number"],
           input[type="tel"],
           input[type="url"],
           input[type="search"],
           input[type="date"],
           input[type="time"],
           input[type="datetime-local"]) {
      padding: var(--space-2) var(--space-3);
      min-height: auto;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    :where(input[type="text"],
           input[type="email"],
           input[type="password"],
           input[type="number"],
           input[type="tel"],
           input[type="url"],
           input[type="search"],
           input[type="date"],
           input[type="time"],
           input[type="datetime-local"]) {
      transition: all var(--transition-fast);
    }
  }

  :where(input[type="text"]:focus,
         input[type="email"]:focus,
         input[type="password"]:focus,
         input[type="number"]:focus,
         input[type="tel"]:focus,
         input[type="url"]:focus,
         input[type="search"]:focus,
         input[type="date"]:focus,
         input[type="time"]:focus,
         input[type="datetime-local"]:focus) {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-ring);
    outline: 2px solid transparent;
    outline-offset: 2px;
  }

  :where(input::placeholder,
         textarea::placeholder) {
    color: var(--color-muted-foreground);
  }

  /* Checkbox and Radio inputs - must come after text inputs to override */
  :where(input[type="checkbox"],
         input[type="radio"]) {
    width: 1.25rem;
    height: 1.25rem;
    min-height: auto;
    padding: 0;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-card);
    color: var(--color-primary);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    accent-color: var(--color-primary);
  }

  /* Ensure unchecked checkboxes have visible background */
  :where(input[type="checkbox"]:not(:checked),
         input[type="radio"]:not(:checked)) {
    background-color: var(--color-card);
    border-color: var(--color-border);
  }

  :where(input[type="checkbox"]:checked,
         input[type="radio"]:checked) {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z' fill='white'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
  }

  :where(input[type="checkbox"]:focus,
         input[type="radio"]:focus) {
    outline: 2px solid var(--color-ring);
    outline-offset: 2px;
    border-color: var(--color-primary);
  }

  :where(input[type="checkbox"]:hover:not(:checked),
         input[type="radio"]:hover:not(:checked)) {
    border-color: var(--color-primary);
    background-color: var(--color-card);
  }

  :where(input[type="radio"]) {
    border-radius: 50%;
  }

  :where(input[type="radio"]:checked) {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3' fill='white'/%3E%3C/svg%3E");
  }

  :where(textarea) {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-input);
    border-radius: var(--radius-lg);
    background-color: var(--color-background);
    color: var(--color-foreground);
    font: inherit;
    font-size: 1rem;
    outline: none;
    resize: vertical;
    min-height: 120px;
  }

  @media (min-width: 640px) {
    :where(textarea) {
      padding: var(--space-2) var(--space-3);
      min-height: 80px;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    :where(textarea) {
      transition: all var(--transition-fast);
    }
  }

  :where(textarea:focus) {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-ring);
    outline: 2px solid transparent;
    outline-offset: 2px;
  }

  :where(select) {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    min-height: 44px;
    border: 1px solid var(--color-input);
    border-radius: var(--radius-lg);
    background-color: var(--color-background);
    color: var(--color-foreground);
    font: inherit;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
  }

  @media (min-width: 640px) {
    :where(select) {
      padding: var(--space-2) var(--space-3);
      min-height: auto;
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    :where(select) {
      transition: all var(--transition-fast);
    }
  }

  :where(select:focus) {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-ring);
    outline: 2px solid transparent;
    outline-offset: 2px;
  }

  /* Buttons - Base button styling */
  :where(button) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
    color: var(--color-foreground);
  }

  @media (prefers-reduced-motion: no-preference) {
    :where(button) {
      transition: all var(--transition-fast);
    }
  }

  :where(button:focus-visible) {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--color-ring);
  }

  :where(button:disabled) {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* Fieldset and Legend */
  :where(fieldset) {
    margin: 0;
    padding: var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
  }

  :where(legend) {
    padding: 0 var(--space-2);
    font-weight: 600;
    color: var(--color-foreground);
  }
}

/* ===== LAYOUT UTILITIES ===== */
@layer layout {
  /* Display */
  .flex { display: flex; }
  .grid { display: grid; }
  .hidden { display: none; }
  .block { display: block; }

  /* Position */
  .relative { position: relative; }
  .absolute { position: absolute; }
  .fixed { position: fixed; }

  /* Flexbox */
  .flex-col { flex-direction: column; }
  .flex-row { flex-direction: row; }
  .flex-wrap { flex-wrap: wrap; }
  .flex-1 { flex: 1 1 0%; }
  .shrink-0 { flex-shrink: 0; }
  .items-center { align-items: center; }
  .justify-center { justify-content: center; }
  .justify-between { justify-content: space-between; }
  .justify-end { justify-content: flex-end; }
  .justify-items-center { justify-items: center; }

  /* Grid utilities */
  :where(.grid-cols-1) { grid-template-columns: repeat(1, minmax(0, 1fr)); }
  :where(.grid-cols-2) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  :where(.grid-cols-3) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :where(.grid-cols-6) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .col-span-1 { grid-column: span 1 / span 1; }
  .col-span-2 { grid-column: span 2 / span 2; }
}

/* ===== SPACING UTILITIES ===== */
@layer layout {
  /* Margins */
  .mb-1 { margin-bottom: var(--space-1); }
  .mb-2 { margin-bottom: var(--space-2); }
  .mb-3 { margin-bottom: var(--space-3); }
  .mb-4 { margin-bottom: var(--space-4); }
  .mb-5 { margin-bottom: var(--space-5); }
  .mb-6 { margin-bottom: var(--space-6); }
  .mb-8 { margin-bottom: var(--space-8); }
  .mb-12 { margin-bottom: var(--space-12); }
  .mb-16 { margin-bottom: var(--space-16); }
  .mb-20 { margin-bottom: 5rem; }
  .mt-1 { margin-top: var(--space-1); }
  .mt-2 { margin-top: var(--space-2); }
  .mt-4 { margin-top: var(--space-4); }
  .mt-6 { margin-top: var(--space-6); }
  .mt-8 { margin-top: var(--space-8); }
  .mt-16 { margin-top: var(--space-16); }
  .mt-auto { margin-top: auto; }
  .mx-3 { margin-inline: var(--space-3); }
  .mx-4 { margin-inline: var(--space-4); }
  .mx-5 { margin-inline: var(--space-5); }
  .mx-auto { margin-inline: auto; }

  /* Padding - using logical properties for better RTL support */
  .p-4 { padding: var(--space-4); }
  .p-6 { padding: var(--space-6); }
  .p-8 { padding: var(--space-8); }
  .px-2 { padding-inline: var(--space-2); }
  .px-3 { padding-inline: var(--space-3); }
  .px-4 { padding-inline: var(--space-4); }
  .px-6 { padding-inline: var(--space-6); }
  .px-8 { padding-inline: var(--space-8); }
  .py-2 { padding-block: var(--space-2); }
  .py-2\.5 { padding-block: 0.625rem; }
  .py-3 { padding-block: var(--space-3); }
  .py-4 { padding-block: var(--space-4); }
  .py-6 { padding-block: var(--space-6); }
  .py-12 { padding-block: var(--space-12); }
  .py-20 { padding-block: 5rem; }
  .pt-3 { padding-top: var(--space-3); }
  .pt-4 { padding-top: var(--space-4); }
  .pt-5 { padding-top: var(--space-5); }
  .pt-6 { padding-top: var(--space-6); }
  .pt-8 { padding-top: var(--space-8); }
  .pb-4 { padding-bottom: var(--space-4); }
  .pb-5 { padding-bottom: var(--space-5); }

  /* Gap */
  .gap-3 { gap: var(--space-3); }
  .gap-4 { gap: var(--space-4); }
  .gap-6 { gap: var(--space-6); }
  .gap-8 { gap: var(--space-8); }

  /* Space between children */
  .space-y-3 > * + * { margin-top: var(--space-3); }
  .space-y-4 > * + * { margin-top: var(--space-4); }
  .space-y-5 > * + * { margin-top: var(--space-5); }
  .space-y-6 > * + * { margin-top: var(--space-6); }
  .space-y-8 > * + * { margin-top: var(--space-8); }

  /* Space between children (horizontal) */
  .space-x-3 > * + * { margin-left: var(--space-3); }
  .space-x-4 > * + * { margin-left: var(--space-4); }
  .space-x-6 > * + * { margin-left: var(--space-6); }
  .space-x-8 > * + * { margin-left: var(--space-8); }

  /* Size utilities */
  :where(.w-full) { width: 100%; }
  :where(.w-screen) { width: 100vw; }
  :where(.w-1) { width: var(--space-1); }
  :where(.w-2) { width: var(--space-2); }
  :where(.w-3) { width: var(--space-3); }
  :where(.w-4) { width: var(--space-4); }
  :where(.w-5) { width: var(--space-5); }
  :where(.w-6) { width: var(--space-6); }
  :where(.w-8) { width: var(--space-8); }
  :where(.w-12) { width: var(--space-12); }
  :where(.w-16) { width: var(--space-16); }
  :where(.w-px) { width: 1px; }
  :where(.w-0) { width: 0; }

  :where(.h-full) { height: 100%; }
  :where(.h-screen) { height: 100vh; }
  :where(.h-1) { height: var(--space-1); }
  :where(.h-2) { height: var(--space-2); }
  :where(.h-3) { height: var(--space-3); }
  :where(.h-4) { height: var(--space-4); }
  :where(.h-5) { height: var(--space-5); }
  :where(.h-6) { height: var(--space-6); }
  :where(.h-8) { height: var(--space-8); }
  :where(.h-12) { height: var(--space-12); }
  :where(.h-16) { height: var(--space-16); }

  /* Min/Max dimensions */
  :where(.min-h-screen) { min-height: 100vh; }
  :where(.min-h-full) { min-height: 100%; }
  :where(.max-h-screen) { max-height: 100vh; }
  :where(.max-h-full) { max-height: 100%; }
  :where(.max-h-modal) { max-height: var(--modal-max-height); }
  :where(.max-w-screen) { max-width: 100vw; }
  :where(.max-w-full) { max-width: 100%; }

  /* Max widths */
  .max-w-3xl { max-width: 48rem; }
  .max-w-4xl { max-width: 56rem; }
  .max-w-5xl { max-width: 64rem; }
  .max-w-7xl { max-width: 80rem; }
  .max-w-2xl { max-width: 42rem; }
}

/* ===== TYPOGRAPHY ===== */
@layer typography {
  /* Font sizes */
  .text-xs { font-size: 0.75rem; line-height: 1rem; }
  .text-sm { font-size: 0.875rem; line-height: 1.25rem; }
  .text-base { font-size: 1rem; line-height: 1.5rem; }
  .text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
  .text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .text-5xl { font-size: 3rem; line-height: 1; }
  .text-6xl { font-size: 3.75rem; line-height: 1; }
  .text-7xl { font-size: 4.5rem; line-height: 1; }

  /* Semantic text sizes */
  .text-body-large { font-size: 1.125rem; line-height: 1.75rem; }
  .text-body { font-size: 1rem; line-height: 1.5rem; }
  .text-caption { font-size: 0.875rem; line-height: 1.25rem; }

  /* Font weights */
  .font-medium { font-weight: 500; }
  .font-semibold { font-weight: 600; }
  .font-bold { font-weight: 700; }

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

  /* Text transform */
  .uppercase { text-transform: uppercase; }
  .tracking-wider { letter-spacing: 0.05em; }

  /* Text decoration */
  .underline { text-decoration: underline; }
  .not-italic { font-style: normal; }

  /* Line height */
  .leading-relaxed { line-height: 1.625; }
  .leading-tight { line-height: 1.25; }

  /* Text wrap */
  .text-balance { text-wrap: balance; }

  /* Text colors */
  .text-foreground { color: var(--color-foreground); }
  .text-muted-foreground { color: var(--color-muted-foreground); }
  .text-primary { color: var(--color-primary); }
  .text-accent { color: var(--color-accent); }
  .text-success { color: var(--color-success); }
  .text-error { color: var(--color-error); }
  .text-warning { color: var(--color-warning); }
  .text-info { color: var(--color-info); }
  .text-primary-foreground { color: var(--color-primary-foreground); }
  .text-success-foreground { color: var(--color-success-foreground); }
  .text-accent-foreground { color: var(--color-accent-foreground); }
  .text-card-foreground { color: var(--color-card-foreground); }
  .text-secondary-foreground { color: var(--color-secondary-foreground); }

  /* .text-link utility - extends base link styling (no additional styles needed) */
}

/* ===== ESSENTIAL STYLES ===== */
@layer layout {
  /* Background colors */
  .bg-background { background-color: var(--color-background); }
  .bg-card { background-color: var(--color-card); }
  .bg-secondary { background-color: var(--color-secondary); }
  .bg-primary { background-color: var(--color-primary); }
  .bg-accent { background-color: var(--color-accent); }
  .bg-success { background-color: var(--color-success); }
  .bg-error { background-color: var(--color-error); }
  .bg-info { background-color: var(--color-info); }
  .bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }
  .bg-modal-backdrop { background-color: rgba(0, 0, 0, var(--modal-backdrop-opacity)); }

  .bg-secondary-50 {
    background-color: var(--color-secondary);
    opacity: 0.5;
  }

  /* Border styles */
  .border { border: 1px solid var(--color-border); }
  .border-t { border-top: 1px solid var(--color-border); }
  .border-input { border-color: var(--color-input); }
  .border-primary { border-color: var(--color-primary); }
  .border-success { border-color: var(--color-success); }
  .border-error { border-color: var(--color-error); }
  .border-warning { border-color: var(--color-warning); }
  .border-info { border-color: var(--color-info); }

  /* Border radius */
  .rounded { border-radius: var(--radius-md); }
  .rounded-lg { border-radius: var(--radius-lg); }
  .rounded-xl { border-radius: var(--radius-xl); }
  .rounded-full { border-radius: var(--radius-full); }

  /* Shadows */
  .shadow-sm { box-shadow: var(--shadow-sm); }
  .shadow-md { box-shadow: var(--shadow-md); }
  .shadow-lg { box-shadow: var(--shadow-lg); }
  .shadow-xl { box-shadow: var(--shadow-xl); }

  /* Positioning */
  .absolute { position: absolute; }
  .fixed { position: fixed; }
  .inset-0 { inset: 0; }
  .top-0 { top: 0; }
  .top-4 { top: var(--space-4); }
  .right-4 { right: var(--space-4); }
  .bottom-0 { bottom: 0; }
  .left-0 { left: 0; }
  .z-10 { z-index: 10; }
  .z-20 { z-index: 20; }
  .z-50 { z-index: var(--z-modal); }
  .z-modal { z-index: var(--z-modal); }
  .z-modal-backdrop { z-index: var(--z-modal-backdrop); }

  /* Container padding - using logical properties */
  .container-padding {
    padding-inline: var(--space-4);
    min-width: 0;
  }

  @media (min-width: 640px) {
    .container-padding {
      padding-inline: var(--space-6);
    }
  }

  @media (min-width: 1024px) {
    .container-padding {
      padding-inline: var(--space-8);
    }
  }

  /* Responsive utilities - consolidated breakpoints */
  @media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:px-6 { padding-inline: var(--space-6); }
    .sm\:px-0 { padding-inline: 0; }
    .sm\:w-auto { width: auto; }
    .sm\:mx-6 { margin-inline: var(--space-6); }
    .sm\:inline { display: inline; }
  }

}

/* ===== COMPONENT STYLES ===== */
@layer components {
  /* ===== BUTTON SYSTEM ===== */

  /* Base button styles - foundation for all buttons */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    white-space: nowrap;
    border-radius: var(--radius-lg);
    font-weight: 500;
    cursor: pointer;
    border: none;
    text-decoration: none;
    user-select: none;
    font-size: 1rem;
    height: var(--btn-height);
    padding: 0 var(--space-8);
  }

  @media (prefers-reduced-motion: no-preference) {
    .btn {
      transition: all var(--transition-normal);
    }
  }

  .btn:focus-visible {
    outline: 3px solid var(--color-ring);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--color-ring);
  }

  .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* Primary button - gradient background */
  .btn-primary {
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    color: var(--color-primary-foreground);
    font-weight: 600;
  }

  .btn-primary:hover,
  .btn-primary:focus-visible {
    opacity: 0.9;
    box-shadow: 0 25px 50px -12px rgba(14, 165, 233, 0.4);
  }

  /* Secondary button - card background */
  .btn-secondary {
    background-color: var(--color-card);
    color: var(--color-card-foreground);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
  }

  @media (prefers-reduced-motion: no-preference) {
    .btn-secondary:hover,
    .btn-secondary:focus-visible {
      transform: translateY(-2px);
    }
  }

  .btn-secondary:hover,
  .btn-secondary:focus-visible {
    box-shadow: var(--shadow-lg);
  }

  /* Outline button - solid background with border for visibility */
  .btn-outline {
    background-color: var(--color-card);
    color: var(--color-foreground);
    border: 2px solid var(--color-border);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
  }

  @media (prefers-reduced-motion: no-preference) {
    .btn-outline:hover,
    .btn-outline:focus-visible {
      transform: translateY(-2px);
    }
  }

  .btn-outline:hover,
  .btn-outline:focus-visible {
    background-color: var(--color-card);
    color: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
  }

  /* CTA buttons - larger and more prominent */
  .btn-cta-primary {
    padding: var(--space-3) var(--space-6);
    font-weight: 600;
    font-size: 1.125rem;
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    color: var(--color-primary-foreground);
    box-shadow: var(--shadow-lg);
  }

  @media (prefers-reduced-motion: no-preference) {
    .btn-cta-primary:hover,
    .btn-cta-primary:focus-visible {
      transform: translateY(-2px);
    }
  }

  .btn-cta-primary:hover,
  .btn-cta-primary:focus-visible {
    box-shadow: var(--shadow-xl);
  }

  .btn-cta-secondary {
    padding: var(--space-3) var(--space-6);
    font-weight: 600;
    font-size: 1.125rem;
    background-color: var(--color-card);
    color: var(--color-card-foreground);
    box-shadow: var(--shadow-sm);
  }

  @media (prefers-reduced-motion: no-preference) {
    .btn-cta-secondary:hover,
    .btn-cta-secondary:focus-visible {
      transform: translateY(-2px);
    }
  }

  .btn-cta-secondary:hover,
  .btn-cta-secondary:focus-visible {
    box-shadow: var(--shadow-lg);
  }

  /* Focus ring utility for buttons */
  .focus-ring:focus-visible {
      outline: 2px solid transparent;
      outline-offset: 2px;
      box-shadow: 0 0 0 2px var(--color-ring);
  }

  /* Transition utilities */
  @media (prefers-reduced-motion: no-preference) {
    .transition-transform {
      transition: transform var(--transition-normal);
    }

    .transition-shadow {
      transition: box-shadow var(--transition-normal);
    }
  }

  /* Animation utilities */
  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  .animate-spin {
    animation: spin 1s linear infinite;
  }

  @media (prefers-reduced-motion: reduce) {
    .animate-spin {
      animation: none;
    }
  }

  /* Group hover utilities */
  @media (prefers-reduced-motion: no-preference) {
    .group:hover .group-hover\:translate-x-1,
    .group:focus-visible .group-hover\:translate-x-1 {
      transform: translateX(0.25rem);
    }
  }

  /* Backdrop blur utilities */
  .backdrop-blur-sm {
    backdrop-filter: blur(4px);
  }


  /* Opacity modifier utilities */
  .bg-primary\/5 { background-color: rgba(14, 165, 233, 0.05); }
  .bg-primary\/10 { background-color: rgba(14, 165, 233, 0.1); }
  .bg-accent\/10 { background-color: rgba(139, 92, 246, 0.1); }
  .bg-success\/10 { background-color: rgba(16, 185, 129, 0.1); }
  .bg-info\/10 { background-color: rgba(59, 130, 246, 0.1); }
  .bg-warning\/10 { background-color: rgba(245, 158, 11, 0.1); }
  .bg-error\/10 { background-color: rgba(239, 68, 68, 0.1); }
  .bg-secondary-50 { background-color: rgba(248, 250, 252, 0.5); }
  .border-primary\/20 { border-color: rgba(14, 165, 233, 0.2); }
  .border-primary\/30 { border-color: rgba(14, 165, 233, 0.3); }

  /* ===== FORM SYSTEM ===== */
  /* Form classes extend base element styles - no duplication */
  :where(.form-group) {
    margin-bottom: var(--space-4);
  }

  :where(.form-error) {
    font-size: 0.875rem;
    color: var(--color-error);
    margin-top: var(--space-2);
    display: block;
    min-height: 1.25rem;
  }

  :where(.form-error.hidden) {
    display: none;
  }

  /* Visually hidden but accessible to screen readers */
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
  }

  /* Aria live region for announcements */
  [role="alert"],
  [aria-live] {
    position: relative;
  }

  /* ===== CARD SYSTEM ===== */
  :where(.card) {
    padding: var(--space-6);
    border-radius: var(--radius-xl);
    background-color: var(--color-card);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    overflow-wrap: break-word;
  }

  /* Card hover effect */
  @media (prefers-reduced-motion: no-preference) {
    :where(.card-hover) {
      transition: all var(--transition-normal);
    }

    :where(.card-hover:hover),
    :where(.card-hover:focus-visible) {
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg);
    }
  }

  /* Semantic card variants using data attributes */
  :where(.card[data-variant="success"]) {
    border-color: var(--color-success-border);
    background-color: var(--color-success-bg);
  }

  :where(.card[data-variant="error"]) {
    border-color: var(--color-error-border);
    background-color: var(--color-error-bg);
  }

  :where(.card[data-variant="warning"]) {
    border-color: var(--color-warning-border);
    background-color: var(--color-warning-bg);
  }

  :where(.card[data-variant="info"]) {
    border-color: var(--color-info-border);
    background-color: var(--color-info-bg);
  }

  /* ===== MODAL SYSTEM ===== */
  :where(.modal-backdrop) {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal-backdrop);
    display: none;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, var(--modal-backdrop-opacity));
    backdrop-filter: blur(4px);
  }

  :where(.modal-backdrop.active) {
    display: flex;
  }

  :where(.modal-content) {
    position: relative;
    background-color: var(--color-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 90vw;
    max-height: var(--modal-max-height);
    overflow-y: auto;
    margin: var(--space-4);
  }

  @media (min-width: 640px) {
    :where(.modal-content) {
      margin: var(--space-6);
    }
  }

  :where(.modal-header) {
    padding: var(--space-8);
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    color: var(--color-primary-foreground);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }

  :where(.modal-body) {
    padding: var(--space-8);
  }

  :where(.modal-footer) {
    padding: var(--space-6) var(--space-8);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
  }

  :where(.modal-close) {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    color: var(--color-muted-foreground);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-md);
    z-index: 10;
  }

  @media (prefers-reduced-motion: no-preference) {
    :where(.modal-close) {
      transition: all var(--transition-fast);
    }
  }

  :where(.modal-close:hover),
  :where(.modal-close:focus-visible) {
    color: var(--color-foreground);
    background-color: var(--color-secondary);
  }

  /* ===== LINK STYLES ===== */
  /* .link class - extends base link styling (no duplication needed) */

  /* Accessibility */
  .skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-primary-foreground);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 0 0 var(--radius-md) 0;
    font-weight: 600;
    font-size: 1rem;
    z-index: 10000;
    min-height: 44px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-lg);
    border: 2px solid transparent;
  }

  @media (prefers-reduced-motion: no-preference) {
    .skip-to-main {
      transition: top var(--transition-fast), outline var(--transition-fast);
    }
  }

  .skip-to-main:focus {
    top: 0;
    outline: 3px solid var(--color-ring);
    outline-offset: 2px;
  }

  .skip-to-main:focus:not(:focus-visible) {
    outline: none;
  }

  /* ===== HERO SECTION - Modern Asymmetric Layout ===== */
  .hero {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-background);
    isolation: isolate;
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    scroll-margin-top: 0;
  }

  @media (prefers-reduced-motion: reduce) {
    .hero {
      scroll-snap-align: none;
    }
  }

  /* Background Layer */
  .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }

  .hero-bg-gradient {
    position: absolute;
    inset: -50%;
    background:
      radial-gradient(circle at 15% 25%, rgba(14, 165, 233, 0.12) 0%, transparent 50%),
      radial-gradient(circle at 85% 75%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
      radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.08) 0%, transparent 50%);
    filter: blur(100px);
    opacity: 0.8;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-bg-gradient {
      animation: hero-gradient-float 25s ease-in-out infinite;
    }
  }

  @keyframes hero-gradient-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(3%, -3%) scale(1.05); }
    66% { transform: translate(-3%, 3%) scale(0.95); }
  }

  .hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(14, 165, 233, 0.02) 1px, transparent 1px),
      linear-gradient(90deg, rgba(14, 165, 233, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
  }

  .hero-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-bg-orb {
      animation: hero-orb-float 20s ease-in-out infinite;
    }
  }

  .hero-bg-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35), transparent);
    top: -10%;
    right: 10%;
    animation-delay: 0s;
  }

  .hero-bg-orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), transparent);
    bottom: -15%;
    left: 5%;
    animation-delay: 7s;
  }

  .hero-bg-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent);
    top: 50%;
    right: 20%;
    transform: translateY(-50%);
    animation-delay: 14s;
  }

  @keyframes hero-orb-float {
    0%, 100% {
      transform: translate(0, 0) scale(1);
      opacity: 0.5;
    }
    25% {
      transform: translate(40px, -40px) scale(1.1);
      opacity: 0.7;
    }
    50% {
      transform: translate(-30px, 30px) scale(0.9);
      opacity: 0.4;
    }
    75% {
      transform: translate(30px, 40px) scale(1.05);
      opacity: 0.6;
    }
  }

  /* Main Layout Wrapper */
  .hero-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 90rem;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: center;
    height: 100%;
    min-height: 100%;
    overflow-x: hidden;
  }

  @media (min-width: 768px) {
    .hero-wrapper {
      padding: var(--space-12) var(--space-6);
      grid-template-columns: 1fr 0.4fr;
      gap: var(--space-12);
    }
  }

  @media (min-width: 1024px) {
    .hero-wrapper {
      padding: var(--space-16) var(--space-8);
      gap: var(--space-16);
    }
  }

  /* Main Content Column */
  .hero-main {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    max-width: 52rem;
    min-width: 0;
    width: 100%;
  }

  @media (min-width: 768px) {
    .hero-main {
      gap: var(--space-8);
    }
  }

  /* Badge */
  .hero-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(14, 165, 233, 0.2);
    width: fit-content;
    max-width: 100%;
    margin-bottom: var(--space-2);
  }

  .hero-badge-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 0.02em;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Headline - Large, Bold, Left-Aligned */
  .hero-headline {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--color-foreground);
    margin: 0;
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  @media (min-width: 375px) {
    .hero-headline {
      font-size: 2.5rem;
    }
  }

  @media (min-width: 640px) {
    .hero-headline {
      font-size: 3.5rem;
      line-height: 1.1;
      letter-spacing: -0.03em;
    }
  }

  @media (min-width: 768px) {
    .hero-headline {
      font-size: 4.5rem;
      line-height: 1.05;
    }
  }

  @media (min-width: 1024px) {
    .hero-headline {
      font-size: 5.5rem;
      letter-spacing: -0.04em;
    }
  }

  /* Text Group - Subtitle only now */
  .hero-text-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-top: var(--space-5);
    max-width: 44rem;
    min-width: 0;
    width: 100%;
  }

  .hero-lead {
    font-size: 1.375rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--color-foreground);
    margin: 0;
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  @media (min-width: 640px) {
    .hero-lead {
      font-size: 1.5rem;
      line-height: 1.5;
    }
  }

  @media (min-width: 768px) {
    .hero-lead {
      font-size: 1.75rem;
      line-height: 1.5;
    }
  }

  @media (min-width: 1024px) {
    .hero-lead {
      font-size: 2rem;
      line-height: 1.45;
    }
  }

  .hero-body {
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--color-muted-foreground);
    margin: 0;
    max-width: 42rem;
  }

  @media (min-width: 640px) {
    .hero-body {
      font-size: 1.125rem;
      line-height: 1.8;
    }
  }

  @media (min-width: 768px) {
    .hero-body {
      font-size: 1.1875rem;
      line-height: 1.8;
    }
  }

  /* Actions Group */
  .hero-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: 0;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  @media (min-width: 640px) {
    .hero-actions-group {
      gap: var(--space-5);
    }
  }

  .hero-action-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
  }

  .hero-action-icon {
    display: inline-flex;
    align-items: center;
    transition: transform var(--transition-fast);
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-action-primary:hover .hero-action-icon {
      transform: translateX(0.375rem);
    }
  }


  /* Aside Column - Visual Element */
  .hero-aside {
    display: none;
    position: relative;
    align-self: center;
  }

  @media (min-width: 768px) {
    .hero-aside {
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }

  /* Hero Visual Container */
  .hero-visual {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  @media (min-width: 1024px) {
    .hero-visual {
      max-width: 500px;
    }
  }

  .hero-visual-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 20px 40px rgba(14, 165, 233, 0.15));
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-visual-container {
      animation: hero-visual-float 6s ease-in-out infinite;
    }
  }

  @keyframes hero-visual-float {
    0%, 100% {
      transform: translateY(0) scale(1);
    }
    50% {
      transform: translateY(-20px) scale(1.02);
    }
  }

  /* Logo Styling - Reusable for hero and future logo usage */
  .logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  /* Hero cover image styling */
  .hero-cover {
    opacity: 0.95;
    transition: opacity var(--transition-normal), transform var(--transition-normal);
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-visual-container:hover .hero-cover {
      opacity: 1;
      transform: scale(1.05);
    }

    .hero-visual-container:hover {
      filter: drop-shadow(0 25px 50px rgba(14, 165, 233, 0.25));
    }
  }

  /* Hero CTA Section - Separate section below hero */
  .hero-cta-section {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-background);
    border-top: 1px solid var(--color-border);
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    scroll-margin-top: 0;
    overflow: hidden;
    isolation: isolate;
  }

  /* Background Elements */
  .hero-cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }

  .hero-cta-bg-gradient {
    position: absolute;
    inset: -50%;
    background:
      radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.2) 0%, transparent 55%),
      radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.2) 0%, transparent 55%),
      radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.12) 0%, transparent 45%);
    filter: blur(80px);
    opacity: 1;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-cta-bg-gradient {
      animation: hero-cta-gradient-float 30s ease-in-out infinite;
    }
  }

  @keyframes hero-cta-gradient-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(5%, -5%) scale(1.1); }
  }

  .hero-cta-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(14, 165, 233, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(14, 165, 233, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.6;
  }

  .hero-cta-bg-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
      radial-gradient(circle at 30% 40%, rgba(14, 165, 233, 0.03) 0%, transparent 50%),
      radial-gradient(circle at 70% 60%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-cta-section {
      scroll-snap-align: none;
    }
  }

  .hero-cta-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 90rem;
    margin: 0 auto;
    padding: var(--space-8) var(--space-4) calc(var(--space-8) + 4rem) var(--space-4);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  @media (min-width: 768px) {
    .hero-cta-container {
      padding: var(--space-12) var(--space-6) calc(var(--space-12) + 4.5rem) var(--space-6);
    }
  }

  @media (min-width: 1024px) {
    .hero-cta-container {
      padding: var(--space-16) var(--space-8) calc(var(--space-16) + 5rem) var(--space-8);
    }
  }

  .hero-cta-content {
    max-width: 64rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-12);
    align-items: center;
    text-align: center;
    justify-content: center;
    width: 100%;
  }

  @media (min-width: 640px) {
    .hero-cta-content {
      gap: var(--space-16);
    }
  }

  @media (min-width: 768px) {
    .hero-cta-content {
      gap: var(--space-20);
    }
  }

  .hero-cta-description-section {
    position: relative;
    width: 100%;
    max-width: 60rem;
    padding: var(--space-8) var(--space-6);
  }

  @media (min-width: 640px) {
    .hero-cta-description-section {
      padding: var(--space-10) var(--space-8);
    }
  }

  @media (min-width: 768px) {
    .hero-cta-description-section {
      max-width: 64rem;
      padding: var(--space-12) var(--space-10);
    }
  }

  .hero-cta-description {
    font-size: var(--text-lg);
    font-weight: 400;
    line-height: var(--leading-loose);
    color: var(--color-foreground);
    margin: 0;
    letter-spacing: var(--tracking-wide);
    text-wrap: pretty;
    position: relative;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  }

  @media (min-width: 640px) {
    .hero-cta-description {
      font-size: var(--text-xl);
      line-height: var(--leading-loose);
      letter-spacing: var(--tracking-wide);
    }
  }

  @media (min-width: 768px) {
    .hero-cta-description {
      font-size: var(--text-2xl);
      line-height: var(--leading-loose);
      letter-spacing: var(--tracking-wide);
    }
  }

  @media (min-width: 1024px) {
    .hero-cta-description {
      font-size: var(--text-3xl);
      line-height: var(--leading-loose);
      max-width: 68rem;
    }
  }

  /* Add visual interest with gradient text on key phrases */
  .hero-cta-description::before {
    content: '';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 8rem;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), transparent);
    border-radius: var(--radius-full);
    opacity: 0.5;
  }

  @media (min-width: 768px) {
    .hero-cta-description::before {
      width: 12rem;
      height: 4px;
      top: -3rem;
    }
  }

  /* Decorative elements around text */
  .hero-cta-description-section::before,
  .hero-cta-description-section::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 4rem;
    background: linear-gradient(180deg, transparent, var(--color-primary), transparent);
    opacity: 0.3;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
  }

  .hero-cta-description-section::after {
    left: auto;
    right: 0;
    background: linear-gradient(180deg, transparent, var(--color-accent), transparent);
  }

  @media (min-width: 768px) {
    .hero-cta-description-section::before,
    .hero-cta-description-section::after {
      height: 6rem;
      width: 3px;
    }
  }

  /* Reassurance Points */
  .hero-cta-reassurance {
    margin-top: var(--space-12);
    width: 100%;
  }

  @media (min-width: 640px) {
    .hero-cta-reassurance {
      margin-top: var(--space-14);
    }
  }

  @media (min-width: 768px) {
    .hero-cta-reassurance {
      margin-top: var(--space-16);
    }
  }

  .hero-cta-reassurance-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    max-width: 40rem;
    margin: 0 auto;
  }

  @media (min-width: 640px) {
    .hero-cta-reassurance-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: var(--space-5);
      max-width: 48rem;
    }
  }

  @media (min-width: 768px) {
    .hero-cta-reassurance-grid {
      gap: var(--space-6);
      max-width: 56rem;
    }
  }

  .hero-cta-reassurance-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-cta-reassurance-item:hover {
      background: rgba(255, 255, 255, 0.04);
      border-color: var(--color-primary);
      transform: translateY(-2px);
    }
  }

  @media (min-width: 768px) {
    .hero-cta-reassurance-item {
      padding: var(--space-4) var(--space-5);
    }
  }

  .hero-cta-reassurance-text {
    font-size: var(--text-sm);
    color: var(--color-muted-foreground);
    line-height: var(--leading-normal);
  }

  @media (min-width: 640px) {
    .hero-cta-reassurance-text {
      font-size: var(--text-base);
    }
  }

  /* Full-Width Trust Bar - Promo/Special Offers Style */
  .hero-trust-bar {
    width: 100vw;
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(139, 92, 246, 0.1));
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-5) 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    z-index: 10;
  }

  .hero-trust-bar::-webkit-scrollbar {
    display: none;
  }

  @media (min-width: 768px) {
    .hero-trust-bar {
      padding: var(--space-6) 0;
    }
  }

  .hero-trust-bar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-4);
    min-width: min-content;
    width: 100%;
    max-width: 90rem;
    margin: 0 auto;
  }

  @media (min-width: 640px) {
    .hero-trust-bar-container {
      padding: 0 var(--space-6);
    }
  }

  @media (min-width: 768px) {
    .hero-trust-bar-container {
      padding: 0 var(--space-8);
    }
  }

  .hero-trust-bar .hero-trust-item {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    transition: opacity var(--transition-fast);
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-trust-bar .hero-trust-item:hover {
      opacity: 0.8;
    }
  }

  .hero-trust-divider {
    display: inline-block;
    width: 1px;
    height: 1.5rem;
    background: var(--color-border);
    margin: 0 var(--space-4);
    opacity: 0.5;
    flex-shrink: 0;
  }

  @media (min-width: 640px) {
    .hero-trust-divider {
      margin: 0 var(--space-6);
      height: 1.75rem;
    }
  }

  @media (min-width: 768px) {
    .hero-trust-divider {
      margin: 0 var(--space-8);
      height: 2rem;
    }
  }

  .hero-trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
  }

  @media (min-width: 640px) {
    .hero-trust-icon {
      width: 1.25rem;
      height: 1.25rem;
    }
  }

  @media (min-width: 768px) {
    .hero-trust-icon {
      width: 1.375rem;
      height: 1.375rem;
    }
  }

  .hero-trust-bar .hero-trust-item:nth-child(1) .hero-trust-icon {
    color: var(--color-primary);
  }

  .hero-trust-bar .hero-trust-item:nth-child(3) .hero-trust-icon {
    color: var(--color-accent);
  }

  .hero-trust-bar .hero-trust-item:nth-child(5) .hero-trust-icon {
    color: var(--color-info);
  }

  .hero-trust-bar .hero-trust-item:nth-child(7) .hero-trust-icon {
    color: var(--color-success);
  }

  .hero-trust-bar .hero-trust-label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-foreground);
    white-space: nowrap;
    letter-spacing: var(--tracking-wide);
    line-height: var(--leading-normal);
  }

  @media (min-width: 640px) {
    .hero-trust-bar .hero-trust-label {
      font-size: var(--text-base);
    }
  }

  @media (min-width: 768px) {
    .hero-trust-bar .hero-trust-label {
      font-size: var(--text-base);
      letter-spacing: var(--tracking-wider);
    }
  }

  /* Logo utility classes for future use */
  .logo-sm {
    width: 2rem;
    height: 2rem;
  }

  .logo-md {
    width: 3rem;
    height: 3rem;
  }

  .logo-lg {
    width: 4rem;
    height: 4rem;
  }

  .logo-xl {
    width: 6rem;
    height: 6rem;
  }

  /* Logo in header/nav context */
  .logo-header {
    width: auto;
    height: 2.5rem;
    max-width: 200px;
  }

  /* Logo in footer context */
  .logo-footer {
    width: auto;
    height: 3rem;
    max-width: 180px;
    opacity: 0.9;
  }

  /* Responsive adjustments */
  @media (max-width: 1023px) {
    .hero-visual {
      max-width: 300px;
    }
  }

  /* Entrance Animation */
  @media (prefers-reduced-motion: no-preference) {
    .hero-badge {
      animation: hero-fade-slide 0.6s ease-out backwards;
      animation-delay: 0.1s;
    }

    .hero-headline {
      animation: hero-fade-slide 0.7s ease-out backwards;
      animation-delay: 0.2s;
    }

    .hero-lead {
      animation: hero-fade-slide 0.7s ease-out backwards;
      animation-delay: 0.3s;
    }

    .hero-body {
      animation: hero-fade-slide 0.7s ease-out backwards;
      animation-delay: 0.4s;
    }

    .hero-actions-group {
      animation: hero-fade-slide 0.7s ease-out backwards;
      animation-delay: 0.5s;
    }

    .hero-trust {
      animation: hero-fade-slide 0.7s ease-out backwards;
      animation-delay: 0.6s;
    }
  }

  @keyframes hero-fade-slide {
    from {
      opacity: 0;
      transform: translateY(2rem);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .hero-badge,
    .hero-headline,
    .hero-lead,
    .hero-body,
    .hero-actions-group,
    .hero-trust {
      animation: none;
    }
  }

  /* Gradient Text */
  .gradient-text {
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  /* Modern Hero Background Effects */
  .hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
  }

  /* Animated Gradient Mesh */
  .hero-gradient-mesh {
    position: absolute;
    inset: -50%;
    background:
      radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.15) 0%, transparent 50%),
      radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
      radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    filter: blur(80px);
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-gradient-mesh {
      animation: gradient-mesh-move 20s ease-in-out infinite;
    }
  }

  @keyframes gradient-mesh-move {
    0%, 100% {
      transform: translate(0, 0) scale(1);
    }

    33% {
      transform: translate(5%, -5%) scale(1.1);
    }

    66% {
      transform: translate(-5%, 5%) scale(0.9);
    }
  }

  /* Subtle Grid Pattern */
  .hero-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(rgba(14, 165, 233, 0.03) 1px, transparent 1px),
      linear-gradient(90deg, rgba(14, 165, 233, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.4;
  }

  /* Floating Orbs */
  .hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
  }

  @media (prefers-reduced-motion: no-preference) {
    .hero-orb {
      animation: float-orb 15s ease-in-out infinite;
    }
  }

  .hero-orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.4), rgba(14, 165, 233, 0));
    top: 10%;
    right: 10%;
    animation-delay: 0s;
  }

  .hero-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0));
    bottom: 15%;
    left: 15%;
    animation-delay: 5s;
  }

  .hero-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 10s;
  }

  @keyframes float-orb {
    0%, 100% {
      transform: translate(0, 0) scale(1);
      opacity: 0.6;
    }

    25% {
      transform: translate(30px, -30px) scale(1.1);
      opacity: 0.8;
    }

    50% {
      transform: translate(-20px, 20px) scale(0.9);
      opacity: 0.5;
    }

    75% {
      transform: translate(20px, 30px) scale(1.05);
      opacity: 0.7;
    }
  }


  /* Legacy Background Effects (kept for compatibility) */
  .bg-grid {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
  }

  .bg-size-\[60px_60px\] {
    background-size: 60px 60px;
  }

  .bg-radial-primary {
    background: radial-gradient(circle at center, rgba(14, 165, 233, 0.3) 0%, transparent 70%);
  }

  /* Linear gradients */
  .bg-linear-to-r {
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  }

  .bg-linear-to-t {
    background: linear-gradient(to top, var(--color-background) 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
  }

  /* Legacy Animations (kept for compatibility) */
  @keyframes pulse-slow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
  }

  @keyframes pulse-delayed {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
  }

  @media (prefers-reduced-motion: no-preference) {
    .animate-pulse-slow {
      animation: pulse-slow 4s ease-in-out infinite;
    }

    .animate-pulse-delayed {
      animation: pulse-delayed 4s ease-in-out infinite 1.5s;
    }
  }

  /* Animation delay utilities */
  .\[animation-delay\:1\.5s\] {
    animation-delay: 1.5s;
  }

  .\[animation-delay\:2\.5s\] {
    animation-delay: 2.5s;
  }

  .\[animation-delay\:3s\] {
    animation-delay: 3s;
  }

  /* Section Padding */
  .section-padding {
    padding: var(--space-20) 0;
  }

  /* Scroll Snap Sections - All landing page sections */
  .scroll-snap-section {
    scroll-snap-align: start;
    scroll-snap-stop: normal;
    scroll-margin-top: 0;
    position: relative;
    overflow-x: hidden;
    width: 100%;
  }

  @media (prefers-reduced-motion: reduce) {
    .scroll-snap-section {
      scroll-snap-align: none;
    }
  }

  /* Sections that are already full-height maintain their height */
  .hero,
  .hero-cta-section {
    min-height: 100vh;
    height: 100vh;
  }

  /* Regular sections with content - full-height with flex layout */
  .section-padding.scroll-snap-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-16) 0;
  }

  @media (min-width: 768px) {
    .section-padding.scroll-snap-section {
      padding: var(--space-20) 0;
    }
  }

  @media (min-width: 1024px) {
    .section-padding.scroll-snap-section {
      padding: var(--space-24) 0;
    }
  }

  /* Ensure content containers in scroll-snap sections are properly sized */
  .scroll-snap-section > .max-w-7xl,
  .scroll-snap-section > .max-w-4xl {
    width: 100%;
    margin: 0 auto;
    min-width: 0;
  }

  /* Sections with lots of content can expand beyond viewport */
  .scroll-snap-section-expandable {
    min-height: 100vh;
    height: auto;
    justify-content: flex-start;
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  @media (min-width: 768px) {
    .scroll-snap-section-expandable {
      padding-top: var(--space-20);
      padding-bottom: var(--space-20);
    }
  }

  @media (min-width: 1024px) {
    .scroll-snap-section-expandable {
      padding-top: var(--space-24);
      padding-bottom: var(--space-24);
    }
  }

  @media (max-height: 600px) {
    /* On very short screens, allow sections to be smaller */
    .section-padding.scroll-snap-section {
      min-height: auto;
      padding: var(--space-12) 0;
    }

    .scroll-snap-section-expandable {
      padding-top: var(--space-12);
      padding-bottom: var(--space-12);
    }
  }

  /* Ensure proper spacing and accessibility */
  .scroll-snap-section:focus-visible {
    outline: 2px solid var(--color-ring);
    outline-offset: -2px;
  }

  @media (min-width: 1024px) {
    .section-padding {
      padding: var(--space-24) 0;
    }
  }

  /* Standardized Section Headers */
  .section-header {
    text-align: center;
    margin-bottom: var(--space-12);
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
  }

  @media (min-width: 768px) {
    .section-header {
      margin-bottom: var(--space-16);
    }
  }

  @media (min-width: 1024px) {
    .section-header {
      margin-bottom: var(--space-20);
    }
  }

  .section-header h2 {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    margin-bottom: var(--space-6);
    color: var(--color-foreground);
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  @media (min-width: 375px) {
    .section-header h2 {
      font-size: 1.75rem;
    }
  }

  @media (min-width: 640px) {
    .section-header h2 {
      font-size: var(--text-4xl);
    }
  }

  @media (min-width: 768px) {
    .section-header h2 {
      font-size: 3rem;
      line-height: 1.2;
    }
  }

  .section-header p {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  @media (min-width: 768px) {
    .section-header p {
      font-size: var(--text-xl);
    }
  }

  .section-subheader {
    margin-bottom: var(--space-8);
  }

  @media (min-width: 768px) {
    .section-subheader {
      margin-bottom: var(--space-10);
    }
  }

  .section-subheader h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    margin-bottom: var(--space-4);
    color: var(--color-foreground);
  }

  @media (min-width: 768px) {
    .section-subheader h3 {
      font-size: var(--text-3xl);
    }
  }

  .section-subheader p {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
  }

  @media (min-width: 768px) {
    .section-subheader p {
      font-size: var(--text-lg);
    }
  }

  /* Ensure scroll-snap sections handle overflow properly */
  .scroll-snap-section {
    overflow-x: hidden;
    overflow-y: visible;
  }

  /* Trust badges */
  .trust-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-2);
    background-color: var(--color-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
  }

  .stat-item {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    padding: var(--space-2) var(--space-3);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-block;
    width: fit-content;
    max-width: 100%;
  }

  @media (prefers-reduced-motion: no-preference) {
    .stat-item {
      transition: all var(--transition-fast);
    }

    .stat-item:hover,
    .stat-item:focus-visible {
      transform: translateY(-1px);
    }
  }

  .stat-item:hover,
  .stat-item:focus-visible {
    background-color: rgba(255, 255, 255, 0.15);
  }

  /* Footer */
  .footer {
    background: linear-gradient(135deg, var(--color-footer-bg-start) 0%, var(--color-footer-bg-end) 100%);
    color: var(--color-footer-text);
    border-top: 1px solid var(--color-footer-border);
    position: relative;
    isolation: isolate;
  }

  .footer-container {
    max-width: 90rem;
    margin: 0 auto;
    padding: var(--space-16) var(--space-4) var(--space-8) var(--space-4);
  }

  @media (min-width: 640px) {
    .footer-container {
      padding: var(--space-20) var(--space-6) var(--space-10) var(--space-6);
    }
  }

  @media (min-width: 1024px) {
    .footer-container {
      padding: var(--space-24) var(--space-8) var(--space-12) var(--space-8);
    }
  }

  /* Footer Content Grid */
  .footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-12);
  }

  @media (min-width: 768px) {
    .footer-content {
      grid-template-columns: 1fr 1fr;
      gap: var(--space-16);
      margin-bottom: var(--space-16);
    }
  }

  @media (min-width: 1024px) {
    .footer-content {
      gap: var(--space-20);
    }
  }

  /* Footer Brand Section */
  .footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }

  .footer-brand-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .footer-brand-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-footer-text);
    margin: 0;
    letter-spacing: var(--tracking-tight);
  }

  @media (min-width: 768px) {
    .footer-brand-title {
      font-size: var(--text-3xl);
      line-height: 1.2;
    }
  }

  .footer-brand-description {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-footer-text-muted);
    margin: 0;
    max-width: 36rem;
    font-weight: 400;
  }

  @media (min-width: 768px) {
    .footer-brand-description {
      font-size: var(--text-lg);
      line-height: 1.7;
    }
  }

  /* Footer Social Links */
  .footer-social {
    display: flex;
    gap: var(--space-4);
    align-items: center;
  }

  .footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--color-footer-link);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-footer-border);
  }

  @media (prefers-reduced-motion: no-preference) {
    .footer-social-link:hover,
    .footer-social-link:focus-visible {
      color: var(--color-footer-text);
      background: rgba(14, 165, 233, 0.2);
      border-color: var(--color-primary);
      transform: translateY(-2px);
    }
  }

  .footer-social-link:focus-visible {
    outline: 2px solid var(--color-ring);
    outline-offset: 2px;
  }

  /* Footer Links Section */
  .footer-links {
    display: flex;
    flex-direction: column;
  }

  .footer-links-title {
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: var(--leading-normal);
    color: var(--color-footer-text);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 var(--space-5) 0;
  }

  @media (min-width: 768px) {
    .footer-links-title {
      font-size: var(--text-base);
      margin-bottom: var(--space-6);
    }
  }

  .footer-links-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    margin: 0;
    padding: 0;
  }

  @media (min-width: 640px) {
    .footer-links-nav {
      gap: var(--space-2) var(--space-4);
    }
  }

  @media (min-width: 768px) {
    .footer-links-nav {
      gap: var(--space-2) var(--space-5);
    }
  }

  .footer-link {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-footer-link);
    text-decoration: none;
    transition: all var(--transition-fast);
    display: inline-block;
    font-weight: 400;
    white-space: nowrap;
  }

  @media (min-width: 768px) {
    .footer-link {
      font-size: var(--text-base);
    }
  }

  @media (prefers-reduced-motion: no-preference) {
    .footer-link:hover,
    .footer-link:focus-visible {
      color: var(--color-footer-link-hover);
      text-decoration: underline;
      text-underline-offset: 4px;
    }
  }

  .footer-link:focus-visible {
    outline: 2px solid var(--color-ring);
    outline-offset: 2px;
    border-radius: var(--radius-md);
  }

  .footer-link-with-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
  }

  .footer-compliance-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 1.5rem;
    padding: 0 var(--space-2);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    color: #10b981;
    line-height: 1;
    flex-shrink: 0;
  }

  @media (prefers-reduced-motion: no-preference) {
    .footer-link-with-badge:hover .footer-compliance-badge {
      background: linear-gradient(135deg, rgba(16, 185, 129, 0.3), rgba(16, 185, 129, 0.2));
      border-color: rgba(16, 185, 129, 0.5);
      transform: scale(1.05);
    }
  }

  .footer-link-separator {
    display: inline-block;
    color: var(--color-footer-text-muted);
    font-size: var(--text-lg);
    line-height: 1;
    opacity: 0.5;
    user-select: none;
    pointer-events: none;
  }

  @media (max-width: 639px) {
    .footer-link-separator {
      display: none;
    }
  }

  /* Footer Bottom */
  .footer-bottom {
    border-top: 1px solid var(--color-footer-border);
    padding-top: var(--space-10);
    margin-top: var(--space-8);
  }

  @media (min-width: 768px) {
    .footer-bottom {
      padding-top: var(--space-12);
      margin-top: var(--space-10);
    }
  }

  .footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }

  @media (min-width: 768px) {
    .footer-bottom-content {
      flex-direction: row;
      justify-content: space-between;
      align-items: flex-start;
      gap: var(--space-8);
    }
  }

  .footer-bottom-left,
  .footer-bottom-right {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: flex-start;
  }

  @media (min-width: 768px) {
    .footer-bottom-left {
      text-align: left;
      flex: 1;
      align-items: flex-start;
    }

    .footer-bottom-right {
      text-align: right;
      flex: 1;
      align-items: flex-end;
    }
  }

  @media (max-width: 767px) {
    .footer-bottom-left,
    .footer-bottom-right {
      text-align: center;
      align-items: center;
    }
  }

  .footer-copyright {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-footer-text);
    margin: 0;
    font-weight: 500;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
  }

  .footer-copyright-year {
    font-weight: 500;
    opacity: 0.9;
  }

  .footer-copyright-company {
    font-weight: 600;
  }

  .footer-copyright-separator {
    color: var(--color-footer-text-muted);
    opacity: 0.4;
    font-weight: 300;
    margin: 0 var(--space-1);
  }

  .footer-copyright-trust {
    font-style: italic;
    opacity: 0.85;
  }

  .footer-copyright-location {
    opacity: 0.9;
  }

  .footer-copyright-rights {
    color: var(--color-footer-text-muted);
    opacity: 0.8;
    font-weight: 400;
  }

  @media (min-width: 768px) {
    .footer-copyright {
      font-size: var(--text-lg);
      gap: var(--space-3);
    }

    .footer-copyright-separator {
      margin: 0 var(--space-2);
    }
  }

  .footer-legal-info,
  .footer-address,
  .footer-odr {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    color: var(--color-footer-text-muted);
    margin: 0;
    font-weight: 400;
  }

  @media (min-width: 768px) {
    .footer-legal-info,
    .footer-address,
    .footer-odr {
      font-size: var(--text-base);
    }
  }

  .footer-odr {
    margin-top: var(--space-3);
  }

  .footer-odr .footer-link {
    font-size: inherit;
    font-weight: 500;
  }

  /* Legacy support - keep for backward compatibility */
  .text-link-social {
    color: var(--color-footer-link);
  }

  @media (prefers-reduced-motion: no-preference) {
    .text-link-social {
      transition: color var(--transition-fast);
    }
  }

  .text-link-social:hover,
  .text-link-social:focus-visible {
    color: var(--color-primary);
  }

  .text-link-footer {
    color: var(--color-footer-link);
    text-decoration: none;
  }

  @media (prefers-reduced-motion: no-preference) {
    .text-link-footer {
      transition: color var(--transition-fast);
    }
  }

  .text-link-footer:hover,
  .text-link-footer:focus-visible {
    color: var(--color-primary);
    text-decoration: underline;
  }

  /* Compliance Checker Section */
  .compliance-checker-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
    align-items: center;
    width: 100%;
  }

  @media (min-width: 640px) {
    .compliance-checker-content {
      gap: var(--space-10);
    }
  }

  @media (min-width: 768px) {
    .compliance-checker-content {
      gap: var(--space-12);
    }
  }

  @media (min-width: 1024px) {
    .compliance-checker-content {
      grid-template-columns: 1.2fr 1fr;
      gap: var(--space-16);
    }
  }

  .compliance-checker-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    min-width: 0;
    width: 100%;
  }

  .compliance-checker-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-2);
  }

  .compliance-checker-badge-text {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .compliance-checker-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-foreground);
    margin: 0;
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  @media (min-width: 375px) {
    .compliance-checker-title {
      font-size: 1.75rem;
    }
  }

  @media (min-width: 640px) {
    .compliance-checker-title {
      font-size: var(--text-3xl);
    }
  }

  @media (min-width: 768px) {
    .compliance-checker-title {
      font-size: var(--text-4xl);
    }
  }

  .compliance-checker-description {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
    margin: 0;
    text-wrap: balance;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  @media (min-width: 768px) {
    .compliance-checker-description {
      font-size: var(--text-xl);
    }
  }

  .compliance-checker-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .compliance-checker-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-foreground);
    min-width: 0;
  }

  .compliance-checker-feature span {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    flex: 1;
    min-width: 0;
  }

  @media (min-width: 768px) {
    .compliance-checker-feature {
      font-size: var(--text-lg);
    }
  }

  .compliance-checker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-2);
    width: 100%;
  }

  @media (min-width: 375px) {
    .compliance-checker-actions {
      gap: var(--space-4);
    }
  }

  @media (min-width: 640px) {
    .compliance-checker-actions {
      gap: var(--space-4);
    }
  }

  .compliance-checker-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
  }

  .compliance-checker-cta-icon {
    display: inline-flex;
    align-items: center;
    transition: transform var(--transition-fast);
  }

  @media (prefers-reduced-motion: no-preference) {
    .compliance-checker-cta:hover .compliance-checker-cta-icon {
      transform: translateX(0.25rem);
    }
  }

  .compliance-checker-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    padding: var(--space-4) 0;
  }

  @media (min-width: 640px) {
    .compliance-checker-visual {
      padding: var(--space-6) 0;
    }
  }

  @media (min-width: 1024px) {
    .compliance-checker-visual {
      padding: 0;
    }
  }

  .compliance-checker-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  @media (min-width: 375px) {
    .compliance-checker-stats {
      gap: var(--space-4);
      max-width: 28rem;
    }
  }

  @media (min-width: 640px) {
    .compliance-checker-stats {
      gap: var(--space-6);
      max-width: 32rem;
    }
  }

  @media (min-width: 1024px) {
    .compliance-checker-stats {
      max-width: 24rem;
    }
  }

  @media (min-width: 640px) {
    .compliance-checker-stats {
      gap: var(--space-8);
    }
  }

  .compliance-checker-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-4);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(139, 92, 246, 0.05));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    min-width: 0;
  }

  @media (min-width: 375px) {
    .compliance-checker-stat {
      padding: var(--space-5);
    }
  }

  @media (min-width: 640px) {
    .compliance-checker-stat {
      padding: var(--space-6);
    }
  }

  @media (min-width: 768px) {
    .compliance-checker-stat {
      padding: var(--space-8);
    }
  }

  .compliance-checker-stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: var(--leading-none);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
    overflow-wrap: break-word;
    word-break: break-word;
  }

  @media (min-width: 375px) {
    .compliance-checker-stat-value {
      font-size: var(--text-3xl);
    }
  }

  @media (min-width: 640px) {
    .compliance-checker-stat-value {
      font-size: var(--text-3xl);
    }
  }

  @media (min-width: 768px) {
    .compliance-checker-stat-value {
      font-size: var(--text-4xl);
    }
  }

  .compliance-checker-stat-label {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-muted-foreground);
    text-align: center;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  @media (min-width: 768px) {
    .compliance-checker-stat-label {
      font-size: var(--text-base);
    }
  }

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

  /* Legal Check Page Styles */
  .legal-check-section {
    min-height: 100vh;
    padding: var(--space-16) 0;
  }

  @media (min-width: 768px) {
    .legal-check-section {
      padding: var(--space-20) 0;
    }
  }

  @media (min-width: 1024px) {
    .legal-check-section {
      padding: var(--space-24) 0;
    }
  }

  /* Legal Check Hero */
  .legal-check-hero {
    padding: var(--space-8) 0;
  }

  @media (min-width: 768px) {
    .legal-check-hero {
      padding: var(--space-12) 0;
    }
  }

  .legal-check-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: var(--space-2) var(--space-4);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(14, 165, 233, 0.2);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-4) auto;
  }

  .legal-check-hero-badge-text {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .legal-check-hero-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-foreground);
    margin: 0 0 var(--space-4) 0;
  }

  @media (min-width: 640px) {
    .legal-check-hero-title {
      font-size: var(--text-4xl);
    }
  }

  @media (min-width: 768px) {
    .legal-check-hero-title {
      font-size: 3.5rem;
      line-height: 1.1;
    }
  }

  .legal-check-hero-subtitle {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
    margin: 0;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
  }

  @media (min-width: 768px) {
    .legal-check-hero-subtitle {
      font-size: var(--text-xl);
    }
  }

  .legal-check-hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-8);
    margin-top: var(--space-8);
    flex-wrap: wrap;
  }

  @media (min-width: 640px) {
    .legal-check-hero-stats {
      gap: var(--space-12);
    }
  }

  .legal-check-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .legal-check-hero-stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: var(--leading-none);
    color: var(--color-primary);
    margin-bottom: var(--space-2);
  }

  @media (min-width: 768px) {
    .legal-check-hero-stat-value {
      font-size: var(--text-3xl);
    }
  }

  .legal-check-hero-stat-label {
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    color: var(--color-muted-foreground);
  }

  @media (min-width: 768px) {
    .legal-check-hero-stat-label {
      font-size: var(--text-base);
    }
  }

  /* Legal Check Form Container */
  .legal-check-form-container {
    margin: var(--space-12) 0;
  }

  @media (min-width: 768px) {
    .legal-check-form-container {
      margin: var(--space-16) 0;
    }
  }

  .legal-check-form-header {
    text-align: center;
    margin-bottom: var(--space-8);
  }

  .legal-check-form-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-foreground);
    margin: 0 0 var(--space-3) 0;
  }

  @media (min-width: 768px) {
    .legal-check-form-title {
      font-size: var(--text-3xl);
    }
  }

  .legal-check-form-description {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
    margin: 0;
    max-width: 40rem;
    margin-left: auto;
    margin-right: auto;
  }

  @media (min-width: 768px) {
    .legal-check-form-description {
      font-size: var(--text-lg);
    }
  }

  /* Legal Check Features Section */
  .legal-check-features {
    margin: var(--space-16) 0;
  }

  @media (min-width: 768px) {
    .legal-check-features {
      margin: var(--space-20) 0;
    }
  }

  .section-header-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-foreground);
    margin: 0 0 var(--space-4) 0;
  }

  @media (min-width: 768px) {
    .section-header-title {
      font-size: var(--text-4xl);
    }
  }

  .section-header-description {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
    margin: 0;
  }

  @media (min-width: 768px) {
    .section-header-description {
      font-size: var(--text-xl);
    }
  }

  /* How It Works Section */
  .legal-check-how-it-works {
    padding: var(--space-16) 0;
    border-radius: var(--radius-xl);
    margin: var(--space-16) 0;
  }

  @media (min-width: 768px) {
    .legal-check-how-it-works {
      padding: var(--space-20) 0;
      margin: var(--space-20) 0;
    }
  }

  .legal-check-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-4);
  }

  .legal-check-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: var(--radius-full);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-white);
    line-height: var(--leading-none);
    margin-bottom: var(--space-2);
  }

  @media (min-width: 768px) {
    .legal-check-step-number {
      width: 4rem;
      height: 4rem;
      font-size: var(--text-3xl);
    }
  }

  .legal-check-step-title {
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-foreground);
    margin: 0;
  }

  @media (min-width: 768px) {
    .legal-check-step-title {
      font-size: var(--text-2xl);
    }
  }

  .legal-check-step-description {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
    margin: 0;
  }

  @media (min-width: 768px) {
    .legal-check-step-description {
      font-size: var(--text-lg);
    }
  }

  /* Platform Integration Section */
  .legal-check-integration {
    margin: var(--space-16) 0;
    padding: var(--space-16) 0;
  }

  @media (min-width: 768px) {
    .legal-check-integration {
      margin: var(--space-20) 0;
      padding: var(--space-20) 0;
    }
  }

  .legal-check-integration-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-12);
    align-items: center;
  }

  @media (min-width: 1024px) {
    .legal-check-integration-content {
      grid-template-columns: 1.2fr 1fr;
      gap: var(--space-16);
    }
  }

  .legal-check-integration-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
  }

  .legal-check-integration-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-foreground);
    margin: 0;
  }

  @media (min-width: 768px) {
    .legal-check-integration-title {
      font-size: var(--text-4xl);
    }
  }

  .legal-check-integration-description {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
    margin: 0;
  }

  @media (min-width: 768px) {
    .legal-check-integration-description {
      font-size: var(--text-xl);
    }
  }

  .legal-check-integration-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
  }

  .legal-check-integration-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-foreground);
  }

  @media (min-width: 768px) {
    .legal-check-integration-feature {
      font-size: var(--text-lg);
    }
  }

  .legal-check-integration-cta {
    margin-top: var(--space-2);
  }

  .legal-check-integration-cta .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
  }

  .legal-check-integration-visual {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Legal check integration card - specific styling for integration section */
  .legal-check-integration-card {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.05), rgba(139, 92, 246, 0.05));
    width: 100%;
    max-width: 24rem;
  }

  @media (min-width: 768px) {
    .legal-check-integration-card {
      padding: var(--space-10);
    }
  }

  /* Reusable Card Component Styles */
  .card-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    min-width: 0;
  }

  .card-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
  }

  .card-header-title {
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: var(--leading-tight);
    color: var(--color-foreground);
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    flex: 1;
    min-width: 0;
  }

  .card-description {
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
    color: var(--color-muted-foreground);
    margin: 0;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
  }

  /* Icon container - base styles only, background and color controlled via utility classes */
  .icon-container {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .icon-container .icon {
      width: 1.5rem;
      height: 1.5rem;
      flex-shrink: 0;
  }

  /* Status badges */
  .status-base {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1\.5);
    padding: var(--space-2) var(--space-3\.5);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
    margin: 0 auto;
  }

  .status-bg-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
  }

  .status-text-error {
    color: var(--color-error);
  }

  .status-bg-primary {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--color-primary);
    border: 1px solid rgba(14, 165, 233, 0.2);
  }

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

  .status-bg-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
  }

  .status-text-success {
    color: var(--color-success);
  }

  .status-bg-accent {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--color-accent);
    border: 1px solid rgba(139, 92, 246, 0.2);
  }

  .status-text-accent {
    color: var(--color-accent);
  }

  .status-bg-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
  }

  .status-text-warning {
    color: var(--color-warning);
  }

  .status-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1\.5);
    padding: var(--space-2) var(--space-3\.5);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
  }

  /* Form classes extend base element styles - no duplication needed */

  /* ===== INTERACTION STATES ===== */

  /* Hover utilities */
  :where(.hover\:text-primary:hover),
  :where(.hover\:text-primary:focus-visible) { color: var(--color-primary); }

  :where(.hover\:bg-secondary:hover),
  :where(.hover\:bg-secondary:focus-visible) { background-color: var(--color-secondary); }

  :where(.hover\:border-primary:hover),
  :where(.hover\:border-primary:focus-visible) { border-color: var(--color-primary); }

  :where(.hover\:shadow-md:hover),
  :where(.hover\:shadow-md:focus-visible) { box-shadow: var(--shadow-md); }

  :where(.hover\:shadow-lg:hover),
  :where(.hover\:shadow-lg:focus-visible) { box-shadow: var(--shadow-lg); }

  :where(.hover\:shadow-xl:hover),
  :where(.hover\:shadow-xl:focus-visible) { box-shadow: var(--shadow-xl); }

  /* Focus utilities */
  :where(.focus\:ring-2:focus-visible) {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--color-ring);
  }

  :where(.focus\:ring-primary:focus-visible) {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--color-primary);
  }

  /* Disabled utilities */
  :where(.disabled\:opacity-50:disabled) { opacity: 0.5; }
  :where(.disabled\:cursor-not-allowed:disabled) { cursor: not-allowed; }

  /* Opacity utilities */
  :where(.text-primary-foreground\/80) {
    color: var(--color-primary-foreground);
    opacity: 0.8;
  }

  .text-muted-foreground\/80 {
    color: var(--color-muted-foreground);
    opacity: 0.8;
  }

  /* Transition duration utilities */
  .transition-all { transition-property: all; }
  .duration-300 { transition-duration: var(--transition-normal); }
  .duration-150 { transition-duration: var(--transition-fast); }

  /* Icon styling - SVG icons inherit color via CSS filters when using img tags */
  img[src*="/static/icons/"] {
    display: inline-block;
    vertical-align: middle;
  }

  /* Icon color inheritance - using CSS filters for img-based icons */
  .text-primary img[src*="/static/icons/"],
  img[src*="/static/icons/"].text-primary {
    filter: brightness(0) saturate(100%) invert(58%) sepia(96%) saturate(1234%) hue-rotate(165deg) brightness(98%) contrast(91%);
  }

  .text-success img[src*="/static/icons/"],
  img[src*="/static/icons/"].text-success {
    filter: brightness(0) saturate(100%) invert(60%) sepia(95%) saturate(400%) hue-rotate(100deg) brightness(95%) contrast(90%);
  }

  .text-error img[src*="/static/icons/"],
  img[src*="/static/icons/"].text-error {
    filter: brightness(0) saturate(100%) invert(40%) sepia(93%) saturate(1352%) hue-rotate(338deg) brightness(97%) contrast(96%);
  }

  .text-warning img[src*="/static/icons/"],
  img[src*="/static/icons/"].text-warning {
    filter: brightness(0) saturate(100%) invert(75%) sepia(98%) saturate(1352%) hue-rotate(1deg) brightness(99%) contrast(98%);
  }

  .text-info img[src*="/static/icons/"],
  img[src*="/static/icons/"].text-info {
    filter: brightness(0) saturate(100%) invert(50%) sepia(98%) saturate(1352%) hue-rotate(200deg) brightness(98%) contrast(96%);
  }

  .text-accent img[src*="/static/icons/"],
  img[src*="/static/icons/"].text-accent {
    filter: brightness(0) saturate(100%) invert(60%) sepia(95%) saturate(2000%) hue-rotate(250deg) brightness(95%) contrast(90%);
  }
}

/* ===== RESPONSIVE UTILITIES ===== */
@layer utilities {
  /* Small screens (640px+) */
  @media (min-width: 640px) {
    :where(.sm\:flex-row) { flex-direction: row; }
    :where(.sm\:px-6) { padding-inline: var(--space-6); }
    :where(.sm\:px-0) { padding-inline: 0; }
    :where(.sm\:w-auto) { width: auto; }
    :where(.sm\:mx-6) { margin-inline: var(--space-6); }
    :where(.sm\:inline) { display: inline; }
  }

  /* Medium screens (768px+) */
  @media (min-width: 768px) {
    :where(.md\:text-2xl) { font-size: 1.5rem; line-height: 2rem; }
    :where(.md\:text-5xl) { font-size: 3rem; line-height: 1; }
    :where(.md\:text-6xl) { font-size: 3.75rem; line-height: 1; }
    :where(.md\:text-7xl) { font-size: 4.5rem; line-height: 1; }
    :where(.md\:block) { display: block; }
    :where(.md\:flex-row) { flex-direction: row; }
    :where(.md\:grid-cols-2) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    :where(.md\:grid-cols-3) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    :where(.md\:grid-cols-4) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    :where(.md\:col-span-2) { grid-column: span 2 / span 2; }
    :where(.md\:text-left) { text-align: left; }
    :where(.md\:text-right) { text-align: right; }
  }

  /* Large screens (1024px+) */
  @media (min-width: 1024px) {
    :where(.lg\:text-2xl) { font-size: 1.5rem; line-height: 2rem; }
    :where(.lg\:text-3xl) { font-size: 1.875rem; line-height: 2.25rem; }
    :where(.lg\:px-8) { padding-inline: var(--space-8); }
    :where(.lg\:gap-12) { gap: var(--space-12); }
    :where(.lg\:grid-cols-3) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    :where(.lg\:grid-cols-4) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    :where(.lg\:grid-cols-6) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    :where(.lg\:grid-cols-7) { grid-template-columns: repeat(7, minmax(0, 1fr)); }
    :where(.lg\:col-span-1) { grid-column: span 1 / span 1; }
  }
}

/* ===== LANGUAGE SWITCHER ===== */
@layer components {
  .language-switcher {
    z-index: 50;
  }

  .language-switcher-container {
    position: relative;
  }

  @media (prefers-reduced-motion: reduce) {
.language-switcher-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-3);
    box-shadow: var(--shadow-lg);
    transition: none;
    cursor: pointer;
}
}

  .language-switcher-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-3);
    min-height: 44px;
    min-width: 44px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
  }

  .language-switcher-btn:hover {
    background: var(--color-secondary);
    box-shadow: var(--shadow-xl);
  }

  .language-switcher-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--color-primary), var(--shadow-lg);
  }

  .language-switcher-current {
    font-weight: 500;
    color: var(--color-foreground);
  }

  @media (prefers-reduced-motion: reduce) {
.language-switcher-arrow {
    color: var(--color-foreground);
    transition: none;
}
}

  .language-switcher-arrow {
    color: var(--color-foreground);
    transition: transform var(--transition-fast);
  }

  .language-switcher-arrow.rotate-180 {
    transform: rotate(180deg);
  }

  @media (prefers-reduced-motion: reduce) {
.language-switcher-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-2);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2) 0;
    min-width: 160px;
    opacity: 0;
    transition: none;
    pointer-events: none;
    z-index: 1000;
}
}

  .language-switcher-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-2);
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--space-2) 0;
    min-width: 160px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
    z-index: 1000;
  }

  .language-switcher-menu:not(.hidden) {
    pointer-events: auto;
  }

  .language-switcher-menu.opacity-100 {
    opacity: 1;
    pointer-events: auto;
  }

  @media (prefers-reduced-motion: reduce) {
.language-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    color: var(--color-foreground);
    text-decoration: none;
    transition: none;
}
}

  .language-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
    color: var(--color-foreground);
    text-decoration: none;
    transition: background-color var(--transition-fast);
  }

  .language-option:hover, .language-option:focus {
    background: var(--color-secondary);
  }

  .language-option[data-lang] {
    cursor: pointer;
  }

  /* Responsive adjustments */
  @media (max-width: 640px) {
    .language-switcher {
      top: var(--space-2);
      right: var(--space-2);
    }

    .language-switcher-btn {
      padding: var(--space-2);
    }
  }
}

/* Cookie Consent Banner */
  @media (prefers-reduced-motion: reduce) {
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: var(--space-6);
  transform: translateY(100%);
  transition: none;
  max-width: 100%;
}
}

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-background);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: var(--space-6);
  transform: translateY(100%);
  transition: transform var(--transition-base);
  max-width: 100%;
}

.cookie-consent-banner-visible {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

@media (min-width: 768px) {
  .cookie-consent-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.cookie-consent-text {
  flex: 1;
}

.cookie-consent-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-foreground);
  margin-bottom: var(--space-2);
}

.cookie-consent-description {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  line-height: 1.5;
  margin: 0;
}

.cookie-consent-actions {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-shrink: 0;
}

  @media (prefers-reduced-motion: reduce) {
.cookie-consent-link {
  font-size: 0.875rem;
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: none;
}
}

.cookie-consent-link {
  font-size: 0.875rem;
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-fast);
}

  .cookie-consent-link:hover,
  .cookie-consent-link:focus {
  color: var(--color-link-hover);
}

  @media (prefers-reduced-motion: reduce) {
.cookie-consent-accept {
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary-foreground);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: none;
}
}

.cookie-consent-accept {
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary-foreground);
  background: var(--color-primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.cookie-consent-accept:hover {
  background: var(--color-primary-hover);
}

.cookie-consent-accept:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== WIZARD PROGRESS INDICATOR ===== */
.wizard-progress {
  width: 100%;
}

.wizard-progress-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}

.wizard-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  position: relative;
  z-index: 1;
}

.wizard-progress-step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  transition: all var(--transition-normal);
  border: 2px solid transparent;
}

.wizard-progress-step-label {
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  transition: color var(--transition-normal);
}

/* Active step */
.wizard-progress-step-active .wizard-progress-step-number {
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
  color: var(--color-primary-foreground);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.wizard-progress-step-active .wizard-progress-step-label {
  color: var(--color-foreground);
  font-weight: 600;
}

/* Completed step */
.wizard-progress-step-completed .wizard-progress-step-number {
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
  border-color: var(--color-primary);
}

.wizard-progress-step-completed .wizard-progress-step-number::after {
  content: '✓';
  font-size: 1rem;
}

.wizard-progress-step-completed .wizard-progress-step-label {
  color: var(--color-muted-foreground);
}

/* Inactive step */
.wizard-progress-step-inactive .wizard-progress-step-number {
  background-color: var(--color-secondary);
  color: var(--color-muted-foreground);
  border-color: var(--color-border);
}

.wizard-progress-step-inactive .wizard-progress-step-label {
  color: var(--color-muted-foreground);
}

/* Connector lines */
.wizard-progress-connector {
  flex: 1;
  height: 2px;
  margin: 0 var(--space-2);
  margin-top: -1.25rem;
  position: relative;
  z-index: 0;
  transition: background-color var(--transition-normal);
}

.wizard-progress-connector-active {
  background: linear-gradient(to right, var(--color-primary), var(--color-accent));
}

.wizard-progress-connector-inactive {
  background-color: var(--color-border);
}

.wizard-progress-counter {
  margin-top: var(--space-4);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .wizard-progress-step-label {
    font-size: 0.75rem;
  }

  .wizard-progress-step-number {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .wizard-progress-connector {
    margin-top: -1rem;
  }
}

@media (max-width: 640px) {
  .cookie-consent-banner {
    padding: var(--space-4);
  }

  .cookie-consent-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-consent-accept {
    width: 100%;
  }
}
