/* Medspire — brand tokens (from copy doc + brand identity) */
:root {
  --primary: #82b2c0;     /* soft teal */
  --accent: #5a8f9e;      /* deeper teal — buttons */
  --accent-hover: #4a7b89;
  --ink: #0f1419;         /* dark */
  --ink-2: #3b4650;
  --muted: #5b6770;
  --bg: #ffffff;
  --tint: #f3f8f9;
  --tint-2: #e6f0f3;
  --line: #dce7ea;
  --error: #b42318;

  --font-display: "Red Hat Display", system-ui, sans-serif;
  --font-body: "Red Hat Text", system-ui, sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --container: 1160px;
  --nav-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 62ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem;
  text-decoration: none; border: 0; cursor: pointer;
  border-radius: 12px; padding: 14px 24px; min-height: 48px;
  transition: background-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px -10px rgba(90, 143, 158, .8); }
.btn--primary:hover { background: var(--accent-hover); box-shadow: 0 12px 28px -10px rgba(74, 123, 137, .85); }
.btn--primary:active { transform: translateY(1px); }
.btn--sm { padding: 10px 18px; min-height: 44px; font-size: .95rem; }
.btn--lg { padding: 18px 30px; font-size: 1.08rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .65; cursor: progress; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; color: var(--accent);
  text-decoration: none; min-height: 44px;
  transition: color .2s var(--ease);
}
.link-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--accent-hover); }
.link-arrow:hover svg { transform: translate(2px, 2px); }

