/* ═══════════════════════════════════════════════════════════
   MAILPULSE — Global Styles
   Design System: Variables, Reset, Typography, Components
   ═══════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --brand: #0d9488;
  --brand-light: #14b8a6;
  --brand-dark: #0f766e;
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;
  --brand-200: #99f6e4;
  --brand-300: #5eead4;
  --brand-400: #2dd4bf;
  --brand-500: #14b8a6;
  --brand-600: #0d9488;
  --brand-700: #0f766e;
  --brand-800: #115e59;
  --brand-900: #134e4a;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #030712;

  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Background */
  --bg: var(--white);
  --bg-subtle: var(--gray-50);
  --bg-muted: var(--gray-100);

  /* Text */
  --text: var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted: var(--gray-400);

  /* Borders */
  --border: var(--gray-200);
  --border-strong: var(--gray-300);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -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);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Font Sizes */
  --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;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

  /* Font Weights */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;

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

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

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

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Z-Index */
  --z-dropdown: 50;
  --z-sticky: 100;
  --z-fixed: 200;
  --z-modal: 300;
  --z-toast: 400;

  /* Container */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;

  /* Header Height */
  --header-h: 4rem;
}

/* ── DARK MODE ─────────────────────────────────────────── */
[data-theme="dark"] {
  --bg: var(--gray-900);
  --bg-subtle: var(--gray-800);
  --bg-muted: var(--gray-700);
  --text: var(--gray-50);
  --text-secondary: var(--gray-300);
  --text-muted: var(--gray-500);
  --border: var(--gray-700);
  --border-strong: var(--gray-600);
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.4), 0 10px 10px -5px rgba(0,0,0,0.3);
  --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.5);
  
  /* Dark mode badge overrides */
  --badge-success-bg: #065f46;
  --badge-success-text: #d1fae5;
  --badge-success-border: #047857;
  --badge-warning-bg: #92400e;
  --badge-warning-text: #fef3c7;
  --badge-warning-border: #b45309;
  --badge-danger-bg: #991b1b;
  --badge-danger-text: #fee2e2;
  --badge-danger-border: #dc2626;
  
  /* Dark mode brand backgrounds */
  --brand-50: rgba(13, 148, 136, 0.1);
  --brand-100: rgba(13, 148, 136, 0.15);
  --brand-200: rgba(13, 148, 136, 0.2);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --bg: var(--gray-900);
    --bg-subtle: var(--gray-800);
    --bg-muted: var(--gray-700);
    --text: var(--gray-50);
    --text-secondary: var(--gray-300);
    --text-muted: var(--gray-500);
    --border: var(--gray-700);
    --border-strong: var(--gray-600);
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.4), 0 2px 4px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -2px rgba(0,0,0,0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.4), 0 10px 10px -5px rgba(0,0,0,0.3);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.5);
    --badge-success-bg: #065f46;
    --badge-success-text: #d1fae5;
    --badge-success-border: #047857;
    --badge-warning-bg: #92400e;
    --badge-warning-text: #fef3c7;
    --badge-warning-border: #b45309;
    --badge-danger-bg: #991b1b;
    --badge-danger-text: #fee2e2;
    --badge-danger-border: #dc2626;
    --brand-50: rgba(13, 148, 136, 0.1);
    --brand-100: rgba(13, 148, 136, 0.15);
    --brand-200: rgba(13, 148, 136, 0.2);
  }
}

/* ── THEME TOGGLE ─────────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text);
}

.theme-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon,
[data-theme="auto"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

input,
textarea,
select {
  font: inherit;
}

/* ── TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--text);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

.text-gradient {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── LAYOUT ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-24) 0;
}

.section--sm {
  padding: var(--space-16) 0;
}

.section--lg {
  padding: var(--space-32) 0;
}

.grid {
  display: grid;
  gap: var(--space-8);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }
  
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  
  .section { padding: var(--space-16) 0; }
  .section--lg { padding: var(--space-20) 0; }
}

/* ── COMPONENTS ────────────────────────────────────────────── */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background: var(--brand);
  color: var(--white);
  border: 2px solid var(--brand);
}

.btn--primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background: transparent;
  color: var(--brand);
  border: 2px solid var(--brand);
}

.btn--secondary:hover {
  background: var(--brand-50);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid transparent;
}

.btn--ghost:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--brand-200);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand);
  border-radius: var(--radius-lg);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.card__desc {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
  background: var(--brand-50);
  color: var(--brand);
  border: 1px solid var(--brand-200);
}

