/* ════════════════════════════════════════════════
   TOKENS
════════════════════════════════════════════════ */
:root {
  --f: 'Inter', -apple-system, sans-serif;

  /* Canvas */
  --white:     #ffffff;
  --canvas:    #F6F6F4;
  --canvas-2:  #EFEFE D;

  /* Ink */
  --ink:       #0A0A0A;
  --ink-2:     #525252;
  --ink-3:     #A3A3A3;
  --ink-4:     #D4D4D4;

  /* Border */
  --line:      #E8E8E8;
  --line-2:    #D0D0D0;

  /* Green */
  --g:         #047857;
  --g-mid:     #059669;
  --g-lite:    #ECFDF5;
  --g-border:  rgba(5,150,105,.18);

  /* Dark sections */
  --dk:        #0A0A0A;
  --dk-2:      #141414;
  --dk-3:      #1E1E1E;
  --dk-ln:     #2A2A2A;
  --dk-txt:    rgba(255,255,255,.64);
  --dk-muted:  rgba(255,255,255,.32);

  /* Ease */
  --ease: cubic-bezier(.16,1,.3,1);
  --py: 128px;
}

/* ════════════════════════════════════════════════
   RESET
════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--f);
  background: var(--white);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
.hidden { display: none !important; }

/* ════════════════════════════════════════════════
   LAYOUT
════════════════════════════════════════════════ */
.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 48px;
}


/* ════════════════════════════════════════════════
   SCROLL REVEAL
════════════════════════════════════════════════ */
.panel {
  padding: var(--py) 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .72s var(--ease), transform .72s var(--ease);
}

.panel.visible {
  opacity: 1;
  transform: none;
}

/* Intro has no border-top */
.intro {
  border-top: none;
  padding: 160px 0 120px;
}


/* ════════════════════════════════════════════════
   SHARED PANEL ELEMENTS
════════════════════════════════════════════════ */
.panel-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.panel-label-light { color: var(--dk-muted); }

.step-tag {
  font-feature-settings: 'tnum';
}

.panel-hl {
  font-size: clamp(1.9rem, 4vw, 2.875rem);
  font-weight: 800;
  letter-spacing: -0.038em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 20px;
}

.panel-hl-light { color: var(--white); }

.panel-sub {
  font-size: 1.0625rem;
  color: var(--ink-2);
  line-height: 1.65;
  max-width: 500px;
  margin-bottom: 56px;
}


/* ════════════════════════════════════════════════
   INTRO
════════════════════════════════════════════════ */
.brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 40px;
}

.intro-hl {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 900;
  letter-spacing: -0.048em;
  line-height: 1.04;
  color: var(--ink);
  margin-bottom: 24px;
  max-width: 700px;
}

.intro-body {
  font-size: 1.125rem;
  color: var(--ink-2);
  line-height: 1.7;
  max-width: 520px;
  margin-bottom: 40px;
}

.scroll-down {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink);
  transition: gap .18s var(--ease);
}
.scroll-down:hover { gap: 12px; }


/* ════════════════════════════════════════════════
   STEP 1 · INPUTS
════════════════════════════════════════════════ */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 52px;
  flex-wrap: wrap;
}

.toggle-q {
  font-size: .9375rem;
  font-weight: 500;
  color: var(--ink-2);
}

.toggle {
  display: inline-flex;
  background: var(--canvas);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px;
  gap: 2px;
}

.toggle-opt {
  font-family: var(--f);
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-3);
  background: none;
  border: none;
  padding: 8px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.toggle-opt.active {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* Fields grid */
.fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 44px 64px;
}

.field { display: flex; flex-direction: column; gap: 12px; }

.field-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.field-head label {
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-2);
}

.fval {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Range slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  /* background set by JS */
  background: linear-gradient(to right, var(--ink) 20%, var(--line-2) 20%);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--line-2);
  box-shadow: 0 1px 6px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.04);
  transition: transform .12s var(--ease), border-color .12s;
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  border-color: var(--ink);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(.9); }

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--line-2);
  cursor: pointer;
}

.field-range {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--ink-4);
}


/* ════════════════════════════════════════════════
   STEP 2 · DARK FUNNEL
════════════════════════════════════════════════ */
.panel-dark {
  background: var(--dk);
  border-top-color: var(--dk-ln);
}

/* Funnel */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 64px;
}

.fn-row {
  display: flex;
  align-items: flex-end;
  gap: 40px;
  padding: 18px 0;
}

.fn-stage {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 160px;
}

.fn-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dk-muted);
}

.fn-num {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  line-height: 1;
}

.fn-num-accent { color: var(--g-mid); }

.fn-stage-final { padding-bottom: 0; }

.fn-loss {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 4px;
}

.fn-loss-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  flex-shrink: 0;
}

.fn-loss-txt {
  font-size: .825rem;
  color: var(--dk-muted);
}

/* Horizontal fill bar between funnel rows */
.fn-bar {
  height: 1.5px;
  background: var(--dk-ln);
  position: relative;
  overflow: hidden;
  margin: 0;
}

.fn-bar-fill {
  height: 100%;
  background: rgba(255,255,255,.1);
  border-radius: 1px;
}

