/* OP Clinic 홍보 사이트 공통 스타일 (태국어 우선 모바일 레이아웃) */
@font-face {
  font-family: "Noto Sans Thai";
  src: url("fonts/NotoSansThai.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0E00-0E7F, U+200C-200D, U+25CC;
}

:root {
  --paper: #f7f3ec;
  --paper-2: #efe7da;
  --ink: #1d2721;
  --muted: #4c5850;
  --forest: #1f4d3a;
  --forest-deep: #143326;
  --ochre: #c48a36;
  --ochre-soft: #e8cfa4;
  --ochre-ink: #85571a;
  --on-dark: #f4efe6;
  --on-dark-muted: #c9d3cc;
  --line: #dcd2c2;
  --font: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar-h: 4.75rem;
  --wrap: 72rem;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.75;
  overflow-wrap: break-word;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}
html[lang="en"] body { line-height: 1.6; }
body.offline-page { padding-bottom: 0; }

h1, h2, h3 { margin: 0 0 .6em; font-weight: 700; color: var(--forest-deep); }
h1 { font-size: clamp(1.9rem, 7.2vw, 3.5rem); line-height: 1.32; letter-spacing: -.01em; }
h2 { font-size: clamp(1.55rem, 5vw, 2.3rem); line-height: 1.35; }
h3 { font-size: 1.15rem; line-height: 1.45; }
html[lang="en"] h1 { line-height: 1.15; letter-spacing: -.02em; }
html[lang="en"] h2 { line-height: 1.2; }
p { margin: 0 0 1em; }
a { color: var(--forest); }
address { font-style: normal; }

:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 1rem; top: -5rem; z-index: 50;
  padding: .75rem 1rem; background: var(--forest-deep); color: var(--on-dark);
  border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .7rem 1.35rem;
  border: 2px solid var(--forest); border-radius: 999px;
  font: inherit; font-weight: 600; line-height: 1.3; text-align: center; text-decoration: none;
  cursor: pointer;
}
.btn-primary { background: var(--forest); color: var(--on-dark); }
.btn-primary:hover { background: var(--forest-deep); border-color: var(--forest-deep); }
.btn-ghost { background: transparent; color: var(--forest); }
.btn-ghost:hover { background: var(--paper-2); }
.btn-light { background: var(--on-dark); color: var(--forest-deep); border-color: var(--on-dark); }
.btn-small { min-height: 44px; padding: .45rem 1rem; }
.btn:disabled { opacity: .6; cursor: progress; }

/* 헤더 */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  max-width: var(--wrap); margin: 0 auto; padding: .6rem var(--pad);
}
.brand { display: flex; flex-direction: column; text-decoration: none; min-height: 44px; justify-content: center; }
.brand-mark {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem; font-weight: 700; letter-spacing: .01em; line-height: 1.1; color: var(--forest-deep);
}
.brand-th { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.header-tools { display: flex; align-items: center; gap: .5rem; }

.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 40px; padding: 0 .6rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600; text-decoration: none; color: var(--muted);
}
.lang a[aria-current="page"] { background: var(--forest); color: var(--on-dark); }

.menu-toggle {
  min-height: 44px; min-width: 44px; padding: 0 1rem;
  border: 1px solid var(--forest); border-radius: 999px; background: transparent;
  color: var(--forest); font: inherit; font-weight: 600; cursor: pointer;
}
.menu-toggle[aria-expanded="true"] { background: var(--forest); color: var(--on-dark); }
html:not(.js) .menu-toggle { display: none; }

.site-nav ul {
  list-style: none; margin: 0 auto; padding: 0 var(--pad) .5rem; max-width: var(--wrap);
  display: flex; flex-wrap: wrap; gap: 0 1.25rem;
}
.site-nav a {
  display: flex; align-items: center; min-height: 44px;
  text-decoration: none; color: var(--ink); font-weight: 500;
}
.site-nav a:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 4px; }
.js .site-nav { display: none; }
.js .site-nav.is-open { display: block; border-top: 1px solid var(--line); }
.js .site-nav.is-open ul { flex-direction: column; padding-top: .25rem; padding-bottom: .75rem; }
.js .site-nav.is-open a { border-bottom: 1px solid var(--line); font-size: 1.1rem; }

