/*
 * OpsMed — Base Styles (always loaded)
 * Variables, Reset, Typography, Navigation, Buttons, Utilities
 * WCAG 2.2 AA Compliant
 */

/* === DESIGN TOKENS === */
:root {
  /* Primary Medical Blues */
  --blue-900: #0c1929;
  --blue-800: #0c4a6e;
  --blue-700: #075985;
  --blue-600: #0369a1;
  --blue-500: #0284c7;
  --blue-400: #38bdf8;
  --blue-100: #e0f2fe;
  --blue-50: #f0f9ff;

  /* Silver / Gray */
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;

  /* Semantic */
  --red-600: #dc2626;
  --red-100: #fee2e2;
  --green-600: #16a34a;
  --green-100: #dcfce7;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(12, 25, 41, 0.05);
  --shadow-md: 0 4px 12px rgba(12, 25, 41, 0.08);
  --shadow-lg: 0 12px 32px rgba(12, 25, 41, 0.12);
  --shadow-xl: 0 24px 48px rgba(12, 25, 41, 0.16);

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

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: 'DM Sans', 'Inter', sans-serif; font-size: 16px; line-height: 1.6; color: var(--slate-800); background: var(--white); padding-top: 72px; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* === UTILITIES === */
.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; }
.skip-link:focus { position: fixed; top: 0; left: 0; z-index: 10000; background: var(--blue-600); color: var(--white); padding: 0.75rem 1.5rem; font-weight: 600; width: auto; height: auto; clip: auto; }

/* === TYPOGRAPHY === */
h1, h2, h3, h4 { font-family: 'Inter', sans-serif; font-weight: 700; line-height: 1.2; color: var(--slate-900); }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }
p { color: var(--slate-600); }

/* === LAYOUT === */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: var(--space-4xl) 0; }
.section--dark { background: var(--blue-900); color: rgba(255,255,255,0.92); }
.section--light { background: var(--blue-50); }
.section__header { text-align: center; max-width: 720px; margin: 0 auto var(--space-3xl); }
.section__header p { font-size: 1.1rem; margin-top: var(--space-md); color: var(--slate-600); }
.section__header--light h2 { color: var(--white); }
.section__header--light p { color: rgba(255,255,255,0.78); }

/* === BUTTONS === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1rem; padding: var(--space-md) var(--space-xl); border-radius: var(--radius-md); border: none; cursor: pointer; transition: all var(--transition-base); text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--blue-400); outline-offset: 2px; }
.btn--primary { background: var(--blue-600); color: var(--white); box-shadow: 0 4px 14px rgba(3,105,161,0.35); }
.btn--primary:hover { background: var(--blue-800); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(3,105,161,0.45); }
.btn--secondary { background: transparent; color: var(--slate-800); border: 2px solid var(--slate-300); }
.btn--secondary:hover { border-color: var(--blue-600); color: var(--blue-600); background: var(--blue-50); }
.btn--secondary-light { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.3); }
.btn--secondary-light:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }
.btn--large { padding: var(--space-lg) var(--space-2xl); font-size: 1.1rem; }

/* === NAVIGATION === */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: rgba(255,255,255,0.97); backdrop-filter: blur(12px); border-bottom: 1px solid var(--slate-200); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.nav__logo { display: flex; align-items: center; gap: var(--space-xs); text-decoration: none; }
.nav__logo-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--blue-600), var(--blue-800)); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.nav__logo-icon svg { width: 22px; height: 22px; color: white; }
.nav__logo-text { font-family: 'Inter', sans-serif; font-weight: 800; font-size: 1.4rem; color: var(--slate-900); }
.nav__logo-suffix { color: var(--blue-600); }
.nav__links { display: none; list-style: none; gap: var(--space-xl); }
.nav__link { font-family: 'Inter', sans-serif; font-weight: 500; font-size: 0.95rem; color: var(--slate-600); transition: color var(--transition-fast); }
.nav__link:hover { color: var(--slate-900); }
.nav__link:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; border-radius: 4px; }
.nav__link--active { color: var(--blue-800) !important; font-weight: 600; }
.nav__actions { display: flex; align-items: center; gap: var(--space-md); }
.nav__cta-btn { display: none; padding: 0.5rem 1.25rem; background: var(--blue-600); color: var(--white); border-radius: var(--radius-md); font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.9rem; transition: all var(--transition-base); text-decoration: none; }
.nav__cta-btn:hover { background: var(--blue-800); }
.nav__cta-btn:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.nav__social { display: none; gap: 0.5rem; }
.nav__social-link { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 6px; color: var(--slate-500); transition: all 0.2s; }
.nav__social-link:hover { color: var(--blue-600); background: var(--blue-50); }
.nav__social-link:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.nav__mobile-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--slate-700); border-radius: 2px; transition: all 0.3s; }
.nav__mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__mobile-toggle.active span:nth-child(2) { opacity: 0; }
.nav__mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.nav__mobile-social { display: none; }

/* Desktop nav */
@media (min-width: 1024px) {
  .nav__links { display: flex; }
  .nav__cta-btn { display: inline-block; }
  .nav__social { display: flex; }
  .nav__mobile-toggle { display: none; }
}

/* Mobile nav */
@media (max-width: 1023px) {
  .nav__links {
    display: none; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: white; padding: 1.5rem; border-bottom: 1px solid var(--slate-200);
    box-shadow: var(--shadow-lg); gap: 0;
  }
  .nav__links--active { display: flex; }
  .nav__links li { padding: 0.75rem 0; }
  .nav__link { font-size: 1.1rem; }
  .nav__mobile-social { display: list-item; list-style: none; padding-top: 1rem; border-top: 1px solid var(--slate-200); margin-top: 0.5rem; }
}

/* === GLOBAL FOCUS === */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue-400);
  outline-offset: 2px;
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
