/* ==========================================================================
   SEODAM Plastic Surgery — site styles (서담 성형외과 디자인 시스템)
   Quiet · Private · Refined · Precise · Considered
   어두운 바탕(차콜 · 에스프레소)이 이끌고, 본(bone) 바탕이 사이를 쉰다.
   사진 한 장, 큰 글자, 느린 세로 리듬, 헤어라인. 장식 · 그라데이션 · 금색 · 둥근 상자를 쓰지 않는다.
   관리자가 바꾸지 않는 디자인 시스템 (폰트 · 색 · 간격 · 폭) — 페이지 전용은 public/css/pages/*.css
   ========================================================================== */

/* ---------------------------------------------------------------- fonts */
/* 라틴 세리프(워드마크 · 숫자 · 영문 소제목) — Cormorant Garamond, SIL OFL 1.1 (public/fonts/cormorant-garamond/OFL.txt) */
@font-face {
    font-family: "Cormorant Garamond";
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/cormorant-garamond/CormorantGaramond-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Cormorant Garamond";
    font-style: italic;
    font-weight: 300 700;
    font-display: swap;
    src: url("../fonts/cormorant-garamond/CormorantGaramond-Italic-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------------------------------------------------------------- tokens */
:root {
    /* 팔레트 — 차콜 · 에스프레소, 본, 스톤 · 그레이지, 클레이 모브(포인트 하나) */
    --charcoal: #191715;
    --charcoal-deep: #12100E;           /* 푸터 · 고지 띠 */
    --charcoal-raise: #221F1C;          /* 어두운 면의 사진 자리 */
    --bone: #F3F0EB;
    --bone-2: #EAE5DE;
    --stone: #CFC7BC;

    /* 의미 색 — 밝은 면(기본). 어두운 면은 .is-dark 가 다시 정한다. 대비: --fg-3 도 바탕 위 4.5:1 이상 */
    --bg: var(--bone);
    --fg: #1C1916;
    --fg-2: #4D4741;
    --fg-3: #6B645C;
    --rule: #D8D1C7;
    --rule-strong: #1C1916;
    --media: #E4DED6;
    --accent: #7F605A;                  /* 클레이 모브 — 아주 작은 표식에만 */
    --plate: #F3F0EB;                   /* 일러스트 판 — 어느 면에서나 종이색 */
    --plate-rule: #D8D1C7;

    --error: #9E3B2C;

    --gutter: clamp(20px, 4.4vw, 72px);
    --col-gap: clamp(16px, 2vw, 32px);
    --maxw: 1600px;
    --header-h: 84px;
    --section-y: clamp(112px, 13vw, 232px);

    --sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
    --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --slow: 1.2s;
}

@media (max-width: 1099px) {
    :root { --header-h: 64px; }
}

/* 어두운 면 — 히어로 · 페이지 머리 · 의료진 · 상담 · 푸터 */
.is-dark {
    --bg: var(--charcoal);
    --fg: #EDE8E1;
    --fg-2: #B8B0A6;
    --fg-3: #978F85;
    --rule: #3A3531;
    --rule-strong: #7A7269;
    --media: var(--charcoal-raise);
    --accent: #B39089;
    --plate-rule: transparent;          /* 어두운 면에서는 종이색 판 자체가 구분된다 */
    --error: #E0907F;
    background: var(--bg);
    color: var(--fg);
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 24px);
    background: var(--charcoal);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: -0.006em;
    word-break: keep-all;
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: inherit; }

:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }

.visually-hidden {
    position: absolute !important;
    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: -9999px; top: 12px; z-index: 100;
    background: var(--bone); color: var(--charcoal); padding: 10px 14px; font-size: 14px;
}
.skip-link:focus { left: 12px; }

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding-left: var(--gutter);
    padding-right: var(--gutter);
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
}

/* ---------------------------------------------------------------- type */
.serif { font-family: var(--serif); }

/* 영문 소제목(세리프 대문자) + 짧은 선 + 한글 */
.eyebrow {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px 16px;
    font-family: var(--serif);
    font-size: 13.5px;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--fg-3);
}
.eyebrow .ko {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-family: var(--sans);
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: none;
}
.eyebrow .ko::before {
    content: "";
    width: 24px; height: 1px;
    background: currentColor;
    opacity: .55;
}

/* 숫자 — 세리프 라이닝 숫자 */
.numeral {
    font-family: var(--serif);
    font-weight: 300;
    font-variant-numeric: lining-nums tabular-nums;
    letter-spacing: .02em;
    line-height: 1;
}

.display {
    font-size: clamp(34px, 4.4vw, 74px);
    font-weight: 260;
    line-height: 1.28;
    letter-spacing: -.04em;
    text-wrap: balance;
}

.statement {
    margin-top: 36px;
    font-size: clamp(26px, 2.75vw, 46px);
    font-weight: 280;
    line-height: 1.46;
    letter-spacing: -.032em;
    text-wrap: balance;
}