.update-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  max-width: var(--wrap); margin: 0 auto; padding: .5rem var(--pad) .75rem;
}
.update-banner p { margin: 0; font-weight: 600; color: var(--forest-deep); }

/* 첫 화면 */
.hero {
  display: grid; gap: 1.5rem;
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(2rem, 7vw, 5rem) var(--pad) clamp(2.5rem, 6vw, 4.5rem);
}
.eyebrow {
  margin-bottom: 1rem; color: var(--ochre-ink); font-weight: 600; font-size: .95rem; letter-spacing: .06em;
}
.lead { font-size: clamp(1.08rem, 2.6vw, 1.25rem); color: var(--muted); max-width: 38rem; }
.hours-line {
  display: inline-block; padding: .2rem 0 .2rem .85rem;
  border-left: 3px solid var(--ochre); font-weight: 600; color: var(--forest-deep);
}
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-art { width: 100%; height: auto; max-height: 300px; }

.hero-art .sun { fill: var(--ochre-soft); }
.hero-art .flow { fill: none; stroke: var(--forest); stroke-linecap: round; }
.hero-art .flow-1 { stroke-width: 2.5; opacity: .85; animation: drift 16s ease-in-out infinite alternate; }
.hero-art .flow-2 { stroke-width: 1.6; opacity: .55; animation: drift 21s ease-in-out infinite alternate-reverse; }
.hero-art .flow-3 { stroke: var(--ochre); stroke-width: 1.4; opacity: .7; animation: drift 26s ease-in-out infinite alternate; }
.hero-art .stem { fill: none; stroke: var(--forest-deep); stroke-width: 2.2; stroke-linecap: round; }
.hero-art .leaf { fill: var(--forest); opacity: .9; }
.hero-art .leaf-2 { opacity: .7; }
.hero-art .leaf-3 { fill: var(--ochre); opacity: .75; }
.hero-art .sprig {
  transform-box: view-box; transform-origin: 122px 318px;
  animation: sway 9s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-14px); } }
@keyframes sway { from { transform: rotate(-2.5deg); } to { transform: rotate(2.5deg); } }

/* 공통 섹션 */
.section {
  max-width: var(--wrap); margin: 0 auto;
  padding: clamp(3rem, 8vw, 5.5rem) var(--pad);
}
.section > h2::before {
  content: ""; display: block; width: 2.5rem; height: 3px; margin-bottom: 1rem;
  background: var(--ochre);
}
.section-tint { max-width: none; background: var(--paper-2); }
.section-tint > * { max-width: calc(var(--wrap) - 2 * var(--pad)); margin-left: auto; margin-right: auto; }
.section-intro { color: var(--muted); max-width: 40rem; margin-bottom: 2rem; }
.note { color: var(--muted); font-size: .95rem; }

/* 서비스 */
.services { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0; }
.services li { padding: 1.5rem 0; border-top: 1px solid var(--line); }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services h3 { font-size: clamp(1.3rem, 3.6vw, 1.6rem); color: var(--forest); }
.services p { margin: 0; max-width: 34rem; }

