/* =============================================================
   MBS Medical Billing Services — Core Stylesheet
   Design system: conservative healthcare + modern motion
   ============================================================= */
@import url("../fonts/fonts.css");

/* ---------- Tokens ----------
   Palette derived from the MBS badge logo: a desaturated navy (#21384c) and a
   muted sage green (#7f9d97). Navy carries structure + primary actions; sage is
   the single accent. Token NAMES are kept from the previous blue build so the
   ~200 downstream usages don't churn — only the values changed. */
:root {
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Navy ramp (was --navy-*) */
  --navy-900: #10202c;   /* footer ground            */
  --navy-800: #1b2f42;   /* deep bands / page-hero    */
  --navy-700: #23415a;   /* primary / CTA start       */

  /* Sage accent — name kept as --blue-* for compatibility */
  --blue-600: #3f6357;   /* accent text / links / eyebrow  (6.7:1 on white) */
  --blue-500: #4f7d6e;   /* focus ring / hover             (4.6:1 on white) */
  --blue-50:  #e3edea;   /* pale accent fill / focus glow  */
  --teal-500: #7f9d97;   /* the logo sage — decorative fills only */

  --emerald-500: #3a7d5c;   /* success — kept clearly green, distinct from sage */
  --emerald-50:  #e6f1ea;

  --ink:      #16222e;
  --body:     #384a54;
  --muted:    #5c6f78;
  --line:     #dde5e4;
  --bg:       #ffffff;
  --surface:  #f3f7f5;
  --surface-2:#e9f0ed;
  --white:    #ffffff;

  --accent:      var(--blue-600);
  --sage:        #7f9d97;

  /* Decorative fills only (no text sits on these) */
  --gradient-brand: linear-gradient(120deg, #33526c 0%, #7f9d97 100%);
  /* Safe for white text / background-clip text — navy -> pine, both AA */
  --gradient-cta:   linear-gradient(115deg, #23415a 0%, #2f5a4e 100%);
  --gradient-deep:  linear-gradient(160deg, #16283a 0%, #21415a 55%, #16283a 100%);
  --gradient-soft:  linear-gradient(180deg, #f3f7f5 0%, #ffffff 100%);

  /* Eyebrow / small accent text — needs 4.5:1 on page bg */
  --eyebrow: #3f6357;

  --shadow-sm: 0 1px 2px rgba(20, 40, 55, .06), 0 1px 3px rgba(20, 40, 55, .10);
  --shadow-md: 0 10px 30px -12px rgba(20, 40, 55, .18);
  --shadow-lg: 0 30px 60px -20px rgba(16, 32, 44, .26);
  --shadow-glow: 0 20px 55px -18px rgba(35, 65, 90, .40);

  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);

  --ease:        cubic-bezier(.22, 1, .36, 1);
  --ease-out:    cubic-bezier(.22, 1, .36, 1);
  --ease-in:     cubic-bezier(.7, 0, .84, 0);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-back:   cubic-bezier(.34, 1.4, .64, 1);
  --dur-fast: .12s; --dur: .22s; --dur-slow: .4s; --dur-hero: .8s;
}

/* Dark palette — LIGHT is the site default. Dark is opt-in only: it applies
   solely when the theme toggle sets data-theme="dark" (remembered in
   localStorage). The OS colour-scheme is deliberately not consulted. */
:root[data-theme="dark"] {
  --ink: #eef3f2; --body: #b9c6c4; --muted: #93a8a2; --line: #263b4c;
  --bg: #0d1922; --surface: #142330; --surface-2: #1b2f3c; --white: #142330;
  --navy-900: #0b151d;
  --blue-600: #9dc0b4;   /* sage accent, brightened for dark */
  --blue-500: #7fa89b;
  --blue-50:  #17322c;
  --teal-500: #7f9d97;
  --emerald-500: #57ad82; --emerald-50: #14302a;
  --gradient-soft: linear-gradient(180deg, #0e1a24 0%, #10202c 100%);
  --gradient-cta:  linear-gradient(115deg, #2f5678 0%, #3a6b58 100%);
  --gradient-deep: linear-gradient(160deg, #0c1922 0%, #16303f 55%, #0c1922 100%);
  --eyebrow: #a9ccc0;
  --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .5);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.4);
  --shadow-glow: 0 20px 55px -18px rgba(0, 0, 0, .55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
html:focus-within { scroll-behavior: smooth; }
/* Reduced motion. Every rule is scoped so ?motion=force (which sets
   data-motion="force" on <html>) can opt a QA/demo session back into full
   motion regardless of the OS setting. */
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="force"]) { scroll-behavior: auto; }
  :root:not([data-motion="force"]) *,
  :root:not([data-motion="force"]) *::before,
  :root:not([data-motion="force"]) *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Lenis smooth scroll ---------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Cross-document view transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .38s; animation-timing-function: var(--ease-out); }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="force"])::view-transition-group(*),
  :root:not([data-motion="force"])::view-transition-old(*),
  :root:not([data-motion="force"])::view-transition-new(*) { animation: none !important; }
}
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }

