/* =========================================================
   DESIGN TOKENS
   ========================================================= */
:root {
  /* 60% - Light foundation */
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --surface: #F1F5F9;
  --surface-light: #EAF1F8;
  --card: #FFFFFF;
  --card-hover: #F7FAFD;
  --border: #DCE6F2;
  --divider: #E8EEF5;

  /* 30% - Medical blue */
  --primary: #0F4C9C;
  --primary-dark: #0A356D;
  --primary-light: #E8F2FF;
  --primary-soft: #D7E8FF;
  --primary-hover: #155CB8;
  --primary-active: #083060;

  --secondary: #1E6FD9;
  --secondary-light: #F2F8FF;
  --secondary-border: #BFD8FF;

  /* 10% - Emergency red */
  --accent: #E53935;
  --accent-dark: #C62828;
  --accent-light: #FFF1F1;
  --accent-soft: #FFE2E2;
  --accent-hover: #D32F2F;

  /* Text */
  --text: #1E293B;
  --text-heading: #0F172A;
  --text-light: #475569;
  --text-muted: #64748B;
  --text-disabled: #94A3B8;
  --text-white: #FFFFFF;

  /* Status */
  --success: #16A34A;
  --success-light: #ECFDF3;
  --warning: #F59E0B;
  --warning-light: #FFF7E6;
  --danger: #DC2626;
  --danger-light: #FEF2F2;
  --info: #0284C7;
  --info-light: #F0F9FF;

  /* Emergency identity */
  --ambulance-red: #E53935;
  --medical-blue: #0F4C9C;
  --medical-white: #FFFFFF;
  --emergency-dark: #10243E;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,76,156,.06);
  --shadow-sm: 0 4px 12px rgba(15,76,156,.08);
  --shadow-md: 0 10px 25px rgba(15,76,156,.12);
  --shadow-lg: 0 20px 50px rgba(15,76,156,.15);
  --shadow-red: 0 12px 30px rgba(229,57,53,.15);

  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Motion */
  --transition: all .3s ease;
}

/* =========================================================
   BASE
   ========================================================= */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, h4, h5, .font-heading {
  font-family: 'Poppins', system-ui, sans-serif;
}

::selection { background: var(--primary-soft); color: var(--primary-dark); }

/* Visible keyboard focus everywhere (WCAG) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* =========================================================
   SIGNATURE ELEMENT: EKG / vitals pulse line
   Used in the hero to evoke a cardiac monitor without being literal.
   ========================================================= */
.pulse-line {
  stroke: var(--accent);
  stroke-width: 2.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw-pulse 4.5s linear infinite;
}
@keyframes draw-pulse {
  0%   { stroke-dashoffset: 1400; }
  60%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -20; }
}

.pulse-dot {
  animation: pulse-glow 1.6s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.35); }
}

/* =========================================================
   SCROLL REVEAL (fade-up)
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   CARD LIFT
   ========================================================= */
.lift {
  transition: var(--transition);
}
.lift:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

/* =========================================================
   IMAGE ZOOM ON HOVER
   ========================================================= */
.zoom-wrap { overflow: hidden; }
.zoom-wrap img {
  transition: transform .5s ease;
}
.zoom-wrap:hover img {
  transform: scale(1.08);
}

/* =========================================================
   BUTTON RIPPLE
   ========================================================= */
.btn-ripple {
  position: relative;
  overflow: hidden;
}
.btn-ripple .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  transform: scale(0);
  animation: ripple-anim .6s linear;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(3); opacity: 0; }
}

/* =========================================================
   FAQ ACCORDION
   ========================================================= */
.faq-item[data-open="true"] .faq-icon { transform: rotate(45deg); }
.faq-icon { transition: transform .25s ease; }
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s ease;
}
.faq-item[data-open="true"] .faq-panel { grid-template-rows: 1fr; }
.faq-panel > div { overflow: hidden; }

/* =========================================================
   NAV
   ========================================================= */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
#mobile-menu.open { max-height: 32rem; }

.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* =========================================================
   MARQUEE STRIP (top utility bar ticker on mobile)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  .pulse-line, .pulse-dot, .reveal, .zoom-wrap img { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