.lead {
    font-size: clamp(15.5px, 1.1vw, 18px);
    line-height: 1.95;
    color: var(--fg-2);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 8px;
    font-size: 14.5px;
    letter-spacing: .02em;
    line-height: 1.2;
    border-bottom: 1px solid currentColor;
    transition: gap .5s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.text-link:hover { gap: 20px; }
.text-link--small { font-size: 13.5px; }
.text-link--quiet { border-bottom-color: var(--rule-strong); color: var(--fg-2); }
.text-link--quiet:hover { color: var(--fg); border-bottom-color: currentColor; }

/* 얇은 선 화살표 — 아이콘 없이 CSS 로 */
.arrow {
    position: relative;
    display: inline-block;
    width: 22px; height: 1px;
    background: currentColor;
    flex: none;
}
.arrow::after {
    content: "";
    position: absolute;
    right: 0; top: 50%;
    width: 7px; height: 7px;
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
}

/* 버튼 — 헤어라인 사각형. 마우스를 올리면 채워진다. --solid 는 페이지의 마지막 행동에만 */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 56px;
    padding: 0 30px;
    border: 1px solid currentColor;
    background: transparent;
    color: var(--fg);
    font-size: 14.5px;
    letter-spacing: .06em;
    line-height: 1.2;
    transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease), gap .5s var(--ease);
}
.button:hover { background: var(--fg); border-color: var(--fg); color: var(--bg); gap: 24px; }
.button--solid { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.button--solid:hover { background: transparent; color: var(--fg); }
.button:focus-visible { outline: 1px solid var(--fg); outline-offset: 4px; }
.button[disabled],
.button[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }

/* ---------------------------------------------------------------- media */
.media {
    position: relative;
    overflow: hidden;
    background: var(--media);
}
.media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
/* 일러스트 판(plate) — 시드 그림은 투명 바탕의 SVG 선화다. 종이색 판 위에 놓고, 밝은 면에서는 헤어라인 테두리로 판을 구분한다.
   관리자가 사진(래스터)을 올리면 이 규칙은 걸리지 않고 사진이 칸을 꽉 채운다. */
.media:has(> img[src*=".svg"]) {
    background: var(--plate);
    box-shadow: inset 0 0 0 1px var(--plate-rule);
}
.media > img[src*=".svg"] { object-fit: contain; }
.ratio-4x5 { aspect-ratio: 4 / 5; }
.ratio-3x4 { aspect-ratio: 3 / 4; }
.ratio-4x3 { aspect-ratio: 4 / 3; }
.ratio-16x10 { aspect-ratio: 16 / 10; }
.ratio-21x9 { aspect-ratio: 21 / 9; }

figcaption {
    margin-top: 16px;
    font-size: 12.5px;
    line-height: 1.6;
    letter-spacing: .01em;
    color: var(--fg-3);
}

/* ---------------------------------------------------------------- demo bar (inc.demo_notice) */
.demo-bar {
    position: relative;
    z-index: 60;
    background: var(--charcoal-deep);
    color: #A39B91;
    border-bottom: 1px solid #2A2623;
}
.demo-bar__text {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 9px var(--gutter);
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 14px;
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: .01em;
}
.demo-bar__label {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 12.5px;
    letter-spacing: .28em;
    color: #B39089;
}
.demo-bar__link {
    margin-left: auto;
    color: #CFC7BC;
    border-bottom: 1px solid #5A534C;
    transition: border-color .3s var(--ease);
}
.demo-bar__link:hover { border-bottom-color: currentColor; }
.demo-bar__link + .demo-bar__link { margin-left: 0; }   /* 링크가 여럿이면 첫 링크만 오른쪽으로 민다 */

/* ---------------------------------------------------------------- header */
/* 고지 띠 아래에 붙어 있다가(sticky) 위에 고정된다. 히어로 위에서는 투명, 그 밖에서는 차콜 */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    color: #EDE8E1;
    background: var(--charcoal);
    border-bottom: 1px solid transparent;
    transition: background-color .6s var(--ease), border-color .6s var(--ease), transform .6s var(--ease);
}
.has-hero .site-header:not(.is-solid) { background: transparent; }
.site-header.is-solid {
    background: rgba(25, 23, 21, .94);
    -webkit-backdrop-filter: saturate(120%) blur(14px);
    backdrop-filter: saturate(120%) blur(14px);
    border-bottom-color: rgba(237, 232, 225, .08);
}
.site-header.is-hidden { transform: translateY(-100%); }
.menu-open .site-header { background: var(--charcoal); border-bottom-color: transparent; transform: none; }

.site-header__inner {
    height: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: clamp(24px, 4vw, 72px);
}

.site-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    line-height: 1;
}
.site-logo__mark {
    font-family: var(--serif);
    font-size: 23px;
    font-weight: 500;
    letter-spacing: .3em;
    margin-right: -.3em;
}
.site-logo__sub {
    font-size: 10.5px;
    letter-spacing: .26em;
    opacity: .66;
}