body {
  font-family: var(--font-body);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .45s var(--ease-out), color .45s var(--ease-out);
}
img, svg, video { max-width: 100%; height: auto; display: block; }

/* ---------- Icon system (Lucide line icons) ---------- */
.i {
  width: 1.15em; height: 1.15em; flex: none; display: inline-block;
  vertical-align: -0.18em; color: currentColor;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.i--lg { width: 1.5em; height: 1.5em; }
.card__icon-svg, .media-icon-svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }

a { color: var(--blue-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--navy-700); }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }
.section--deep :focus-visible, .page-hero :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible { outline-color: #fff; }
/* Underline in-flow text links so they're distinguishable from body text without
   relying on colour alone (WCAG 1.4.1). Excludes nav, buttons and card CTAs. */
.prose a,
main p a:not(.btn):not(.card__link),
main .checklist a,
.phi-notice a, .disclaimer a {
  text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px;
}
.prose a:hover, main p a:hover, main .checklist a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.14;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(2rem, 1.55rem + 2.1vw, 3.4rem); line-height: 1.08; }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.7rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem); }
p { max-width: 68ch; text-wrap: pretty; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(64px, 9vw, 128px); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.section--surface { background: var(--surface); }
[data-theme="dark"] .section--surface { box-shadow: inset 0 1px 0 rgba(255,255,255,.04), inset 0 -1px 0 rgba(255,255,255,.04); }
.section--deep { background: var(--gradient-deep); color: #c6d6d1; }
.section--deep h1, .section--deep h2, .section--deep h3 { color: #fff; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: clamp(20px, 3vw, 34px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.eyebrow {
  display: flex; flex-wrap: wrap; align-items: center; gap: .55rem;
  font-family: var(--font-display);
  font-weight: 600; font-size: clamp(.74rem, .68rem + .3vw, .82rem);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--eyebrow); text-wrap: balance;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gradient-brand); border-radius: 2px; flex: none; }
.section--deep .eyebrow { color: #a9ccc0; }
.section-head.center .eyebrow { justify-content: center; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin-top: 1rem; }
.section--deep .section-head p { color: #a8c2ba; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .9rem 1.5rem; text-align: center;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(.92rem, .88rem + .2vw, .98rem);
  border-radius: 999px; white-space: nowrap; min-height: 48px; position: relative;
  transition: transform .32s var(--ease-out), box-shadow .32s var(--ease-out), background .25s, border-color .25s, color .25s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ease-out); }
