/* 얼굴본성형외과 서브페이지 — 골드만식 스크롤 연출을 얼굴본의 세계(로고 블루·네이비·Pretendard) 안에서.
   main.css 다음에 로드한다. 스크롤에 묶인 초기 상태(흐린 글자, 닫힌 사진)는 .motion 아래에서만 걸린다:
   sub.js가 GSAP을 확인하고 움직임 줄이기 설정이 아닐 때 <html>에 붙인다. 없으면 전부 보이는 정적 페이지다. */

@property --fill-ink { syntax: "<color>"; inherits: true; initial-value: #14171b; }
@property --fill-dim { syntax: "<color>"; inherits: true; initial-value: rgba(20, 23, 27, 0.16); }

.page-sub {
  --section: clamp(96px, 11vw, 160px);
  --fill-ink: var(--ink);
  --fill-dim: rgba(20, 23, 27, 0.16);
}

/* lenis (부드러운 스크롤) 필수 규칙 */
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; }

/* ---------- header floating over the full visual ---------- */
.page-sub .site-header {
  position: fixed; top: 0; left: 0; right: 0; background: var(--paper);
  transition: background-color 0.45s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.brand .logo-light { display: none; }
.site-header.is-over { background: transparent; box-shadow: none; }
.site-header.is-over .logo-dark { display: none; }
.site-header.is-over .logo-light { display: block; }
.site-header.is-over .gnb-link,
.site-header.is-over .icon-btn { color: #fff; }
.site-header.is-over .gnb-item > .gnb-link { color: #fff; }
.site-header.is-over .gnb-link::after { background: #fff; }
.site-header.is-over .icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
/* the mega menu opens a white header, even over the photo */
.site-header.is-over.is-mega { background: #fff; }
.site-header.is-over.is-mega .logo-dark { display: block; }
.site-header.is-over.is-mega .logo-light { display: none; }
.site-header.is-over.is-mega .gnb-item > .gnb-link,
.site-header.is-over.is-mega .icon-btn { color: var(--ink); }
.site-header.is-over.is-mega .gnb-link::after { background: var(--blue); }
.site-header.is-over.is-mega .gnb-item:hover > .gnb-link,
.site-header.is-over.is-mega .gnb-item.is-current > .gnb-link { color: var(--blue); }

/* a word or line whose color fills in from the left (the reference's fill text) */
.fill {
  color: var(--fill-dim);
  background-image: linear-gradient(var(--fill-ink), var(--fill-ink));
  -webkit-background-clip: text; background-clip: text;
  background-repeat: no-repeat;
  background-size: var(--fill-p, 100%) 100%;
}
.motion .fill[data-fill] { --fill-p: 0%; }
@keyframes fill-in { from { background-size: 0% 100%; } to { background-size: 100% 100%; } }

/* ---------- 1. full visual that settles into a card ---------- */
.sv { position: relative; height: 136svh; background: var(--paper); }
.sv-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.sv-media {
  --fw: calc(100% - 2 * var(--inset)); /* a big surface: inset like the main hero and the consult card */
  --fh: min(54svh, 540px);
  position: absolute; inset: 0; overflow: hidden; background: var(--night);
  clip-path: inset(0 0 0 0 round 0px);
  transition: clip-path 1.05s var(--ease-out);
}
.sv.is-framed .sv-media {
  clip-path: inset(calc(100% - var(--fh)) calc((100% - var(--fw)) / 2) 0 calc((100% - var(--fw)) / 2) round var(--radius-lg));
}
.sv-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--sv-pos, 48% 50%); transition: transform 1.05s var(--ease-out); }
/* framed: the middle of the wall (logo circle and lettering) slides down into the card */
.sv.is-framed .sv-media img { transform: translateY(calc(50svh - var(--fh) / 2 + var(--sv-shift, 3svh))); } /* no shrink: the photo must stay wider than the card */
.js .sv-media img { animation: sv-settle 1.9s var(--ease-out) backwards; }
@keyframes sv-settle { from { transform: scale(1.15); } }
/* a navy grade keeps the brown wall inside the palette; the veil only darkens for the white title */
.sv-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--blue-800); mix-blend-mode: color; opacity: 0.75;
}
.sv-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: rgba(6, 26, 45, 0.55); transition: opacity 1.05s var(--ease-out);
}
.sv.is-framed .sv-media::after { opacity: 0.18; }

