/* MedyFlo — site styles */
:root {
  /* Brand palette taken from the MedyFlo logo: deep navy shield, royal blue, teal swoosh. */
  --navy-900: #061a3d;
  --navy-800: #0a2a5e;
  --navy-700: #123c80;
  --navy-600: #1f56b3;
  --teal-600: #00968a;
  --teal-500: #10ad9d;
  --teal-400: #2ccfbe;
  --teal-50: #e8f8f6;
  --blue-50: #eef3fc;
  --brand-gradient: linear-gradient(120deg, var(--navy-600) 0%, var(--teal-500) 100%);
  --ink: #0f172a;
  --body: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-tint: #f4f8fc;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .08);
  --shadow: 0 10px 30px -12px rgba(10, 42, 94, .18), 0 4px 10px -4px rgba(10, 42, 94, .08);
  --shadow-lg: 0 30px 60px -20px rgba(10, 42, 94, .30);
  --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --container: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--navy-700); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--teal-400); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.center { text-align: center; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--navy-800); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; color: #fff; }

.icon { width: 24px; height: 24px; flex-shrink: 0; }
.icon-sm { width: 18px; height: 18px; }
.icon-xs { width: 14px; height: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: .95rem;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  line-height: 1.2; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--teal-600); color: #fff; box-shadow: 0 8px 20px -8px rgba(0, 150, 138, .7); }
.btn-primary:hover { background: #007f75; color: #fff; }
.btn-accent { background: var(--teal-400); color: var(--navy-900); }
.btn-accent:hover { background: #5fe0d2; color: var(--navy-900); }
.btn-ghost { background: #fff; color: var(--navy-800); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy-800); color: var(--navy-800); }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.btn-outline-light:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .06); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: .8rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--teal-600); margin-bottom: 14px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-500); box-shadow: 0 0 0 4px rgba(16, 173, 157, .18); }
.eyebrow-light { color: var(--teal-400); }
.lead { font-size: 1.15rem; color: var(--body); }
.text-accent { color: var(--teal-600); }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--navy-900); color: #cbd5e1; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 9px; padding-bottom: 9px; }
.topbar-msg { margin: 0; display: flex; align-items: center; gap: 8px; }
.topbar-msg .icon { color: var(--teal-400); }
.topbar-msg a { color: var(--teal-400); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.topbar-contact { display: flex; gap: 22px; }
.topbar-contact a { color: #e2e8f0; display: inline-flex; align-items: center; gap: 6px; }
.topbar-contact a:hover { color: #fff; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s; }
.site-header.scrolled { border-color: var(--line); box-shadow: 0 6px 20px -12px rgba(10, 42, 94, .25); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 78px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--navy-800); }
.logo-mark { width: 48px; height: 48px; object-fit: contain; }
.logo-text { line-height: 1; }
.logo-accent { background: linear-gradient(90deg, var(--teal-600), var(--teal-500)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo-light .logo-accent { background: none; color: var(--teal-400); }
.site-footer .logo-mark { width: 52px; height: 52px; }
.logo-text { font-family: var(--font-head); font-weight: 800; font-size: 1.45rem; letter-spacing: -.03em; color: var(--navy-800); }
.logo-light .logo-text { color: #fff; }

.main-nav { margin-left: auto; }
.main-nav > ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav > ul > li > a { display: inline-flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-weight: 500; font-size: .95rem; }
.main-nav > ul > li > a:hover, .main-nav > ul > li > a.active { color: var(--teal-600); background: var(--teal-50); }
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: -20px; width: 560px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease;
}
.dropdown::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: none; }
.dropdown a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--ink); font-size: .92rem; }
.dropdown a:hover { background: var(--bg-tint); color: var(--teal-600); }
.dd-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--teal-50); color: var(--teal-600); }
.dd-icon .icon { width: 18px; height: 18px; }
.dropdown strong { font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-family: var(--font-head); font-size: .95rem; line-height: 1.2; }
.header-phone small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--muted); }
.header-phone-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal-50); color: var(--teal-600); }
.nav-toggle .ico-open, .nav-toggle .ico-close { display: contents; }
.nav-toggle .ico-close, body.nav-open .nav-toggle .ico-open { display: none; }
body.nav-open .nav-toggle .ico-close { display: contents; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px; color: var(--ink); cursor: pointer; }
.nav-mobile-cta { display: none; }

