:root {
  --bg: #fafbfc;
  --surface: #ffffff;
  --ink: #1a1f2e;
  --muted: #5b6475;
  --line: #e6e9ef;
  --accent: #0f766e;
  --accent-soft: #e6f4f2;
  --accent-dark: #0a5c56;
  --shadow: 0 12px 40px rgba(26, 31, 46, 0.08);
  --radius: 16px;
  --font: "Noto Sans KR", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 251, 252, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--accent), #14b8a6);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.35);
}

.logo-text small {
  margin-left: 6px;
  font-weight: 500;
  color: var(--muted);
  font-size: 0.85em;
}

.nav {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 48px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 3.6vw, 3.15rem);
  line-height: 1.25;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-note {
  margin: 0;
  font-size: 0.82rem;
  color: #8a93a3;
}

.hero-stage {
  position: relative;
  height: min(560px, 68vw);
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  background: #dfe7ef;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.map {
  position: absolute;
  inset: 0;
}

.map-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  backdrop-filter: blur(8px);
}

/* Map markers & overlays */
.example-pin {
  width: 18px;
  height: 18px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.45);
}

.example-pin.pulse::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 2px solid rgba(15, 118, 110, 0.35);
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.clinic-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #334155;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.clinic-card,
.target-label {
  pointer-events: none;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  box-shadow: 0 8px 24px rgba(26, 31, 46, 0.12);
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.clinic-card.visible,
.target-label.visible {
  opacity: 1;
  transform: translateY(0);
}

.clinic-card strong,
.target-label strong {
  display: block;
  font-weight: 700;
}

.clinic-card .sub,
.target-label .sub {
  color: var(--muted);
  font-size: 0.72rem;
}

.example-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 0.68rem;
  font-weight: 600;
}

.stat-panels {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(280px, calc(100% - 32px));
  pointer-events: none;
}

.stat-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(26, 31, 46, 0.12);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.stat-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.stat-card .stat-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.stat-card .stat-title span {
  font-size: 0.65rem;
  font-weight: 600;
  color: #c2410c;
  background: #fff7ed;
  padding: 2px 6px;
  border-radius: 4px;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-dark);
}

.stat-caption {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--muted);
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
  margin-top: 6px;
}

.bars .bar {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #14b8a6, var(--accent));
  min-height: 8px;
  position: relative;
}

.bars .bar em {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
}

.top-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
}

.top-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px dashed var(--line);
}

.top-list li:last-child {
  border-bottom: 0;
}

.top-list .rank {
  color: var(--accent);
  font-weight: 700;
  margin-right: 6px;
}

/* Value */
.value {
  padding: 40px 0 80px;
  text-align: center;
}

.value h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.value p {
  margin: 0 auto;
  max-width: 640px;
  color: var(--muted);
}

/* Services */
.services {
  padding: 24px 0 96px;
}

.section-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.services h2,
.how h2,
.contact h2 {
  margin: 0 0 28px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: 0 4px 16px rgba(26, 31, 46, 0.03);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: #c5ddd9;
  box-shadow: var(--shadow);
}

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  margin-bottom: 16px;
  font-size: 1.15rem;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 600;
}

/* How / sources */
.how {
  padding: 48px 0 96px;
  background: linear-gradient(180deg, #f3f7f6 0%, var(--bg) 100%);
  border-block: 1px solid var(--line);
}

.how-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.sources li {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.sources strong {
  font-size: 0.95rem;
}

.sources span {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Contact */
.contact {
  padding: 80px 0;
}

.contact-inner {
  text-align: center;
  padding: 56px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.contact p {
  color: var(--muted);
  margin: 0 0 24px;
}

.placeholder-note {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #b45309;
  font-style: normal;
  background: #fffbeb;
  padding: 4px 10px;
  border-radius: 6px;
}

.email {
  display: inline-block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  border-bottom: 2px solid rgba(15, 118, 110, 0.25);
  padding-bottom: 2px;
}

.email:hover {
  color: var(--accent-dark);
}

.contact-sub {
  margin-top: 18px !important;
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* MapLibre attribution tweak */
.maplibregl-ctrl-attrib {
  font-size: 10px !important;
  opacity: 0.75;
}

.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  z-index: 4;
}

/* Responsive */
@media (max-width: 920px) {
  .hero-grid,
  .how-inner,
  .cards {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 380px;
    height: 420px;
  }

  .nav {
    gap: 16px;
    font-size: 0.88rem;
  }
}

@media (max-width: 560px) {
  .container {
    width: calc(100% - 32px);
  }

  .footer-inner {
    flex-direction: column;
  }

  .hero {
    padding-top: 28px;
  }
}

/* Recording mode: full-bleed map for MP4 capture */
body.record-mode .site-header,
body.record-mode .value,
body.record-mode .services,
body.record-mode .how,
body.record-mode .contact,
body.record-mode .site-footer,
body.record-mode .hero-copy {
  display: none !important;
}

body.record-mode .hero {
  padding: 0;
}

body.record-mode .hero-grid {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
}

body.record-mode .container.hero-grid {
  width: 100%;
}

body.record-mode .hero-stage {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

body.record-mode {
  background: #000;
  overflow: hidden;
}