.site-nav { justify-self: end; }
.site-nav ul { display: flex; gap: clamp(22px, 2.6vw, 44px); }
.site-nav a {
    position: relative;
    display: block;
    padding: 8px 0;
    font-size: 14px;
    letter-spacing: .05em;
    opacity: .82;
    transition: opacity .3s var(--ease);
}
.site-nav a::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: 2px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease);
}
.site-nav a:hover,
.site-nav a.is-current { opacity: 1; }
.site-nav a:hover::after,
.site-nav a.is-current::after { transform: scaleX(1); }

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 24px;
}
.site-header__cta {
    display: inline-flex;
    align-items: center;
    height: 42px;
    padding: 0 20px;
    border: 1px solid rgba(237, 232, 225, .42);
    font-size: 13.5px;
    letter-spacing: .08em;
    transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease);
}
.site-header__cta:hover { background: #EDE8E1; color: var(--charcoal); border-color: #EDE8E1; }
.site-header__menu { display: none; padding: 10px 0; font-size: 14px; letter-spacing: .06em; }
.site-header__menu-close { display: none; }
.menu-open .site-header__menu-open { display: none; }
.menu-open .site-header__menu-close { display: inline; }

/* 전체 메뉴(모바일 · 태블릿) — 차콜 위의 큰 가는 글자, 세리프 번호 */
.site-menu {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: calc(var(--header-h) + 32px) var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
    background: var(--charcoal);
    color: #EDE8E1;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s var(--ease), visibility .5s;
}
.menu-open .site-menu { opacity: 1; visibility: visible; }
.site-menu__links li { border-bottom: 1px solid #3A3531; }
.site-menu__links li:first-child { border-top: 1px solid #3A3531; }
.site-menu__links a {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: 14px 0;
    font-size: clamp(24px, 6.6vw, 38px);
    font-weight: 280;
    line-height: 1.3;
    letter-spacing: -.025em;
}
.site-menu__links .numeral { font-size: 15px; color: #978F85; min-width: 22px; }
.site-menu__info {
    display: grid;
    gap: 4px;
    font-size: 13px;
    line-height: 1.7;
    color: #B8B0A6;
}

/* 떠 있는 상담 신청 — 모바일 · 태블릿에서 헤더의 버튼 대신. 상담 버튼 · 푸터가 보이면 숨는다(site.js) */
.fab { display: none; }

@media (max-width: 1099px) {
    .site-nav, .site-header__cta { display: none; }
    .site-header__inner { grid-template-columns: 1fr auto; }
    .site-header__menu { display: block; }
    .fab {
        position: fixed;
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px));
        z-index: 55;
        display: inline-flex;
        align-items: center;
        gap: 12px;
        height: 46px;
        padding: 0 18px;
        background: var(--charcoal);
        color: #EDE8E1;
        border: 1px solid rgba(237, 232, 225, .28);
        font-size: 13.5px;
        letter-spacing: .06em;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s;
    }
    .fab .arrow { width: 16px; }
    .fab.is-shown { opacity: 1; visibility: visible; transform: none; }
    .menu-open .fab { opacity: 0; visibility: hidden; }
    .site-logo__mark { font-size: 20px; }
}

/* ---------------------------------------------------------------- hero (Home — 사진 한 장) */
/* 넓은 화면: 왼쪽 다섯 칸에 문장, 오른쪽 일곱 칸에 사진(화면 끝까지). 좁은 화면: 사진 위, 문장 아래 */
.hero {
    position: relative;
    margin-top: calc(-1 * var(--header-h));
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    background: var(--charcoal);
}
.hero__media {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    overflow: hidden;
    background: var(--charcoal-raise);
}
.hero__media img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: 62% 50%;
    transition: transform 3.2s var(--ease);
}
.js .hero__media img { transform: scale(1.04); }
.js .hero.is-in .hero__media img { transform: none; }
/* 히어로가 SVG 선화면(어두운 바탕용) 판을 깔지 않고 차콜 위에 그대로 — 칸 안에 여백을 두고 담는다 */
.hero__media:has(> img[src*=".svg"]) { background: transparent; }
/* 넓은 화면: 16:10 그림을 칸 높이에 맞춰 키우고 빈 좌우만 잘라 낸다(주제는 가운데 60% 안에 있다) */
.hero .hero__media > img[src*=".svg"] {
    padding: calc(var(--header-h) + 8px) 0 clamp(24px, 3vw, 48px);
    object-fit: cover;
    object-position: 50% 50%;
}
@media (max-width: 1099px) {
    .hero .hero__media > img[src*=".svg"] { padding: calc(var(--header-h) + 16px) var(--gutter) 8px; object-fit: contain; }
}
/* 모바일: 정사각에 가까운 칸에서 다시 cover — 가운데 주제가 화면 폭을 채운다 */
@media (max-width: 767px) {
    .hero__media:has(> img[src*=".svg"]) { height: calc(100vw + var(--header-h)); min-height: 0; }
    .hero .hero__media > img[src*=".svg"] { padding: calc(var(--header-h) + 4px) 0 4px; object-fit: cover; object-position: 40% 50%; }
}
.hero__media[data-focal="left"] img { object-position: 25% 50%; }
.hero__media[data-focal="right"] img { object-position: 85% 50%; }
.hero__media[data-focal="center"] img { object-position: 50% 50%; }

.hero__content {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    padding: calc(var(--header-h) + 48px) clamp(24px, 3.6vw, 64px) clamp(64px, 11vh, 120px) max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
}
.hero__headline {
    margin-top: 40px;
    font-size: clamp(34px, 3.9vw, 66px);
    font-weight: 260;
    line-height: 1.3;
    letter-spacing: -.042em;
}
.hero__caption {
    max-width: 420px;
    margin-top: 32px;
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.9;
    color: var(--fg-2);
}
.hero__cta { margin-top: 52px; }
.hero__index {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-top: clamp(56px, 9vh, 104px);
    padding-top: 20px;
    border-top: 1px solid var(--rule);
    font-size: 12.5px;
    letter-spacing: .04em;
    color: var(--fg-3);
}
.hero__index .numeral { font-size: 15px; color: var(--fg-2); }

.js .hero__content > * {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.js .hero.is-in .hero__content > * { opacity: 1; transform: none; }
.js .hero.is-in .hero__content > :nth-child(2) { transition-delay: .15s; }
.js .hero.is-in .hero__content > :nth-child(3) { transition-delay: .3s; }
.js .hero.is-in .hero__content > :nth-child(4) { transition-delay: .45s; }
.js .hero.is-in .hero__content > :nth-child(5) { transition-delay: .6s; }

@media (max-width: 1099px) {
    .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; min-height: 0; }
    .hero__media { grid-column: 1; grid-row: 1; height: min(78svh, 128vw); min-height: 360px; }
    .hero__content { grid-column: 1; grid-row: 2; padding: 48px var(--gutter) 72px; }
    .hero__headline { margin-top: 28px; }
}

/* ---------------------------------------------------------------- sections */
.section { padding: var(--section-y) 0; }
.section--tight-top { padding-top: 0; }
.section--tight-bottom { padding-bottom: 0; }
.section--bone-2 { --bg: var(--bone-2); background: var(--bg); }

.section-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: end;
    margin-bottom: clamp(56px, 6vw, 104px);
}
.section-head > :first-child { grid-column: 1 / span 7; }
.section-head > :last-child:not(:first-child) { grid-column: 9 / span 4; justify-self: start; }
.section-head > .lead { max-width: 440px; }