@media (hover: hover) {
  .btn:hover svg { transform: translateX(3px); }
  .btn:active { transform: scale(.97); transition-duration: .1s; }
}
.btn--primary { background: var(--gradient-cta); color: #fff; box-shadow: var(--shadow-glow); }
.btn--primary:hover { color: #fff; box-shadow: 0 26px 60px -16px rgba(47,99,230,.55); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn--ghost:hover { border-color: var(--blue-500); color: var(--blue-600); }
@media (hover: hover) {
  .btn--primary:not([data-magnetic]):hover,
  .btn--ghost:not([data-magnetic]):hover,
  .btn--light:not([data-magnetic]):hover { transform: translateY(-3px); }
}
@media (max-width: 460px) {
  .btn { white-space: normal; width: 100%; }
  .btn-row { width: 100%; }
}
.section--deep .btn--ghost { color: #fff; border-color: rgba(255,255,255,.28); }
.section--deep .btn--ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.08); }
.btn--light { background: #fff; color: var(--navy-800); }
.btn--light:hover { color: var(--navy-800); box-shadow: var(--shadow-lg); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }
[data-magnetic] { transition: transform .35s var(--ease-out), box-shadow .32s var(--ease-out); }

/* ---------- Header ---------- */
.site-header {
  --h: 76px;
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: transform .45s var(--ease-out), border-color .3s, background .3s, box-shadow .3s;
}
.site-header.is-stuck {
  --h: 66px;
  border-color: var(--line); box-shadow: var(--shadow-sm);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}
.site-header.is-hidden { transform: translateY(-100%); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: var(--h); transition: height .35s var(--ease-out); }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-logo { width: 46px; height: 46px; flex: none; border-radius: 50%; transition: width .35s var(--ease-out), height .35s var(--ease-out); }
.site-header.is-stuck .brand-logo { width: 40px; height: 40px; }
.site-footer .brand-logo { width: 54px; height: 54px; }
.brand-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark { display: block; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-word strong { font-weight: 800; font-size: 1.12rem; letter-spacing: .06em; color: var(--ink); }
.brand-word small {
  font-family: var(--font-body); font-weight: 500; font-size: .6rem; letter-spacing: .13em;
  color: var(--muted); text-transform: uppercase; margin-top: 3px; white-space: nowrap;
}
.site-footer .brand-word strong { color: #fff; }
.site-footer .brand-word small { color: #97b1a9; }
@media (max-width: 400px) { .brand-word small { display: none; } }
.nav-links { display: flex; align-items: center; gap: .3rem; }
.nav-links > a:not(.btn) {
  color: var(--body); font-weight: 500; font-size: .95rem;
  padding: .55rem .8rem; border-radius: 10px; position: relative; white-space: nowrap;
}
.nav-links > .btn { display: none; }
.nav-links a:hover { color: var(--ink); background: var(--surface); }
.nav-links a[aria-current="page"] { color: var(--blue-600); }
.nav-actions { display: flex; align-items: center; gap: .75rem; }
.theme-toggle {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  border: 1px solid var(--line); color: var(--body); transition: .2s;
}
.theme-toggle:hover { color: var(--blue-600); border-color: var(--blue-500); }
.theme-toggle svg { width: 18px; height: 18px; }
/* Moon icon in light mode ("switch to dark"), sun icon in dark mode. */
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); margin: 3px auto; transition: .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: var(--h, 76px) 0 auto 0; z-index: 95;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.6rem;
    transform: translateY(-102%); transition: transform .42s var(--ease-out), visibility .42s;
    visibility: hidden;
    box-shadow: var(--shadow-lg); max-height: calc(100dvh - var(--h, 76px)); overflow-y: auto;
  }
  .nav-links > a:not(.btn) { transform: translateY(-6px); opacity: 0; transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); }
  .nav-links.open { transform: translateY(0); visibility: visible; }
  .nav-links.open > a:not(.btn) { opacity: 1; transform: none; }
  .nav-links.open > a:nth-child(1) { transition-delay: .06s; }
  .nav-links.open > a:nth-child(2) { transition-delay: .10s; }
  .nav-links.open > a:nth-child(3) { transition-delay: .14s; }
  .nav-links.open > a:nth-child(4) { transition-delay: .18s; }
  .nav-links.open > a:nth-child(5) { transition-delay: .22s; }
  .nav-links a { padding: .9rem 1rem; font-size: 1.05rem; }
  body.nav-open::before {
    content: ""; position: fixed; inset: 0; z-index: 89;
    background: rgba(9, 18, 24, .58); backdrop-filter: blur(2px);
    animation: fade-in .3s var(--ease);
  }
  .nav .btn { display: none; }
  .nav-links .btn { display: inline-flex; margin-top: .6rem; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(44px, 6vw, 84px); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -2; background: var(--gradient-soft); }
.hero__blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; z-index: -1;
  animation: float 16s var(--ease) infinite alternate;
}
.hero__blob--a { width: 520px; height: 520px; background: radial-gradient(circle, rgba(51,82,108,.5), transparent 70%); top: -160px; right: -120px; }
.hero__blob--b { width: 460px; height: 460px; background: radial-gradient(circle, rgba(127,157,151,.42), transparent 70%); bottom: -200px; left: -140px; animation-delay: -6s; }
[data-theme="dark"] .hero__blob { opacity: .35; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .9fr; gap: clamp(36px, 5vw, 68px); align-items: center; }
@media (max-width: 940px) { .hero__grid { grid-template-columns: 1fr; align-items: start; } }
.hero h1 { margin-block: .85rem .95rem; max-width: 18ch; }
@media (max-width: 940px) { .hero h1 { max-width: none; } }
.hero__lead { font-size: clamp(1.02rem, 0.98rem + 0.2vw, 1.12rem); color: var(--body); max-width: 46ch; }
.hero .btn-row { margin-top: 1.6rem; }
.hero__trust { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: 1rem 1.8rem; align-items: center; }
.hero__trust span { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); font-weight: 500; }
.hero__trust svg { width: 18px; height: 18px; color: var(--emerald-500); flex: none; }

