/* MooreLife Medicare — brand colours from the logo: deep navy + ECG red */
:root {
  --navy: #1e2468;
  --navy-700: #161b52;
  --navy-50: #eef0fa;
  --red: #c1121f;
  --red-700: #9c0e18;
  --red-50: #fdecee;
  --ink: #1a1d2e;
  --muted: #5b6078;
  --line: #e3e5ef;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --ok: #18794e;
  --ok-50: #e7f6ee;
  --warn: #a15c00;
  --warn-50: #fff4e0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 24, 70, .06), 0 6px 24px rgba(20, 24, 70, .06);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--navy); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy-700); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--red); margin-bottom: .6em; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .78em 1.35em; border-radius: 999px; font: inherit; font-weight: 700; font-size: .95rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, transform .1s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-700); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-700); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-light { background: #fff; color: var(--navy); }
.btn-sm { padding: .45em .9em; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--red-50); color: var(--red-700); }

/* Header */
.topbar { background: var(--navy); color: #dfe2ff; font-size: .85rem; }
.topbar .wrap { display: flex; gap: 20px; justify-content: flex-end; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: #fff; text-decoration: none; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 76px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 62px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; padding: .5em .8em; border-radius: 8px; }
.nav a:hover, .nav a.active { color: var(--red); }
.nav .btn { margin-left: 8px; color: #fff; }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; }
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 76px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); display: none; }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; }
  .topbar .wrap { justify-content: center; }
}

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--navy-50) 0%, #fff 55%, var(--red-50) 100%); padding: 80px 0 90px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.2rem; color: var(--muted); max-width: 36em; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-card { background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 28px; position: relative; }
.hero-card h3 { margin-bottom: 14px; }
.ecg { position: absolute; left: 0; right: 0; bottom: 18px; height: 60px; opacity: .14; pointer-events: none; }
.trust { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.trust div { font-size: .9rem; color: var(--muted); }
.trust strong { display: block; font-size: 1.5rem; color: var(--navy); }
@media (max-width: 900px) { .hero { padding: 48px 0 60px; } .hero .wrap { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-navy { background: var(--navy); color: #e8eaff; }
.section-navy h2, .section-navy h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
@media (max-width: 700px) { .section { padding: 56px 0; } }

.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .g3, .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card.lift { transition: transform .15s, box-shadow .15s; }
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.service-card p { color: var(--muted); flex: 1; }
.service-card .more { font-weight: 700; color: var(--red); }
.icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--red-50); color: var(--red); margin-bottom: 16px; }
.icon svg { width: 26px; height: 26px; }
.icon.navy { background: var(--navy-50); color: var(--navy); }

.steps { counter-reset: step; display: grid; gap: 22px; grid-template-columns: repeat(4, 1fr); }
.steps li { list-style: none; counter-increment: step; position: relative; padding-top: 56px; }
.steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; display: grid; place-items: center; }
.steps { padding: 0; margin: 0; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: .6em; }
.ticks li::before { content: ''; position: absolute; left: 0; top: .35em; width: 18px; height: 18px; border-radius: 50%; background: var(--ok-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2318794e' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
.pills li { background: var(--navy-50); color: var(--navy); padding: .35em .85em; border-radius: 999px; font-size: .9rem; font-weight: 600; }
.pills.red li { background: var(--red-50); color: var(--red-700); }

.page-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-700) 100%); color: #dfe2ff; padding: 64px 0 56px; }
.page-hero h1 { color: #fff; }
.page-hero p { font-size: 1.15rem; max-width: 40em; }
.page-hero .eyebrow { color: #ff9aa2; }

/* Rate tables */
.rate-group { margin-bottom: 34px; }
.rate-group h3 { border-bottom: 2px solid var(--red); display: inline-block; padding-bottom: 4px; }
.rates { width: 100%; border-collapse: collapse; }
.rates td { padding: 14px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rates td:last-child { text-align: right; font-weight: 800; color: var(--navy); white-space: nowrap; }
.rates .unit { display: block; font-weight: 500; font-size: .8rem; color: var(--muted); }
.rates .desc { display: block; color: var(--muted); font-size: .88rem; }

.note { background: var(--warn-50); border-left: 4px solid var(--warn); padding: 14px 18px; border-radius: 8px; }
.callout { background: var(--red-50); border-radius: var(--radius); padding: 22px 26px; }

.cta-band { background: linear-gradient(120deg, var(--red) 0%, var(--red-700) 100%); color: #fff; border-radius: 22px; padding: 44px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { margin: 0; opacity: .9; }

/* Footer */
.site-footer { background: var(--navy-700); color: #c5c9ee; padding: 60px 0 24px; margin-top: 0; font-size: .93rem; }
.site-footer h4 { color: #fff; font-size: 1rem; }
.site-footer a { color: #c5c9ee; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .45em; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-logo { background: #fff; display: inline-block; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; }
.footer-logo img { height: 44px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 60; background: #25d366; color: #fff; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.wa-float svg { width: 30px; height: 30px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: var(--ink); }
input, select, textarea { width: 100%; font: inherit; font-size: 1rem; padding: .7em .85em; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,36,104,.12); }
textarea { min-height: 110px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--navy); transform: scale(1.15); margin-right: 8px; }
.check { display: flex; align-items: flex-start; font-weight: 500; }
.check input { margin-top: .3em; }
.err-text { color: var(--red-700); font-size: .85rem; margin-top: 4px; }
.has-err input, .has-err select { border-color: var(--red); }
.hp { position: absolute; left: -9999px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 18px; }
legend { font-weight: 800; color: var(--navy); padding: 0 6px; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.flash.ok { background: var(--ok-50); color: var(--ok); }
.flash.warn { background: var(--warn-50); color: var(--warn); }
.flash.err { background: var(--red-50); color: var(--red-700); }

/* ======================= Portal ======================= */
body.portal { background: var(--bg-soft); }
.app { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy-700); color: #c5c9ee; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .logo { background: #fff; border-radius: 12px; padding: 8px 12px; margin-bottom: 22px; }
.sidebar .logo img { height: 40px; margin: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: #c5c9ee; text-decoration: none; padding: 10px 12px; border-radius: 10px; font-weight: 600; font-size: .93rem; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar nav .sep { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: #7f86c4; margin: 16px 12px 6px; }
.sidebar .badge { margin-left: auto; }
.sidebar .me { margin-top: auto; padding: 14px 12px 0; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.sidebar .me strong { color: #fff; display: block; }
.sidebar .me form button { background: none; border: 0; color: #ff9aa2; padding: 0; cursor: pointer; font: inherit; font-weight: 600; }
.main { padding: 28px 32px 60px; min-width: 0; }
.page-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.page-title h1 { font-size: 1.6rem; margin: 0; }
.mobile-bar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 30% 0 0; z-index: 80; transform: translateX(-100%); transition: transform .2s; height: 100%; }
  .sidebar.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
  .mobile-bar img { height: 34px; }
  .main { padding: 18px 16px 60px; }
}
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.panel h2 { font-size: 1.1rem; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; text-decoration: none; color: inherit; }
.kpi .v { font-size: 1.75rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.kpi .l { font-size: .82rem; color: var(--muted); font-weight: 600; }
.kpi.alert .v { color: var(--red); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cols-3-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; }
@media (max-width: 1100px) { .cols, .cols-3-2 { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data a { font-weight: 600; text-decoration: none; }
table.data a:hover { text-decoration: underline; }
.num { text-align: right; white-space: nowrap; }
.badge { display: inline-block; padding: .15em .6em; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--navy-50); color: var(--navy); }
.b-urgent, .b-critical, .b-missed, .b-unpaid, .b-new { background: var(--red-50); color: var(--red-700); }
.b-attention, .b-deteriorated, .b-in_progress, .b-contacted, .b-prospect, .b-paused { background: var(--warn-50); color: var(--warn); }
.b-routine, .b-completed, .b-paid, .b-improved, .b-stable, .b-active, .b-converted { background: var(--ok-50); color: var(--ok); }
.b-cancelled, .b-void, .b-closed, .b-discharged { background: #eee; color: #666; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filters > * { flex: 0 0 auto; }
.filters input, .filters select { width: auto; padding: .5em .7em; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: .4em .9em; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .88rem; color: var(--muted); background: #fff; border: 1px solid var(--line); }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: .93rem; }
dl.facts dt { color: var(--muted); font-weight: 600; }
dl.facts dd { margin: 0; }
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.vital { background: var(--bg-soft); border-radius: 10px; padding: 10px 12px; }
.vital .l { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.vital .v { font-size: 1.25rem; font-weight: 800; color: var(--navy); }
.alert-box { background: var(--red-50); border: 1px solid #f5c2c7; color: var(--red-700); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; }
.alert-box.attention { background: var(--warn-50); border-color: #f3d19c; color: var(--warn); }
.alert-box ul { margin: 4px 0 0; padding-left: 18px; }
.allergy { background: var(--red); color: #fff; padding: 8px 14px; border-radius: 10px; font-weight: 700; margin-bottom: 14px; }
.visit-card { display: block; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--navy); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; text-decoration: none; color: inherit; }
.visit-card.in_progress { border-left-color: var(--warn); }
.visit-card.completed { border-left-color: var(--ok); }
.visit-card .t { font-weight: 800; color: var(--navy); }
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.vitals-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }
.spark { width: 100%; height: 120px; }
.timeline { border-left: 2px solid var(--line); padding-left: 16px; margin: 0; list-style: none; }
.timeline li { margin-bottom: 14px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); }

/* Login */
.auth { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-50), #fff 60%, var(--red-50)); padding: 20px; }
.auth .card { width: 100%; max-width: 420px; box-shadow: var(--shadow); padding: 34px; }
.auth .logo { height: 72px; margin: 0 auto 18px; }

/* Print (invoices / receipts) */
.doc { background: #fff; max-width: 820px; margin: 0 auto; padding: 40px; border: 1px solid var(--line); border-radius: var(--radius); }
.doc-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--red); padding-bottom: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.doc-head img { height: 70px; }
@media print {
  .sidebar, .mobile-bar, .no-print, .flash { display: none !important; }
  .app { display: block; }
  .main { padding: 0; }
  body.portal { background: #fff; }
  .doc { border: 0; padding: 0; }
}
.split-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 36px; }
@media (max-width: 860px) { .split-2-1 { grid-template-columns: 1fr; } }
.cols > *, .cols-3-2 > *, .grid > * { min-width: 0; }
.visit-card, dd { overflow-wrap: anywhere; }

/* ======================= Imagery & motion ======================= */
/* Service cards: photo on top, icon tile overlapping its edge */
.svc-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: inherit; position: relative; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.svc-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s ease; z-index: 2; }
.sc-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy-50); }
.sc-media picture, .sc-media img { display: block; width: 100%; height: 100%; }
.sc-media img { object-fit: cover; transition: transform .6s ease; }
.sc-placeholder { display: block; width: 100%; height: 100%; }
.sc-placeholder polyline { fill: none; stroke: var(--red); stroke-width: 2.5; opacity: .3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sc-icon { margin: -26px 0 12px 22px; position: relative; z-index: 1; border: 3px solid #fff; transition: background .25s ease, color .25s ease; }
.sc-body { padding: 0 22px 24px; display: flex; flex-direction: column; flex: 1; }
.sc-body p { color: var(--muted); flex: 1; }
.svc-card .more { font-weight: 700; color: var(--red); }
.svc-card .arrow { display: inline-block; transition: transform .2s ease; }
.svc-card:hover, .svc-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.svc-card:focus-visible { outline: 3px solid rgba(30,36,104,.35); outline-offset: 2px; }
.svc-card:hover::before, .svc-card:focus-visible::before { transform: scaleX(1); }
.svc-card:hover .sc-media img { transform: scale(1.04); }
.svc-card:hover .sc-icon, .svc-card:focus-visible .sc-icon { background: var(--red); color: #fff; }
.svc-card:hover .sc-icon svg { animation: ml-beat .7s ease-out; }
.svc-card:hover .arrow, .svc-card:focus-visible .arrow { transform: translateX(5px); }
@keyframes ml-beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.22); } 60% { transform: scale(.95); } }

/* Heartbeat line from the logo — draws itself when scrolled into view */
.ecg-line { display: block; width: min(300px, 70%); height: 28px; margin: 4px auto 14px; overflow: visible; }
.section-head:not(.center) .ecg-line { margin-left: 0; }
.ecg-line polyline { fill: none; stroke: var(--red); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .ecg-line polyline { stroke-dashoffset: 1; }
.js .ecg-line.in polyline { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s ease-out; }

/* Scroll reveal (only when JS is running, so content never stays hidden) */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.in { opacity: 1; transform: none; transition: opacity .5s ease-out var(--delay, 0ms), transform .5s ease-out var(--delay, 0ms); }
.js .reveal-steps li::before { transform: scale(0); }
.js .reveal-steps.in li::before { transform: scale(1); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.reveal-steps.in li:nth-child(2)::before { transition-delay: .15s; }
.reveal-steps.in li:nth-child(3)::before { transition-delay: .3s; }
.reveal-steps.in li:nth-child(4)::before { transition-delay: .45s; }

/* Page hero with a photo (HomeCare) */
.page-hero-split .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center; }
.hero-photo { margin: 0; position: relative; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 25%; border-radius: 20px; box-shadow: 0 24px 50px rgba(0, 0, 0, .28); }
.hero-photo .ecg-line { position: absolute; left: -20px; bottom: -16px; width: 62%; margin: 0; }
.hero-photo .ecg-line polyline { stroke: #ff9aa2; stroke-width: 3; }
@media (max-width: 900px) { .page-hero-split .wrap { grid-template-columns: 1fr; gap: 28px; } .hero-photo .ecg-line { left: 0; } }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal.in { opacity: 1; transform: none; transition: none; }
  .js .ecg-line polyline { stroke-dashoffset: 0; transition: none; }
  .js .reveal-steps li::before { transform: none; transition: none; }
  .svc-card, .svc-card::before, .sc-media img, .svc-card .arrow { transition: none; }
  .svc-card:hover, .svc-card:hover .sc-media img { transform: none; }
  .svc-card:hover .sc-icon svg { animation: none; }
}