/* reveal — 스크롤 때 한 번, 조용하게 */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 1.2s var(--ease), transform 1.2s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- index list (번호 · 이름 · 영문 · 화살표 헤어라인 목록) */
/* 수술 목록 · 의료진 목록 · 사례 목록이 같이 쓴다. 카드 대신 줄 */
.index-list { border-top: 1px solid var(--rule); }
.index-list__item { border-bottom: 1px solid var(--rule); }
.index-list__link {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: 16px;
    padding: 22px 0;
    transition: color .4s var(--ease), padding .5s var(--ease);
}
.index-list__num { font-family: var(--serif); font-size: 15px; color: var(--fg-3); font-variant-numeric: lining-nums tabular-nums; }
.index-list__main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; min-width: 0; }
.index-list__name { font-size: clamp(17px, 1.3vw, 20px); font-weight: 400; letter-spacing: -.015em; line-height: 1.5; }
.index-list__en { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--fg-3); letter-spacing: .01em; }
.index-list__note { flex-basis: 100%; font-size: 14px; line-height: 1.7; color: var(--fg-2); }
.index-list__link .arrow { align-self: center; opacity: .5; transform: translateX(-6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
@media (hover: hover) {
    .index-list__link:hover { padding-left: 8px; }
    .index-list__link:hover .arrow { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- Home — 대표 수술(chapters) */
/* 왼쪽: 지금 읽는 분류의 사진(고정) / 오른쪽: 분류 넷이 천천히 지나간다. 좁은 화면은 분류마다 사진 */
.chapters__layout { align-items: start; }
.chapters__visual {
    grid-column: 1 / span 5;
    position: sticky;
    top: calc(var(--header-h) + 48px);
}
.chapters__visual .media img { opacity: 0; transition: opacity 1s var(--ease); }
.chapters__visual .media img.is-active { opacity: 1; }
.chapters__caption { display: flex; align-items: baseline; gap: 14px; }
.chapters__caption .numeral { font-size: 15px; color: var(--fg-2); }
.chapters__list { grid-column: 7 / span 6; }
.chapter {
    min-height: 72vh;
    padding: 0 0 clamp(72px, 9vw, 144px);
}
.chapter:last-child { min-height: 0; padding-bottom: 0; }
.chapter__head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    column-gap: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--rule-strong);
}
.chapter__num { font-size: clamp(56px, 6vw, 96px); color: var(--accent); margin-bottom: -.08em; }
.chapter__title { font-size: clamp(28px, 2.6vw, 42px); font-weight: 300; letter-spacing: -.03em; line-height: 1.25; }
.chapter__en { display: block; margin-top: 6px; font-family: var(--serif); font-style: italic; font-size: clamp(17px, 1.3vw, 20px); color: var(--fg-3); letter-spacing: .01em; }
.chapter__text { max-width: 520px; margin-top: 32px; font-size: 15.5px; line-height: 1.95; color: var(--fg-2); }
.chapter__media { display: none; }
.chapter .index-list { margin-top: 40px; }
.chapter .index-list__link { grid-template-columns: minmax(0, 1fr) auto; padding: 17px 0; }
.chapter .index-list__name { font-size: 16.5px; }
.chapter__more { margin-top: 32px; }

/* ---------------------------------------------------------------- Home — 의료진 */
.lead-doctor .grid { align-items: end; }
.lead-doctor__figure { grid-column: 1 / span 5; }
.lead-doctor__body { grid-column: 7 / span 6; }
.lead-doctor__quote {
    margin-top: 40px;
    font-size: clamp(24px, 2.35vw, 38px);
    font-weight: 280;
    line-height: 1.55;
    letter-spacing: -.03em;
    text-wrap: balance;
}
.lead-doctor__quote::before {
    content: "\201C";
    display: block;
    height: .5em;
    margin-bottom: .1em;
    font-family: var(--serif);
    font-size: 2.6em;
    line-height: 1;
    color: var(--accent);
}
.lead-doctor__name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-top: 48px; }
.lead-doctor__name strong { font-size: 22px; font-weight: 450; letter-spacing: -.01em; }
.lead-doctor__name .serif { font-style: italic; font-size: 18px; color: var(--fg-3); }
.lead-doctor__title { margin-top: 6px; font-size: 14px; color: var(--fg-2); }
.lead-doctor__text { max-width: 520px; margin-top: 28px; font-size: 15.5px; line-height: 1.95; color: var(--fg-2); }
.lead-doctor__body .text-link { margin-top: 44px; }
.lead-doctor__team { margin-top: clamp(80px, 9vw, 152px); }
.lead-doctor__team-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 16px 24px; margin-bottom: 24px; }
.lead-doctor__team-head .text-link { white-space: nowrap; }

/* ---------------------------------------------------------------- 사례 일러스트 (설명용 선 그림 — 실제 사진 아님) */
.case-art-figure { container: art / inline-size; }
.case-art {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}
.case-art__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--fg);
}
.case-art__panel svg { width: 100%; height: auto; aspect-ratio: 4 / 5; overflow: visible; }
.case-art__label {
    position: absolute;
    left: 16px; top: 13px;
    font-size: 12.5px;
    letter-spacing: .04em;
    color: var(--fg-3);
}
.case-art__note {
    margin-top: auto;
    padding: 0 18px 18px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--fg-2);
}
.case-art__note::before {
    content: "";
    display: block;
    width: 14px; height: 1px;
    margin-bottom: 10px;
    background: var(--accent);
}
.case-art__demo {
    position: absolute;
    right: 10px; top: 10px;
    z-index: 1;
    padding: 3px 8px;
    background: var(--bg);
    border: 1px solid var(--rule);
    font-size: 11px;
    letter-spacing: .06em;
    color: var(--fg-2);
}
.case-art svg .ln { fill: none; stroke: currentColor; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.case-art svg .ln--soft { stroke: var(--fg-3); stroke-width: .9; }
.case-art svg .ln--guide { stroke: var(--accent); stroke-width: .9; stroke-dasharray: 3 4; }
.case-art svg .ln--mark { stroke: var(--accent); stroke-width: 1.3; }
.case-art svg .tx { fill: var(--accent); font-family: var(--sans); font-size: 14px; letter-spacing: .01em; }
@container art (max-width: 600px) {
    .case-art svg .tx { display: none; }
    .case-art__label { left: 10px; top: 8px; font-size: 11.5px; }
    .case-art__demo { position: static; grid-column: 1 / -1; padding: 7px 10px; border: 0; font-size: 10.5px; }
    .case-art__note { padding: 0 10px 12px; font-size: 12px; }
}

/* ---------------------------------------------------------------- 상담 과정 (헤어라인 타임라인) */
.process {
    display: grid;
    grid-template-columns: repeat(var(--steps, 6), minmax(0, 1fr));
    border-top: 1px solid var(--rule-strong);
}
.process__step { position: relative; padding: 26px 24px 0 0; }
.process__step::before {
    content: "";
    position: absolute;
    left: 0; top: -4px;
    width: 7px; height: 7px;
    background: var(--bg);
    border: 1px solid var(--rule-strong);
    transform: rotate(45deg);
}
.process__num { display: block; font-size: 15px; color: var(--fg-3); }
.process__title { margin-top: 24px; font-size: 16.5px; font-weight: 450; letter-spacing: -.01em; line-height: 1.5; }
.process__text { margin-top: 10px; font-size: 14px; line-height: 1.8; color: var(--fg-2); }

/* 원칙 셋 — 로마 숫자 */
.principles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(28px, 3.4vw, 64px);
}
.principle { padding-top: 24px; border-top: 1px solid var(--rule); }
.principle__num { font-size: 22px; color: var(--accent); font-style: italic; }
.principle__title { margin-top: 36px; font-size: clamp(19px, 1.5vw, 23px); font-weight: 350; letter-spacing: -.02em; line-height: 1.45; }
.principle__text { margin-top: 14px; max-width: 400px; font-size: 15px; line-height: 1.9; color: var(--fg-2); }