.sv-head {
  position: absolute; left: 0; right: 0; top: calc(var(--header-h) + clamp(20px, 6svh, 64px));
  color: #fff; --fill-ink: #fff; --fill-dim: rgba(255, 255, 255, 0.3);
  transition: color 0.6s var(--ease-out) 0.15s, --fill-ink 0.6s var(--ease-out) 0.15s, --fill-dim 0.6s var(--ease-out) 0.15s;
}
.sv.is-framed .sv-head { color: var(--ink); --fill-ink: var(--ink); --fill-dim: rgba(20, 23, 27, 0.16); }
.sv-title { margin: 0; }
.sv-word {
  display: block; margin-left: -0.05em;
  font-size: clamp(2.5rem, 7.4vw, 6rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.04em;
}
.sv-line {
  display: block; margin-top: clamp(10px, 1.4vw, 18px);
  font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 700; line-height: 1.35; letter-spacing: -0.03em;
}
.js .sv-word { animation: rise 1.1s var(--ease-out) 0.25s both; }
.js .sv-line .fill { animation: fill-in 1.4s var(--ease-out) 0.75s both; }
.js .sv .lnb { animation: rise 0.9s var(--ease-out) 1s both; }

/* location dropdowns (the reference's LNB) */
.lnb { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 0 0 clamp(16px, 3svh, 36px) -10px; font-size: 0.9375rem; font-weight: 650; } /* above the animated title, or its menus slide under it */
.lnb-home, .lnb-btn { color: inherit; border-radius: 999px; transition: background-color 0.25s var(--ease-out); }
.lnb-home { display: grid; place-items: center; width: 44px; height: 44px; }
.lnb-home .icon { width: 20px; height: 20px; }
.lnb-item { position: relative; }
.lnb-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; font: inherit; }
.lnb-btn .icon { width: 16px; height: 16px; transition: transform 0.35s var(--ease-out); }
.lnb-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.lnb-home:hover, .lnb-btn:hover { background: rgba(255, 255, 255, 0.14); }
.sv.is-framed .lnb-home:hover, .sv.is-framed .lnb-btn:hover { background: var(--mist); }
.lnb-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 5; min-width: 208px;
  display: grid; gap: 2px; padding: 8px; border-radius: var(--radius); background: #fff; color: var(--ink);
  box-shadow: 0 26px 50px -22px rgba(10, 38, 64, 0.45); animation: pop 0.35s var(--ease-out);
}
.lnb-menu[hidden] { display: none; }
.lnb-menu a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; }
.lnb-menu a:hover { background: var(--mist); color: var(--blue); }
.lnb-menu a[aria-current="page"] { color: var(--blue); }

/* ---------- 2. from 압구정·신사 to 광주, then the statement ---------- */
.since { padding: clamp(64px, 8vw, 120px) 0 var(--section); text-align: center; }
.rail { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: clamp(16px, 3vw, 48px); }
.rail-end {
  margin: 0; display: flex; align-items: baseline; gap: 6px;
  font-size: clamp(2.5rem, 7.4vw, 6rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.rail-end small { font-size: clamp(1.625rem, 2.7vw, 2.5rem); font-weight: 750; letter-spacing: -0.035em; }
.rail-to { color: var(--blue); }
.rail-line {
  height: 28px;
  background:
    repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 120px) left center / 100% 28px no-repeat,
    repeating-linear-gradient(90deg, var(--ink-3) 0 1px, transparent 1px 12px) left center / 100% 10px no-repeat;
}
.motion .rail-line { clip-path: inset(0 100% 0 0); transition: clip-path 1.8s var(--ease-out) 0.2s; }
.motion .rail.is-in .rail-line { clip-path: inset(0 0 0 0); }
.rail-note { margin: clamp(20px, 2.4vw, 32px) auto 0; max-width: 36em; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); color: var(--ink-2); text-wrap: balance; }
.rail-note .verify { margin-left: 4px; vertical-align: 2px; }
.odo { display: inline-flex; }
.odo-col { display: inline-block; height: 1em; overflow: hidden; }
.odo-strip { display: flex; flex-direction: column; transition: transform 2.2s var(--ease-out); }
.odo-strip > span { display: block; height: 1em; line-height: 1; }
.since-title {
  margin-top: 0;
  font-size: clamp(2.25rem, 4.3vw, 4.25rem); font-weight: 750; line-height: 1.17; letter-spacing: -0.038em;
}
.rail-note + .since-title { margin-top: var(--section); } /* the rail may be left out of the upload until confirmed */
.since-fill {
  margin: 20px auto 0; max-width: 24em;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 750; line-height: 1.4; letter-spacing: -0.03em; text-wrap: balance;
}