/* Hero visual: floating dashboard card */
.hero__panel {
  --rx: 0deg; --ry: 0deg;
  position: relative; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 1.4rem;
  transform: perspective(1400px) rotateX(calc(3deg + var(--rx))) rotateY(calc(-8deg + var(--ry)));
  transition: transform .5s var(--ease-out);
  transform-style: preserve-3d;
}
@media (hover: hover) { .hero__panel { transition: transform .18s var(--ease-out); } }
.hero__panel-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.hero__panel-top strong { font-family: var(--font-display); color: var(--ink); font-size: .95rem; }
.hero__panel-dots { display: flex; gap: 5px; }
.hero__panel-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .9rem 1rem;
}
.kpi span { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi strong { display: block; font-family: var(--font-display); font-size: 1.55rem; color: var(--ink); margin-top: .25rem; }
.kpi em { font-style: normal; font-size: .78rem; font-weight: 600; }
.kpi em.up { color: var(--emerald-500); }
.kpi em.down { color: #b7503b; }
.hero__bars { display: flex; align-items: flex-end; gap: 8px; height: 92px; margin-top: 1rem; padding: 0 .2rem; }
.hero__bars i { flex: 1; background: linear-gradient(180deg, #7f9d97, #4f7d6e); border-radius: 5px 5px 0 0; opacity: .9; transform-origin: bottom; animation: grow 1.1s var(--ease) both; }
[data-theme="dark"] .hero__bars i { background: linear-gradient(180deg, #a9ccc0, #6f9a8b); }
.hero__visual { position: relative; }
.hero__badge {
  position: absolute; right: 8px; bottom: -16px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-md); padding: .6rem .8rem; display: flex; gap: .5rem; align-items: center;
  font-size: .78rem; font-weight: 600; color: var(--ink); white-space: nowrap;
  animation: float-badge 7s ease-in-out infinite;
}
.hero__badge .i { width: 18px; height: 18px; color: var(--emerald-500); }

/* ---------- Marquee / logos ---------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; gap: 3.5rem; width: max-content; animation: scroll-x 40s linear infinite; will-change: transform; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { :root:not([data-motion="force"]) .marquee__track { animation: none; } }
.marquee__track span { font-family: var(--font-display); font-weight: 600; color: var(--muted); font-size: 1.05rem; white-space: nowrap; opacity: .8; }

/* ---------- Cards ---------- */
.card {
  --mx: 50%; --my: 50%;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
  position: relative; overflow: hidden; isolation: isolate;
}
.card::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  border-radius: inherit; opacity: 0; transition: opacity .4s var(--ease-out);
  background: radial-gradient(240px circle at var(--mx) var(--my),
    color-mix(in srgb, var(--blue-500) 16%, transparent), transparent 62%);
}
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--blue-500) 42%, var(--line)); }
  .card:hover::before { opacity: 1; }
}
.card__icon {
  width: 54px; height: 54px; margin-bottom: 1.15rem; border-radius: 15px;
  display: grid; place-items: center; flex: none;
  background: var(--blue-50);
  border: 1px solid color-mix(in srgb, var(--sage) 38%, transparent);
  color: var(--navy-700);
  transition: transform .45s var(--ease-back), background .3s, border-color .3s, color .3s;
}
[data-theme="dark"] .card__icon { color: var(--blue-600); }
.card__icon-svg { width: 27px; height: 27px; stroke-width: 1.85; }
@media (hover: hover) {
  .card:hover .card__icon { transform: translateY(-2px) rotate(-3deg); background: color-mix(in srgb, var(--sage) 22%, var(--blue-50)); border-color: color-mix(in srgb, var(--sage) 55%, transparent); }
}
.card--flat .card__icon { box-shadow: none; }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--muted); font-size: .96rem; }
.card__link { display: inline-flex; align-items: center; gap: .4rem; margin-top: 1rem; font-family: var(--font-display); font-weight: 600; font-size: .9rem; }
.card__link svg { width: 16px; height: 16px; transition: transform .25s; }
.card:hover .card__link svg { transform: translateX(4px); }
.card--flat { box-shadow: none; }
.card--glass { background: color-mix(in srgb, var(--white) 70%, transparent); backdrop-filter: blur(10px); }