.badge--success {
  background: var(--badge-success-bg, #d1fae5);
  color: var(--badge-success-text, #065f46);
  border-color: var(--badge-success-border, #a7f3d0);
}

.badge--warning {
  background: var(--badge-warning-bg, #fef3c7);
  color: var(--badge-warning-text, #92400e);
  border-color: var(--badge-warning-border, #fde68a);
}

.badge--danger {
  background: var(--badge-danger-bg, #fee2e2);
  color: var(--badge-danger-text, #991b1b);
  border-color: var(--badge-danger-border, #fecaca);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

[data-theme="dark"] .form-select,
[data-theme="auto"] .form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

/* ── UTILITIES ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.mx-auto { margin-left: auto; margin-right: auto; }
.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); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.w-full { width: 100%; }
.max-w-sm { max-width: var(--container-sm); }
.max-w-md { max-width: var(--container-md); }
.max-w-lg { max-width: var(--container-lg); }
.max-w-xl { max-width: var(--container-xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── HEADER ────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-fixed);
  transition: all var(--transition-base);
}

[data-theme="dark"] .header {
  background: rgba(17, 24, 39, 0.9);
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] .header {
    background: rgba(17, 24, 39, 0.9);
  }
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text);
}

.header__brand svg {
  color: var(--brand);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.header__link {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.header__link:hover,
.header__link--active {
  color: var(--text);
  background: var(--bg-muted);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header__login {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.header__login:hover {
  color: var(--text);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-muted);
  border-radius: var(--radius-lg);
  padding: 2px;
  gap: 2px;
}

.lang-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-secondary);
  border-radius: calc(var(--radius-lg) - 2px);
  transition: all var(--transition-fast);
  text-decoration: none;
}

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

.lang-link--active {
  background: var(--bg);
  color: var(--brand);
  box-shadow: var(--shadow-xs);
}

.lang-switcher--mobile {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
}

/* Mobile Menu */
.header__menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  transition: background var(--transition-fast);
}

.header__menu-btn:hover {
  background: var(--bg-muted);
}

.header__menu-btn svg {
  width: 24px;
  height: 24px;
}

.header__mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  padding: var(--space-6);
  z-index: var(--z-modal);
}

.header__mobile-nav.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.header__mobile-link {
  display: block;
  padding: var(--space-4);
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  color: var(--text);
  border-radius: var(--radius-lg);
  transition: background var(--transition-fast);
}

.header__mobile-link:hover {
  background: var(--bg-muted);
}

@media (max-width: 1024px) {
  .header__nav,
  .header__actions .btn--secondary {
    display: none;
  }
  
  .header__menu-btn {
    display: flex;
  }
}

/* ── FOOTER ────────────────────────────────────────────────── */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-16) 0 var(--space-8);
}

.footer__inner {
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

.footer__brand {
  max-width: 300px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--white);
  margin-bottom: var(--space-4);
}

.footer__logo svg {
  color: var(--brand);
}

.footer__desc {
  color: var(--gray-400);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-6);
}

.footer__social {
  display: flex;
  gap: var(--space-3);
}

.footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gray-800);
  border-radius: var(--radius-lg);
  color: var(--gray-400);
  transition: all var(--transition-fast);
}

.footer__social a:hover {
  background: var(--brand);
  color: var(--white);
  transform: translateY(-2px);
}

.footer__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__link {
  font-size: var(--text-sm);
  color: var(--gray-400);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--white);
}

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-8);
  border-top: 1px solid var(--gray-800);
}

.footer__copy {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.footer__legal {
  display: flex;
  gap: var(--space-6);
}

.footer__legal a {
  font-size: var(--text-sm);
  color: var(--gray-500);
  transition: color var(--transition-fast);
}

.footer__legal a:hover {
  color: var(--white);
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
  
  .footer__brand {
    grid-column: 1 / -1;
  }
  
  .footer__bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
  
  .footer__legal {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}

/* ── ACCESSIBILITY ─────────────────────────────────────────── */

/* Skip Navigation Link */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  padding: var(--space-3) var(--space-6);
  background: var(--brand);
  color: var(--white);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-lg);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-nav:focus {
  top: var(--space-4);
}

/* Focus Styles */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
  outline: none;
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
  .btn--primary {
    border: 2px solid currentColor;
  }
  
  .card {
    border: 2px solid currentColor;
  }
  
  .badge {
    border: 1px solid currentColor;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
  
  .hero__dashboard {
    animation: none;
  }
}

/* Screen Reader Only (already defined, but ensuring) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure sufficient color contrast */
@media (prefers-contrast: high) {
  :root {
    --text-secondary: var(--gray-800);
    --text-muted: var(--gray-600);
    --border: var(--gray-400);
  }
}