/* ---------- 3. the creed: lines light up one by one over the lobby ---------- */
.creed { position: relative; background: var(--night); color: #fff; }
.creed-bg { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.creed-bg img {
  position: absolute; top: 0; right: 0; width: min(62%, 920px); height: 100%;
  object-fit: cover; object-position: 50% 22%; transition: opacity 1.1s var(--ease-out);
}
.creed-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--night) 34%, rgba(6, 26, 45, 0.55) 62%, rgba(6, 26, 45, 0.2) 100%),
    linear-gradient(180deg, rgba(6, 26, 45, 0) 55%, var(--night) 100%);
}
.creed.is-dim .creed-bg img { opacity: 0.6; }
.creed-text { position: relative; z-index: 1; margin-top: -56svh; padding-bottom: 34svh; }
.creed-line {
  max-width: 22em; margin: 0;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 700; line-height: 1.55; letter-spacing: -0.03em;
}
.creed-line + .creed-line { margin-top: clamp(64px, 9vw, 120px); }
.motion .creed-line { opacity: 0.14; }
.creed-sign { margin: clamp(64px, 9vw, 120px) 0 0; font-size: 1rem; font-weight: 650; color: var(--sky); }

/* ---------- 4. the ring: a guide circle drawn from five o'clock, then flung outward ---------- */
.ring { position: relative; background: var(--night); color: #fff; overflow: hidden; }
.ring-marquee {
  padding-top: clamp(40px, 6vw, 96px); white-space: nowrap;
  font-size: clamp(2.5rem, 7.4vw, 6rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.08);
}
.ring-marquee span { display: inline-block; padding-left: var(--gutter); }
.ring-stage { position: relative; height: 100svh; display: grid; place-items: center; }
.ring-circle { position: absolute; width: min(74vmin, 660px); height: auto; overflow: visible; transform-origin: 50% 50%; }
.ring-solid { fill: none; stroke: var(--blue); stroke-width: 3; vector-effect: non-scaling-stroke; }
.ring-dash { fill: none; stroke: var(--sky); stroke-opacity: 0.55; stroke-width: 1.5; stroke-dasharray: 5 7; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ring-copy { position: relative; padding: 0 var(--gutter); text-align: center; }
.ring-title { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 750; line-height: 1.22; letter-spacing: -0.038em; }
.ring-text { margin-top: 20px; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); color: var(--sky); }

/* ---------- 5. three pillars; the blue flows from one circle into the next ---------- */
.pillars { position: relative; margin-top: -45svh; background: var(--night); color: #fff; padding: clamp(40px, 5vw, 80px) 0 var(--section); --fill-ink: #fff; --fill-dim: rgba(255, 255, 255, 0.18); }
.pillars-title { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 750; line-height: 1.24; letter-spacing: -0.038em; }
.pillar-list {
  --gap: clamp(16px, 2.4vw, 40px);
  position: relative; margin-top: clamp(40px, 5vw, 72px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap);
}
.pillar-list::before {
  content: ""; position: absolute; left: 16%; right: 16%; top: 50%;
  border-top: 1.5px dashed rgba(220, 235, 247, 0.4);
}
.motion .pillar-list::before { clip-path: inset(0 100% 0 0); transition: clip-path 2.4s var(--ease-out); }
.motion .pillar-list.is-in::before { clip-path: inset(0 0 0 0); }
.pillar {
  position: relative; isolation: isolate; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; align-content: center; padding: 12%; text-align: center;
  background: var(--blue-900);
}
.pillar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--blue);
  clip-path: circle(150% at 0% 50%);
}
.motion .pillar::before { clip-path: circle(0% at 0% 50%); transition: clip-path 1.1s var(--ease-out); }
.motion .pillar.is-lit::before { clip-path: circle(150% at 0% 50%); }
.pillar-icon { width: clamp(40px, 4vw, 56px); height: clamp(40px, 4vw, 56px); margin-bottom: 14px; color: #fff; }
.pillar strong { display: block; font-size: clamp(1.625rem, 2.7vw, 2.5rem); font-weight: 750; line-height: 1.3; letter-spacing: -0.035em; }
.pillar span { display: block; margin-top: 10px; max-width: 15em; font-size: 1rem; line-height: 1.55; text-wrap: balance; }
.motion .pillar-icon, .motion .pillar span { color: var(--sky); transition: color 0.6s var(--ease-out) 0.3s; }
.motion .pillar.is-lit .pillar-icon, .motion .pillar.is-lit span { color: #fff; }

/* ---------- 6. the promises in detail: the picture swaps as the text scrolls ---------- */
.story { padding: var(--section) 0; background: var(--paper); }
.story-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 112px); align-items: start; }
.story-stack {
  position: sticky; top: calc(var(--header-h) + 9svh);
  aspect-ratio: 5 / 4; border-radius: var(--radius-lg); overflow: hidden; background: var(--mist);
}
.story-shot { position: absolute; inset: 0; margin: 0; }
.story-shot img, .story-inline img { width: 100%; height: 100%; object-fit: cover; }
.story-shot[data-shot="1"] img, .story-inline-1 img { object-position: 44% 30%; }
.story-shot[data-shot="2"] img, .story-inline-2 img { object-position: 50% 16%; }
.story-shot[data-shot="3"] img, .story-inline-3 img { object-position: 64% 40%; }
.motion .story-shot + .story-shot { clip-path: inset(100% 0 0 0); }
.story-item { min-height: 78svh; display: flex; flex-direction: column; justify-content: center; padding: 6svh 0; }
.story-inline { display: none; }
.story-title { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 750; line-height: 1.24; letter-spacing: -0.038em; text-wrap: balance; }
.story-lead { margin-top: 14px; font-size: clamp(1.0625rem, 1.35vw, 1.25rem); font-weight: 650; color: var(--blue-600); }
.story-text { margin-top: 18px; max-width: 32em; color: var(--ink-2); }
.story-tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.story-tags li {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px;
  background: var(--mist); font-size: 0.9375rem; font-weight: 650;
}

