:root {
  --cream: #f7f2e8;
  --sand: #e9e0cd;
  --beige: #cfc6b2;
  --navy: #1f2a5c;
  --navy-soft: #3a4580;
  --ink: #2b2a27;
  --muted: #6f6b61;
  --white: #fff;
  --radius: 24px;
  --shadow: 0 10px 30px rgba(31, 42, 92, 0.08);
  --max: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body {
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  word-break: keep-all;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.section { padding: 96px 0; }
.section.alt { background: var(--white); }
.eyebrow { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy-soft); font-weight: 700; margin-bottom: 12px; }
h1, h2, h3 { line-height: 1.35; letter-spacing: -0.02em; }
h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 700; margin-bottom: 16px; }
h3 { font-size: 20px; font-weight: 700; }
.lead { color: var(--muted); font-size: 17px; max-width: 640px; }
.section-head { margin-bottom: 48px; }

/* 헤더 */
.header { position: sticky; top: 0; z-index: 50; background: rgba(247, 242, 232, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(207, 198, 178, 0.6); }
.header .container { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo img { height: 42px; width: auto; filter: brightness(0.5) saturate(1.2); }
.nav { display: flex; gap: 36px; font-weight: 500; }
.nav a { position: relative; padding: 6px 0; color: var(--ink); }
.nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--navy); transition: width 0.25s; }
.nav a:hover::after, .nav a.active::after { width: 100%; }
.nav a.active { color: var(--navy); font-weight: 700; }
.header-tel { display: inline-flex; align-items: center; gap: 8px; background: var(--navy); color: var(--white); padding: 10px 20px; border-radius: 999px; font-weight: 700; font-size: 15px; transition: background 0.2s; }
.header-tel:hover { background: var(--navy-soft); }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.menu-btn span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 6px auto; transition: transform 0.25s, opacity 0.25s; }
.menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 999px; font-weight: 700; border: 1.5px solid var(--navy); transition: transform 0.2s, background 0.2s, color 0.2s; cursor: pointer; font-size: 16px; font-family: inherit; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-soft); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: var(--white); }