/* 첫 방문 단계 */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 1.75rem; }
.steps li { counter-increment: step; position: relative; padding-left: 3.75rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.15rem;
  font-family: Georgia, "Times New Roman", serif; font-size: 2.2rem; line-height: 1; color: var(--ochre-ink);
}
.steps li::after {
  content: ""; position: absolute; left: 1.05rem; top: 2.6rem; bottom: -1.4rem; width: 1px; background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps p { margin: 0; color: var(--muted); }

/* 방문 준비 */
.checklist { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: .9rem; max-width: 42rem; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before {
  content: ""; position: absolute; left: .2rem; top: .55em;
  width: .8rem; height: .8rem; border-radius: 0 70% 0 70%; background: var(--forest);
}
.caution {
  max-width: 42rem; padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-left: 4px solid var(--forest); background: var(--paper-2);
}
.caution p { margin: 0; }

/* FAQ */
.faq { max-width: 46rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 56px; padding: .85rem 0; cursor: pointer;
  font-weight: 600; color: var(--forest-deep); list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 1.75rem; text-align: center;
  font-size: 1.5rem; line-height: 1; color: var(--ochre-ink);
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding: 0 0 1.25rem; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

/* 주소·시간·지도 */
.visit { background: var(--forest-deep); color: var(--on-dark); }
.visit-inner {
  display: grid; gap: 2.5rem;
  max-width: var(--wrap); margin: 0 auto; padding: clamp(3rem, 8vw, 5.5rem) var(--pad);
}
.visit h2, .visit h3 { color: var(--on-dark); }
.visit h3 { margin-top: 1.75rem; color: var(--ochre-soft); font-size: 1rem; letter-spacing: .04em; }
.visit h2 + h3 { margin-top: 0; }
.visit address { font-size: 1.15rem; }
.clinic-name { font-weight: 700; }
.visit .note, .address-original { color: var(--on-dark-muted); }
.address-original .label { display: block; font-size: .9rem; }
.hours { width: 100%; max-width: 26rem; border-collapse: collapse; }
.hours th, .hours td { padding: .55rem 0; border-bottom: 1px solid rgba(244, 239, 230, .18); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours .is-closed { color: var(--ochre-soft); }
.map-block h3 { margin-top: 0; }
.map-frame {
  position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 60vh;
  border-radius: 14px; overflow: hidden; background: var(--forest);
}
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-block .note { margin-top: .9rem; }

/* 예약 상태 */
.status { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: 1.25rem; }
.status-label { color: var(--muted); }
.status-pill {
  display: inline-block; padding: .3rem .9rem; border: 1.5px solid var(--ochre-ink); border-radius: 999px;
  color: var(--ochre-ink); font-weight: 700; line-height: 1.5;
}
#booking > p { max-width: 42rem; }

/* 푸터 */
.site-footer { background: var(--forest-deep); color: var(--on-dark); border-top: 1px solid rgba(244, 239, 230, .15); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 2.5rem var(--pad) 3rem; }
.footer-brand .brand-mark { color: var(--on-dark); }
.site-footer .note { color: var(--on-dark-muted); font-size: .9rem; margin-bottom: .4rem; }
.site-footer .lang { display: inline-flex; margin-top: 1rem; border-color: rgba(244, 239, 230, .3); }
.site-footer .lang a { color: var(--on-dark-muted); }
.site-footer .lang a[aria-current="page"] { background: var(--on-dark); color: var(--forest-deep); }

/* 하단 고정 행동 영역 (모바일) */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  display: grid; grid-template-columns: 1fr 1fr; gap: .6rem;
  padding: .65rem var(--pad) calc(.65rem + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(20, 51, 38, .08);
}
.action-bar .btn { min-height: 48px; padding: .5rem .75rem; font-size: .98rem; }

@media (min-width: 768px) {
  .hero { grid-template-columns: 1.15fr .85fr; align-items: center; }
  .hero-art { max-height: 360px; }
  .services { grid-template-columns: 1fr 1fr; gap: 0 2.5rem; }
  .services li:last-child { border-bottom: 0; }
  .services li { border-bottom: 0; }
  .services { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 2.25rem 2.5rem; }
  .steps li::after { display: none; }
  .visit-inner { grid-template-columns: .9fr 1.1fr; align-items: start; }
  .map-frame { aspect-ratio: 16 / 11; }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .action-bar { display: none; }
  .menu-toggle { display: none; }
  .js .site-nav { display: block; }
  .site-nav ul { padding-bottom: .25rem; }
  .steps { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