/* ---------- 7. figures: pinned, one number at a time ---------- */
.figures { background: var(--night); color: #fff; padding-top: var(--section); --fill-ink: #fff; --fill-dim: rgba(255, 255, 255, 0.18); }
.figures-head { text-align: center; }
.figures-title { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 750; line-height: 1.24; letter-spacing: -0.038em; }
.figures-lead { margin-top: 16px; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); color: var(--sky); }
.figures-pin { position: relative; padding: clamp(48px, 6vw, 96px) 0 var(--section); }
.figures-list {
  width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto;
  display: grid; gap: clamp(56px, 8vw, 96px);
}
.figure-step {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr) minmax(0, 0.9fr);
  align-items: center; gap: clamp(24px, 4vw, 64px);
}
.figure-num {
  margin: 0; overflow: hidden;
  font-size: clamp(2.5rem, 7.4vw, 6rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.figure-num-in { display: flex; align-items: baseline; gap: 8px; }
.figure-num-in span { font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 750; letter-spacing: -0.03em; }
.figure-media { position: relative; margin: 0; aspect-ratio: 3 / 2; border-radius: var(--radius-lg); overflow: hidden; background: var(--blue-900); }
.figure-media > img { width: 100%; height: 100%; object-fit: cover; }
.figure-media .thirds { clip-path: inset(0 0 0 0); }
.figure-media figcaption {
  position: absolute; left: 16px; bottom: 16px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 0.8125rem; font-weight: 600;
}
.figure-copy h3 { font-size: clamp(1.625rem, 2.7vw, 2.5rem); font-weight: 750; line-height: 1.3; letter-spacing: -0.035em; }
.figure-copy p { margin-top: 12px; color: var(--sky); }
.soc-list { margin-top: 18px; display: grid; border-top: 1px solid rgba(220, 235, 247, 0.16); }
.soc-list li {
  display: flex; align-items: center; gap: 10px; min-height: 36px;
  border-bottom: 1px solid rgba(220, 235, 247, 0.16); font-size: 0.9375rem; font-weight: 650; color: var(--sky);
}
.soc-list li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.soc-list li.is-key { color: #fff; }
.figures-dots { display: none; }

/* desktop: the section pins and steps through its figures */
.figures.is-pinned .figures-pin { height: 100svh; padding: 0; display: grid; align-content: center; }
.figures.is-pinned .figures-list { gap: 0; }
.figures.is-pinned .figure-step { grid-area: 1 / 1; pointer-events: none; }
.figures.is-pinned .figure-step.is-active { pointer-events: auto; }
.figures.is-pinned .figure-num-in { transform: translateY(105%); transition: transform 0.9s var(--ease-out); }
.figures.is-pinned .figure-step.is-active .figure-num-in { transform: none; }
.figures.is-pinned .figure-step.is-out .figure-num-in { transform: translateY(-105%); }
.figures.is-pinned .figure-media { clip-path: inset(100% 0 0 0 round var(--radius-lg)); transition: clip-path 1s var(--ease-out); }
.figures.is-pinned .figure-media > * { transform: scale(1.1); transition: transform 1.4s var(--ease-out); }
.figures.is-pinned .figure-step.is-active .figure-media { clip-path: inset(0 0 0 0 round var(--radius-lg)); }
.figures.is-pinned .figure-step.is-active .figure-media > * { transform: none; }
.figures.is-pinned .figure-step.is-out .figure-media { clip-path: inset(0 0 100% 0 round var(--radius-lg)); }
.figures.is-pinned .figure-copy { opacity: 0; transform: translateY(32px); transition: opacity 0.6s var(--ease-out), transform 0.9s var(--ease-out); }
.figures.is-pinned .figure-step.is-active .figure-copy { opacity: 1; transform: none; transition-delay: 0.15s; }
.figures.is-pinned .figure-step.is-out .figure-copy { transform: translateY(-32px); }
.figures.is-pinned .figures-dots {
  position: absolute; left: 50%; bottom: clamp(24px, 5svh, 56px); translate: -50% 0;
  display: flex; gap: 10px;
}
.figures-dots i { width: 32px; height: 3px; border-radius: 999px; background: rgba(220, 235, 247, 0.25); transition: background-color 0.4s var(--ease-out); }
.figures-dots i.is-on { background: var(--blue); }

/* ---------- 8. how a visit goes: a slider of steps ---------- */
.flow { padding: var(--section) 0; background: var(--paper); overflow: hidden; }
.flow-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 24px 40px; }
.flow-title { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 750; line-height: 1.24; letter-spacing: -0.038em; }
.flow-controls { display: flex; align-items: center; gap: 14px; }
.flow-count { font-size: 1.0625rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.flow-count span { color: var(--ink-3); }
.flow-bar { width: clamp(80px, 9vw, 128px); height: 2px; border-radius: 999px; background: var(--line); overflow: hidden; }
.flow-bar i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0.2); transition: transform 0.6s var(--ease-out); }
.flow-nav {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1.5px solid var(--ink); color: var(--ink);
  transition: background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}
.flow-nav .icon { width: 22px; height: 22px; }
.flow-nav:hover { background: var(--ink); color: #fff; }
.flow-nav:disabled { opacity: 0.3; cursor: default; background: none; color: var(--ink); }
.flow-tabs { margin-top: clamp(24px, 3vw, 40px); display: flex; flex-wrap: wrap; gap: 8px; }
.flow-tabs button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--mist); font-size: 0.9375rem; font-weight: 650;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.flow-tabs button b { font-variant-numeric: tabular-nums; }
.flow-tabs button:hover { color: var(--blue); }
.flow-tabs button[aria-current="step"] { background: var(--ink); color: #fff; }
.flow-track {
  --slide: min(76vw, 1040px);
  position: relative; margin-top: clamp(24px, 3vw, 40px);
  display: flex; gap: clamp(14px, 1.6vw, 24px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 4px calc((100% - var(--slide)) / 2) 8px;
  scrollbar-width: none;
}
.flow-track::-webkit-scrollbar { display: none; }
.flow-slide {
  position: relative; flex: 0 0 var(--slide); height: clamp(440px, 42vw, 600px);
  scroll-snap-align: center; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--night); color: #fff;
  transition: opacity 0.6s var(--ease-out), transform 0.9s var(--ease-out);
}
.flow-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.flow-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6, 26, 45, 0.88) 0%, rgba(6, 26, 45, 0.55) 42%, rgba(6, 26, 45, 0) 78%);
}
.flow-model {
  position: absolute; top: 20px; right: 20px; z-index: 1; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 0.8125rem; font-weight: 600;
}
.flow-copy { position: absolute; left: 0; bottom: 0; z-index: 1; max-width: min(32em, 72%); padding: clamp(28px, 4vw, 56px); }
.flow-copy > * { transition: opacity 0.6s var(--ease-out), transform 0.9s var(--ease-out); }
.flow-no { display: block; font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 800; letter-spacing: -0.03em; color: var(--sky); font-variant-numeric: tabular-nums; }
.flow-copy h3 { margin-top: 8px; font-size: clamp(1.625rem, 2.7vw, 2.5rem); font-weight: 750; line-height: 1.3; letter-spacing: -0.035em; }
.flow-copy p { margin-top: 12px; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); line-height: 1.65; }
/* once the slider runs: the chosen step is full, the neighbours wait, dimmed and a little smaller */
.flow.is-ready .flow-slide:not(.is-active) { opacity: 0.4; transform: scale(0.94); cursor: pointer; }
.flow.is-ready .flow-slide:not(.is-active) .flow-copy > * { opacity: 0; transform: translateY(16px); }
.flow.is-ready .flow-slide.is-active .flow-copy > :nth-child(2) { transition-delay: 0.08s; }
.flow.is-ready .flow-slide.is-active .flow-copy > :nth-child(3) { transition-delay: 0.16s; }

