/* Case study page — shares the clinic's paper, ink and serif */
:root {
  color-scheme: light;
  --paper: #fbf8f3;
  --paper-2: #f3ede3;
  --card: #fffdf9;
  --ink: #0b3b3a;
  --ink-2: #2c4745;
  --muted: #55635f;
  --teal: #0f766e;
  --teal-soft: #dcefe9;
  --line: #e3dbcd;
  --field: #847b6d;
  --apricot: #f6c39b;
  --apricot-hover: #f1ad7b;
  --rose: #a63d32;
  --rose-soft: #f9e3dd;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 18px;
  --shadow: 0 1px 0 rgb(11 59 58 / .04), 0 28px 56px -28px rgb(11 59 58 / .32);
}
@supports (color: oklch(0% 0 0)) {
  :root {
    --paper: oklch(98% 0.007 81);
    --paper-2: oklch(94.8% 0.015 81);
    --card: oklch(99.4% 0.006 85);
    --ink: oklch(32.1% 0.049 193);
    --ink-2: oklch(37.6% 0.033 190);
    --muted: oklch(48.7% 0.018 176);
    --teal: oklch(51.1% 0.086 186);
    --teal-soft: oklch(93.6% 0.022 175);
    --line: oklch(89.4% 0.021 82);
    --field: oklch(58.7% 0.024 79);
    --apricot: oklch(85.3% 0.079 60);
    --rose: oklch(50.5% 0.141 29);
    --rose-soft: oklch(93.2% 0.026 36);
  }
}
@supports (color: oklch(from red l c h)) {
  :root { --apricot-hover: oklch(from var(--apricot) calc(l - .05) calc(c + .025) h); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; font: 1.0625rem/1.6 var(--sans); color: var(--ink); background: var(--paper); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 1.5rem + 4.2vw, 4.75rem); letter-spacing: -.025em; line-height: 1.02; }
h1 em { color: var(--teal); }
h2 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--teal); text-underline-offset: .2em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted { color: var(--muted); font-weight: 400; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 12px; color: var(--paper); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 52px; padding: .7rem 1.4rem; border-radius: 999px; font: inherit; font-weight: 650; font-size: 1rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; }
.btn svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--book { background: var(--apricot); color: var(--ink); }
.btn--book:hover { background: var(--apricot-hover); color: var(--ink); }
.btn--line { border-color: var(--field); color: var(--ink); background: transparent; }
.btn--line:hover { border-color: var(--ink); color: var(--ink); background: var(--card); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgb(251 248 243 / .94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-family: var(--serif); font-size: 1.2rem; color: var(--ink); text-decoration: none; }
.mark:hover { color: var(--ink); }
.mark svg { width: 30px; height: 30px; }
.top nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.top nav a { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 550; font-size: .95rem; }
.top nav a:hover { color: var(--ink); background: var(--paper-2); }
@media (max-width: 859px) { .top nav { display: none; } }

/* Intro */
.intro { padding-block: clamp(40px, 7vw, 96px) clamp(40px, 5vw, 64px); }
.intro-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .intro-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; } }
.pill { display: inline-block; margin-bottom: 1.25rem; padding: 6px 14px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: .9rem; font-weight: 650; }
.lede { font-size: clamp(1.125rem, 1rem + .4vw, 1.3rem); color: var(--ink-2); max-width: 44ch; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.75rem; }

.specimen { position: relative; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); transition: border-color .15s; }
.specimen:hover { border-color: var(--teal); }
.specimen p { margin: 0; }
.spec-label { font-size: .875rem; color: var(--muted); margin-bottom: 18px !important; }
.spec-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.3rem; view-transition-name: brand; }
.spec-brand svg { width: 38px; height: 38px; }
.spec-brand i { color: var(--teal); }
.spec-title { margin: 22px 0 22px !important; font-family: var(--serif); font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; view-transition-name: hero-title; }
.spec-title em { color: var(--teal); }
.spec-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #fde8d6; font-variant-numeric: tabular-nums; }
.spec-slot b { padding: 2px 10px; border-radius: 999px; background: var(--apricot); font-size: .8125rem; }
.spec-link { display: inline-block; margin-top: 18px; font-weight: 650; }
.spec-link::after { content: ""; position: absolute; inset: 0; border-radius: 22px; }