/* ---------- Hero (home): full-width photo background, text on the right ---------- */
.hero-full {
  position: relative; isolation: isolate; overflow: hidden; color: #cbd5e1;
  /* Exactly one screen tall below the top bar + header (--hero-offset is measured in site.js). */
  height: calc(100svh - var(--hero-offset, 118px)); min-height: 440px; max-height: 1000px;
  display: flex; align-items: center;
  background: var(--navy-900);
}
.hero-full-bg {
  position: absolute; left: 0; top: -8%; width: 100%; height: 116%; z-index: -2;
  object-fit: cover; object-position: 0% 30%;
  animation: heroZoom 2.2s cubic-bezier(.2, .7, .2, 1) both; will-change: transform;
}
/* Shade only behind the text so it stays readable; the photo stays clear on the left. */
.hero-full::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(270deg, rgba(6, 26, 61, .94) 0%, rgba(6, 26, 61, .82) 34%, rgba(6, 26, 61, .35) 58%, rgba(6, 26, 61, 0) 74%);
}
@keyframes heroZoom { from { scale: 1.12; } to { scale: 1; } }
@media (min-width: 1200px) and (max-height: 760px) {
  .hero-full .hero-form { padding: 14px; margin-bottom: 14px; }
  .hero-full .hero-form-title { margin-bottom: 8px; }
  .hero-full .hero-form-fields input { padding: 10px 12px; }
  .hero-full .hero-form-fields .btn { padding-top: 11px; padding-bottom: 11px; }
  .hero-full .hero-points { display: none; }
}
.hero-full-bg { transform-origin: left center; }
.page-hero-bg { transform-origin: right center; }
.hero-full-inner { display: flex; justify-content: flex-end; padding-top: 3svh; padding-bottom: 5svh; }
/* Text never reaches the photo's subject, which is kept in the left quarter of the image. */
.hero-full-content { width: 100%; max-width: min(510px, 44%); }
.hero-full-pic, .page-hero-pic { display: contents; }
.hero-full h1 { color: #fff; font-size: clamp(2rem, min(3.6vw, 6.2svh), 3.2rem); line-height: 1.08; margin-bottom: 18px; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.hero-full h1 .text-accent { display: block; background: linear-gradient(90deg, var(--teal-400), #7cc4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-full .lead { color: #e2e8f0; font-size: clamp(1rem, 2.1svh, 1.12rem); margin-bottom: clamp(14px, 2.6svh, 26px); }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; translate: -50% 0; width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .55); border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
.hero-in { animation: heroIn .9s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 110ms + 250ms); }
@keyframes heroIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
.center-actions { justify-content: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.hero-form { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: 20px; padding: 18px; margin-bottom: 22px; backdrop-filter: blur(6px); }
.hero-form-title { margin: 0 0 12px; font-family: var(--font-head); font-weight: 700; color: #fff; font-size: .98rem; }
.hero-form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-form-fields input {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink); background: #fff;
  border: 2px solid transparent; border-radius: 12px; padding: 13px 14px;
}
.hero-form-fields input:focus { outline: none; border-color: var(--teal-400); box-shadow: 0 0 0 4px rgba(44, 207, 190, .25); }
.hero-form-fields .btn { grid-column: 1 / -1; width: 100%; border-radius: 12px; }
.hero-form-note { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; font-size: .8rem; color: #94a3b8; }
.hero-form .form-status { margin-top: 10px; }
.hero-points { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 10px 20px; }
.hero-points li { display: flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; color: #e2e8f0; }
.hero-points .icon { color: var(--teal-400); }
.hero-call { display: inline-flex; align-items: center; gap: 8px; color: #cbd5e1; font-size: .92rem; }
.hero-call strong { color: #fff; }
.hero-call .icon { color: var(--teal-400); }
.hero-call:hover strong { color: var(--teal-400); }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.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; }

/* ---------- Trust strip ---------- */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.trust-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust-item { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 22px 12px; font-family: var(--font-head); font-weight: 700; color: var(--navy-800); font-size: .95rem; }
.trust-item + .trust-item { border-left: 1px solid var(--line); }
.trust-item span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal-50); color: var(--teal-600); }
.trust-item .icon { width: 20px; height: 20px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-tint { background: var(--bg-tint); }
.section-dark { background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #cbd5e1; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head p:last-child { font-size: 1.08rem; margin-bottom: 0; }
.section-head-light p { color: #cbd5e1; }

.stats-section { padding: 0; margin-top: -1px; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: linear-gradient(120deg, var(--navy-800) 0%, var(--navy-700) 60%, var(--navy-600) 100%); border-radius: 24px;
  padding: 40px 24px; margin-top: 72px; box-shadow: var(--shadow-lg);
}
.stat { text-align: center; padding: 6px 12px; }
.stat + .stat { border-left: 1px solid rgba(255, 255, 255, .12); }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.1; }
.stat span { color: #a5b4c8; font-size: .92rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }
/* Home "What we do": every service card on one row on desktop. */
.card-grid.services-row { grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 18px; }
.services-row .service-card { padding: 24px 20px; }
.services-row .service-card h3 { font-size: 1.08rem; }
.services-row .service-card p { font-size: .9rem; }
@media (max-width: 1199px) { .card-grid.services-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .card-grid.services-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .card-grid.services-row { grid-template-columns: 1fr; } }
.service-card, .value-card, .spec-card, .mv-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 26px; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.service-card { color: var(--body); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; color: var(--body); }
.service-card h3 { margin: 18px 0 8px; }
.service-card p { font-size: .95rem; flex: 1; }
.card-link { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--teal-600); }
.service-card:hover .card-link .icon { transform: translateX(3px); }
.card-link .icon { transition: transform .2s; }
.service-icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 15px;
  background: linear-gradient(135deg, var(--teal-50), #dff3f9); color: var(--teal-600); flex-shrink: 0;
}
.service-icon .icon { width: 26px; height: 26px; }
.service-icon-lg { width: 64px; height: 64px; margin-bottom: 20px; }
.value-card h3, .spec-card h3, .mv-card h3 { margin: 18px 0 8px; }
.value-card p, .spec-card p { font-size: .95rem; margin: 0; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split-top { align-items: start; }
.split-media { position: relative; }
.split-media > img { border-radius: 24px; width: 100%; aspect-ratio: 5 / 4.4; object-fit: cover; box-shadow: var(--shadow); }
.check-list { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 500; }
.check-list .icon { color: #fff; background: var(--teal-500); border-radius: 50%; padding: 3px; width: 22px; height: 22px; margin-top: 2px; }
.check-list-2 { grid-template-columns: 1fr 1fr; }
.check-list-light li { color: #e2e8f0; }

/* Process */
.process { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: step; }
.process-step { position: relative; padding: 30px 26px; border-radius: var(--radius); background: var(--bg-tint); }
.process-step::after { content: ''; position: absolute; top: 52px; right: -22px; width: 22px; border-top: 2px dashed #b9c6d6; }
.process-step:last-child::after { display: none; }
.step-num { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--navy-800); color: #fff; font-family: var(--font-head); font-weight: 800; margin-bottom: 18px; }
.process-step p { font-size: .95rem; margin: 0; }

/* Specialty chips */
.spec-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 40px; }
.spec-chip { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); color: #fff; font-weight: 500; font-size: .95rem; transition: background .2s, border-color .2s; }
.spec-chip:hover { background: rgba(44, 207, 190, .1); border-color: rgba(44, 207, 190, .4); }
.spec-chip .icon { color: var(--teal-400); }
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.spec-card:hover, .value-card:hover { box-shadow: var(--shadow); border-color: transparent; transform: translateY(-3px); }

/* Testimonials */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testimonial { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.stars { display: flex; gap: 2px; color: #f59e0b; margin-bottom: 14px; }
.stars .icon { fill: currentColor; }
.testimonial blockquote { margin: 0 0 22px; color: var(--ink); flex: 1; }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; }
.testimonial figcaption img, .avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--navy-800); color: #fff; font-weight: 700; }
.testimonial strong { display: block; color: var(--ink); }
.testimonial small { color: var(--muted); }

/* FAQ */
.faq-list { display: grid; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: box-shadow .2s, border-color .2s; }
.faq-item[open] { box-shadow: var(--shadow); border-color: transparent; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 22px; font-family: var(--font-head); font-weight: 700; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--teal-600); transition: transform .2s; }
.faq-item[open] summary .icon { transform: rotate(180deg); }
.faq-answer { padding: 0 22px 8px; }
.faq-image { border-radius: 20px; margin-top: 24px; aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.faq-page { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }

/* Audit / lead form */
.audit { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.audit-copy img { border-radius: 20px; margin: 28px 0; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.contact-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-mini a { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; color: var(--ink); }
.contact-mini a > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--teal-50); color: var(--teal-600); }
.contact-mini small { display: block; color: var(--muted); font-size: .78rem; }
.contact-mini strong { font-size: .9rem; word-break: break-word; }

.lead-form { background: #fff; border-radius: 24px; padding: 34px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.lead-form-head { margin-bottom: 22px; }
.lead-form-head h3 { font-size: 1.45rem; margin-bottom: 6px; }
.lead-form-head p { margin: 0; color: var(--muted); font-size: .95rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-bottom: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field > span { font-size: .85rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; color: var(--ink); width: 100%;
  padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--teal-500); background: #fff; box-shadow: 0 0 0 4px rgba(16, 173, 157, .15); }
.form-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; font-size: .82rem; color: var(--muted); }
.form-status:empty { display: none; }
.form-status { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: .92rem; }
.form-status.error { background: #fef2f2; color: #b91c1c; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--navy-800) 0%, var(--navy-700) 55%, var(--teal-600) 140%); color: #cbd5e1; padding: 72px 0; position: relative; overflow: hidden; }
.cta-band::after { content: ''; position: absolute; right: -120px; top: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .04); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: 10px; }
.cta-band p { margin: 0; max-width: 620px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Page hero: full-width photo background with the text over it */
.page-hero { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(140deg, var(--navy-900) 0%, var(--navy-800) 60%, #0d3470 100%); color: #cbd5e1; padding: 72px 0; }
.page-hero.has-image { min-height: 420px; display: flex; align-items: center; padding: 64px 0; }
.page-hero-bg { position: absolute; left: 0; top: -10%; width: 100%; height: 120%; z-index: -2; object-fit: cover; object-position: right 35%; animation: heroZoom 2.2s cubic-bezier(.2, .7, .2, 1) both; }
.page-hero.has-image::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(6, 26, 61, .92) 0%, rgba(6, 26, 61, .78) 38%, rgba(6, 26, 61, .3) 68%, rgba(6, 26, 61, .1) 100%);
}
.page-hero-inner { width: 100%; }
.page-hero-copy { max-width: min(600px, 45%); }
.page-hero:not(.has-image) .page-hero-copy { max-width: 760px; }
.page-hero h1 { color: #fff; font-size: clamp(2rem, 4vw, 3.2rem); text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.page-hero .lead { color: #e2e8f0; max-width: 620px; margin: 0; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .85rem; margin-bottom: 22px; color: #94a3b8; }
.breadcrumbs a { color: #cbd5e1; }
.breadcrumbs a:hover { color: #fff; }

/* Services page */
.service-list { display: grid; gap: 88px; }
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.service-row.reverse .service-row-media { order: 2; }
.service-row-media img { border-radius: 24px; width: 100%; aspect-ratio: 16 / 11; object-fit: cover; box-shadow: var(--shadow); }
.service-row-copy h2 { margin-top: 18px; font-size: clamp(1.6rem, 2.6vw, 2.1rem); }

/* Service detail */
.detail-grid { display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: start; }
.detail-main > p { font-size: 1.05rem; }
.detail-main h3 { margin-top: 36px; font-size: 1.4rem; }
.feature-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.feature-grid li { display: flex; gap: 12px; align-items: flex-start; padding: 16px; background: var(--bg-tint); border-radius: 14px; color: var(--ink); font-weight: 500; }
.feature-grid .icon { color: var(--teal-600); }
.detail-image img { border-radius: 20px; margin-top: 36px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mini-services { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-services a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-weight: 600; font-size: .93rem; }
.mini-services a:hover { border-color: var(--teal-500); color: var(--teal-600); }
.mini-services .icon { color: var(--teal-600); width: 20px; height: 20px; }
.detail-aside .sticky { position: sticky; top: 100px; display: grid; gap: 20px; }
.detail-aside .lead-form { padding: 26px; }
.detail-aside .form-grid { grid-template-columns: 1fr; }
.aside-card { background: var(--bg-tint); border-radius: var(--radius); padding: 26px; }
.aside-card h3 { margin-bottom: 6px; }
.aside-link { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; color: var(--navy-800); }
.aside-card-dark { background: var(--navy-800); color: #cbd5e1; position: sticky; top: 100px; }
.aside-card-dark h3 { color: #fff; margin-top: 18px; }
.aside-card-dark .aside-link { color: #fff; justify-content: center; margin-top: 14px; }

/* About */
.mv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.mv-card { padding: 36px; }
.mv-card p { font-size: 1.1rem; color: var(--ink); margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
.contact-cards { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 14px; }
.contact-cards li { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.contact-cards small { display: block; color: var(--muted); font-size: .8rem; }
.contact-cards a, .contact-cards span:not(.service-icon) { color: var(--ink); font-weight: 600; }
.next-steps { background: var(--bg-tint); border-radius: var(--radius); padding: 28px; }
.next-steps ol { margin: 0; padding-left: 20px; display: grid; gap: 10px; }

.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 32px; }
.message-page { padding: 120px 0; }
.success-mark { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--teal-50); color: var(--teal-600); margin-bottom: 22px; }
.success-mark .icon { width: 38px; height: 38px; }

/* Footer */
.site-footer { background: var(--navy-900); color: #94a3b8; padding: 56px 0 0; font-size: .94rem; }
.footer-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer-badge { display: flex; align-items: center; gap: 10px; color: #e2e8f0; font-weight: 600; font-size: .9rem; }
.footer-badge .icon { color: var(--teal-400); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding: 48px 0; }
.footer-brand p { margin: 18px 0; max-width: 340px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.site-footer a { color: #94a3b8; }
.site-footer a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { color: var(--teal-400); margin-top: 3px; }
.socials { display: flex; gap: 10px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .15); }
.socials a:hover { background: var(--teal-600); border-color: var(--teal-600); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }
.footer-bottom p { margin: 0; }

/* ---------- Motion ---------- */
/* Scroll reveals: hidden only when JS is running (html.js), so content never stays invisible. */
.js [data-reveal] {
  opacity: 0;
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal="up"] { transform: translateY(34px); }
.js [data-reveal="left"] { transform: translateX(-44px); }
.js [data-reveal="right"] { transform: translateX(44px); }
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* Elements waiting to slide in sideways must not widen the page (clip keeps sticky working). */
main, .site-footer { overflow-x: clip; }
@media (max-width: 760px) {
  .js [data-reveal="left"] { transform: translateX(-24px); }
  .js [data-reveal="right"] { transform: translateX(24px); }
}

/* Scroll progress bar */
.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 100; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--sp, 0)); background: linear-gradient(90deg, var(--teal-400), var(--navy-600)); }

/* Header tucks away while scrolling down, returns when scrolling up */
.site-header { transition: transform .35s ease, box-shadow .2s, border-color .2s; }
.site-header.tucked { transform: translateY(-100%); }

/* Service cards: soft spotlight follows the cursor */
.service-card { position: relative; overflow: hidden; isolation: isolate; }
.service-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(280px circle at var(--x, 50%) var(--y, 0%), rgba(16, 173, 157, .14), transparent 65%);
}
.service-card:hover::before { opacity: 1; }
.service-icon { transition: transform .35s cubic-bezier(.2, .7, .2, 1), background .3s, color .3s; }
.service-card:hover .service-icon { transform: rotate(-8deg) scale(1.08); background: var(--teal-600); color: #fff; }
/* Pain cards: same hover as the service cards, in the section's own red. */
.pain-card { position: relative; overflow: hidden; isolation: isolate; }
.pain-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(280px circle at var(--x, 50%) var(--y, 0%), rgba(225, 29, 72, .09), transparent 65%);
}
.pain-card:hover::before { opacity: 1; }
.pain-icon { transition: transform .35s cubic-bezier(.2, .7, .2, 1), background .3s, color .3s; }
.pain-card:hover .pain-icon { transform: rotate(-8deg) scale(1.08); background: #e11d48; color: #fff; }

/* Comparison: in-house vs MedyFlo */
.compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: stretch; }
.compare-col { border-radius: 24px; padding: 34px; }
.compare-col h3 { display: flex; align-items: center; gap: 12px; font-size: 1.3rem; margin-bottom: 18px; }
.compare-col ul { list-style: none; padding: 0; margin: 0 0 8px; }
.compare-col li { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px dashed var(--line); font-weight: 500; }
.compare-col li:last-child { border-bottom: 0; }
.compare-col li .icon { margin-top: 3px; flex-shrink: 0; }
.compare-badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.compare-without { background: #fff; border: 1px solid var(--line); }
.compare-without li { color: var(--body); }
.compare-without li .icon { color: #e11d48; }
.compare-without .compare-badge { background: #ffe4e6; color: #e11d48; }
.compare-with { background: linear-gradient(150deg, var(--navy-800), var(--navy-700)); color: #e2e8f0; box-shadow: var(--shadow-lg); }
.compare-with h3 { color: #fff; }
.compare-with li { border-color: rgba(255, 255, 255, .12); }
.compare-with li .icon { color: var(--teal-400); }
.compare-with .compare-badge { background: var(--teal-500); color: #fff; }
.compare-with .btn { margin-top: 18px; }
.compare-vs { align-self: center; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); font-family: var(--font-head); font-weight: 800; color: var(--navy-800); text-transform: uppercase; font-size: .85rem; }

/* Pain points: problem on top, MedyFlo fix underneath */
.pain-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pain-card { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; transition: transform .25s, box-shadow .25s; }
.pain-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.pain-top { display: grid; gap: 14px; }
.pain-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #ffe4e6; color: #e11d48; }
.pain-card h3 { margin: 0 0 4px; }
.pain-problem { margin: 0; color: #be123c; font-weight: 600; font-size: .95rem; }
.pain-fix { display: flex; gap: 10px; margin: 0; padding-top: 16px; border-top: 1px dashed var(--line); font-size: .93rem; color: var(--ink); }
.pain-fix .icon { color: var(--teal-600); flex-shrink: 0; margin-top: 2px; }

/* Revenue leakage "iceberg": denied claims above the waterline, hidden leaks below */
.iceberg { position: relative; max-width: 1040px; margin: 0 auto; text-align: center; }
.iceberg-tip { display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; border-radius: 999px; background: #fff; color: var(--navy-800); font-family: var(--font-head); font-weight: 800; font-size: 1.1rem; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .5); }
.iceberg-tip span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ffe4e6; color: #e11d48; }
.waterline { position: relative; margin: 34px 0 30px; height: 2px; background: linear-gradient(90deg, transparent, rgba(44, 207, 190, .7), transparent); }
.waterline span { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px 14px; border-radius: 999px; background: var(--navy-800); border: 1px solid rgba(44, 207, 190, .4); color: var(--teal-400); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.leak-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: left; }
.leak-item { padding: 22px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); }
.leak-item h3 { font-size: 1.05rem; margin-bottom: 6px; color: #fff; }
.leak-item p { margin: 0; color: #cbd5e1; font-size: .93rem; }
.leak-item:nth-child(n+4) { background: rgba(255, 255, 255, .035); }

/* ROI calculator */
.roi { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.roi-field { display: grid; gap: 10px; margin-top: 26px; }
.roi-field > span { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; color: var(--ink); }
.roi-field output { font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; color: var(--teal-600); }
.roi-field small { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.roi-field input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--teal-500) var(--fill, 50%), #dbe4ef var(--fill, 50%)); outline: none; cursor: pointer; }
.roi-field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 4px solid var(--teal-600); box-shadow: var(--shadow-sm); }
.roi-field input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--teal-600); }
.roi-field input[type=range]:focus-visible { box-shadow: 0 0 0 4px rgba(16, 173, 157, .25); }
.roi-result { background: linear-gradient(150deg, var(--navy-800), var(--navy-700)); color: #cbd5e1; border-radius: 26px; padding: 36px; box-shadow: var(--shadow-lg); }
.roi-label { margin: 0; text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; font-weight: 700; color: var(--teal-400); }
.roi-big { margin: 6px 0 18px; font-family: var(--font-head); font-size: clamp(2.6rem, 5vw, 3.6rem); font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1.1; }
.roi-rows { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; margin-bottom: 22px; }
.roi-rows p { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; }
.roi-rows strong { color: #fff; }
.roi-rows .roi-plus { color: var(--teal-400); }
.roi-note { margin: 14px 0 0; font-size: .8rem; color: #94a3b8; text-align: center; }

/* Process timeline: the line draws itself as you scroll */
.timeline { position: relative; --n: 4; }
.timeline-track { position: absolute; top: 23px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: 3px; border-radius: 3px; background: #d5dfeb; }
.timeline-fill { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: linear-gradient(90deg, var(--teal-500), var(--navy-600)); }
.timeline .process { position: relative; }
.timeline .process-step { background: none; padding: 0 14px; text-align: center; }
.timeline .process-step::after { display: none; }
.timeline .step-num { position: relative; z-index: 1; margin: 0 auto 20px; background: #fff; color: var(--navy-800); border: 3px solid #d5dfeb; transition: background .4s, color .4s, border-color .4s, box-shadow .4s; }
.timeline .process-step.lit .step-num { background: var(--teal-600); border-color: var(--teal-600); color: #fff; box-shadow: 0 0 0 8px rgba(16, 173, 157, .15); }

/* Specialties ticker: two rows drifting in opposite directions */
.marquee { display: grid; gap: 14px; margin-bottom: 44px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-row { overflow: hidden; }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: marquee 42s linear infinite; }
.marquee-row.reverse .marquee-track { animation-direction: reverse; animation-duration: 48s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee .spec-chip { flex-shrink: 0; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }

/* Gentle parallax room for images that move on scroll */
.split-media:has(img[data-parallax]) { overflow: hidden; border-radius: 24px; box-shadow: var(--shadow); }
.split-media img[data-parallax] { scale: 1.12; box-shadow: none; }

/* Call-to-action band slowly shifts its gradient */
.cta-band { background-size: 200% 200%; animation: ctaShift 14s ease-in-out infinite alternate; }
@keyframes ctaShift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee-track { width: auto; flex-wrap: wrap; justify-content: center; padding: 0 18px; }
  .marquee [aria-hidden="true"] { display: none; }
  .marquee-row.reverse { display: none; }
}

/* Lenis smooth scrolling */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .header-phone { display: none; }
  .card-grid, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .spec-chips { grid-template-columns: repeat(3, 1fr); }
}
/* Below 1200px the hero photo sits above the text instead of behind it, so the two can never overlap. */
@media (max-width: 1199px) {
  /* Tablets and phones: photo on top, text below on navy, so they never overlap. */
  .hero-full, .page-hero.has-image { display: block; min-height: 0; padding: 0; }
  .hero-full { height: auto; max-height: none; }
  .hero-full::before, .page-hero.has-image::before { display: none; }
  .hero-full-bg, .page-hero-bg { position: relative; top: 0; display: block; width: 100%; z-index: auto; object-position: center 25%; }
  .hero-full-bg { height: 52svh; min-height: 300px; max-height: 560px; }
  .page-hero-bg { height: 40svh; min-height: 240px; max-height: 420px; }
  .hero-full .hero-full-inner { display: block; padding-top: 36px; padding-bottom: 56px; }
  .page-hero.has-image .page-hero-inner { padding-top: 36px; padding-bottom: 48px; }
  .hero-full-content, .page-hero-copy { max-width: 680px; }
}
@media (max-width: 1024px) {
  .main-nav {
    position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); background: #fff; padding: 88px 22px 24px;
    box-shadow: var(--shadow-lg); overflow-y: auto; z-index: 60;
    /* Fade/slide within the viewport: translating fully off-screen would widen the page. */
    opacity: 0; visibility: hidden; transform: translateX(0) scale(.98); transform-origin: top right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .main-nav.open { opacity: 1; visibility: visible; transform: none; }
  .main-nav > ul { flex-direction: column; gap: 2px; }
  .main-nav > ul > li > a { width: 100%; padding: 14px; font-size: 1.05rem; }
  .dropdown { position: static; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; grid-template-columns: 1fr; padding: 0 0 6px 12px; display: none; }
  .has-dropdown.open .dropdown { display: grid; }
  .has-dropdown:hover .dropdown { transform: none; }
  .nav-mobile-cta { display: grid; gap: 10px; margin-top: 22px; }
  .nav-toggle { display: grid; position: relative; z-index: 70; }
  .header-actions .btn { display: none; }
  .main-nav { margin-left: 0; }
  .header-actions { margin-left: auto; }
  .hero-grid, .split, .audit, .service-row, .detail-grid, .contact-grid, .faq-page { grid-template-columns: 1fr; gap: 48px; }
  .service-row.reverse .service-row-media { order: 0; }
  .scroll-cue { display: none; }
  .compare { grid-template-columns: 1fr; }
  .pain-grid { grid-template-columns: 1fr 1fr; }
  .roi { grid-template-columns: 1fr; gap: 36px; }
  .leak-grid { grid-template-columns: 1fr 1fr; }
  .compare-vs { justify-self: center; margin: -8px 0; }
  .process { grid-template-columns: 1fr 1fr; }
  .process-step::after { display: none; }
  .testimonials, .spec-grid { grid-template-columns: 1fr 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .detail-aside .sticky, .aside-card-dark { position: static; }
  body.nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(6, 26, 61, .45); z-index: 55; }
  /* Keep the header (menu panel + close button) above the dimmed background. */
  body.nav-open .site-header { z-index: 80; transform: none; }
  /* backdrop-filter would make the header the containing block of the fixed menu panel and clip it. */
  .site-header { backdrop-filter: none; background: #fff; }
  .main-nav { top: var(--nav-top, 0px); padding-top: 18px; border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .topbar-contact { display: none; }
  .topbar-msg { font-size: .8rem; }
  .topbar-msg > a { display: none; }
  .section { padding: 68px 0; }
  .container { padding: 0 18px; }
  .trust-inner { grid-template-columns: 1fr 1fr; }
  .trust-item { justify-content: flex-start; padding: 16px 8px; font-size: .85rem; }
  .trust-item:nth-child(3) { border-left: 0; }
  .trust-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 24px 0; margin-top: 56px; }
  .stat:nth-child(3) { border-left: 0; }
  .card-grid, .card-grid-4, .process, .testimonials, .spec-grid, .mv-grid, .feature-grid, .mini-services, .check-list-2, .contact-mini { grid-template-columns: 1fr; }
  .spec-chips { grid-template-columns: 1fr 1fr; }
  .spec-chip { font-size: .85rem; padding: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .lead-form { padding: 24px 20px; }
    .footer-badges { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; }
  .hero-actions .btn { flex: 1 1 100%; }
  .btn { white-space: normal; text-align: center; }
  .service-row > * { min-width: 0; }
  .page-hero { padding: 48px 0 56px; }
  .hero-form-fields { grid-template-columns: 1fr; }
  .hero-full-bg { height: 46svh; }
  .page-hero-bg { height: 34svh; }
  .compare-col { padding: 26px 22px; }
  .pain-grid, .leak-grid { grid-template-columns: 1fr; }
  .roi-result { padding: 28px 22px; }
  .timeline-track { top: 0; bottom: 0; left: 22px; right: auto; width: 3px; height: auto; }
  .timeline-fill { width: 100%; height: calc(var(--p, 0) * 100%); }
  .timeline .process { gap: 34px; }
  .timeline .process-step { text-align: left; padding: 0 0 0 66px; }
  .timeline .step-num { position: absolute; left: 0; top: 0; margin: 0; }
}

/* ======================================================================
   Phone layout (≤760px): compact, thumb-friendly and easy to scan.
   ====================================================================== */
.swipe-hint, .mobile-cta { display: none; }

@media (max-width: 760px) {
  body { font-size: 15.5px; }
  h2 { font-size: clamp(1.5rem, 6.4vw, 1.85rem); }
  h3 { font-size: 1.08rem; }
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 28px; }
  .section-head p:last-child { font-size: 1rem; }
  .eyebrow { font-size: .8125rem; margin-bottom: 10px; }

  /* Top bar + header: one short line, slimmer header */
  .topbar-inner { justify-content: center; padding-top: 7px; padding-bottom: 7px; }
  .topbar-msg { font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; text-align: center; }
  .topbar-msg .icon { display: none; }
  .header-inner { height: 64px; }
  .logo-mark { width: 40px; height: 40px; }
  .logo-text { font-size: 1.3rem; }
  .nav-toggle { width: 44px; height: 44px; place-items: center; }
  .main-nav { width: 100vw; }
  .main-nav > ul > li > a { min-height: 48px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .dropdown a { min-height: 44px; }

  /* Hero */
  .hero-full-bg { height: 42svh; min-height: 260px; }
  .hero-full .hero-full-inner { padding-top: 26px; padding-bottom: 36px; }
  .hero-full h1 { font-size: clamp(1.85rem, 8.6vw, 2.3rem); }
  .hero-full .lead { font-size: 1rem; margin-bottom: 20px; }
  .hero-form { padding: 14px; }
  .hero-form-note, .form-note { font-size: .8125rem; }
  .hero-points { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .hero-points li { font-size: .8125rem; align-items: flex-start; }
  .hero-links { gap: 4px 18px; }
  .hero-call { min-height: 44px; }
  .page-hero.has-image .page-hero-inner { padding-top: 26px; padding-bottom: 36px; }
  .page-hero-bg { height: 30svh; min-height: 200px; }
  .page-hero h1 { font-size: clamp(1.75rem, 8vw, 2.2rem); }
  .page-hero-actions .btn { flex: 1 1 100%; }

  /* Trust strip: compact 2×2 */
  .trust-item { padding: 12px 8px; gap: 8px; font-size: .8125rem; }
  .trust-item span { width: 32px; height: 32px; flex-shrink: 0; }

  /* Swipeable rows instead of long stacks (services, pain points) */
  .card-grid.services-row, .pain-grid {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 -18px; padding: 4px 18px 16px; scroll-padding-left: 18px; scrollbar-width: none;
  }
  .card-grid.services-row::-webkit-scrollbar, .pain-grid::-webkit-scrollbar { display: none; }
  .card-grid.services-row > *, .pain-grid > * { flex: 0 0 82%; scroll-snap-align: start; }
  .swipe-hint { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 0 0; font-size: .8125rem; font-weight: 600; color: var(--muted); }
  .swipe-hint .icon { animation: nudge 1.6s ease-in-out infinite; }
  @keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }

  /* Revenue leakage: tidy 2-column tiles */
  .leak-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .leak-item { padding: 14px; }
  .leak-item h3 { font-size: .95rem; }
  .leak-item p { font-size: .8125rem; }
  .waterline { margin: 26px 0 22px; }
  .waterline span { font-size: .75rem; }

  /* ROI calculator */
  .roi { gap: 24px; }
  .roi-field { margin-top: 18px; }
  .roi-field small { font-size: .8125rem; }
  .roi-field input[type=range] { height: 10px; }
  .roi-field input[type=range]::-webkit-slider-thumb { width: 28px; height: 28px; }
  .roi-big { font-size: 2.6rem; }
  .roi-note { font-size: .8125rem; }
  .roi-rows p { align-items: baseline; flex-wrap: wrap; column-gap: 8px; row-gap: 2px; }
  .roi-rows strong { white-space: nowrap; margin-left: auto; }

  /* Why MedyFlo / timeline / FAQ / audit: less scrolling */
  .split { gap: 28px; }
  .split-media > img, .split-media { aspect-ratio: 16 / 10; }
  .faq-image, .audit-copy img { display: none; }
  .faq-item summary { padding: 16px 18px; min-height: 52px; }
  .timeline .process { gap: 26px; }
  .contact-mini { grid-template-columns: 1fr; }
  .contact-mini a { min-height: 56px; }
  .specialties-band .marquee { margin-bottom: 28px; }
  .cta-band { padding: 52px 0; }
  .cta-actions, .cta-actions .btn { width: 100%; }

  /* Forms: comfortable full-width fields (16px text stops iOS zooming in) */
  .field input, .field select, .field textarea, .hero-form-fields input { font-size: 16px; min-height: 48px; }
  .lead-form-head h3 { font-size: 1.25rem; }

  /* Footer: badges and link lists side by side, roomy tap targets */
  .site-footer { padding-top: 40px; }
  .footer-badges { gap: 14px 10px; padding-bottom: 28px; }
  .footer-badge { font-size: .8125rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 18px; padding: 32px 0; }
  .footer-brand, .footer-grid > div:last-child { grid-column: 1 / -1; }
  .site-footer ul { gap: 0; }
  .site-footer li a { display: inline-flex; align-items: center; min-height: 40px; }
  .socials a { width: 44px; height: 44px; }
  .footer-bottom { font-size: .8125rem; text-align: center; align-items: center; }
  .footer-bottom a { display: inline-block; padding: 10px 4px; }

  /* Pinned call to action at the bottom of the screen */
  .mobile-cta {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 45;
    min-height: 52px; border-radius: 14px; background: var(--teal-600); color: #fff;
    font-family: var(--font-head); font-weight: 700; box-shadow: 0 14px 30px -10px rgba(6, 26, 61, .55);
    transform: translateY(140%); transition: transform .3s ease;
  }
  .mobile-cta.show { transform: none; }
  .mobile-cta:hover { color: #fff; }
  body.has-mobile-cta .site-footer { padding-bottom: 76px; }
  body.nav-open .mobile-cta { transform: translateY(140%); }
}

@media (max-width: 760px) {
  .waterline span, .roi-label, .contact-mini small, .contact-cards small { font-size: .8125rem; }
  .aside-link { min-height: 44px; margin-top: 4px; }
  .contact-cards a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (max-width: 380px) {
  .hero-points { grid-template-columns: 1fr; }
  .leak-grid { grid-template-columns: 1fr; }
}

/* Phone menu: full-width sheet below the header */
@media (max-width: 760px) {
  .main-nav { width: 100%; border-radius: 0 0 20px 20px; bottom: auto; max-height: calc(100svh - var(--nav-top, 0px)); padding-bottom: 28px; }
}
