/* Template 1. Colour tokens are defined in :root below. */
:root {
  --ink: #241811;
  --muted: #5c5c5c;
  --accent: #b84a00;
  --accent-dk: #9a3d00;
  --t6: #fbf4f0;   /* about 6% accent on white */
  --t12: #f7e9e0;  /* about 12% accent on white */
  --g1: #f7f7f7;
  --foot: #464646;
  --line: #e5e0dc;
  --wrap: 1440px;
  --gut: 80px;
  --sec: 140px;
  --r: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, "Malgun Gothic", sans-serif;
  font-size: 17px; line-height: 1.65; font-weight: 400;
  word-break: keep-all; overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }

/* Buttons: 40px, radius 8, weight 400, no shadow */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 16px; font-weight: 400; line-height: 1; cursor: pointer; white-space: nowrap;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-dk); }
.btn--line { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn--line:hover { background: var(--ink); color: #fff; }
.btn--accentline { border-color: var(--accent); color: var(--accent); }
.btn--accentline:hover { background: var(--accent); color: #fff; }

/* Header sits on top of the first screen */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 10; color: #fff; }
.site-header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 96px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.logo__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #fff; }
.gnb { display: flex; gap: 36px; font-size: 17px; }
.gnb a { opacity: .92; }
.gnb a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }

/* Hero */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; max-height: 960px; overflow: hidden; color: #fff; background: var(--ink); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(rgba(36,24,17,.55), rgba(36,24,17,.38) 45%, rgba(36,24,17,.6)); }
.hero__body { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 96px var(--gut) 40px; text-align: center; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 14px; background: var(--accent); color: #fff; border-radius: 8px; font-size: 14px; }
.hero__frame { position: relative; padding: 48px 72px 44px; }
.hero h1 { font-size: 47px; line-height: 1.5; font-weight: 600; letter-spacing: -0.02em; }

/* Sections */
.sec { padding: var(--sec) 0; }
.sec--white { background: #fff; }
.sec--t6 { background: var(--t6); }
.sec--grey { background: var(--g1); }
.sec__head { margin-bottom: 64px; }
.title { font-size: 40px; line-height: 1.35; font-weight: 600; letter-spacing: -0.025em; }
.title--center { text-align: center; }
.title--sm { font-size: 30px; line-height: 1.4; }
.title--white { color: #fff; }
.title--dot::before { content: none; }
mark { color: inherit; background: none; padding: 0; }
.lead { margin-top: 12px; font-size: 19px; color: var(--muted); }

/* Treatment cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 32px; }
.card__ph { aspect-ratio: 361 / 231; border-radius: var(--r); overflow: hidden; margin-bottom: 22px; background: var(--g1); }
.card__ph img { width: 100%; height: 100%; object-fit: cover; }
.tag { display: inline-block; padding: 1px 10px; border-radius: 6px; background: var(--t6); color: var(--accent); font-size: 14px; font-weight: 600; line-height: 1.7; margin-bottom: 8px; }
.card__t { font-size: 24px; line-height: 1.4; font-weight: 600; color: var(--accent); margin-bottom: 8px; }
.card__d { font-size: 17px; color: var(--muted); }

/* Promise */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 72px; }
.promise li { background: #fff; border-radius: var(--r); padding: 48px 36px; text-align: center; }
.promise__n { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 24px; border-radius: 50%; background: var(--t12); color: var(--ink); font-size: 24px; font-weight: 600; }
.promise h3 { font-size: 23px; line-height: 1.4; font-weight: 600; margin-bottom: 10px; }
.promise p { color: var(--muted); font-size: 17px; }

/* Doctors */
.docs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; align-items: start; }
.person__ph { aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: #ece8e4; margin-bottom: 22px; }
.person__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.person__tag { font-size: 14px; font-weight: 600; color: var(--accent); }
.person__name { font-size: 24px; line-height: 1.4; font-weight: 600; margin: 2px 0 12px; }
.arrow { display: block; width: 18px; height: 1px; background: var(--ink); position: relative; }
.arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border: solid var(--ink); border-width: 1px 1px 0 0; transform: rotate(45deg); transform-origin: 100% 0; }
.career { grid-column: span 2; background: var(--t12); border-radius: var(--r); padding: 44px 48px; }
.career__t { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 600; margin-bottom: 14px; }
.career__t--2 { margin-top: 32px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.career__list li { position: relative; padding: 9px 0 9px 20px; border-bottom: 1px solid rgba(36,24,17,.14); font-size: 18px; }
.career__list li:last-child { border-bottom: 0; }
.career__list li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: 6px; height: 1px; background: var(--ink); }

/* Facility strip: native scroll-snap, works without JS */
.sec--space { overflow: hidden; }
.strip {
  --pad: max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut)));
  display: flex; gap: 28px; margin-top: 64px; padding: 0 var(--pad) 8px; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip figure { flex: none; width: min(660px, 78vw); scroll-snap-align: start; }
.strip img { width: 100%; aspect-ratio: 660 / 420; object-fit: cover; border-radius: var(--r); }
.strip figcaption { margin-top: 12px; font-size: 16px; color: var(--muted); }
.strip__ctl { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }

/* Closing block: hours | map | phone and directions (the one full-accent band is the hours part) */
.visit { display: grid; grid-template-columns: 1fr 1fr 1fr; min-height: 560px; }
.visit__hours { background: var(--accent); color: #fff; padding: 80px 64px; }
.hours { margin-top: 28px; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.4); font-size: 18px; }
.hours div:last-child { border-bottom: 0; }
.hours dt { font-weight: 400; }
.map { position: relative; background: var(--g1); min-height: 360px; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.visit__info { background: var(--t6); padding: 80px 64px; }
.addr { margin-top: 20px; font-size: 19px; }
.tel-l { margin-top: 32px; font-size: 16px; color: var(--muted); }
.route { margin-top: 20px; font-size: 16px; }
.route li { padding: 4px 0; }
.route span { display: inline-block; min-width: 4.5em; margin-right: 8px; color: var(--muted); font-size: 15px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.career__k { margin-right: 12px; color: var(--accent); font-weight: 600; }
.tel { display: inline-block; font-size: 34px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }

/* Footer */
.foot { background: var(--foot); color: #e2e2e2; padding: 64px 0; font-size: 15px; }
.foot__name { font-size: 20px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.foot li { padding: 2px 0; }
.foot__note { margin-top: 24px; font-size: 14px; color: #cfcfcf; }

/* Gentle fade-up on enter (only when JS is on and motion is allowed) */
.js .fade { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s ease; }
.js .fade.is-in { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  :root { --gut: 40px; --sec: 100px; }
  .gnb { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .promise { grid-template-columns: 1fr; }
  .docs { grid-template-columns: repeat(2, 1fr); gap: 32px 28px; }
  .career { grid-column: span 2; }
  .visit { grid-template-columns: 1fr; }
  .map { min-height: 380px; }
  .visit__hours, .visit__info { padding: 64px var(--gut); }
}
@media (max-width: 640px) {
  :root { --gut: 24px; --sec: 80px; }
  body { font-size: 16px; }
  .site-header__in { height: 72px; }
  .logo { font-size: 20px; }
  .btn { height: 38px; padding: 0 14px; font-size: 15px; }
  .site-header .btn { padding: 0 12px; font-size: 14px; }
  .hero { min-height: 600px; }
  .hero__frame { padding: 36px 24px 32px; }
  .hero h1 { font-size: 30px; }
  .title { font-size: 32px; }
  .title--sm { font-size: 26px; }
  .lead { font-size: 17px; }
  .sec__head { margin-bottom: 40px; }
  .cards { grid-template-columns: 1fr; gap: 40px; }
  .card__t { font-size: 22px; }
  .promise { margin-top: 40px; gap: 16px; }
  .promise li { padding: 36px 24px; }
  .docs { gap: 28px 16px; }
  .person__name { font-size: 18px; }
  .career { padding: 32px 24px; }
  .career__list li { font-size: 16px; }
  .strip { margin-top: 40px; gap: 16px; }
  .strip img { aspect-ratio: 4 / 3; }
  .tel { font-size: 30px; }
  .hours div { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1 !important; transform: none !important; transition: none !important; }
}
/* Photo slots: the placeholder text stays centred (a real photo keeps the crop set above). */
img[src*="images/slot-"] { object-position: 50% 50%; }

/* EMS: comparison table + 3-step infographic (uses the template colour tokens only) */
.ems-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.ems-compare { margin-top: 20px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ems-compare__row { display: grid; grid-template-columns: 1.1fr 1.5fr 1.5fr; border-bottom: 1px solid var(--line); }
.ems-compare__row:last-child { border-bottom: 0; }
.ems-compare__row > span { padding: 14px 18px; font-size: 16px; }
.ems-compare__row--head { background: var(--t6); font-weight: 600; }
.ems-compare__row > span:nth-child(3) { background: var(--t6); color: var(--ink); }
.ems-compare__row > span[role="rowheader"] { font-weight: 600; color: var(--muted); }
.ems-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.ems-flow__step { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 24px 20px; background: var(--t6); border-radius: var(--r); }
.ems-flow__step:not(:last-child)::after { content: ""; position: absolute; right: -14px; top: 50%; width: 10px; height: 1px; background: var(--accent); }
.ems-flow__n { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; }
.ems-flow__t { font-size: 18px; font-weight: 600; }
.ems-flow__d { font-size: 15px; color: var(--muted); }
.ems-note { margin-top: 24px; font-size: 14px; color: var(--muted); }
.ems-body .btn { margin-top: 24px; }
@media (max-width: 1100px) {
  .ems-grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 640px) {
  .ems-compare__row { grid-template-columns: 1fr; }
  .ems-compare__row > span { padding: 10px 14px; }
  .ems-compare__row > span:nth-child(n+2) { border-top: 1px dashed var(--line); }
  .ems-flow { grid-template-columns: 1fr; }
  .ems-flow__step:not(:last-child)::after { display: none; }
}