/* ---------- 9. the five areas: tall cards that open wider on hover ---------- */
.areas { padding: 0 0 var(--section); }
.areas-title { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 750; line-height: 1.24; letter-spacing: -0.038em; }
.areas-lead { margin-top: 14px; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); color: var(--ink-2); }
.area-list { margin-top: clamp(32px, 4vw, 56px); display: flex; gap: 12px; height: clamp(400px, 38vw, 540px); }
.area-list li { flex: 1 1 0; min-width: 0; transition: flex-grow 0.8s var(--ease-out); }
.area-list li:hover, .area-list li:focus-within { flex-grow: 2.1; }
.motion .area-list li { opacity: 0; transform: translateY(48px); transition: flex-grow 0.8s var(--ease-out), opacity 0.8s var(--ease-out), transform 1s var(--ease-out); transition-delay: 0s, calc(var(--i) * 0.08s), calc(var(--i) * 0.08s); }
.motion .area-list.is-in li { opacity: 1; transform: none; }
.area-card { position: relative; display: block; height: 100%; border-radius: var(--radius-lg); overflow: hidden; color: #fff; background: var(--blue-900); }
.area-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.area-card:hover img { transform: scale(1.05); }
.area-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 26, 45, 0) 42%, rgba(6, 26, 45, 0.8) 100%); }
.area-model {
  position: absolute; left: 16px; top: 16px; z-index: 1; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 0.8125rem; font-weight: 600;
}
.area-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; gap: 6px; padding: clamp(20px, 2vw, 28px); }
.area-name { font-size: clamp(1.625rem, 2.7vw, 2.5rem); font-weight: 750; line-height: 1.3; letter-spacing: -0.035em; }
.area-desc { font-size: 0.9375rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.area-go {
  position: absolute; right: clamp(20px, 2vw, 28px); bottom: clamp(24px, 2.4vw, 32px); z-index: 1;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: var(--ink);
  opacity: 0; transform: translateX(-8px); transition: opacity 0.4s var(--ease-out), transform 0.5s var(--ease-out);
}
.area-go .icon { width: 20px; height: 20px; }
.area-card:hover .area-go, .area-card:focus-visible .area-go { opacity: 1; transform: none; }

/* ---------- doctor profiles: the portrait with its blue second line, the name, two ruled lists ---------- */
.profile { padding: var(--section) 0; }
.profile.is-soft { margin: 0 var(--inset); border-radius: var(--radius-lg); background: var(--mist); }
.profile-grid { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(48px, 8vw, 128px); align-items: center; }
.profile.is-flip .profile-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } /* the photo keeps the narrow column on either side */
.profile.is-flip .profile-photo { order: 2; }
.profile-photo {
  position: relative; margin: 16px; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--mist-2); outline: 1px solid var(--blue); outline-offset: 16px;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.motion .profile-photo img { clip-path: inset(10% 10% 10% 10% round 28px); transform: scale(1.06); transition: clip-path 1.4s var(--ease-out), transform 1.6s var(--ease-out); }