/* Feature list item */
.checklist { display: grid; gap: .85rem; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; color: var(--body); }
.checklist .i, .checklist svg { width: 21px; height: 21px; color: var(--emerald-500); flex: none; margin-top: 2px; }
.section--deep .checklist li { color: #c6d6d1; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 34px); }
@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat strong { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(2.1rem, 4.5vw, 3rem); background: var(--gradient-cta); -webkit-background-clip: text; background-clip: text; color: transparent; }
@supports not ((-webkit-background-clip: text) or (background-clip: text)) { .stat strong { color: var(--blue-600); background: none; } }
.stat span { color: var(--muted); font-size: .95rem; font-weight: 500; }
.section--deep .stat span { color: #a8c2ba; }

/* ---------- Process / timeline ---------- */
.process-head { display: grid; grid-template-columns: 1.4fr .9fr; gap: 3rem; align-items: center; margin-bottom: clamp(32px, 5vw, 56px); }
.process-anim { width: 100%; max-width: 300px; margin-left: auto; }
@media (max-width: 820px) { .process-head { grid-template-columns: 1fr; } .process-anim { display: none; } }

.cyc { width: 100%; height: auto; overflow: visible; }
.cyc-track { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 2; }
.cyc-arc { fill: none; stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 120 370; transform-origin: 110px 110px;
  animation: cyc-spin 6s linear infinite; }
.cyc-node circle:first-child { fill: #7f9d97; }
.cyc-node:nth-child(3) circle:first-child,
.cyc-node:nth-child(5) circle:first-child { fill: #a9ccc0; }
.cyc-ping { fill: none; stroke: #a9ccc0; stroke-width: 2; transform-origin: center;
  transform-box: fill-box; opacity: 0;
  animation: cyc-ping 6s ease-out infinite; animation-delay: calc(var(--i) * 1.2s); }
.cyc-center { fill: #fff; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .04em; }
@keyframes cyc-spin { to { transform: rotate(360deg); } }
@keyframes cyc-ping { 0%,70% { opacity: 0; transform: scale(1); } 80% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(2.4); } }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="force"]) .cyc-arc { animation: none; stroke-dasharray: 0; }
  :root:not([data-motion="force"]) .cyc-ping { animation: none; }
}

.steps { display: grid; gap: 1.2rem; counter-reset: step; }
.step {
  display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.7rem; transition: transform .3s var(--ease), box-shadow .3s;
}
.step:hover { transform: translateX(6px); box-shadow: var(--shadow-md); }
.step__num {
  counter-increment: step; width: 52px; height: 52px; border-radius: 15px;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800;
  color: #fff; background: var(--gradient-cta); font-size: 1.1rem; box-shadow: var(--shadow-glow);
}
.step__num::before { content: "0" counter(step); }
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .95rem; }