/* ---------------------------------------------------------------- info list · hours */
.info-list > div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--rule);
    font-size: 14px;
    line-height: 1.75;
}
.info-list > div:last-child { border-bottom: 1px solid var(--rule); }
.info-list > div > dt { color: var(--fg-3); }
.info-list__note { display: block; margin-top: 6px; color: var(--fg-3); font-size: 13px; }
.hours > div { display: flex; justify-content: space-between; gap: 16px; }
.hours dt { color: var(--fg-2); }
.hours dd { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- footer */
.site-footer {
    --bg: var(--charcoal-deep);
    padding: clamp(80px, 8vw, 128px) 0 40px;
    background: var(--bg);
    font-size: 13.5px;
    line-height: 1.75;
    color: var(--fg-2);
}
.site-footer__top {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    row-gap: 56px;
}
.site-footer__brand { grid-column: 1 / span 4; }
.site-logo--footer { color: var(--fg); }
.site-logo--footer .site-logo__mark { margin-right: 0; font-size: 26px; }
.site-footer__brand p { margin-top: 28px; max-width: 280px; }
.site-footer__brand .serif { font-style: italic; font-size: 17px; color: var(--fg-3); }
.site-footer__nav {
    grid-column: 5 / span 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--col-gap);
}
.site-footer__nav h2,
.site-footer__hours h2 {
    margin-bottom: 16px;
    font-family: var(--serif);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--fg-3);
}
.site-footer__nav li + li { margin-top: 6px; }
.site-footer__nav a { transition: color .3s var(--ease); }
.site-footer__nav a:hover { color: var(--fg); }
.site-footer__hours { grid-column: 10 / span 3; }
.site-footer__hours span { display: block; font-variant-numeric: tabular-nums; }

.site-footer__bottom {
    margin-top: clamp(72px, 7vw, 112px);
    padding-top: 28px;
    border-top: 1px solid var(--rule);
    font-size: 12px;
    line-height: 1.8;
    color: var(--fg-3);
}
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 0 18px; }
.site-footer__notice { margin-top: 10px; max-width: 820px; }
.site-footer__meta {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}
.site-footer__meta span:last-child { display: flex; gap: 20px; }
.site-footer__meta a:hover { color: var(--fg); }

/* 제작 정보 · 데모 고지 (inc.devteam_credit) — 문구와 항목은 그대로, 모양만 */
.devteam-credit {
    margin-top: 40px;
    padding: 28px 0 0;
    border-top: 1px solid var(--rule);
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    row-gap: 14px;
    font-size: 12px;
    line-height: 1.8;
    color: var(--fg-3);
}
.devteam-credit__title {
    grid-column: 1 / span 3;
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--fg-2);
}
.devteam-credit__notice { grid-column: 4 / span 9; max-width: 760px; color: var(--fg-2); }
.devteam-credit__info {
    grid-column: 4 / span 9;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 22px;
}
.devteam-credit__info > div { display: flex; gap: 8px; }
.devteam-credit__info dt { color: var(--fg-3); }
.devteam-credit__info dd { color: var(--fg-2); }
.devteam-credit__info a { border-bottom: 1px solid var(--rule); }
.devteam-credit__info a:hover { border-bottom-color: currentColor; }