.motion .profile.is-in .profile-photo img { clip-path: inset(0 0 0 0 round 0); transform: none; }
.profile-name { font-size: clamp(2.25rem, 4.3vw, 4.25rem); font-weight: 750; line-height: 1.17; letter-spacing: -0.038em; }
.profile-name small { margin-left: 0.25em; font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 750; letter-spacing: -0.03em; }
.profile-meta { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 1rem; font-weight: 650; color: var(--blue-600); }
.profile-meta span + span { color: var(--ink-3); font-weight: 500; }
.profile-lead { margin-top: clamp(20px, 2.4vw, 28px); max-width: 30em; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); color: var(--ink-2); text-wrap: pretty; }
.profile-lists { margin-top: clamp(32px, 4vw, 48px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; }
.profile-lists h3 { padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); font-size: 1rem; font-weight: 750; }
.profile-lists li {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; padding: 8px 0;
  border-bottom: 1px solid var(--line); font-size: 0.9375rem; color: var(--ink-2);
}
.profile-lists li::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.profile-lists li.is-key { color: var(--ink); font-weight: 650; }
.motion .profile-lists li { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: calc(0.4s + var(--i, 0) * 0.06s); }
.motion .profile.is-in .profile-lists li { opacity: 1; transform: none; }

/* ---------- on-air: the shows he appeared in, drifting by, then a ruled list ---------- */
.onair { padding: var(--section) 0; overflow: hidden; }
.onair-title { font-size: clamp(2rem, 3.5vw, 3.25rem); font-weight: 750; line-height: 1.24; letter-spacing: -0.038em; }
.onair-lead { margin-top: 14px; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); color: var(--ink-2); }
.onair-marquee {
  margin-top: clamp(32px, 4vw, 56px); white-space: nowrap;
  font-size: clamp(2.5rem, 7.4vw, 6rem); font-weight: 800; line-height: 1.12; letter-spacing: -0.04em; color: var(--mist-2);
}
.onair-marquee span { display: inline-block; padding-left: var(--gutter); }
.onair-list { margin-top: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 48px); border-top: 1.5px solid var(--ink); }
.onair-list li { display: grid; align-content: start; gap: 10px; padding: 22px 0 24px; border-bottom: 1px solid var(--line); }
.onair-meta { display: flex; align-items: center; gap: 10px; }
.onair-channel { font-size: 0.8125rem; font-weight: 600; color: var(--ink-3); }
.onair-show { font-size: clamp(1.375rem, 2.2vw, 1.875rem); font-weight: 750; line-height: 1.3; letter-spacing: -0.03em; }
.onair-role {
  padding: 3px 12px; border-radius: 999px;
  background: var(--mist); font-size: 0.8125rem; font-weight: 650; color: var(--blue-600);
}
.motion .onair-list li { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: calc(var(--i, 0) * 0.07s); }
.motion .onair-list.is-in li { opacity: 1; transform: none; }