/* 1. Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.nav.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(15, 20, 25, .35); }
.nav__inner { height: var(--nav-h); display: flex; align-items: center; gap: 40px; }
.nav__logo img { width: 168px; height: auto; }
.nav__links { display: flex; gap: 32px; margin-left: auto; }
.nav__links a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .98rem; padding: 10px 0; transition: color .2s var(--ease); }
.nav__links a:hover { color: var(--accent); }

/* 2. Hero */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(80px, 12vw, 150px) 0 clamp(96px, 12vw, 160px);
  background:
    linear-gradient(115deg, #e3eef1 0%, #f4f8f9 34%, #ffffff 52%, #e2edf0 78%, #cfe0e5 100%);
  text-align: center;
}
.hero__waves { position: absolute; inset: auto 0 0 0; width: 100%; height: 70%; pointer-events: none; }
.hero__waves path { fill: none; stroke: var(--primary); stroke-width: 1.4; opacity: .45; vector-effect: non-scaling-stroke; }
.hero__waves path:nth-child(2) { opacity: .3; }
.hero__waves path:nth-child(3) { opacity: .18; }
.hero__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero__title {
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 600; letter-spacing: -0.035em; line-height: 1.02;
  max-width: 14ch;
}
.hero__proof { margin-top: 20px; font-size: .95rem; color: var(--muted); max-width: 52ch; }
.hero__sub { margin-top: 28px; font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--ink-2); max-width: 60ch; }
.hero__actions { margin-top: 40px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.trust { font-size: .92rem; color: var(--muted); }

/* Sections */
.section { padding: clamp(80px, 10vw, 128px) 0; }
.section__head { max-width: 760px; margin-bottom: 56px; }
.section__head .lead, .split__head .lead, .audit__intro .lead { margin-top: 22px; }

/* 3. Problem */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.symptoms { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.symptoms li {
  position: relative; padding: 20px 0 20px 36px;
  border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.symptoms li::before {
  content: ""; position: absolute; left: 0; top: 33px;
  width: 18px; height: 2px; background: var(--accent);
}
.cost {
  margin: 72px 0 0; padding: 40px 44px;
  background: var(--tint); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.cost p { font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.55rem); line-height: 1.45; font-weight: 500; color: var(--ink); max-width: 56ch; }

/* 4. Solution */
.solution { background: linear-gradient(180deg, var(--tint) 0%, #ffffff 100%); }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pillar {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 36px 32px 38px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.pillar:hover { border-color: var(--primary); box-shadow: 0 18px 40px -28px rgba(90, 143, 158, .6); }
.pillar__num { display: block; font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .1em; color: var(--accent); margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.pillar p { margin-top: 14px; color: var(--ink-2); font-size: 1rem; }
.measure {
  margin-top: 24px; padding: 36px 40px; border-radius: var(--radius-lg);
  background: var(--ink); color: #dbe6e9;
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center;
}
.measure__label { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--primary); font-weight: 600; }
.measure__text { font-size: 1.08rem; }
.measure__text strong { color: #fff; font-weight: 600; }
.measure .link-arrow { color: var(--primary); }
.measure .link-arrow:hover { color: #fff; }

/* 5. Lead form — GHL booking widget */
.audit__wrap { display: grid; gap: 48px; justify-items: center; }
.audit__intro { text-align: center; max-width: 720px; }
.audit__intro .lead { margin-left: auto; margin-right: auto; }
.booking { width: 100%; max-width: 980px; display: grid; gap: 18px; }
.booking__frame {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 12px; box-shadow: 0 30px 60px -40px rgba(15, 20, 25, .35);
  min-height: 640px; overflow: hidden;
}
.booking__frame iframe { display: block; min-height: 616px; }
.form__privacy { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: .86rem; color: var(--muted); text-align: center; }
.form__privacy svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 6. FAQ */
.faq { background: var(--tint); }
.faq__grid { display: grid; grid-template-columns: 4fr 8fr; gap: 64px; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 26px 48px 26px 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; line-height: 1.4;
  transition: color .2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 16px; height: 2px;
  background: var(--accent); transition: transform .25s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { padding: 0 48px 28px 0; color: var(--ink-2); max-width: 68ch; }

/* 7. Final CTA */
.final {
  padding: clamp(96px, 12vw, 144px) 0;
  background: linear-gradient(115deg, #cfe0e5 0%, #e9f2f4 40%, #ffffff 60%, #dbe9ed 100%);
  text-align: center;
}
.final__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.final h2 { max-width: 20ch; }
.final .lead { margin: 0 auto; }
.final__capacity { font-size: .95rem; color: var(--muted); max-width: 58ch; }

/* 8. Footer */
.footer { background: var(--ink); color: #aebcc1; padding: 64px 0 40px; }
.footer__inner { display: grid; gap: 24px; justify-items: start; }
.footer__mark { width: 56px; height: auto; }
.footer__line { max-width: 52ch; color: #c9d5d9; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer__links a { color: var(--primary); text-decoration: none; font-size: .95rem; padding: 6px 0; transition: color .2s var(--ease); }
.footer__links a:hover { color: #fff; }
.footer__copy { font-size: .85rem; color: #7d8b91; padding-top: 24px; border-top: 1px solid #222b32; width: 100%; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* Responsive */
@media (max-width: 960px) {
  .split, .faq__grid { grid-template-columns: 1fr; gap: 40px; }
  .pillars { grid-template-columns: 1fr; }
  .measure { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 720px) {
  :root { --nav-h: 64px; }
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .nav__links { display: none; }
  .nav__inner { gap: 12px; justify-content: space-between; }
  .nav__logo img { width: 124px; }
  .nav .btn--sm { font-size: .82rem; padding: 8px 12px; }
  .booking__frame { padding: 4px; border-radius: var(--radius); }
  .cost { padding: 28px 22px; margin-top: 48px; }
  .measure { padding: 28px 22px; }
  .pillar { padding: 28px 22px; }
  .faq summary { font-size: 1.05rem; }
}
@media (max-width: 380px) {
  .nav__logo img { width: 104px; }
}

/* Legal pages (Privacy Policy / Terms) */
.legal-hero {
  padding: clamp(64px, 9vw, 112px) 0 clamp(48px, 6vw, 72px);
  background: linear-gradient(115deg, #e3eef1 0%, #f4f8f9 40%, #ffffff 60%, #dbe9ed 100%);
  border-bottom: 1px solid var(--line);
}
.legal-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 600; letter-spacing: -0.03em; }
.legal-hero__updated { margin-top: 14px; color: var(--muted); font-size: .98rem; }

.legal { padding: clamp(56px, 7vw, 96px) 0 clamp(80px, 10vw, 128px); }
.legal__body { max-width: 760px; color: var(--ink-2); font-size: 1rem; line-height: 1.75; overflow-wrap: anywhere; }
.legal__body > div > div, .legal__body > div > div > div { margin: 0 0 16px; }
.legal__body h2, .legal__body [data-custom-class="heading_1"] {
  display: block;
  font-family: var(--font-display); font-size: clamp(1.3rem, 2.4vw, 1.6rem); font-weight: 600;
  color: var(--ink); line-height: 1.3; letter-spacing: -0.01em;
  margin: 56px 0 18px; padding-top: 28px; border-top: 1px solid var(--line);
}
.legal__body h3, .legal__body [data-custom-class="heading_2"] {
  display: block;
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink);
  margin: 32px 0 12px;
}
.legal__body strong { color: var(--ink); font-weight: 600; }
.legal__body em { font-style: italic; color: var(--ink-2); }
.legal__body em strong { font-style: normal; }
.legal__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(90, 143, 158, .45); transition: color .2s var(--ease), text-decoration-color .2s var(--ease); }
.legal__body a:hover { color: var(--accent-hover); text-decoration-color: currentColor; }
.legal__body ul { margin: 0 0 18px; padding-left: 0; list-style: none; }
.legal__body li { position: relative; padding-left: 28px; margin: 0 0 10px; }
.legal__body li::before { content: ""; position: absolute; left: 4px; top: .85em; width: 12px; height: 2px; background: var(--primary); }
.legal__body p { margin: 0 0 16px; }
.legal__body table { width: 100%; border-collapse: collapse; margin: 16px 0 28px; font-size: .95rem; table-layout: fixed; }
.legal__body table + table, .legal__body div:has(> table) + div:has(> table) { margin-top: -29px; }
.legal__body th, .legal__body td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
.legal__body th { background: var(--tint); color: var(--ink); font-weight: 600; }
.legal__body td { overflow-wrap: normal; }
.legal__body :is(td, th):first-child { width: 32%; }
.legal__body :is(td, th):last-child { width: 110px; text-align: center; }
.legal__body td li { padding-left: 0; }
.legal__body td li::before { display: none; }
.legal__body > div > br:last-of-type ~ div:last-child, .legal__body > br + div { margin-top: 48px; font-size: .85rem; color: var(--muted); }
.legal__body [data-custom-class="heading_1"]:has(h2, h3), .legal__body [data-custom-class="heading_2"]:has(h2, h3) { margin: 0; padding: 0; border: 0; font-size: inherit; }
@media (max-width: 720px) {
  .legal__body table { font-size: .85rem; }
  .legal__body td, .legal__body th { padding: 10px 8px; }
  .legal__body :is(td, th):last-child { width: 84px; }
}

/* Thank-you page */
.thanks {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(72px, 10vw, 128px) 0 clamp(96px, 12vw, 150px);
  background: linear-gradient(115deg, #e3eef1 0%, #f4f8f9 34%, #ffffff 52%, #e2edf0 78%, #cfe0e5 100%);
}
.thanks__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.thanks__badge {
  width: 88px; height: 88px; border-radius: 26px; margin-bottom: 32px;
  display: grid; place-items: center;
  background: var(--accent); box-shadow: 0 22px 44px -18px rgba(90, 143, 158, .9);
  animation: badge-pop .7s cubic-bezier(.34, 1.56, .64, 1) both;
}
.thanks__badge svg { width: 48px; height: 48px; fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.thanks__badge path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: check-draw .5s .45s var(--ease) forwards; }
.thanks__title { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.04; max-width: 16ch; }
.thanks__sub { margin-top: 24px; font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--ink-2); max-width: 54ch; }
.thanks__inner > :not(.thanks__badge) { animation: rise .7s var(--ease) both; }
.thanks__inner > .eyebrow { animation-delay: .25s; }
.thanks__title { animation-delay: .35s !important; }
.thanks__sub { animation-delay: .45s !important; }

.thanks__confetti { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.thanks__confetti span {
  position: absolute; top: -24px; border-radius: 2px; opacity: 0;
  animation-name: confetti-fall; animation-timing-function: cubic-bezier(.25, .6, .45, 1); animation-fill-mode: forwards;
}

.steps__head { text-align: center; margin-left: auto; margin-right: auto; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: none; }
.step {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 32px 38px;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.step:hover { border-color: var(--primary); box-shadow: 0 18px 40px -28px rgba(90, 143, 158, .6); }
.step__num { display: block; font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .1em; color: var(--accent); margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.step p { margin-top: 14px; color: var(--ink-2); font-size: 1rem; }
.thanks__note { margin-top: 24px; }

@keyframes badge-pop { from { opacity: 0; transform: scale(.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes check-draw { to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes confetti-fall {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(0); }
  10% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 92vh, 0) rotate(var(--spin)); }
}

@media (prefers-reduced-motion: reduce) {
  .thanks__badge, .thanks__inner > * { animation: none !important; }
  .thanks__badge path { animation: none; stroke-dashoffset: 0; }
}
@media (max-width: 960px) {
  .steps__list { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .thanks__badge { width: 72px; height: 72px; border-radius: 22px; }
  .thanks__badge svg { width: 40px; height: 40px; }
  .step { padding: 28px 22px; }
}