/* ---------- Accordion (FAQ) ---------- */
.accordion { display: grid; gap: .8rem; }
.acc-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.5rem; text-align: left; font-family: var(--font-display); font-weight: 600;
  color: var(--ink); font-size: 1.03rem;
}
.acc-trigger .plus { position: relative; width: 20px; height: 20px; flex: none; }
.acc-trigger .plus::before, .acc-trigger .plus::after { content: ""; position: absolute; inset: 0; margin: auto; background: var(--blue-600); transition: transform .3s var(--ease); }
.acc-trigger .plus::before { width: 100%; height: 2px; }
.acc-trigger .plus::after { width: 2px; height: 100%; }
.acc-item.open .plus::after { transform: rotate(90deg); opacity: 0; }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-panel > div { overflow: hidden; }
.acc-panel p { padding: 0 1.5rem 1.35rem; color: var(--muted); font-size: .97rem; }

/* ---------- Testimonials ---------- */
.quote {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 3vw, 2.4rem); box-shadow: var(--shadow-sm); position: relative;
}
.quote::before { content: "\201C"; font-family: var(--font-display); font-size: 5rem; line-height: 1; color: var(--blue-500); opacity: .18; position: absolute; top: .3rem; left: 1.2rem; }
.quote p { font-size: 1.08rem; color: var(--ink); position: relative; }
.quote footer { margin-top: 1.2rem; display: flex; align-items: center; gap: .8rem; }
.quote .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--gradient-cta); display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 700; flex: none; }
.quote cite { font-style: normal; font-weight: 600; color: var(--ink); display: block; font-family: var(--font-display); }
.quote span { font-size: .86rem; color: var(--muted); }

