/*
 * OpsMed — Homepage Styles
 * Color Palette: Medical Blues / Silver / White / Red accent
 * WCAG 2.2 AA Compliant — All text meets 4.5:1 minimum contrast ratio
 */

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

  /* Medical Red (accent only) */
  --red-600: #dc2626;
  --red-100: #fee2e2;

  /* Success Green */
  --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);

  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
}

/* === RESET & BASE === */
*, *::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); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Screen-reader only utility */
.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 */
.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 — WCAG contrast: slate-800 on white = ~12.6:1 */
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); }
/* Body text: slate-600 on white = ~7:1 contrast */
p { color: var(--slate-600); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-lg); }
.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); }

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

/* === HERO === */
.hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 50%, var(--slate-100) 100%);
  overflow: hidden;
}
.hero__inner { display: grid; grid-template-columns: 1fr; gap: var(--space-3xl); align-items: center; }
@media (min-width: 768px) { .hero__inner { grid-template-columns: 1.2fr 1fr; } }

.hero__badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--blue-100); color: var(--blue-800); /* 8.5:1 contrast */
  padding: 0.4rem 1rem; border-radius: 99px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: var(--space-lg);
}
.hero__badge svg { color: var(--blue-600); }

.hero h1 { margin-bottom: var(--space-lg); color: var(--slate-900); }

.hero__subtitle {
  font-size: 1.15rem; line-height: 1.7; color: var(--slate-600); max-width: 560px;
  margin-bottom: var(--space-xl);
}
.hero__subtitle strong { color: var(--slate-900); }

.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-bottom: var(--space-xl); }

.hero__trust-row { display: flex; flex-wrap: wrap; gap: var(--space-lg); }
.hero__trust-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--slate-600); }
.hero__trust-item svg { color: var(--green-600); flex-shrink: 0; }

.hero__visual { display: flex; justify-content: center; }
.hero__image-placeholder {
  width: 100%; max-width: 480px; aspect-ratio: 4/3; background: var(--slate-100);
  border-radius: var(--radius-xl); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0.5rem; border: 2px dashed var(--slate-300);
}
.hero__image-placeholder svg { color: var(--blue-400); }
.hero__image-placeholder p { color: var(--slate-500); font-size: 0.9rem; }
.hero__image-note { font-size: 0.8rem !important; color: var(--slate-400) !important; }

/* === STATS SECTION === */
.stats-section { background: var(--white); }
.stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-xl); }
.stat-card {
  text-align: center; padding: var(--space-xl); background: var(--blue-50);
  border-radius: var(--radius-lg); border: 1px solid var(--blue-100);
}
.stat-card__number { font-family: 'Inter', sans-serif; font-size: 3rem; font-weight: 800; color: var(--blue-600); display: block; line-height: 1; }
.stat-card__unit { font-size: 0.95rem; font-weight: 600; color: var(--blue-800); display: block; margin-bottom: 0.5rem; }
.stat-card__label { font-size: 0.95rem; color: var(--slate-600); line-height: 1.5; margin-bottom: 0.5rem; }
.stat-card__source { font-size: 0.8rem; color: var(--slate-500); font-style: italic; display: block; }

/* === MESSAGING ANGLES === */
.angles__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-xl); }
.angle-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); padding: var(--space-2xl);
  transition: all var(--transition-base);
}
.angle-card:hover { background: rgba(255,255,255,0.1); border-color: rgba(56, 189, 248, 0.3); transform: translateY(-4px); }
.angle-card__icon {
  width: 56px; height: 56px; background: rgba(56, 189, 248, 0.15); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-lg);
}
.angle-card__icon svg { color: var(--blue-400); }
.angle-card h3 { color: var(--white); margin-bottom: var(--space-md); }
/* Light text on dark: rgba(255,255,255,0.78) on --blue-900 = ~12:1 contrast */
.angle-card p { color: rgba(255,255,255,0.78); line-height: 1.7; }

/* === GUARDRAILS === */
.guardrails__grid { display: grid; grid-template-columns: 1fr; gap: var(--space-xl); }
@media (min-width: 768px) { .guardrails__grid { grid-template-columns: 1fr 1fr; } }
.guardrails__col { padding: var(--space-2xl); border-radius: var(--radius-lg); }
.guardrails__col h3 { margin-bottom: var(--space-lg); font-size: 1.25rem; }
.guardrails__col ul { list-style: none; padding: 0; }
.guardrails__col li { padding: 0.75rem 0; border-bottom: 1px solid var(--slate-200); font-size: 1rem; color: var(--slate-700); display: flex; align-items: flex-start; gap: 0.75rem; }
.guardrails__col li:last-child { border-bottom: none; }
.guardrails__col--do { background: var(--green-100); border: 1px solid #bbf7d0; }
.guardrails__col--do h3 { color: #166534; }
.guardrails__col--do li::before { content: "✓"; color: var(--green-600); font-weight: 700; flex-shrink: 0; }
.guardrails__col--dont { background: var(--red-100); border: 1px solid #fecaca; }
.guardrails__col--dont h3 { color: #991b1b; }
.guardrails__col--dont li::before { content: "✕"; color: var(--red-600); font-weight: 700; flex-shrink: 0; }

/* === TRUST PREVIEW === */
.trust-preview__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-xl); }
.trust-preview__card {
  background: var(--white); padding: var(--space-2xl); border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200); transition: all var(--transition-base);
}
.trust-preview__card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--blue-400); }
.trust-preview__icon {
  width: 48px; height: 48px; background: var(--blue-100); border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--space-md);
}
.trust-preview__icon svg { color: var(--blue-600); }
.trust-preview__card h3 { margin-bottom: var(--space-sm); }
.trust-preview__card p { color: var(--slate-600); font-size: 0.95rem; line-height: 1.6; }
.trust-preview__cta { text-align: center; margin-top: var(--space-2xl); }

/* === FHO+ SECTION === */
.fho-section { background: linear-gradient(135deg, var(--blue-800), var(--blue-900)); }
.fho__inner { max-width: 720px; margin: 0 auto; text-align: center; }
.fho__badge {
  display: inline-block; background: rgba(56,189,248,0.2); color: var(--blue-400);
  padding: 0.4rem 1rem; border-radius: 99px; font-size: 0.85rem; font-weight: 600;
  margin-bottom: var(--space-lg); border: 1px solid rgba(56,189,248,0.3);
}
.fho__content h2 { color: var(--white); margin-bottom: var(--space-lg); }
.fho__content p { color: rgba(255,255,255,0.82); font-size: 1.1rem; line-height: 1.7; margin-bottom: var(--space-xl); }
.fho__content strong { color: var(--white); }

/* === CTA SECTION === */
.cta-section { padding: var(--space-4xl) 0; }
.cta__inner { text-align: center; max-width: 720px; margin: 0 auto; }
.cta__inner h2 { color: var(--white); margin-bottom: var(--space-md); }
.cta__inner p { color: rgba(255,255,255,0.78); font-size: 1.1rem; line-height: 1.7; margin-bottom: var(--space-2xl); }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-md); }

/* === FOCUS STYLES (WCAG 2.2) === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select: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; }
}
