/* ==========================================================================
   GetNancy — styles.css
   Clean, clinical, high-trust medical-tech SaaS styling.
   Light + dark themes are driven by CSS custom properties on <html data-theme>.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
  --nav-h: 64px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Light (default) */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --surface-2: #F1F5F9;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-2: #475569;
  --text-3: #64748B;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;
  --accent: #0D9488;
  --accent-soft: rgba(13, 148, 136, .08);
  --accent-ink: #0F766E;
  --link: #0F766E;
  --btn-bg: #0F766E;
  --btn-bg-hover: #115E59;
  --btn-text: #FFFFFF;
  --nav-bg: rgba(255, 255, 255, .82);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 10px 28px -10px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .05);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .28), 0 4px 12px rgba(15, 23, 42, .06);
  --band-bg: #0F172A;
  --band-text: #F1F5F9;
  --band-muted: #CBD5E1;
  --band-border: rgba(255, 255, 255, .22);
}

/* Dark */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1120;
  --surface: #0E1527;
  --surface-2: #131C30;
  --card: #111827;
  --text: #F1F5F9;
  --text-2: #CBD5E1;
  --text-3: #94A3B8;
  --border: #1F2937;
  --border-strong: #334155;
  --accent: #14B8A6;
  --accent-soft: rgba(20, 184, 166, .12);
  --accent-ink: #5EEAD4;
  --link: #5EEAD4;
  --btn-bg: #14B8A6;
  --btn-bg-hover: #2DD4BF;
  --btn-text: #04211F;
  --nav-bg: rgba(11, 17, 32, .82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7), 0 4px 12px rgba(0, 0, 0, .35);
  --band-bg: #111827;
  --band-text: #F1F5F9;
  --band-muted: #CBD5E1;
  --band-border: #334155;
}

/* If JS is blocked the head script never runs: still honour the OS setting. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0B1120;
    --surface: #0E1527;
    --surface-2: #131C30;
    --card: #111827;
    --text: #F1F5F9;
    --text-2: #CBD5E1;
    --text-3: #94A3B8;
    --border: #1F2937;
    --border-strong: #334155;
    --accent: #14B8A6;
    --accent-soft: rgba(20, 184, 166, .12);
    --accent-ink: #5EEAD4;
    --link: #5EEAD4;
    --btn-bg: #14B8A6;
    --btn-bg-hover: #2DD4BF;
    --btn-text: #04211F;
    --nav-bg: rgba(11, 17, 32, .82);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 28px -10px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .3);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, .7), 0 4px 12px rgba(0, 0, 0, .35);
    --band-bg: #111827;
    --band-border: #334155;
  }
}

/* ---------- 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
svg { flex-shrink: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  color: var(--text);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2.15rem, 5.2vw, 3.6rem); letter-spacing: -.035em; line-height: 1.06; font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.03em; }
h3 { font-size: 1.125rem; letter-spacing: -.01em; }

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

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-text);
  padding: .6rem 1rem; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* Icons (SVG sprite) */
.i {
  width: 1.15em; height: 1.15em;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -.2em;
}

/* ---------- 3. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .65rem 1.15rem;
  border: 1px solid transparent; border-radius: 10px;
  font: inherit; font-size: .95rem; font-weight: 600; line-height: 1.2; text-align: center;
  cursor: pointer; text-decoration: none;
  transition: background-color .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn-bg); color: var(--btn-text); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--btn-bg-hover); color: var(--btn-text); }
.btn--secondary { background: var(--card); color: var(--text); border-color: var(--border-strong); }
.btn--secondary:hover { background: var(--surface); border-color: var(--text-3); color: var(--text); }
.btn--lg { min-height: 52px; padding: .8rem 1.4rem; font-size: 1rem; border-radius: 12px; }
.btn--sm { min-height: 38px; padding: .45rem .9rem; font-size: .875rem; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  font-size: 1.1rem;
  transition: background-color .15s, color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }

/* Sun/Moon: show the icon of the theme you will switch TO */
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-sun { display: inline-block; }
:root[data-theme="dark"] .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .icon-sun { display: inline-block; }
  :root:not([data-theme]) .icon-moon { display: none; }
}