/* ---------- Dashboard table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.data { width: 100%; border-collapse: collapse; min-width: 520px; }
table.data th, table.data td { padding: .95rem 1.2rem; text-align: left; font-size: .95rem; }
table.data thead th { background: var(--surface); font-family: var(--font-display); color: var(--ink); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
table.data tbody tr + tr { border-top: 1px solid var(--line); }
table.data td:not(:first-child) { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.note { font-size: .84rem; color: var(--muted); margin-top: .8rem; font-style: italic; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--flip .split__media { order: 2; }
@media (max-width: 900px) { .split, .split--flip { grid-template-columns: 1fr; } .split--flip .split__media { order: 0; } }
.split__media {
  background: var(--gradient-deep); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 3rem);
  position: relative; overflow: hidden; box-shadow: var(--shadow-lg);
}
.media-icon-wrap { display: grid; place-items: center; margin-inline: auto; animation: float 8s ease-in-out infinite alternate; }
.media-icon {
  width: min(200px, 60%); aspect-ratio: 1; margin-inline: auto;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(233,240,237,.14), rgba(233,240,237,.03) 70%);
  border: 1px solid rgba(233,240,237,.20);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 24px 50px -20px rgba(0,0,0,.5);
}
.media-icon-svg { width: 46%; height: 46%; color: #d3e2dc; stroke-width: 1.4; }
.split__media .ring { position: absolute; border: 1.5px dashed rgba(233,240,237,.16); border-radius: 50%; inset: 0; margin: auto; }
.split__media .ring--1 { width: 260px; height: 260px; animation: spin 26s linear infinite; }
.split__media .ring--2 { width: 380px; height: 380px; animation: spin 40s linear infinite reverse; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--gradient-deep); border-radius: var(--radius-xl); color: #fff;
  padding: clamp(2.4rem, 6vw, 4.5rem); text-align: center; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta-band::after { content: ""; position: absolute; width: 420px; height: 420px; background: radial-gradient(circle, rgba(51,82,108,.5), transparent 70%); top: -180px; right: -120px; filter: blur(40px); }
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: #aec5bd; margin: 1rem auto 2rem; position: relative; }
.cta-band .btn-row { justify-content: center; position: relative; }

/* ---------- Forms ---------- */
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 3.5vw, 2.6rem); box-shadow: var(--shadow-md); }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-family: var(--font-display); font-weight: 600; font-size: .9rem; color: var(--ink); margin-bottom: .45rem; }
.field .req { color: #c0392b; }
.field input, .field select, .field textarea {
  width: 100%; padding: .85rem 1rem; font: inherit; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-500); background: var(--white);
  box-shadow: 0 0 0 4px var(--blue-50);
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .35rem; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #c0392b; box-shadow: 0 0 0 4px rgba(192,57,43,.12); }
.field .error-msg { display: none; color: #c0392b; font-size: .8rem; margin-top: .35rem; font-weight: 500; }
.field.invalid .error-msg { display: block; }
.phi-notice {
  display: flex; gap: .7rem; align-items: flex-start;
  background: var(--emerald-50); border: 1px solid color-mix(in srgb, var(--emerald-500) 30%, transparent);
  border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .86rem; color: var(--body); margin-bottom: 1.4rem;
}
.phi-notice svg { width: 20px; height: 20px; color: var(--emerald-500); flex: none; margin-top: 1px; }
.form-success-anim { width: 72px; margin: 1.2rem auto 0; }
.success-check { width: 72px; height: 72px; display: block; margin: 0 auto; }
.success-check__circle { stroke: var(--emerald-500); stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: sc-circle .5s var(--ease-out, var(--ease)) forwards; }
.success-check__tick { stroke: var(--emerald-500); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: sc-tick .35s .4s var(--ease-out, var(--ease)) forwards; }
@keyframes sc-circle { to { stroke-dashoffset: 0; } }
@keyframes sc-tick { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  :root:not([data-motion="force"]) .success-check__circle,
  :root:not([data-motion="force"]) .success-check__tick { animation: none; stroke-dashoffset: 0; }
}
.form-status { display: none; padding: 1rem 1.2rem; border-radius: var(--radius-sm); font-weight: 500; font-size: .92rem; margin-top: 1rem; }
.form-status.show { display: block; }
.form-status.ok { background: var(--emerald-50); color: #2c6a49; border: 1px solid color-mix(in srgb, var(--emerald-500) 35%, transparent); }
.form-status.err { background: #fdecec; color: #b23b26; border: 1px solid #f3c3ba; }
.btn[disabled] { opacity: .6; cursor: not-allowed; transform: none; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* ---------- Contact info tiles ---------- */
.info-tile { display: flex; gap: 1rem; align-items: flex-start; }
.info-tile .i { width: 44px; height: 44px; flex: none; padding: 10px; border-radius: 13px; background: var(--blue-50); border: 1px solid color-mix(in srgb, var(--sage) 32%, transparent); color: var(--blue-600); stroke-width: 1.8; }
.info-tile strong { display: block; font-family: var(--font-display); color: var(--ink); }
.info-tile a, .info-tile span { color: var(--muted); font-size: .95rem; }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: var(--gradient-deep); color: #c6d6d1; padding-block: clamp(56px, 8vw, 104px); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; width: 460px; height: 460px; background: radial-gradient(circle, rgba(127,157,151,.38), transparent 70%); bottom: -240px; left: -120px; filter: blur(50px); }
.page-hero h1 { color: #fff; margin-top: 1rem; }
.page-hero p { color: #a8c2ba; font-size: 1.15rem; margin-top: 1rem; }
.breadcrumb { display: flex; gap: .5rem; font-size: .85rem; color: #97b1a9; }
.breadcrumb a { color: #97b1a9; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #a9beb7; padding-block: clamp(48px, 7vw, 84px) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; }
.footer-about { margin-top: 1rem; font-size: .92rem; max-width: 34ch; }
.footer-col__title { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; font-family: var(--font-display); font-weight: 700; }
.footer-col a { display: block; color: #b0c6bf; padding: .34rem 0; font-size: .92rem; border-radius: 4px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 3rem; padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .84rem; }
.footer-social { display: flex; gap: .6rem; }
.footer-social a { width: 42px; height: 42px; border-radius: 11px; border: 1px solid rgba(255,255,255,.14); display: grid; place-items: center; color: #a4b6d2; }
.footer-social a:hover { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.05); }
.footer-social svg { width: 17px; height: 17px; }
.disclaimer { font-size: .8rem; color: #8fa7a0; margin-top: 1rem; max-width: 90ch; line-height: 1.6; }

/* ---------- Reveal on scroll ---------- */
/* Hidden state only applies when JS is present (html.js set by the inline head
   script) AND motion is allowed — so no-JS and reduced-motion users get the
   full page immediately. Stagger comes from --ri (set per group in JS). */
.js [data-reveal] {
  transition:
    opacity .72s var(--ease-out),
    transform .72s var(--ease-out),
    filter .72s var(--ease-out);
  transition-delay: calc(var(--ri, 0) * 65ms + var(--rd, 0ms));
}
.js [data-reveal]:not(.in) { opacity: 0; transform: translateY(28px); }
.js [data-reveal="fade"]:not(.in)  { transform: none; }
.js [data-reveal="left"]:not(.in)  { transform: translateX(-36px); }
.js [data-reveal="right"]:not(.in) { transform: translateX(36px); }
.js [data-reveal="scale"]:not(.in) { transform: scale(.92); }
.js [data-reveal="blur"]:not(.in)  { opacity: 0; transform: translateY(20px); filter: blur(10px); }
.js [data-reveal].in { opacity: 1; transform: none; filter: none; }
[data-reveal-delay="1"] { --rd: 80ms; }
[data-reveal-delay="2"] { --rd: 160ms; }
[data-reveal-delay="3"] { --rd: 240ms; }
[data-reveal-delay="4"] { --rd: 320ms; }

@media (prefers-reduced-motion: reduce) {
  :root.js:not([data-motion="force"]) [data-reveal]:not(.in),
  :root.js:not([data-motion="force"]) [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; transition: none; }
}


/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: var(--gradient-cta); z-index: 200;
  transform: scaleX(0); transform-origin: 0 50%; will-change: transform;
}
@media (prefers-reduced-motion: reduce) { :root:not([data-motion="force"]) .scroll-progress { display: none; } }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 14px;
  background: var(--gradient-cta); color: #fff; display: grid; place-items: center;
  box-shadow: var(--shadow-glow); opacity: 0; pointer-events: none; transform: translateY(14px);
  transition: opacity .3s, transform .3s; z-index: 90;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Pills ---------- */
.pill-cloud { display: flex; flex-wrap: wrap; gap: .6rem; }
.pill {
  display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1rem;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  font-size: .9rem; font-weight: 500; color: var(--body); transition: .25s;
}
.pill:hover { border-color: var(--blue-500); color: var(--blue-600); transform: translateY(-2px); }
.pill .i { width: 17px; height: 17px; color: var(--blue-600); }

/* ---------- Misc ---------- */
.lead { font-size: 1.15rem; color: var(--body); }
.prose h2 { margin-top: 2.6rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 1.8rem; margin-bottom: .6rem; }
.prose p, .prose ul { margin-bottom: 1rem; }
.prose ul { list-style: disc; padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose a { text-decoration: underline; }
.tag { display: inline-block; padding: .3rem .7rem; border-radius: 999px; background: var(--blue-50); color: var(--blue-600); font-size: .78rem; font-weight: 600; font-family: var(--font-display); }
.divider { height: 1px; background: var(--line); border: 0; margin-block: clamp(48px, 7vw, 90px); }
.skip-link { position: fixed; left: 12px; top: 12px; background: var(--white); color: var(--ink); padding: .8rem 1.2rem; z-index: 999; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-md); transform: translateY(-150%); transition: transform .2s var(--ease); }
.skip-link:focus { transform: none; }
.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; }
.marquee-label { color: var(--muted); font-family: var(--font-display); font-weight: 600; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 1.6rem; }

/* ---------- Keyframes ---------- */
@keyframes float { from { transform: translateY(0); } to { transform: translateY(-22px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes scroll-x { to { transform: translateX(-50%); } }
@keyframes float-badge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