/* ---------------------------------------------------------------- popup (공지 — 기본은 꺼 둔다) */
.popup-layer {
    position: fixed;
    right: var(--gutter);
    bottom: var(--gutter);
    z-index: 60;
    max-width: calc(100vw - 2 * var(--gutter));
    background: var(--bone);
    color: #1C1916;
    border: 1px solid #D8D1C7;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: opacity .6s var(--ease), transform .6s var(--ease), visibility .6s;
}
.popup-layer.is-open { opacity: 1; visibility: visible; transform: none; }
.menu-open .popup-layer { opacity: 0; visibility: hidden; }
.popup-layer__items { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.popup { flex: 0 0 320px; scroll-snap-align: start; }
.popup + .popup { border-left: 1px solid #D8D1C7; }
.popup__media { aspect-ratio: 4 / 3; overflow: hidden; background: #E4DED6; }
.popup__media img { width: 100%; height: 100%; object-fit: cover; }
.popup__body { padding: 24px 26px 26px; }
.popup__title { font-size: 16px; font-weight: 500; letter-spacing: -.01em; line-height: 1.5; }
.popup__text { margin-top: 8px; font-size: 13.5px; line-height: 1.75; color: #4D4741; }
.popup__body .text-link { margin-top: 18px; }
.popup-layer__bar {
    display: flex;
    justify-content: space-between;
    padding: 12px 26px;
    border-top: 1px solid #D8D1C7;
    font-size: 12.5px;
    color: #4D4741;
}
.popup-layer__bar button:hover { color: #1C1916; }

/* ==========================================================================
   공용 컴포넌트 — 내부 페이지 (마크업과 사용법: docs/front-components.md)
   ========================================================================== */

/* ---------------------------------------------------------------- page head (어두운 머리) */
.page-head {
    --bg: var(--charcoal);
    padding: clamp(72px, 9vw, 168px) 0 clamp(64px, 7vw, 120px);
}
.page-head__inner {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: end;
}
.page-head__text { grid-column: 1 / span 8; }
.page-head__title {
    margin-top: 36px;
    font-size: clamp(32px, 4.1vw, 68px);
    font-weight: 260;
    line-height: 1.28;
    letter-spacing: -.04em;
    text-wrap: balance;
}
.page-head__lead {
    grid-column: 9 / span 4;
    font-size: clamp(15px, 1.05vw, 17px);
    line-height: 1.95;
    color: var(--fg-2);
}
.page-head__media { margin-top: clamp(64px, 7vw, 120px); }
/* 어두운 머리 바로 다음의 밝은 본문은 위 여백을 다시 준다 (Master 의 tight-top 은 같은 색 머리를 전제로 했다) */
.page-head + .section--tight-top:not(.consult) { padding-top: clamp(72px, 8vw, 136px); }
.page-head__media--bleed { width: 100%; }
.page-head__lead.reveal { transition-delay: .15s; }
/* 어두운 머리 아래로 이어지는 사진 — 아래 절반은 밝은 면에 걸친다 */
.page-head + .page-head-media { position: relative; }

@media (max-width: 1099px) {
    .page-head__text { grid-column: 1 / span 11; }
    .page-head__lead { grid-column: 1 / span 9; margin-top: 32px; }
}
@media (max-width: 767px) {
    .page-head__text, .page-head__lead { grid-column: 1 / -1; }
    .page-head__title { margin-top: 26px; }
    .page-head__lead { margin-top: 26px; }
}

/* ---------------------------------------------------------------- facts (헤어라인 정보 표) */
.facts { border-top: 1px solid var(--rule); }
.facts > div {
    display: grid;
    grid-template-columns: minmax(96px, 30%) minmax(0, 1fr);
    column-gap: var(--col-gap);
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
    line-height: 1.75;
}
.facts dt { font-size: 13.5px; color: var(--fg-3); letter-spacing: .01em; }
.facts dd { color: var(--fg); }
.facts a,
.prose a { border-bottom: 1px solid var(--fg-3); transition: border-color .3s var(--ease); }
.facts a:hover,
.prose a:hover { border-bottom-color: currentColor; }
.facts--strong { border-top-color: var(--rule-strong); }
@media (max-width: 519px) {
    .facts > div { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
}

/* ---------------------------------------------------------------- faq (<details> · JS 없음) */
.faq { border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    padding: 23px 0;
    font-size: 16px;
    line-height: 1.65;
    cursor: pointer;
    list-style: none;
    transition: color .3s var(--ease);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::marker { content: ""; }
.faq__icon {
    position: relative;
    flex: none;
    width: 13px;
    height: 13px;
    margin-top: calc((1.65em - 13px) / 2);
}
.faq__icon::before,
.faq__icon::after {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 6px;
    height: 1px;
    background: currentColor;
    transition: transform .45s var(--ease);
}
.faq__icon::after { transform: rotate(90deg); }
.faq__item[open] > .faq__q .faq__icon::after { transform: rotate(0deg); }
.faq__a {
    max-width: 40em;
    padding: 0 37px 28px 0;
    font-size: 15px;
    line-height: 1.95;
    color: var(--fg-2);
}
.faq__a p + p { margin-top: .9em; }
@media (hover: hover) {
    .faq__q:hover { color: var(--fg-2); }
}

/* ---------------------------------------------------------------- subnav (앵커 서브내비) */
/* 페이지 루트 <div> 바로 안에 둔다. 헤더가 숨으면 맨 위로 올라간다. */
.subnav {
    position: sticky;
    top: var(--header-h);
    z-index: 40;
    background: rgba(243, 240, 235, .95);
    -webkit-backdrop-filter: saturate(120%) blur(12px);
    backdrop-filter: saturate(120%) blur(12px);
    border-bottom: 1px solid var(--rule);
    transition: top .6s var(--ease);
}
.subnav.is-dark { background: rgba(25, 23, 21, .95); }
body:has(.site-header.is-hidden) .subnav { top: 0; }
.subnav__list {
    display: flex;
    gap: clamp(24px, 2.8vw, 48px);
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 var(--gutter);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.subnav__list::-webkit-scrollbar { display: none; }
.subnav__list::after { content: ""; flex: 0 0 1px; }
.subnav__list a {
    position: relative;
    display: block;
    padding: 17px 0 16px;
    font-size: 14px;
    letter-spacing: .03em;
    white-space: nowrap;
    color: var(--fg-2);
    transition: color .3s var(--ease);
}
.subnav__list a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease);
}
.subnav__list a:hover,
.subnav__list a.is-current,
.subnav__list a[aria-current="true"] { color: var(--fg); }
.subnav__list a:hover::after,
.subnav__list a.is-current::after,
.subnav__list a[aria-current="true"]::after { transform: scaleX(1); }
.subnav__list a:focus-visible { outline-offset: -3px; }
.subnav__count { margin-left: 7px; font-size: 12px; letter-spacing: 0; color: var(--fg-3); font-variant-numeric: tabular-nums; }
html:has(.subnav) { scroll-padding-top: calc(var(--header-h) + 72px); }

/* ---------------------------------------------------------------- forms (상담 신청) */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px var(--col-gap);
}
.form-grid > .field--full { grid-column: 1 / -1; }
.field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}
.field__label {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
    padding: 0;
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--fg-2);
}
.field__req { font-size: 11px; letter-spacing: .06em; color: var(--fg-3); }
.field__input {
    display: block;
    width: 100%;
    min-height: 52px;
    margin: 0;
    padding: 12px 0 11px;
    border: 0;
    border-bottom: 1px solid var(--fg-3);
    border-radius: 0;
    background: transparent;
    color: var(--fg);
    font: inherit;
    font-size: 16px;
    line-height: 1.6;
    transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.field__input::placeholder { color: var(--fg-3); opacity: 1; }
.field__input:hover { border-bottom-color: var(--fg-2); }
.field__input:focus,
.field__input:focus-visible {
    outline: none;
    border-bottom-color: var(--fg);
    box-shadow: 0 1px 0 0 var(--fg);
}
.field__input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--bg) inset; -webkit-text-fill-color: var(--fg); }
.field__input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 1000px var(--bg) inset, 0 1px 0 0 var(--fg); }
textarea.field__input { min-height: 148px; resize: vertical; }
select.field__input { -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer; }
select.field__input option { color: #1C1916; background: #F3F0EB; }
.field__select { position: relative; }
.field__select::after {
    content: "";
    position: absolute;
    right: 6px; top: 50%;
    width: 7px; height: 7px;
    border-right: 1px solid var(--fg-2);
    border-bottom: 1px solid var(--fg-2);
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
}
.field__input[aria-invalid="true"],
.field.is-invalid .field__input { border-bottom-color: var(--error); }
.field__hint,
.field__error { margin-top: 8px; font-size: 13px; line-height: 1.6; }
.field__hint { color: var(--fg-3); }
.field__error { color: var(--error); }

.check {
    position: relative;
    display: inline-flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14.5px;
    line-height: 1.7;
    cursor: pointer;
}
.check input {
    position: absolute;
    left: 0; top: 3px;
    width: 18px; height: 18px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.check__box {
    position: relative;
    flex: none;
    width: 18px; height: 18px;
    margin-top: 3px;
    border: 1px solid var(--fg-2);
    transition: background-color .2s, border-color .2s;
}
.check input:checked + .check__box { background: var(--fg); border-color: var(--fg); }
.check input:checked + .check__box::after {
    content: "";
    position: absolute;
    left: 5px; top: 1px;
    width: 5px; height: 10px;
    border-right: 1.5px solid var(--bg);
    border-bottom: 1.5px solid var(--bg);
    transform: rotate(45deg);
}
.check input:focus-visible + .check__box { outline: 1px solid var(--fg); outline-offset: 3px; }
.check input[aria-invalid="true"] + .check__box { border-color: var(--error); }
.check a { border-bottom: 1px solid currentColor; }

.choices { display: flex; flex-wrap: wrap; gap: 6px 28px; padding-top: 6px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.choice span {
    display: inline-block;
    padding: 10px 0 9px;
    font-size: 15px;
    color: var(--fg-2);
    border-bottom: 1px solid transparent;
    transition: color .3s var(--ease), border-color .3s var(--ease);
}
.choice:hover span { color: var(--fg); }
.choice input:checked + span { color: var(--fg); border-bottom-color: var(--fg); }
.choice input:focus-visible + span { outline: 1px solid var(--fg); outline-offset: 4px; }

.hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 36px; margin-top: 52px; }

@media (max-width: 767px) {
    .form-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---------------------------------------------------------------- blocks (콘텐츠 블록 — docs/blocks.md) */
.blocks { container: blocks / inline-size; width: 100%; }
.blocks > * + * { margin-top: clamp(88px, 9vw, 160px); }

.block__heading {
    margin-bottom: 28px;
    font-size: clamp(20px, 1.55vw, 25px);
    font-weight: 350;
    line-height: 1.5;
    letter-spacing: -.022em;
}
.prose {
    max-width: 40em;
    font-size: clamp(15.5px, 1.08vw, 17px);
    line-height: 1.98;
    color: var(--fg-2);
}
.prose p + p { margin-top: 1.1em; }

@container blocks (min-width: 900px) {
    .block--text,
    .block--list,
    .block--steps,
    .block--facts,
    .block--faq,
    .block--notice,
    .block--quote,
    .block--image-medium,
    .block--cta {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        column-gap: var(--col-gap);
        align-items: start;
    }
    .block > .block__heading { grid-column: 1 / span 4; margin-bottom: 0; }
    .block > .block__content { grid-column: 6 / span 7; }
}

.block__media-link { display: block; }
.block__media-link .media img { transition: opacity .5s var(--ease); }
.block__media-link:hover .media img { opacity: .9; }
.block--image figcaption { display: flex; align-items: center; gap: 12px; }
@container blocks (min-width: 900px) {
    .block--image-medium > * { grid-column: 6 / span 5; }
}

/* 좁은 칸(모바일): 그림은 본문 폭 전체 — 좌우로 번갈거나 한쪽으로 밀린 좁은 칸을 두지 않는다 */
.block-image-text__media + .block-image-text__body { margin-top: 36px; }
@container blocks (min-width: 700px) and (max-width: 899px) {
    .block--image-medium { width: 76%; margin-left: auto; }
}
.block-image-text__body .text-link { margin-top: 36px; }
@container blocks (min-width: 700px) {
    .block--image-text {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        column-gap: var(--col-gap);
        align-items: start;             /* 그림과 글이 같은 윗선에서 시작한다 */
    }
    .block-image-text__media + .block-image-text__body { margin-top: 0; }
    .block--image-left .block-image-text__media { grid-column: 1 / span 5; }
    .block--image-left .block-image-text__body { grid-column: 7 / span 5; }
    .block--image-right .block-image-text__media { grid-column: 8 / span 5; grid-row: 1; }
    .block--image-right .block-image-text__body { grid-column: 1 / span 5; grid-row: 1; }
}

.block-quote__text p {
    font-size: clamp(23px, 2.2vw, 36px);
    font-weight: 280;
    line-height: 1.55;
    letter-spacing: -.03em;
}
.block-quote__cite {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    font-size: 13.5px;
    color: var(--fg-2);
}
.block-quote__cite::before {
    content: "";
    flex: none;
    width: 24px; height: 1px;
    background: currentColor;
    opacity: .55;
}
@container blocks (min-width: 900px) {
    .block--quote > * { grid-column: 6 / span 7; }
}

.block-list { border-top: 1px solid var(--rule); counter-reset: blist; }
.block-list li {
    position: relative;
    padding: 17px 0 17px 44px;
    border-bottom: 1px solid var(--rule);
    font-size: 15.5px;
    line-height: 1.75;
    counter-increment: blist;
}
.block-list li::before {
    content: counter(blist, decimal-leading-zero);
    position: absolute;
    left: 0; top: 17px;
    font-family: var(--serif);
    font-size: 15px;
    line-height: 1.75;
    color: var(--fg-3);
    font-variant-numeric: lining-nums tabular-nums;
}

.block-steps { border-top: 1px solid var(--rule-strong); }
.block-steps__item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 12px;
    padding: 24px 0 26px;
    border-bottom: 1px solid var(--rule);
}
.block-steps__index {
    padding-top: .2em;
    font-family: var(--serif);
    font-size: 16px;
    color: var(--fg-3);
    font-variant-numeric: lining-nums tabular-nums;
}
.block-steps__title { font-size: 17px; font-weight: 450; line-height: 1.6; letter-spacing: -.01em; }
.block-steps__body {
    grid-column: 2;
    margin-top: 6px;
    font-size: 15px;
    line-height: 1.88;
    color: var(--fg-2);
}
.block-steps__body p + p { margin-top: .8em; }
@container blocks (min-width: 700px) {
    .block-steps__item { grid-template-columns: 60px minmax(0, 30%) minmax(0, 1fr); column-gap: var(--col-gap); }
    .block-steps__body { grid-column: 3; margin-top: 0; }
}

.block-notice { border-top: 1px solid var(--rule-strong); }
.block-notice li {
    position: relative;
    padding: 15px 0 15px 28px;
    border-bottom: 1px solid var(--rule);
    font-size: 14.5px;
    line-height: 1.8;
    color: var(--fg-2);
}
.block-notice li::before {
    content: "";
    position: absolute;
    left: 0; top: calc(15px + .9em);
    width: 12px; height: 1px;
    background: var(--fg-3);
}

/* 갤러리 — 나란한 그림은 같은 크기 · 같은 윗선. 1장은 모바일에서 본문 폭 전체 */
.block--gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--col-gap); row-gap: 40px; align-items: start; }
.block-gallery--single > * { grid-column: 1 / -1; }
@container blocks (min-width: 560px) {
    .block--gallery { row-gap: 56px; }
}
@container blocks (min-width: 700px) and (max-width: 899px) {
    .block-gallery--single > * { width: 76%; justify-self: end; }
}
@container blocks (min-width: 900px) {
    .block--gallery { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: clamp(56px, 5vw, 88px); }
    .block--gallery > * { grid-column: span 4; }
    .block-gallery--single > * { grid-column: 6 / span 5; }
    .block-gallery--pair > :nth-child(1) { grid-column: 1 / span 5; }
    .block-gallery--pair > :nth-child(2) { grid-column: 8 / span 5; }
}
.block--gallery > :nth-child(3n + 2) { transition-delay: .12s; }
.block--gallery > :nth-child(3n) { transition-delay: .24s; }

.block--cta { border-top: 1px solid var(--rule-strong); padding-top: clamp(36px, 3.8vw, 60px); }
.block-cta__heading {
    font-size: clamp(25px, 2.5vw, 42px);
    font-weight: 280;
    line-height: 1.45;
    letter-spacing: -.032em;
    text-wrap: balance;
}
.block-cta__aside { margin-top: 28px; }
.block-cta__aside .button { margin-top: 36px; }
@container blocks (min-width: 900px) {
    .block--cta { align-items: end; }
    .block-cta__heading { grid-column: 1 / span 6; }
    .block-cta__aside { grid-column: 8 / span 5; margin-top: 0; }
    .block-cta__aside .button:first-child { margin-top: 0; }
}

/* ---------------------------------------------------------------- tablet */
@media (max-width: 1099px) {
    .section-head > :first-child { grid-column: 1 / span 12; }
    .section-head > :last-child:not(:first-child) { grid-column: 1 / span 9; margin-top: 32px; }

    .chapters__visual { display: none; }
    .chapters__list { grid-column: 1 / -1; }
    .chapter { min-height: 0; }
    /* 좁은 화면: 분류마다 그림. 좌우로 번갈지 않고 모두 같은 왼쪽 축에 */
    .chapter__media { display: block; width: 46%; margin-bottom: 40px; }

    .lead-doctor__figure { grid-column: 1 / span 6; }
    .lead-doctor__body { grid-column: 7 / span 6; }

    .principles { grid-template-columns: minmax(0, 1fr); row-gap: 40px; }
    .principle__title { margin-top: 20px; }
    .process { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 48px; border-top: 0; }
    .process__step { border-top: 1px solid var(--rule-strong); }

    .site-footer__brand { grid-column: 1 / span 12; }
    .site-footer__nav { grid-column: 1 / span 7; }
    .site-footer__hours { grid-column: 8 / span 5; }
    .devteam-credit__title,
    .devteam-credit__notice,
    .devteam-credit__info { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- mobile */
@media (max-width: 767px) {
    /* 모바일: 그림은 본문 폭 전체. 정사각 판으로 높이를 눌러 둔다 */
    .chapter__media { width: 100%; }
    .chapter__media .media { aspect-ratio: 1 / 1; }
    .chapter__head { column-gap: 20px; }

    .lead-doctor__figure, .lead-doctor__body { grid-column: 1 / -1; }
    .lead-doctor__body { margin-top: 48px; }

    .ratio-21x9 { aspect-ratio: 4 / 3; }

    .process { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
    .process__step { padding: 22px 0 26px 0; display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; }
    .process__step::before { display: none; }
    .process__num { grid-row: 1 / span 2; padding-top: 3px; }
    .process__title { margin-top: 0; }
    .process__text { grid-column: 2; }

    .info-list > div { grid-template-columns: 1fr; gap: 8px; }

    .index-list__link { grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; }

    .site-footer__nav { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
    .site-footer__hours { grid-column: 1 / -1; }
    .site-footer__meta { flex-direction: column; }
    .demo-bar__text { padding-top: 8px; padding-bottom: 8px; gap: 2px 10px; font-size: 11.5px; line-height: 1.55; }
    .demo-bar__link { margin-left: 0; }

    .popup-layer { left: 12px; right: 12px; bottom: 12px; max-width: none; }
    .popup { flex-basis: 100%; }
    .popup + .popup { border-left: 0; }
    .popup__media { display: none; }
}

/* ---------------------------------------------------------------- touch targets */
/* 손가락 화면: 글자 크기와 밑줄 위치는 그대로, 누르는 높이만 44px 안팎으로 */
@media (pointer: coarse) {
    .text-link,
    .site-logo,
    .site-header__menu,
    .demo-bar__link { position: relative; }
    .text-link::before,
    .site-logo::before,
    .site-header__menu::before,
    .demo-bar__link::before {
        content: "";
        position: absolute;
        inset: -10px -6px;
    }
    /* 메뉴 버튼: 옆 누름 폭은 안쪽 여백으로(같은 만큼 바깥 여백을 빼서 자리는 그대로) — 칸 밖으로 넘치지 않게 */
    .site-header__menu { padding-left: 12px; padding-right: 12px; margin: 0 -12px; }
    .site-header__menu::before { inset: -6px 0; }
    .demo-bar__link::before { inset: -12px 0; }   /* 옆으로는 넓히지 않는다 — 칸 밖으로 넘치지 않게 */
    .facts a,
    .prose a { position: relative; }
    .facts a::before,
    .prose a::before { content: ""; position: absolute; inset: -12px -4px; }

    .site-footer__nav li + li { margin-top: 0; }
    .site-footer__nav h2 { margin-bottom: 4px; }
    .site-footer__nav a { display: block; padding: 10px 0; }
    .site-footer__meta a,
    .site-menu__info a,
    .devteam-credit__info a,
    .popup-layer__bar button { display: inline-block; padding: 12px 0; margin: -12px 0; }
}

/* ---------------------------------------------------------------- motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
    .js .reveal { opacity: 1; transform: none; }
    .js .hero__content > * { opacity: 1; transform: none; }
    .js .hero__media img { transform: none; }
}
