:root {
  --red: #d21f2b;
  --red-dark: #a8151f;
  --red-bright: #e8323e;
  --red-soft: #fdeced;
  --ink: #16181d;
  --text: #33373f;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #fbfafa;
  --border: #ececef;
  --max: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 20px rgba(20, 22, 28, 0.06);
  --shadow-lg: 0 18px 48px rgba(210, 31, 43, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* ===== Animations ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes floatY { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes pulseRing { 0% { transform: scale(0.9); opacity: 0.6; } 70% { transform: scale(1.4); opacity: 0; } 100% { opacity: 0; } }
@keyframes heartbeat {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: -14; }
}
@keyframes dashMove { to { stroke-dashoffset: -1000; } }

/* Scroll-reveal: hidden until .in-view added by JS */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.reveal.in-view { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .08s; }
.reveal.delay-2 { transition-delay: .16s; }
.reveal.delay-3 { transition-delay: .24s; }
.reveal.delay-4 { transition-delay: .32s; }
.reveal.delay-5 { transition-delay: .40s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: "Sora", "Inter", system-ui, sans-serif;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .25s ease, background .25s ease;
}
.site-header.scrolled { box-shadow: 0 6px 24px rgba(20, 22, 28, 0.07); background: rgba(255, 255, 255, 0.95); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: linear-gradient(140deg, var(--red-bright), var(--red-dark));
  color: #fff;
  border-radius: 13px;
  font-weight: 800;
  font-family: "Sora", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 16px rgba(210, 31, 43, 0.32);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.04rem; color: var(--ink); font-family: "Sora", sans-serif; font-weight: 700; }
.brand-text small { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.02em; }

.nav-list { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav-list a { color: var(--ink); font-weight: 500; font-size: 0.95rem; transition: color .15s ease; }
.nav-list a:hover { color: var(--red); text-decoration: none; }
.nav-cta {
  background: var(--red);
  color: #fff !important;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(210, 31, 43, 0.28);
  transition: background .2s ease, transform .15s ease;
}
.nav-cta:hover { background: var(--red-dark); transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer; }

/* Hero */
.hero {
  position: relative;
  background: var(--bg);
  padding: 104px 0 112px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 620px; height: 620px;
  background: radial-gradient(circle at center, var(--red-soft) 0%, rgba(253, 236, 237, 0) 70%);
  z-index: 0;
  animation: floatY 9s ease-in-out infinite;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(var(--red-bright), var(--red-dark));
}
/* Surgical ECG heartbeat line across the hero */
.hero-ecg {
  position: absolute;
  left: 0; right: 0; bottom: 34px;
  width: 100%; height: 120px;
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
}
.hero-ecg path {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: dashMove 6s linear infinite;
}
/* Floating medical cross badge */
.hero-cross {
  position: absolute;
  top: 18%; right: 8%;
  width: 84px; height: 84px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--red-bright), var(--red-dark));
  color: #fff;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(210, 31, 43, 0.34);
  z-index: 0;
  animation: floatY 5.5s ease-in-out infinite;
}
.hero-cross::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 22px;
  border: 2px solid var(--red);
  animation: pulseRing 2.8s ease-out infinite;
}
.hero-cross svg { width: 40px; height: 40px; }
.hero-inner { max-width: 780px; position: relative; z-index: 1; }
.hero-inner .eyebrow { animation: fadeUp .6s ease both; }
.hero-inner h1 { animation: fadeUp .7s ease .1s both; }
.hero-inner .lede { animation: fadeUp .7s ease .22s both; }
.hero-inner .hero-actions { animation: fadeUp .7s ease .34s both; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.74rem;
  color: var(--red-dark); margin: 0 0 20px; font-weight: 700;
  background: var(--red-soft); padding: 7px 14px; border-radius: 999px;
}
.hero h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); margin: 0 0 20px; font-weight: 800; }
.lede { font-size: 1.2rem; color: var(--muted); margin: 0 0 34px; max-width: 640px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 11px; font-weight: 600; font-size: 1rem;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(210, 31, 43, 0.3); }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }

/* Sections */
.section { padding: 92px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.8rem, 3.6vw, 2.5rem); margin: 0 0 20px; font-weight: 800; }
.section-title.center, .section-sub.center { text-align: center; }
.section-title.center::after {
  content: ""; display: block; width: 56px; height: 4px;
  background: var(--red); border-radius: 2px; margin: 16px auto 0;
}
.section-sub { color: var(--muted); margin: 18px auto 48px; max-width: 640px; font-size: 1.05rem; }

.grid-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: center; }

/* Stat list */
.stat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.stat-list li {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 24px; box-shadow: var(--shadow);
  border-left: 4px solid var(--red);
}
.stat-num { display: block; font-family: "Sora", sans-serif; font-size: 1.4rem; color: var(--red); font-weight: 700; }
.stat-label { color: var(--muted); font-size: 0.95rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px 28px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card-icon {
  display: grid; place-items: center; width: 52px; height: 52px;
  background: var(--red-soft); color: var(--red); border-radius: 14px; margin-bottom: 18px;
  transition: transform .3s ease, background .3s ease, color .3s ease;
}
.card:hover .card-icon { transform: rotate(-8deg) scale(1.08); background: var(--red); color: #fff; }
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin: 0 0 10px; font-size: 1.22rem; font-weight: 700; }
.card p { margin: 0; color: var(--muted); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.feature { text-align: center; }
.feature-icon {
  display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto 18px;
  background: linear-gradient(140deg, var(--red-bright), var(--red-dark));
  color: #fff; border-radius: 50%;
  box-shadow: 0 10px 22px rgba(210, 31, 43, 0.28);
  transition: transform .3s ease;
}
.feature:hover .feature-icon { transform: translateY(-6px) scale(1.06); }
.feature-icon svg { width: 28px; height: 28px; }
.feature h3 { font-size: 1.14rem; margin: 0 0 8px; font-weight: 700; }
.feature p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* Contact */
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 14px; }
.contact-list li { color: var(--text); display: flex; gap: 10px; }
.contact-list strong { color: var(--ink); min-width: 92px; display: inline-block; }
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.map-wrap iframe { width: 100%; height: 340px; border: 0; display: block; filter: saturate(0.9); }
.map-directions { display: block; text-align: center; padding: 14px; background: var(--red); color: #fff; font-weight: 600; }
.map-directions:hover { background: var(--red-dark); text-decoration: none; }

/* Footer */
.site-footer { background: var(--ink); color: #b9bcc4; padding: 48px 0; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-footer strong { color: #fff; font-family: "Sora", sans-serif; font-size: 1.05rem; }
.site-footer p { margin: 8px 0 0; font-size: 0.92rem; }
.copyright { font-size: 0.85rem; }

/* ===== Responsive: Desktop / Tablet / Mobile ===== */

/* Large tablet & small desktop */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-cross { top: 14%; right: 5%; width: 72px; height: 72px; }
  .hero-cross svg { width: 34px; height: 34px; }
}

/* Tablet */
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .section { padding: 76px 0; }
  .hero { padding: 88px 0 92px; }
}

/* Landscape phone / small tablet */
@media (max-width: 680px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero-cross { display: none; }
}

/* Mobile */
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute; top: 76px; right: 0; left: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 24px 18px; display: none;
    box-shadow: var(--shadow);
  }
  .nav-list.open { display: flex; animation: fadeIn .2s ease both; }
  .nav-list li { padding: 8px 0; }
  .nav-cta { text-align: center; }
  .cards, .features { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 72px; }
  .section { padding: 56px 0; }
  .hero-ecg { bottom: 18px; height: 80px; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { width: 100%; }
  .contact-list li { flex-direction: column; gap: 2px; }
  .contact-list strong { min-width: 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* Very small phones */
@media (max-width: 380px) {
  .brand-text small { display: none; }
  .hero h1 { font-size: 2.05rem; }
}