/* Snapshot strip */
.snap-strip {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--dk-ln);
  border-radius: 12px;
  background: var(--dk-2);
  overflow: hidden;
}

.snap-item {
  flex: 1;
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.snap-divider {
  width: 1px;
  background: var(--dk-ln);
  flex-shrink: 0;
}

.snap-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dk-muted);
}

.snap-val {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
  line-height: 1;
}


/* ════════════════════════════════════════════════
   STEP 3 · LEAK
════════════════════════════════════════════════ */
.panel-leak {
  background: var(--canvas);
  border-top-color: var(--line);
}

.leak-intro {
  margin-bottom: 64px;
}

.leak-pre {
  font-size: 1rem;
  color: var(--ink-2);
  margin-bottom: 10px;
}

.leak-number {
  font-size: clamp(4.5rem, 14vw, 10rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: .88;
  margin: 8px 0 18px;
}

.leak-post {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 480px;
  line-height: 1.6;
}

/* Leak cards */
.leak-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5px;
  background: var(--line);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 56px;
}

.lcard {
  background: var(--white);
  padding: 28px 30px 30px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.lcard.card-in { opacity: 1; transform: none; }
.lcard[data-i="1"] { transition-delay: .1s; }
.lcard[data-i="2"] { transition-delay: .2s; }
.lcard[data-i="3"] { transition-delay: .3s; }

.lcard-amt {
  font-size: 1.875rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.lcard-name {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--ink);
}

.lcard-body {
  font-size: .875rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.leak-footer {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.leak-footer-pre,
.leak-footer-post {
  font-size: 1rem;
  color: var(--ink-2);
}

.leak-footer-num {
  font-size: 2.125rem;
  font-weight: 900;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}


/* ════════════════════════════════════════════════
   STEP 4 · PROJECTION
════════════════════════════════════════════════ */

/* Before vs After */
.compare {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-bottom: 40px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.cmp-col {
  flex: 1;
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cmp-col-before {
  background: var(--canvas);
}

.cmp-col-after {
  background: var(--g-lite);
  border-left: 1.5px solid var(--g-border);
}

.cmp-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  background: var(--white);
  border-left: 1.5px solid var(--line);
  border-right: 1.5px solid var(--g-border);
  color: var(--g-mid);
}

.cmp-div-line {
  width: 1px;
  flex: 1;
  background: var(--line);
}

.cmp-tag {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.cmp-tag-green { color: var(--g); }

.cmp-patients {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.cmp-patients span { font-size: 1.75rem; font-weight: 800; color: var(--ink); }
.cmp-patients-green span { color: var(--g); }
.cmp-unit { font-size: .875rem; font-weight: 500; margin-left: 4px; }

.cmp-revenue {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1;
}
.cmp-revenue-green { color: var(--g); }

.cmp-track {
  height: 3px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.cmp-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .9s var(--ease);
}
.cmp-fill-before { background: var(--ink-4); }
.cmp-fill-after  { background: var(--g-mid); }

/* Assumption chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 52px;
}

.chip {
  font-size: .8rem;
  font-weight: 500;
  color: var(--g);
  background: var(--g-lite);
  border: 1px solid var(--g-border);
  border-radius: 99px;
  padding: 5px 13px;
  letter-spacing: .01em;
}

/* Recovery card */
.rcard {
  background: var(--ink);
  border-radius: 16px;
  overflow: hidden;
}

.rcard-top {
  padding: 56px 56px 48px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.rcard-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dk-muted);
}

.rcard-amount {
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 900;
  letter-spacing: -0.065em;
  font-variant-numeric: tabular-nums;
  color: #34D399;
  line-height: .9;
}

.rcard-rule {
  height: 1px;
  background: var(--dk-ln);
  margin: 0 40px;
}

.rcard-bottom {
  padding: 28px 48px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.rcard-annual { display: flex; flex-direction: column; gap: 5px; }

.rcard-annual-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dk-muted);
}

.rcard-annual-val {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: #34D399;
}

.rcard-badge {
  font-size: .9375rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #34D399;
  background: rgba(52,211,153,.1);
  border: 1px solid rgba(52,211,153,.22);
  border-radius: 99px;
  padding: 8px 20px;
}

.rcard-note {
  padding: 0 48px 40px;
  font-size: .875rem;
  color: var(--dk-muted);
  line-height: 1.65;
  text-align: center;
}


/* ════════════════════════════════════════════════
   HOW CLINICBOOKED WORKS · ANIMATED TIMELINE
════════════════════════════════════════════════ */
.panel-how {
  background: var(--white);
}

.how-wrap { }

.how-hl { margin-bottom: 72px; }

/* Journey container */
.journey {
  position: relative;
  display: flex;
  gap: 0;
}

/* SVG line column */
.journey-line-svg {
  width: 2px;
  flex-shrink: 0;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}

/* The animated green/ink line */
.journey-line-draw {
  stroke-dasharray: 700;
  stroke-dashoffset: 700;
  transition: stroke-dashoffset 2.2s cubic-bezier(.4,0,.2,1);
  stroke: var(--ink);
}

.journey.journey-animate .journey-line-draw {
  stroke-dashoffset: 0;
}

/* Steps column */
.journey-steps {
  display: flex;
  flex-direction: column;
  padding-left: 36px;
  gap: 0;
  width: 100%;
}

.jstep {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 0 0 48px;
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}

.jstep:last-child { padding-bottom: 0; }

/* Stagger each step */
.journey.journey-animate .jstep:nth-child(1) { transition-delay: .12s; }
.journey.journey-animate .jstep:nth-child(2) { transition-delay: .38s; }
.journey.journey-animate .jstep:nth-child(3) { transition-delay: .6s; }
.journey.journey-animate .jstep:nth-child(4) { transition-delay: .82s; }
.journey.journey-animate .jstep:nth-child(5) { transition-delay: 1.04s; }
.journey.journey-animate .jstep:nth-child(6) { transition-delay: 1.26s; }
.journey.journey-animate .jstep:nth-child(7) { transition-delay: 1.48s; }
.journey.journey-animate .jstep { opacity: 1; transform: none; }

/* Dot on the line */
.jstep-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-2);
  border: 2px solid var(--white);
  outline: 1.5px solid var(--line-2);
  flex-shrink: 0;
  margin-top: 5px;
  position: absolute;
  left: -4px;
  transition: background .3s var(--ease), outline-color .3s var(--ease);
}

/* Position each dot */
.jstep { position: relative; }

.journey.journey-animate .jstep-dot {
  background: var(--ink);
  outline-color: var(--ink);
}

.jstep-dot-final {
  background: var(--g-mid) !important;
  outline-color: var(--g-mid) !important;
}

.jstep-body { display: flex; flex-direction: column; gap: 6px; }

.jstep-name {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.jstep-desc {
  font-size: .9375rem;
  color: var(--ink-2);
  line-height: 1.6;
  max-width: 480px;
}


/* ════════════════════════════════════════════════
   FINAL CTA
════════════════════════════════════════════════ */
.panel-cta {
  background: var(--dk);
  border-top-color: var(--dk-ln);
}

.cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}

.cta-live {
  font-size: 1rem;
  font-weight: 500;
  color: var(--dk-muted);
  font-variant-numeric: tabular-nums;
}

.cta-live-num {
  font-size: 1.125rem;
  font-weight: 800;
  color: #34D399;
  letter-spacing: -0.02em;
}

.cta-hl {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.048em;
  line-height: 1.07;
  color: var(--white);
  max-width: 680px;
}

.cta-body {
  font-size: 1.125rem;
  color: var(--dk-txt);
  line-height: 1.65;
  max-width: 520px;
}

.cta-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}

.btn-primary {
  display: inline-block;
  font-family: var(--f);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dk);
  background: #34D399;
  padding: 15px 34px;
  border-radius: 99px;
  transition: opacity .15s, transform .15s;
  letter-spacing: -0.01em;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }

.btn-ghost {
  display: inline-block;
  font-family: var(--f);
  font-size: .9375rem;
  font-weight: 500;
  color: var(--dk-muted);
  padding: 15px 20px;
  border-radius: 99px;
  border: 1px solid var(--dk-ln);
  transition: color .15s, border-color .15s;
}
.btn-ghost:hover { color: var(--white); border-color: rgba(255,255,255,.3); }

.cta-small {
  font-size: .8125rem;
  color: var(--dk-muted);
  margin-top: 4px;
}


/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 860px) {
  :root { --py: 96px; }
  .wrap { padding: 0 28px; }
  .fields { grid-template-columns: 1fr; gap: 36px; }
  .snap-strip { flex-direction: column; }
  .snap-divider { width: auto; height: 1px; }
  .leak-cards { grid-template-columns: 1fr; }
  .compare { flex-direction: column; border-radius: 12px; }
  .cmp-divider { flex-direction: row; height: 44px; padding: 0; border-left: none; border-right: none; border-top: 1.5px solid var(--line); border-bottom: 1.5px solid var(--g-border); justify-content: center; gap: 16px; }
  .cmp-div-line { width: 60px; height: 1px; flex: 0 0 auto; }
  .cmp-col-after { border-left: none; border-top: 1.5px solid var(--g-border); }
  .rcard-top { padding: 48px 32px 40px; }
  .rcard-bottom { padding: 24px 32px 32px; }
  .rcard-note { padding: 0 32px 32px; }
  .fn-row { gap: 24px; }
}

@media (max-width: 580px) {
  :root { --py: 72px; }
  .wrap { padding: 0 20px; }
  .intro { padding: 100px 0 88px; }
  .toggle-group { flex-direction: column; align-items: flex-start; }
  .leak-number { line-height: .92; }
  .rcard-top { padding: 40px 24px 32px; }
  .rcard-bottom { padding: 20px 24px 28px; flex-direction: column; align-items: flex-start; }
  .rcard-rule { margin: 0 16px; }
  .rcard-note { padding: 0 24px 28px; text-align: left; }
  .cmp-col { padding: 28px 24px; }
  .cta-hl { letter-spacing: -0.04em; }
}
