/* ============================================================
   BARO Orthopedics — showcase demo
   Theme: dark-locked (deep charcoal + cobalt)
   Shape rule: containers 12px / interactive pill / images 12px
   ============================================================ */

:root {
  --bg: #101418;
  --surface: #171d24;
  --surface-2: #1e252e;
  --ink: #eef2f6;
  --muted: #97a3b0;
  --line: #29323d;
  --accent: #4a8fe0;
  --accent-deep: #316dbd;
  --accent-soft: rgba(74, 143, 224, 0.14);
  --radius: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Hiragino Sans", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 14px 28px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: var(--accent); color: #0c1320; }
.btn-primary:hover { background: #6aa5ea; transform: translateY(-2px); }
.btn-ghost { border: 1px solid rgba(238, 242, 246, 0.28); background: rgba(16, 20, 24, 0.4); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: #9dc3f0; transform: translateY(-2px); }
.btn-nav { padding: 10px 20px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(16, 20, 24, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14.5px; font-weight: 500; color: var(--muted); transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-btn {
  border: 0; background: transparent; font: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 6px 11px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { background: var(--accent); color: #0c1320; }

/* ---------- Hero : full-bleed ---------- */
.hero {
  position: relative;
  min-height: 86dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(16, 20, 24, 0.94) 20%, rgba(16, 20, 24, 0.72) 50%, rgba(16, 20, 24, 0.3) 100%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-copy { max-width: 620px; padding: 64px 0; }
.hero-title {
  font-size: clamp(42px, 5.6vw, 66px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.hero-title em { font-style: italic; color: var(--accent); padding-bottom: 4px; }
.hero-sub { margin-top: 22px; font-size: 18px; color: rgba(238, 242, 246, 0.78); max-width: 46ch; }
.hero-cta { margin-top: 34px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Info strip ---------- */
.info-strip { background: var(--surface); border-block: 1px solid var(--line); padding: 28px 0; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.info-item { display: flex; flex-direction: column; gap: 4px; }
.info-label { font-size: 13px; font-weight: 600; color: var(--accent); }
.info-value { font-size: 15px; font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-head { max-width: 60ch; margin-bottom: 52px; }
.section-head h2, .doctor-copy h2, .contact-copy h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.section-head p { margin-top: 14px; font-size: 17px; color: var(--muted); }

/* ---------- Services : asymmetric grid ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 250px;
  gap: 16px;
}
.svc-card {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.svc-card:hover { transform: translateY(-4px); border-color: rgba(74, 143, 224, 0.5); }
.svc-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.svc-card p { margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }

.svc-photo { grid-column: span 4; grid-row: span 2; padding: 0; border: 0; }
.svc-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-overlay {
  position: relative;
  z-index: 1;
  padding: 30px;
  margin-top: auto;
  background: linear-gradient(to top, rgba(10, 14, 18, 0.9) 0%, rgba(10, 14, 18, 0.4) 60%, transparent 100%);
}
.svc-overlay p { color: rgba(238, 242, 246, 0.82); }
.svc-card:nth-child(2) { grid-column: span 2; }
.svc-card:nth-child(3) { grid-column: span 2; grid-row: 2; grid-column: 5 / 7; }
.svc-accent { grid-column: span 6; background: var(--accent-soft); border-color: rgba(74, 143, 224, 0.35); flex-direction: row; align-items: center; gap: 24px; justify-content: flex-start; }
.svc-accent h3 { color: #9dc3f0; min-width: 220px; }
.svc-accent p { margin-top: 0; max-width: 52ch; }

/* ---------- Process ---------- */
.section-process { background: var(--surface); border-block: 1px solid var(--line); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  position: relative;
}
.prc-step { position: relative; padding-top: 26px; }
.prc-step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.prc-step h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.prc-step p { margin-top: 12px; font-size: 15px; color: var(--muted); line-height: 1.65; }

/* ---------- Doctor ---------- */
.doctor-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.doctor-media { border-radius: var(--radius); overflow: hidden; }
.doctor-media img { width: 100%; height: 540px; object-fit: cover; }
.doctor-name { margin-top: 24px; font-size: 20px; }
.doctor-role {
  margin-left: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #9dc3f0;
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  vertical-align: 2px;
}
.doctor-bio { margin-top: 18px; font-size: 16.5px; color: var(--muted); max-width: 58ch; }
.doctor-creds { margin-top: 26px; display: grid; gap: 10px; }
.doctor-creds li { padding-left: 24px; position: relative; font-size: 15px; font-weight: 500; }
.doctor-creds li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.doctor-note {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--muted);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 860px; }
.faq-list { display: grid; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease);
}
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  font-size: 16.5px;
  font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon { flex: none; width: 14px; height: 14px; position: relative; }
.faq-icon::before, .faq-icon::after {
  content: "";
  position: absolute;
  background: var(--accent);
  border-radius: 2px;
  transition: transform 0.3s var(--ease);
}
.faq-icon::before { left: 0; top: 6px; width: 14px; height: 2px; }
.faq-icon::after { left: 6px; top: 0; width: 2px; height: 14px; }
.faq-item[open] .faq-icon::after { transform: scaleY(0); }
.faq-item > p { padding: 0 26px 24px; color: var(--muted); font-size: 15.5px; max-width: 68ch; }

/* ---------- Contact ---------- */
.section-contact { background: var(--surface); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 6fr 6fr; gap: 64px; align-items: center; }
.contact-list { margin: 36px 0 40px; display: grid; gap: 22px; }
.contact-list div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
.contact-list dt { font-size: 14px; font-weight: 700; color: var(--accent); padding-top: 2px; }
.contact-list dd { font-size: 15.5px; color: var(--ink); }
.contact-list dd a { font-weight: 600; }
.contact-media { border-radius: var(--radius); overflow: hidden; }
.contact-media img { width: 100%; height: 440px; object-fit: cover; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 40px 0 56px; }
.footer-inner p { font-size: 13.5px; color: var(--muted); }
.footer-legal { margin-top: 8px; font-size: 12.5px; opacity: 0.8; }

/* ---------- Reveal motion ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .svc-card { transition: none; }
}

/* ---------- Language fade ---------- */
body.lang-fading [data-i18n],
body.lang-fading [data-i18n-html] { opacity: 0.25; transition: opacity 0.18s ease; }
[data-i18n], [data-i18n-html] { transition: opacity 0.18s ease; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .hero { min-height: 70dvh; }
  .svc-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 230px; }
  .svc-photo { grid-column: span 2; }
  .svc-card:nth-child(2) { grid-column: span 1; }
  .svc-card:nth-child(3) { grid-column: auto; grid-row: auto; }
  .svc-accent { grid-column: span 2; flex-direction: column; align-items: flex-start; gap: 8px; }
  .svc-accent h3 { min-width: 0; }
  .process-grid { grid-template-columns: 1fr; gap: 36px; }
  .doctor-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .doctor-media img { height: 420px; }
}

@media (max-width: 640px) {
  .section { padding: 72px 0; }
  .brand-name { display: none; }
  .btn-nav { display: none; }
  .info-grid { grid-template-columns: 1fr; gap: 18px; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-photo, .svc-card:nth-child(2), .svc-accent { grid-column: span 1; }
  .contact-list div { grid-template-columns: 1fr; gap: 4px; }
}

/* nav overflow guard */
.nav-links a { white-space: nowrap; }
@media (max-width: 1180px) { .nav-links { display: none; } }


/* ---------- Facility gallery ---------- */
.facility-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.facility-grid figure { margin: 0; }
.facility-grid img { width: 100%; height: 250px; object-fit: cover; border-radius: var(--radius); }
.facility-grid figcaption { margin-top: 12px; }
.fc-t { display: block; font-size: 14.5px; font-weight: 700; }
.fc-d { display: block; font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Global care band ---------- */
.section-gcare { background: var(--accent-soft); }
.gcare-head { max-width: 60ch; margin-bottom: 48px; }
.gcare-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.gcare-head p { margin-top: 14px; font-size: 17px; color: var(--muted); }
.gcare-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.gcare-col h3 { font-size: 17px; font-weight: 700; color: var(--accent); }
.gcare-col p { margin-top: 8px; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

@media (max-width: 1024px) {
  .facility-grid { grid-template-columns: 1fr; }
  .facility-grid img { height: 220px; }
  .gcare-cols { grid-template-columns: 1fr; gap: 24px; }
}