/* two portraits side by side in one media frame */
.figure-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
.figure-duo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .figure-step { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); }
  .figure-copy { grid-column: 1 / -1; }
  .figures.is-pinned .figure-copy { grid-column: auto; }
}
@media (max-width: 960px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile.is-flip .profile-grid { grid-template-columns: 1fr; }
  .profile.is-flip .profile-photo { order: 0; }
  .profile-photo { width: min(100% - 32px, 420px); }
  .onair-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-grid { grid-template-columns: 1fr; }
  .story-stack { display: none; }
  .story-inline { display: block; margin: 0 0 28px; aspect-ratio: 5 / 4; border-radius: var(--radius-lg); overflow: hidden; background: var(--mist); }
  .story-item { min-height: 0; padding: 0; }
  .story-item + .story-item { margin-top: clamp(64px, 12vw, 96px); }
  .figure-step { grid-template-columns: 1fr; gap: 20px; }
  .figure-copy { grid-column: auto; }
}
@media (max-width: 768px) {
  .sv { height: 124svh; }
  .sv-media { --fh: min(52svh, 460px); }
  .sv-media img { object-position: var(--sv-pos-m, var(--sv-pos, 48% 50%)); } /* a page can reframe its subject for a portrait screen */
  /* .sv-low: the subject's face sits high in its photo, so on a phone the title moves to the bottom
     and the card settles at the top, with the face inside it */
  .sv-low .sv-head { top: auto; bottom: calc(88px + env(safe-area-inset-bottom)); }
  .sv-low.is-framed .sv-media {
    clip-path: inset(calc(var(--header-h) + 16px) var(--inset) calc(100% - var(--header-h) - 16px - var(--fh)) var(--inset) round var(--radius-lg));
  }
  .sv-low.is-framed .sv-media img { transform: translateY(var(--sv-shift-m, 12svh)); }
  .rail { grid-template-columns: 1fr; gap: 10px; justify-items: center; }
  .rail-line { width: 100%; max-width: 320px; }
  .pillar-list { grid-template-columns: 1fr; justify-items: center; }
  .pillar-list::before { left: 50%; right: auto; top: 12%; bottom: 12%; border-top: 0; border-left: 1.5px dashed rgba(220, 235, 247, 0.4); }
  .motion .pillar-list::before { clip-path: inset(0 0 100% 0); }
  .pillar { width: min(100%, 340px); }
  .pillar::before, .motion .pillar.is-lit::before { clip-path: circle(150% at 50% 0%); }
  .motion .pillar::before { clip-path: circle(0% at 50% 0%); }
  .figures-list { display: flex; gap: 14px; width: 100%; padding: 0 var(--gutter); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
  .figures-list::-webkit-scrollbar { display: none; }
  .figure-step { flex: 0 0 min(84vw, 360px); scroll-snap-align: start; align-content: start; }
  .flow-controls .flow-bar { display: none; }
  .flow-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); }
  .flow-tabs::-webkit-scrollbar { display: none; }
  .flow-tabs button { flex: none; }
  .flow-track { --slide: 86vw; }
  .flow-slide { height: 540px; }
  .flow-slide::after { background: linear-gradient(180deg, rgba(6, 26, 45, 0) 28%, rgba(6, 26, 45, 0.9) 100%); }
  .flow-copy { max-width: none; padding: 24px; }
  .ring-circle { width: min(90vw, 660px); }
  .creed-bg img { width: 100%; }
  .creed-bg::after { background: linear-gradient(180deg, rgba(6, 26, 45, 0.45) 0%, rgba(6, 26, 45, 0.7) 55%, var(--night) 100%); }
  .creed.is-dim .creed-bg img { opacity: 0.3; }
  .area-list { height: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter); scroll-padding-inline: var(--gutter); }
  .area-list::-webkit-scrollbar { display: none; }
  .area-list li, .area-list li:hover, .area-list li:focus-within { flex: 0 0 min(64vw, 280px); height: 400px; scroll-snap-align: start; }
  .area-go { opacity: 1; transform: none; }
  .profile-lists { grid-template-columns: 1fr; }
  .onair-list { grid-template-columns: 1fr; }
}