.facts { margin: clamp(40px, 6vw, 64px) 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; border-top: 1px solid var(--ink); }
@media (min-width: 860px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { font-size: .875rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }

/* Compare */
.compare-section { padding-bottom: clamp(56px, 8vw, 104px); }
.compare-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 20px; }
.compare-head h2 { margin: 0; }
.compare-head p { margin: 6px 0 0; color: var(--ink-2); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; }
.seg { display: inline-flex; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.seg button { font: inherit; font-size: .9375rem; font-weight: 650; color: var(--ink-2); background: none; border: 0; border-radius: 999px; padding: 0 16px; min-height: 44px; cursor: pointer; }
.seg button:hover { color: var(--ink); background: var(--paper-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.compare { margin: 0; }
.frame { background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 10px; }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 4px 6px 10px; }
.frame-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.frame-bar .url { margin-left: 10px; flex: 1; max-width: 360px; font-family: var(--mono); font-size: .75rem; color: var(--muted); background: var(--paper-2); border-radius: 999px; padding: 3px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stage { --pos: 50%; position: relative; overflow: hidden; border-radius: 14px; background: var(--paper-2); aspect-ratio: 1280 / 820; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.layer iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 820px; border: 0; transform-origin: 0 0; background: #fff; }
.layer--after { clip-path: inset(0 0 0 var(--pos)); }
.tag { position: absolute; bottom: 12px; z-index: 3; font-size: .8125rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; pointer-events: none; transition: opacity .2s; }
.tag--before { left: 12px; background: var(--rose-soft); color: var(--rose); }
.tag--after { right: 12px; background: var(--ink); color: var(--paper); }
.stage.hide-before .tag--before, .stage.hide-after .tag--after { opacity: 0; }
.handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; z-index: 4; pointer-events: none; }
.handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #fff; box-shadow: 0 0 0 1px rgb(11 59 58 / .3), 0 0 12px rgb(11 59 58 / .25); }
.knob { position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 2px 10px rgb(11 59 58 / .3); transition: box-shadow .15s, transform .15s; }
.knob svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage.is-focused .knob { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--teal), 0 2px 10px rgb(11 59 58 / .3); }
.stage.is-dragging .knob { transform: translate(-50%, -50%) scale(1.08); }

/* The range input is the main control */
.scrub { display: flex; align-items: center; gap: 14px; padding: 14px 6px 6px; font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.scrub input { flex: 1; min-width: 0; height: 44px; margin: 0; background: none; cursor: pointer; -webkit-appearance: none; appearance: none; accent-color: var(--ink); }
.scrub input::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line); }
.scrub input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
.scrub input::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: var(--ink); border: 4px solid var(--card); box-shadow: 0 0 0 1.5px var(--ink); }
.scrub input::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); border: 4px solid var(--card); box-shadow: 0 0 0 1.5px var(--ink); }
.scrub input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.compare.is-mobile .frame { max-width: 380px; margin-inline: auto; border-radius: 36px; padding: 12px; }
.compare.is-mobile .frame-bar { justify-content: center; }
.compare.is-mobile .frame-bar i:not(:first-child), .compare.is-mobile .frame-bar .url { display: none; }
.compare.is-mobile .frame-bar i:first-child { width: 64px; height: 6px; border-radius: 3px; }
.compare.is-mobile .stage { aspect-ratio: 390 / 780; border-radius: 24px; }
.compare figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 14px; font-size: .9375rem; color: var(--ink-2); }
.compare figcaption .links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.compare figcaption a { font-weight: 650; }
kbd { font-family: var(--mono); font-size: .8em; padding: 1px 6px; border: 1px solid var(--field); border-bottom-width: 2px; border-radius: 5px; background: var(--card); color: var(--ink); }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section--tight { padding-top: 0; }
.section--card { background: var(--paper-2); }
.section-head { max-width: 42rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--ink-2); font-size: 1.125rem; }
.step-label { font-size: .9375rem; font-weight: 650; color: var(--teal); margin-bottom: .75rem; }
@media (min-width: 960px) { .split { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }

/* Challenge */
.findings { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.findings li { display: grid; grid-template-columns: minmax(7.5rem, 32%) 1fr; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.findings .big { font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.1; color: var(--rose); font-variant-numeric: lining-nums; }
.findings li > span:last-child { color: var(--ink-2); }

/* Solution */
.changes { list-style: none; margin: 0; padding: 0; counter-reset: c; display: grid; gap: 0 clamp(32px, 5vw, 72px); border-top: 1px solid var(--ink); }
@media (min-width: 860px) { .changes { grid-template-columns: 1fr 1fr; } }
.change { counter-increment: c; position: relative; padding: 24px 0 26px 3.5rem; border-bottom: 1px solid var(--line); }
.change::before { content: counter(c, decimal-leading-zero); position: absolute; left: 0; top: 26px; font-family: var(--serif); font-size: 1.2rem; color: var(--teal); font-variant-numeric: lining-nums; }
.ba { display: grid; gap: 8px; margin: 0; }
.ba div { display: grid; grid-template-columns: 4.25rem 1fr; gap: 12px; align-items: baseline; }
.ba dt { font-size: .8125rem; font-weight: 700; text-align: center; border-radius: 999px; padding: 1px 0; }
.ba dd { margin: 0; color: var(--ink-2); }
.ba .b dt { background: var(--rose-soft); color: var(--rose); }
.ba .a dt { background: var(--teal-soft); color: var(--ink); }
.tech { margin-top: clamp(40px, 6vw, 64px); padding: clamp(24px, 4vw, 40px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.tech ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); }
.tech li { margin-bottom: 10px; break-inside: avoid; }
.tech b { color: var(--ink); font-weight: 650; }
@media (min-width: 900px) { .tech ul { columns: 2; column-gap: 56px; } }

/* Outcome */
.targets { display: grid; gap: 16px; }
@media (min-width: 560px) { .targets { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .targets { grid-template-columns: repeat(6, 1fr); } .target { grid-column: span 2; } .target--measured { grid-column: span 3; } }
.target { display: flex; flex-direction: column; gap: 6px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.target .label { align-self: flex-start; font-size: .8125rem; font-weight: 700; color: var(--ink); background: var(--teal-soft); padding: 2px 10px; border-radius: 999px; }
.target .label--measured { color: var(--paper); background: var(--ink); }
.target .value { font-family: var(--serif); font-size: clamp(2.2rem, 1.7rem + 1.6vw, 3rem); line-height: 1.05; margin-top: 6px; font-variant-numeric: lining-nums; }
.target .what { font-weight: 650; }
.target p { margin: 0; color: var(--muted); font-size: .9375rem; }
.disclaimer { margin-top: 24px; font-size: .9375rem; color: var(--muted); max-width: 76ch; }

/* Mini-audit */
@media (min-width: 960px) { .audit { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: start; } }
.audit-list { list-style: none; margin: 0; padding: 0; counter-reset: a; border-top: 1px solid var(--ink); }
.audit-list li { counter-increment: a; display: grid; grid-template-columns: 3rem 1fr; padding: 20px 0; border-bottom: 1px solid var(--line); }
.audit-list li::before { content: counter(a); grid-row: span 2; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; color: var(--teal); }
.audit-list h3 { margin-bottom: .25em; }
.audit-list p { margin: 0; color: var(--ink-2); }

/* CTA */
.cta { display: grid; gap: 24px; align-items: center; padding: clamp(32px, 6vw, 64px); border-radius: 24px; background: var(--ink); color: var(--paper); }
@media (min-width: 900px) { .cta { grid-template-columns: 1fr auto; } }
.cta h2 { color: var(--paper); }
.cta p { margin: 0; color: #c8d6d3; max-width: 56ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta .btn--outline { color: var(--paper); border-color: rgb(251 248 243 / .45); }
.cta .btn--outline:hover { border-color: var(--paper); color: var(--paper); }
.cta :focus-visible { outline-color: var(--apricot); }

.foot { padding-block: 32px 40px; font-size: .9375rem; color: var(--muted); border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }
.foot strong { color: var(--ink); font-weight: 650; }

/* Motion: the cross-document transition into the new site */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
::view-transition-group(brand), ::view-transition-group(hero-title) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