/* ---------- 4. Navbar ---------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .2s;
}
.nav.is-scrolled { box-shadow: 0 6px 20px -12px rgba(15, 23, 42, .25); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--nav-h); }

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--text); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em;
}
.brand:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; }

.nav-links { display: none; list-style: none; }
.nav-links a {
  display: block; padding: .45rem .75rem; border-radius: 8px;
  color: var(--text-2); font-size: .925rem; font-weight: 500;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links a.is-active { color: var(--accent-ink); background: var(--accent-soft); }

.nav-actions { display: flex; align-items: center; gap: .5rem; }
.nav-cta { white-space: nowrap; }

/* Mobile menu panel */
@media (max-width: 899px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 2px;
    padding: .75rem var(--gutter) 1rem;
    background: var(--bg); border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-links a { padding: .8rem .75rem; font-size: 1rem; }
  .nav-toggle .icon-close { display: none; }
  .nav.is-open .nav-toggle .icon-close { display: inline-block; }
  .nav.is-open .nav-toggle .icon-menu { display: none; }
}
@media (min-width: 900px) {
  .nav-links { display: flex; gap: .25rem; }
  .nav-toggle { display: none; }
}
@media (max-width: 379px) {
  .nav-cta { display: none; }
}

/* ---------- 5. Sections -------------------------------------------------- */
.section { padding-block: clamp(60px, 9vw, 108px); }
.section--alt { background: var(--surface); border-block: 1px solid var(--border); }

.section-head { max-width: 680px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.eyebrow {
  display: inline-block; margin: 0 0 .9rem;
  color: var(--accent-ink); font-size: .8rem; font-weight: 650;
  letter-spacing: .09em; text-transform: uppercase;
}
.lead { color: var(--text-2); font-size: clamp(1.02rem, 1.6vw, 1.175rem); line-height: 1.6; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .25rem .7rem; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
  font-size: .78rem; font-weight: 600; line-height: 1.4;
}
.pill--accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }

/* ---------- 6. Hero ------------------------------------------------------ */
.hero { position: relative; padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--border-strong) 1px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 75% 0%, #000 0%, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 70% at 75% 0%, #000 0%, transparent 72%);
  opacity: .55;
}
.hero::after {
  content: ""; position: absolute; z-index: -1; right: -10%; top: -30%; width: 70%; height: 90%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent);
}

.hero-grid { display: grid; gap: clamp(32px, 5vw, 56px); align-items: center; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
}

.badge {
  display: inline-flex; align-items: center; gap: .55rem;
  margin: 0 0 1.25rem; padding: .35rem .85rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 999px;
  color: var(--text-2); font-size: .85rem; font-weight: 550;
  box-shadow: var(--shadow-sm);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #10B981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); animation: pulse 2.2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
  70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero h1 { margin-bottom: 1.1rem; overflow-wrap: break-word; }
.hl { color: var(--accent-ink); }
.hero .lead { max-width: 34em; margin-bottom: 1.75rem; }

.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.5rem; }
@media (max-width: 519px) { .hero-ctas .btn { flex: 1 1 100%; } }

.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; color: var(--text-2); font-size: .9rem; }
.hero-meta li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-meta .i { color: var(--accent); }

/* ---------- 7. Video player --------------------------------------------- */
.video { margin: 0; }
.video-stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background: radial-gradient(120% 130% at 15% 0%, #134E4A 0%, #0B1120 62%);
  box-shadow: var(--shadow-lg);
}
.video-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }

.video-preview {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(12px, 3vw, 20px); color: #E2E8F0; pointer-events: none;
}
.video-preview .chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: .5rem;
  padding: .25rem .7rem; border-radius: 999px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}
.video-who { font-size: .85rem; font-weight: 600; opacity: .9; }
.wave {
  position: absolute; left: 7%; right: 7%; top: 50%; height: 38%; transform: translateY(-50%);
  display: flex; align-items: center; gap: 1.2%;
}
.wave i {
  flex: 1; height: var(--h, 50%); border-radius: 999px;
  background: #2DD4BF; opacity: .42;
  transform-origin: center; animation: wave 1.9s ease-in-out infinite;
}
.wave i:nth-child(3n) { animation-delay: -.35s; animation-duration: 2.3s; }
.wave i:nth-child(3n+1) { animation-delay: -.9s; }
.wave i:nth-child(4n) { animation-delay: -1.3s; animation-duration: 1.6s; }
@keyframes wave { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }

.video-play {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  margin: 0; padding: 0; background: transparent; border: 0; color: #fff; cursor: pointer;
}
.play-circle {
  display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .4);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .2s var(--ease), background-color .2s;
}
.play-circle .i { width: 30px; height: 30px; margin-left: 4px; }
.video-play:hover .play-circle { transform: scale(1.07); background: rgba(255, 255, 255, .26); }
.video-play:focus-visible { outline: none; }
.video-play:focus-visible .play-circle { outline: 3px solid #fff; outline-offset: 4px; }

.video-duration {
  position: absolute; right: 12px; bottom: 12px; z-index: 3;
  padding: .2rem .55rem; border-radius: 6px;
  background: rgba(2, 6, 23, .72); color: #fff;
  font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.video-note {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 4; margin: 0;
  padding: .7rem .9rem; border-radius: 10px;
  background: rgba(2, 6, 23, .86); color: #F1F5F9; font-size: .88rem; line-height: 1.45;
  border: 1px solid rgba(255, 255, 255, .14);
}
.video-note a { color: #5EEAD4; font-weight: 600; }
.video.has-video .video-preview { display: none; }
.video.is-playing .video-play,
.video.is-playing .video-duration { display: none; }

.video-caption {
  display: flex; align-items: center; gap: .55rem; margin-top: .85rem;
  color: var(--text-2); font-size: .9rem; font-weight: 500;
}
.video-caption .i { color: var(--accent); }
.video-caption [data-video-length] { white-space: nowrap; }

/* ---------- 8. Auto-Pay activation card --------------------------------- */
/* In Auto-Pay mode the card becomes its own grid cell next to the video (above the fold).
   Phones read: headline -> activation card -> video. */
.hero--autopay .hero-grid { align-items: start; row-gap: 28px; grid-template-areas: "copy" "card" "media"; }
.hero--autopay .hero-copy { grid-area: copy; }
.hero--autopay .hero-media { grid-area: media; }
.hero--autopay .activate { grid-area: card; }
.hero--autopay h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.hero--autopay .lead { font-size: 1.05rem; margin-bottom: 0; }
@media (min-width: 980px) {
  .hero--autopay .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "copy card" "media card"; }
  .hero--autopay .hero-copy .badge { margin-bottom: 1rem; }
}

.activate {
  margin: 0; overflow: hidden;
  background: var(--card); border: 1px solid var(--accent); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
}
.activate-head {
  display: flex; align-items: center; gap: .8rem; padding: 1rem 1.25rem;
  background: var(--accent-soft); border-bottom: 1px solid var(--border);
}
.activate-icon {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  background: var(--btn-bg); color: var(--btn-text); font-size: 1.25rem;
}
.activate-head h2 { margin: 0; font-size: 1.1rem; letter-spacing: -.01em; line-height: 1.25; }
.activate-clinic { margin: .15rem 0 0; color: var(--text-2); font-size: .9rem; }
.activate-body { padding: 1.25rem; }
.activate-recap { margin: 0 0 1rem; }
.activate-prices { display: grid; gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 520px) { .activate-prices { grid-template-columns: 1fr 1fr; } }
.price-block { padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.price-block .label { margin: 0 0 .25rem; color: var(--text-3); font-size: .78rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.price-block .value { margin: 0; font-size: 1.85rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.price-block .value small { color: var(--text-3); font-size: .95rem; font-weight: 500; letter-spacing: 0; }
.price-block .hint { margin: .4rem 0 0; color: var(--text-2); font-size: .84rem; line-height: 1.45; }
.activate-fine { margin: .85rem 0 0; color: var(--text-3); font-size: .8rem; line-height: 1.5; text-align: center; }

/* ---------- 9. Live demo box -------------------------------------------- */
.demo-grid { display: grid; gap: clamp(24px, 4vw, 40px); align-items: start; }
@media (min-width: 940px) { .demo-grid { grid-template-columns: 1.05fr 1fr; } }

.phone-card { padding: clamp(20px, 3vw, 28px); margin-bottom: 1.75rem; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.phone-label { margin: 0 0 .35rem; color: var(--text-3); font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.phone-number {
  margin: 0 0 1.25rem; color: var(--text);
  font-size: clamp(1.55rem, 6vw, 2.4rem); font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
.phone-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
@media (max-width: 479px) { .phone-actions .btn { flex: 1 1 100%; } }

.mini-title { margin-bottom: 1rem; font-size: 1.05rem; }
.test-steps { display: grid; gap: .9rem; list-style: none; counter-reset: s; }
.test-steps li { display: grid; grid-template-columns: 30px 1fr; gap: .8rem; align-items: start; color: var(--text-2); }
.test-steps li::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font-size: .85rem; font-weight: 700;
}
.test-steps strong { color: var(--text); font-weight: 600; }

/* Email preview mock-up */
.email {
  margin: 0; overflow: hidden; background: var(--card);
  border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-md);
}
.email-bar { display: flex; align-items: center; justify-content: space-between; padding: .7rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.email-bar .dots { display: inline-flex; gap: 6px; }
.email-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.email-head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.25rem .25rem; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-text); font-weight: 700; }
.email-from { margin: 0; font-size: .92rem; line-height: 1.3; }
.email-meta { margin: 0; color: var(--text-3); font-size: .8rem; }
.email-body { padding: .75rem 1.25rem 1.4rem; }
.email-subject { margin: .5rem 0 .6rem; font-size: 1.3rem; letter-spacing: -.02em; }
.email-body > p { color: var(--text-2); font-size: .94rem; }
.email-details { margin: 1rem 0 1.1rem; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.email-details div { display: grid; grid-template-columns: 8.5rem 1fr; gap: .75rem; padding: .6rem .9rem; font-size: .9rem; }
.email-details div + div { border-top: 1px solid var(--border); }
.email-details dt { color: var(--text-3); }
.email-details dd { margin: 0; color: var(--text); font-weight: 550; overflow-wrap: anywhere; }
.fake-btn { display: inline-block; padding: .55rem 1rem; border-radius: 8px; background: var(--btn-bg); color: var(--btn-text); font-size: .88rem; font-weight: 600; }
.demo-note { margin: .9rem 0 0; color: var(--text-3); font-size: .8rem; text-align: center; }
@media (max-width: 479px) { .email-details div { grid-template-columns: 1fr; gap: 0; } }

/* ---------- 10. How it works -------------------------------------------- */
.steps { display: grid; gap: 1.25rem; list-style: none; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.step { position: relative; display: flex; flex-direction: column; padding: clamp(20px, 3vw, 28px); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.step-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 1.35rem; }
.step-n { color: var(--text-3); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.step h3 { font-size: 1.2rem; }
.step p { margin: 0 0 1rem; color: var(--text-2); }
.step .pill { align-self: flex-start; margin-top: auto; }

/* ---------- 11. Calculator ---------------------------------------------- */
.calc { display: grid; overflow: hidden; }
@media (min-width: 900px) { .calc { grid-template-columns: 1.05fr 1fr; } }
.calc-controls { padding: clamp(22px, 3.5vw, 36px); display: grid; gap: 1.75rem; align-content: start; }
.calc-results { padding: clamp(22px, 3.5vw, 36px); background: var(--surface); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 900px) { .calc-results { border-top: 0; border-left: 1px solid var(--border); } }

.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.field-row label { font-weight: 600; }
.field-row output { color: var(--accent-ink); font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.field-hint { margin: .6rem 0 0; color: var(--text-3); font-size: .83rem; }

input[type="range"] {
  --fill: 30%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px; border-radius: 999px;
  background: linear-gradient(to right, var(--accent) 0 var(--fill), var(--border-strong) var(--fill) 100%);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: var(--border-strong); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent); box-shadow: var(--shadow-sm);
  transition: transform .15s;
}
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); box-shadow: var(--shadow-sm); }
input[type="range"]:hover::-webkit-slider-thumb { transform: scale(1.1); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--accent-soft); box-shadow: 0 0 0 3px var(--accent); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--accent); }

.result-main .label, .result-sub .label { margin: 0 0 .2rem; color: var(--text-3); font-size: .78rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.result-main .value { margin: 0; color: var(--text); font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.result-main .value small { color: var(--text-3); font-size: 1rem; font-weight: 500; letter-spacing: 0; }
.result-sub { padding-top: 1.1rem; border-top: 1px solid var(--border); }
.result-sub .value { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.roi-callout { display: flex; gap: .7rem; padding: .9rem 1rem; background: var(--accent-soft); border: 1px solid transparent; border-radius: var(--r-md); color: var(--text); font-size: .94rem; line-height: 1.5; }
.roi-callout .i { margin-top: .15rem; color: var(--accent-ink); }
.roi-callout strong { color: var(--accent-ink); }
.calc-fine { margin: 1rem 0 0; color: var(--text-3); font-size: .82rem; text-align: center; }

/* ---------- 12. Pricing -------------------------------------------------- */
.trial-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem;
  padding: clamp(20px, 3vw, 28px); margin-bottom: 2rem;
  border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--card) 85%);
}
.trial-banner h3 { margin: .5rem 0 .25rem; font-size: 1.35rem; }
.trial-banner p { margin: 0; color: var(--text-2); }
.trial-banner-cta { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
@media (max-width: 599px) { .trial-banner-cta, .trial-banner-cta .btn { width: 100%; } }

.price { margin: 0; display: flex; align-items: baseline; gap: .35rem; }
.price .amount { font-size: 2.6rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.price .per { color: var(--text-3); font-size: .95rem; font-weight: 500; }

.plans-intro { max-width: 640px; margin: 0 auto 1.75rem; color: var(--text-2); text-align: center; }
.plans { display: grid; gap: 1.25rem; align-items: stretch; }
@media (min-width: 900px) { .plans { grid-template-columns: repeat(3, 1fr); } }

.plan { position: relative; display: flex; flex-direction: column; padding: clamp(22px, 3vw, 30px); }
.plan header { margin-bottom: 1rem; }
.plan h3 { margin-bottom: .25rem; font-size: 1.3rem; }
.plan-desc { margin: 0; color: var(--text-2); font-size: .92rem; }
.plan .price { margin-bottom: .25rem; }
.plan-note { margin: 0 0 1.25rem; color: var(--text-3); font-size: .85rem; }
.checks { display: grid; align-content: start; gap: .65rem; margin: 0 0 1.5rem; list-style: none; flex: 1; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: .6rem; align-items: start; color: var(--text-2); font-size: .94rem; line-height: 1.5; }
.checks .i { margin-top: .22rem; color: var(--accent); }
.plan--featured { border: 2px solid var(--accent); box-shadow: var(--shadow-md); }
@media (min-width: 900px) { .plan--featured { transform: translateY(-8px); } }
.plan-tag {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  padding: .25rem .8rem; border-radius: 999px; white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-text); font-size: .76rem; font-weight: 700; letter-spacing: .03em;
}
.plan.is-yours { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-md); }
.plans-fine { max-width: 760px; margin: 2rem auto 0; color: var(--text-3); font-size: .88rem; line-height: 1.6; text-align: center; }

/* ---------- 13. FAQ ------------------------------------------------------ */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: .75rem; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; transition: border-color .2s; }
.faq-item.is-open { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.faq-q { margin: 0; font-size: 1rem; letter-spacing: 0; line-height: 1.4; font-weight: 600; }
.faq-q button {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: 1.05rem 1.25rem; background: transparent; border: 0;
  color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer;
}
.faq-q button:hover { background: var(--surface); }
.faq-q button:focus-visible { outline-offset: -3px; }
.faq-q .chev { color: var(--text-3); transition: transform .25s var(--ease); }
.faq-item.is-open .chev { transform: rotate(180deg); }
.faq-a { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .3s var(--ease), visibility 0s .3s; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .3s var(--ease), visibility 0s; }
.faq-a-inner { min-height: 0; overflow: hidden; }
.faq-a-inner p { margin: 0; padding: 0 1.25rem 1.25rem; color: var(--text-2); }
html:not(.js) .faq-a { grid-template-rows: 1fr; visibility: visible; }
html:not(.js) .faq-q .chev { display: none; }

/* ---------- 14. CTA band + footer --------------------------------------- */
.cta-section { padding-block: clamp(48px, 7vw, 88px); }
.band {
  --text: var(--band-text);
  --border-strong: var(--band-border);
  --btn-bg: #14B8A6; --btn-bg-hover: #2DD4BF; --btn-text: #04211F;
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(32px, 6vw, 64px) clamp(20px, 5vw, 56px);
  background: var(--band-bg); color: var(--band-text);
  border: 1px solid var(--band-border); border-radius: calc(var(--r-lg) + 6px);
  text-align: center;
}
.band::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 90% at 50% 0%, rgba(20, 184, 166, .22), transparent 70%);
}
.band h2 { color: var(--band-text); }
.band p { max-width: 560px; margin: 0 auto 1.75rem; color: var(--band-muted); font-size: 1.1rem; }
.band .btn--secondary { background: transparent; color: var(--band-text); border-color: var(--band-border); }
.band .btn--secondary:hover { background: rgba(255, 255, 255, .08); border-color: #94A3B8; color: var(--band-text); }
.band-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; }
@media (max-width: 519px) { .band-actions .btn { flex: 1 1 100%; } }

.footer { padding-block: 40px 48px; border-top: 1px solid var(--border); background: var(--bg); }
.footer-grid { display: grid; gap: 1.75rem; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.footer-brand p { max-width: 30em; margin: .75rem 0 0; color: var(--text-3); font-size: .92rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; list-style: none; }
@media (min-width: 760px) { .footer-links { justify-content: flex-end; } }
.footer-links a { color: var(--text-2); font-size: .92rem; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); color: var(--text-3); font-size: .875rem; }
.footer-bottom p { margin: 0; }

/* ---------- 15. Legal pages --------------------------------------------- */
.legal { padding-block: clamp(40px, 7vw, 80px) clamp(56px, 8vw, 104px); }
.legal-inner { max-width: 760px; margin-inline: auto; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.9rem); margin-bottom: .5rem; }
.legal-meta { margin-bottom: 2rem; padding-bottom: 1.5rem; color: var(--text-3); font-size: .92rem; border-bottom: 1px solid var(--border); }
.legal-summary { margin: 0 0 2.25rem; padding: 1rem 1.25rem; background: var(--accent-soft); border-radius: var(--r-md); color: var(--text); }
.legal-summary p { margin: 0; }
.legal h2 { margin: 2.25rem 0 .6rem; font-size: 1.3rem; letter-spacing: -.015em; }
.legal p, .legal li { color: var(--text-2); }
.legal ul, .legal ol { margin: 0 0 1em; padding-left: 1.25rem; display: grid; gap: .4rem; }
.legal strong { color: var(--text); font-weight: 600; }

/* ---------- 16. Motion preferences -------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}


/* ---------- v2 Polish: Live Email Preview, Setup Fee & Direct-Buy Links ---------- */
.email--live-preview .email-card-accent {
  border-top: 4px solid var(--accent);
  padding-top: 1rem;
}
.email--live-preview .email-subject {
  margin: 0 0 .75rem;
}
.email-greeting {
  margin: 0 0 .5rem;
  color: var(--text);
  font-weight: 600;
  font-size: .94rem;
}
.email-closing {
  margin: .9rem 0 0;
  color: var(--text-2);
  font-size: .92rem;
  line-height: 1.55;
}
.email-details--boxed {
  margin: .95rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3.5px solid var(--accent);
  border-radius: var(--r-sm);
}
.email-details--boxed div {
  grid-template-columns: 5.5rem 1fr;
  padding: .5rem .85rem;
}
.email-details--boxed div + div {
  border-top: 1px solid var(--border);
}
@media (max-width: 479px) {
  .email-details--boxed div { grid-template-columns: 1fr; gap: 0; }
}

.plan-setup {
  margin: .35rem 0 1.25rem;
  padding: .6rem .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}
.plan-setup-fee {
  margin: 0;
  color: var(--text);
  font-size: .88rem;
  line-height: 1.35;
}
.plan-setup-fee strong {
  color: var(--accent-ink);
  font-weight: 700;
}
.plan-location {
  margin: .2rem 0 0;
  color: var(--text-3);
  font-size: .78rem;
  line-height: 1.35;
}
.plan-direct {
  display: block;
  margin-top: .7rem;
  text-align: center;
  color: var(--text-3);
  font-size: .84rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .18s var(--ease);
}
.plan-direct:hover,
.plan-direct:focus-visible {
  color: var(--link);
  text-decoration: underline;
}
.calc-cta {
  margin-top: .25rem;
}