/* 히어로 */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero .container { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1px solid var(--beige); padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; margin-bottom: 24px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #a8a396; }
.dot.on { background: #2f9e6b; box-shadow: 0 0 0 4px rgba(47, 158, 107, 0.2); }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--navy); background: linear-gradient(transparent 62%, var(--sand) 62%); }
.hero p { color: var(--muted); font-size: 18px; margin-bottom: 36px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual img.photo { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: 200px 200px var(--radius) var(--radius); box-shadow: var(--shadow); }
.hero-visual .symbol { position: absolute; left: -36px; bottom: -28px; width: 120px; background: var(--cream); border-radius: 50%; padding: 22px; box-shadow: var(--shadow); }
.hero-keywords { display: flex; gap: 28px; margin-top: 48px; flex-wrap: wrap; }
.hero-keywords span { font-weight: 700; color: var(--navy); font-size: 15px; }
.hero-keywords span small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }

/* 퀵 정보 */
.quick { margin-top: -48px; position: relative; z-index: 2; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; background: var(--navy); color: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.quick-item { padding: 32px 36px; border-right: 1px solid rgba(255, 255, 255, 0.14); }
.quick-item:last-child { border-right: 0; }
.quick-item h3 { font-size: 15px; font-weight: 500; opacity: 0.75; margin-bottom: 10px; }
.quick-item p { font-size: 20px; font-weight: 700; line-height: 1.5; }
.quick-item p small { display: block; font-size: 14px; font-weight: 400; opacity: 0.75; }

/* 서비스 카드 */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--cream); border-radius: var(--radius); padding: 36px 32px; transition: transform 0.25s, box-shadow 0.25s; display: block; }
.section:not(.alt) .card { background: var(--white); }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card .icon { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; margin-bottom: 24px; }
.card .icon img { width: 34px; height: 34px; object-fit: contain; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; }
.card .more { display: inline-block; margin-top: 18px; color: var(--navy); font-weight: 700; font-size: 14px; }

/* 원장 */
.doctor { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: center; }
.doctor-photo { background: var(--sand); border-radius: var(--radius); padding: 40px 40px 0; overflow: hidden; }
.doctor-photo img { margin-inline: auto; width: 100%; max-width: 380px; }
.doctor .role { color: var(--navy-soft); font-weight: 700; margin-bottom: 4px; }
.doctor .name { font-size: 36px; font-weight: 800; margin-bottom: 24px; }
.doctor blockquote { font-size: 20px; line-height: 1.8; color: var(--ink); padding-left: 20px; border-left: 3px solid var(--navy); margin-bottom: 32px; }

/* 갤러리 */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery button { border: 0; padding: 0; cursor: zoom-in; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--sand); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery button:hover img { transform: scale(1.06); }
.lightbox { position: fixed; inset: 0; background: rgba(20, 22, 40, 0.9); display: none; place-items: center; z-index: 100; padding: 24px; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 88vh; border-radius: 12px; }
.lightbox .close { position: absolute; top: 20px; right: 24px; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; line-height: 1; }

/* 서브 페이지 */
.page-hero { background: var(--sand); padding: 72px 0 64px; }
.page-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; margin-bottom: 12px; }
.page-hero p { color: var(--muted); font-size: 17px; max-width: 620px; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value { background: var(--white); border-radius: var(--radius); padding: 36px 32px; }
.value b { display: block; font-size: 26px; color: var(--navy); margin-bottom: 4px; }
.value .ko { font-weight: 700; margin-bottom: 12px; }
.value p { color: var(--muted); font-size: 15px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split img { border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.checklist li { padding: 10px 0 10px 32px; position: relative; border-bottom: 1px solid var(--sand); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 12px; height: 7px; border-left: 2.5px solid var(--navy); border-bottom: 2.5px solid var(--navy); transform: rotate(-45deg); }

.profile { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.profile .box { background: var(--white); border-radius: var(--radius); padding: 32px; }
.profile h3 { font-size: 17px; margin-bottom: 14px; color: var(--navy); }
.profile li { font-size: 15px; padding: 5px 0 5px 16px; position: relative; color: var(--ink); }
.profile li::before { content: ""; position: absolute; left: 0; top: 17px; width: 5px; height: 5px; border-radius: 50%; background: var(--beige); }

/* 진료분야 */
.subnav { position: sticky; top: 76px; z-index: 40; background: var(--cream); border-bottom: 1px solid var(--sand); }
.subnav .container { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0; scrollbar-width: none; }
.subnav .container::-webkit-scrollbar { display: none; }
.subnav a { white-space: nowrap; padding: 8px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; border: 1px solid var(--beige); background: var(--white); transition: all 0.2s; }
.subnav a:hover, .subnav a.on { background: var(--navy); color: var(--white); border-color: var(--navy); }
.svc { padding: 72px 0; border-bottom: 1px solid var(--sand); }
.svc:nth-of-type(even) { background: var(--white); }
.svc .container { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; }
.svc .num { font-size: 14px; font-weight: 700; color: var(--navy-soft); letter-spacing: 0.15em; margin-bottom: 8px; }
.svc h2 { font-size: 30px; }
.svc .intro { color: var(--muted); }
.svc-body p { margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags span { background: var(--sand); padding: 6px 14px; border-radius: 999px; font-size: 14px; }
.svc:nth-of-type(even) .tags span { background: var(--cream); }
.svc-body h3 { font-size: 16px; color: var(--navy); margin: 24px 0 10px; }
.svc-body h3:first-child { margin-top: 0; }
.svc-body .checklist li { font-size: 15px; }
.notice { background: var(--sand); border-radius: 16px; padding: 18px 22px; font-size: 14px; color: var(--muted); margin-top: 24px; }

/* 접수 / 오시는 길 */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: s; }
.step { background: var(--white); border-radius: var(--radius); padding: 36px 32px; position: relative; }
.step::before { counter-increment: s; content: "0" counter(s); font-size: 32px; font-weight: 800; color: var(--beige); display: block; margin-bottom: 12px; }
.step p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-box { background: var(--white); border-radius: var(--radius); padding: 36px; }
.info-box h3 { margin-bottom: 20px; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { text-align: left; padding: 14px 0; border-bottom: 1px solid var(--sand); font-size: 16px; }
.hours th { font-weight: 500; color: var(--muted); width: 40%; }
.hours td { font-weight: 700; }
.hours tr.today th, .hours tr.today td { color: var(--navy); }
.hours tr.today td::after { content: " · 오늘"; font-size: 13px; font-weight: 500; }
.way dt { font-weight: 700; margin-top: 18px; color: var(--navy); }
.way dt:first-child { margin-top: 0; }
.way dd { color: var(--ink); font-size: 15px; }
.cta-band { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { opacity: 0.8; }
.cta-band .btn-primary { background: var(--white); color: var(--navy); border-color: var(--white); }
.cta-band .btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, 0.5); }
.cta-band .btn-ghost:hover { background: var(--white); color: var(--navy); }

/* 푸터 */
.footer { background: #20233f; color: rgba(255, 255, 255, 0.72); padding: 64px 0 40px; font-size: 14px; }
.footer .top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; margin-bottom: 40px; }
.footer img { height: 40px; width: auto; margin-bottom: 20px; }
.footer address { font-style: normal; line-height: 2; }
.footer .links { display: flex; gap: 24px; flex-wrap: wrap; align-content: flex-start; }
.footer .links a:hover { color: var(--white); }
.footer .bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 24px; font-size: 13px; opacity: 0.7; }

/* 모바일 하단 고정 바 */
.mobile-bar { display: none; }

/* 반응형 */
@media (max-width: 960px) {
  .section { padding: 72px 0; }
  .hero .container, .doctor, .split, .svc .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual .symbol { left: 12px; bottom: -24px; width: 96px; }
  .cards, .values, .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .info-grid, .profile { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .quick-item { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
  .quick-item:last-child { border-bottom: 0; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 130px; }
  .menu-btn { display: block; }
  .header-tel { display: none; }
  .nav { position: absolute; top: 76px; left: 0; right: 0; background: var(--cream); flex-direction: column; gap: 0; padding: 8px 20px 20px; border-bottom: 1px solid var(--beige); display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 16px 0; border-bottom: 1px solid var(--sand); font-size: 17px; }
  .cards, .values, .steps { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .cta-band { padding: 36px 28px; }
  .hero { padding-top: 48px; }
  body { padding-bottom: 64px; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12); }
  .mobile-bar a { padding: 18px 0; text-align: center; font-weight: 700; background: var(--white); color: var(--navy); }
  .mobile-bar a:first-child { background: var(--navy); color: var(--white); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
