/* ─── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }

:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --gray-50: #f8f8f6;
  --gray-100: #efefed;
  --gray-200: #e0e0dc;
  --gray-400: #9a9a96;
  --gray-600: #5a5a56;
  --dark: #111111;
  --font: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', -apple-system, sans-serif;
  --max-w: 1160px;
  --section-py: 140px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  word-break: keep-all;
  overflow-x: hidden;
  width: 100%;
}
body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: var(--font); border: none; background: none; }

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

/* ─── Scroll animations ─────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

.fade-up-delay-1 { transition-delay: 0.1s; }
.fade-up-delay-2 { transition-delay: 0.2s; }
.fade-up-delay-3 { transition-delay: 0.3s; }
.fade-up-delay-4 { transition-delay: 0.4s; }

/* ─── Navigation ───────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  height: 60px;
  display: flex; align-items: center;
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 1px 0 rgba(0,0,0,0.08); }

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 40px;
}

.nav-logo {
  font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
}

.nav-links {
  display: flex; gap: 40px; list-style: none;
}
.nav-links a {
  font-size: 14px; font-weight: 400; color: var(--gray-600);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--black); }


.nav-mobile-btn {
  display: none; padding: 4px; font-size: 22px; color: var(--black);
}

.nav-mobile-menu {
  display: none;
  position: absolute; top: 60px; left: 0; right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(20px);
  padding: 16px 40px 28px;
}
.nav-mobile-menu.open { display: block; }
.nav-mobile-menu a {
  display: block; padding: 13px 0;
  font-size: 15px; font-weight: 500;
  border-bottom: 1px solid var(--gray-100);
  color: var(--black);
}
.nav-mobile-menu a:last-child { border-bottom: none; }

/* ─── Section 01: Hero ─────────────────────────────── */
#hero {
  min-height: 100vh;
  padding-top: 60px;
  display: flex; align-items: center;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 60px);
  max-width: var(--max-w); margin: 0 auto;
  padding: 0 40px;
  align-items: center;
  gap: 60px;
}

.hero-tag {
  font-size: 20px; letter-spacing: 0.02em; color: var(--black);
  font-weight: 700; margin-bottom: 28px;
  display: block;
}

.hero-title {
  font-size: clamp(44px, 5.6vw, 76px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 32px;
}

.hero-sub {
  font-size: 18px; color: var(--gray-600);
  line-height: 1.7; margin-bottom: 48px;
  font-weight: 300;
}

.hero-buttons {
  display: flex; gap: 14px; flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--black); color: var(--white);
  font-size: 15px; font-weight: 500;
  padding: 16px 28px;
  border-radius: 980px;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: #333; transform: scale(1.02); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500;
  color: var(--black);
  padding: 16px 28px;
  border-radius: 980px;
  border: 1.5px solid var(--gray-200);
  transition: border-color 0.2s, transform 0.15s;
}
.btn-secondary:hover { border-color: var(--black); transform: scale(1.02); }

.hero-photo-wrap {
  display: flex; flex-direction: column; align-items: flex-end;
  height: 100%;
  padding: 60px 0;
}

.hero-photo {
  width: 100%;
  max-height: calc(100vh - 180px);
  object-fit: cover;
  object-position: top;
  filter: grayscale(100%);
}

.photo-caption {
  margin-top: 12px;
  font-size: 12px; color: var(--gray-400);
  letter-spacing: 0.05em;
}

/* ─── Section 02: Story ────────────────────────────── */
#story {
  background: var(--black); color: var(--white);
  padding: var(--section-py) 40px;
  text-align: center;
}

.story-quote {
  font-size: clamp(32px, 4.8vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 64px;
  max-width: 900px; margin-left: auto; margin-right: auto;
}

.story-body {
  max-width: 720px; margin: 0 auto;
  text-align: left;
  display: flex; flex-direction: column; gap: 24px;
  border-top: 1px solid #333;
  padding-top: 48px;
}

.story-body p {
  font-size: 18px; color: #aaa; line-height: 1.9; font-weight: 300;
}

/* ─── Section 03: About ────────────────────────────── */
#about { padding: var(--section-py) 40px; }

.about-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 100px; align-items: center;
  max-width: var(--max-w); margin: 0 auto;
}

.about-tag {
  font-size: 12px; letter-spacing: 0.15em; color: var(--gray-400);
  text-transform: uppercase; margin-bottom: 20px; display: block;
}

.about-title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.1; margin-bottom: 40px;
}

.about-body {
  display: flex; flex-direction: column; gap: 18px;
  margin-bottom: 56px;
}
.about-body p { font-size: 17px; color: var(--gray-600); line-height: 1.85; font-weight: 300; }

.about-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--gray-100);
}

.about-stat {
  padding: 32px 0;
  border-right: 1px solid var(--gray-100);
  padding-right: 32px; margin-right: 32px;
}
.about-stat:last-child { border-right: none; padding-right: 0; margin-right: 0; }

.stat-num {
  font-size: 44px; font-weight: 800;
  letter-spacing: -0.04em; line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: 13px; color: var(--gray-400); }

.about-photo {
  width: 100%;
  filter: grayscale(100%);
}

/* ─── Section 04: Impact ───────────────────────────── */
#impact {
  background: var(--gray-50);
  padding: var(--section-py) 40px;
}

.impact-inner {
  max-width: var(--max-w); margin: 0 auto;
}

.impact-label-top {
  font-size: 12px; letter-spacing: 0.15em; color: var(--gray-400);
  text-transform: uppercase; margin-bottom: 80px; display: block;
}

.impact-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--gray-200);
}

.impact-item {
  padding: 48px 0 0;
  border-right: 1px solid var(--gray-200);
  padding-right: 40px; margin-right: 40px;
}
.impact-item:last-child { border-right: none; padding-right: 0; margin-right: 0; }

.impact-num {
  font-size: clamp(44px, 4.5vw, 64px);
  font-weight: 800; letter-spacing: -0.04em;
  line-height: 1; margin-bottom: 16px;
  display: block;
}

.impact-desc { font-size: 14px; color: var(--gray-400); line-height: 1.6; }

/* ─── Section 05: Care System ──────────────────────── */
#care {
  padding: var(--section-py) 40px;
}

.care-inner {
  max-width: var(--max-w); margin: 0 auto;
}

.care-header {
  margin-bottom: 80px;
}

.care-tag {
  font-size: 12px; letter-spacing: 0.15em; color: var(--gray-400);
  text-transform: uppercase; margin-bottom: 20px; display: block;
}

.care-title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 16px;
}

.care-sub {
  font-size: 17px; color: var(--gray-400); font-weight: 300;
}

.care-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--gray-100);
}

.care-card {
  padding: 40px 28px 40px 0;
  border-right: 1px solid var(--gray-100);
  padding-right: 28px;
}
.care-card:last-child { border-right: none; }

.care-num {
  display: block;
  font-size: 52px; font-weight: 800;
  color: var(--gray-100);
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 28px;
}

.care-card-title {
  font-size: 17px; font-weight: 700;
  margin-bottom: 10px;
}

.care-card-desc {
  font-size: 13px; color: var(--gray-400);
  line-height: 1.6;
}

/* ─── Section 06: 방문진료 ─────────────────────────── */
#homecare {
  background: var(--gray-50);
  padding: var(--section-py) 40px;
}

.homecare-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 100px; align-items: center;
  max-width: var(--max-w); margin: 0 auto;
}

.homecare-photo {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.homecare-tag {
  font-size: 12px; letter-spacing: 0.15em; color: var(--gray-400);
  text-transform: uppercase; margin-bottom: 20px; display: block;
}

.homecare-title {
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 700; letter-spacing: -0.03em;
  line-height: 1.15; margin-bottom: 40px;
}

.homecare-desc {
  font-size: 17px; color: var(--gray-600);
  line-height: 1.85; margin-bottom: 40px; font-weight: 300;
}

.homecare-list {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
}

.homecare-list li {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--gray-600);
}

.homecare-list li::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%; background: var(--black);
  flex-shrink: 0;
}

/* ─── Section 07: 진료과목 ─────────────────────────── */
#treatments {
  padding: var(--section-py) 40px;
}

.treat-inner { max-width: var(--max-w); margin: 0 auto; }

.treat-header {
  margin-bottom: 80px;
}

.treat-tag {
  font-size: 12px; letter-spacing: 0.15em; color: var(--gray-400);
  text-transform: uppercase; margin-bottom: 20px; display: block;
}

.treat-title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}

.treat-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 0;
  border-top: 1px solid var(--gray-100);
}

.treat-card {
  display: block;
  padding: 40px 0 40px;
  border-right: 1px solid var(--gray-100);
  font-size: 18px; font-weight: 600;
  text-align: center;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}
.treat-card:last-child { border-right: none; }
.treat-card:hover { background: var(--gray-50); color: #1a6cff; }

/* ─── Section 08: 후기 ─────────────────────────────── */
#reviews {
  background: var(--gray-50);
  padding: var(--section-py) 40px;
}

.review-inner { max-width: var(--max-w); margin: 0 auto; }

.review-header { margin-bottom: 64px; }

.review-tag {
  font-size: 12px; letter-spacing: 0.15em; color: var(--gray-400);
  text-transform: uppercase; margin-bottom: 20px; display: block;
}

.review-title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 18px;
}

.review-sub {
  font-size: 17px;
  color: var(--gray-600);
  line-height: 1.75;
  font-weight: 300;
}

.review-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.review-photo {
  display: block;
  background: var(--white);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  padding: 10px;
  box-shadow: 0 10px 26px rgba(10,10,10,0.045);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}

.review-photo:hover {
  border-color: var(--gray-200);
  box-shadow: 0 18px 40px rgba(10,10,10,0.08);
  transform: translateY(-4px);
}

.review-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.52 / 1;
  object-fit: contain;
  background: var(--white);
}

.review-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 72px 32px 32px;
  background: rgba(10,10,10,0.82);
}

.review-lightbox.open { display: flex; }

.review-lightbox img {
  max-width: min(1120px, 100%);
  max-height: calc(100vh - 120px);
  width: auto;
  height: auto;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(0,0,0,0.32);
}

.review-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  color: var(--black);
  font-size: 28px;
  line-height: 1;
}

/* ─── Section 09: Vision ───────────────────────────── */
#vision {
  background: var(--black); color: var(--white);
  padding: 160px 40px;
  text-align: center;
}

.vision-tag {
  font-size: 12px; letter-spacing: 0.2em; color: #444;
  text-transform: uppercase; margin-bottom: 48px; display: block;
}

.vision-quote {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700; letter-spacing: -0.04em; line-height: 1.1;
  margin-bottom: 64px;
  max-width: 860px; margin-left: auto; margin-right: auto;
}

.vision-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
  font-size: 15px; margin-bottom: 100px;
  color: #555;
}
.vision-flow span { font-weight: 600; color: var(--white); }
.vision-flow .arr { color: #333; }

.vision-divider {
  width: 1px; height: 60px; background: #222;
  margin: 0 auto 40px;
}

.vision-brand {
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 10px;
}

.vision-brand-sub {
  font-size: 12px; color: #444; letter-spacing: 0.1em;
}

.vision-sc-story {
  font-size: 17px; color: #888;
  line-height: 1.8; margin-top: 48px; margin-bottom: 36px;
}

.btn-vision {
  display: inline-block;
  padding: 14px 32px;
  border: 1px solid #444;
  border-radius: 980px;
  font-size: 15px; font-weight: 600;
  color: var(--white);
  transition: background 0.2s, border-color 0.2s;
}
.btn-vision:hover { background: #fff; color: var(--black); border-color: #fff; }

/* ─── Section 10: Contact ──────────────────────────── */
#contact {
  padding: var(--section-py) 40px;
}

.contact-inner { max-width: var(--max-w); margin: 0 auto; }

.contact-header { margin-bottom: 80px; }

.contact-tag {
  font-size: 12px; letter-spacing: 0.15em; color: var(--gray-400);
  text-transform: uppercase; margin-bottom: 20px; display: block;
}

.contact-title {
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
}

.contact-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--gray-100);
}

.contact-item {
  padding: 48px 48px 48px 0;
  border-right: 1px solid var(--gray-100);
  margin-right: 48px;
}
.contact-item:last-child { border-right: none; padding-right: 0; margin-right: 0; }

.contact-item-title {
  font-size: 13px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--gray-400);
  margin-bottom: 16px;
}

.contact-item-body {
  font-size: 17px; color: var(--black);
  line-height: 1.8; font-weight: 300;
}

.contact-sub {
  font-size: 12px; color: var(--gray-400);
  margin-left: 6px;
}

/* ─── Footer ───────────────────────────────────────── */
footer {
  border-top: 1px solid var(--gray-100);
  padding: 32px 40px;
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max-w); margin: 0 auto;
  flex-wrap: wrap; gap: 12px;
}

.footer-copy { font-size: 12px; color: var(--gray-400); }

.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a {
  font-size: 12px; color: var(--gray-400);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--black); }

/* ─── Responsive ───────────────────────────────────── */
@media (max-width: 960px) {
  :root { --section-py: 100px; }
  .container, .nav-inner, .hero-inner,
  .about-inner, .homecare-inner, .contact-inner,
  .care-inner, .treat-inner, .review-inner, .impact-inner,
  .footer-inner { padding-left: 24px; padding-right: 24px; }

  #story, #vision, #impact, #homecare,
  #care, #contact, #about, #treatments, #reviews, #hero {
    padding-left: 24px; padding-right: 24px;
  }

  .nav-inner { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-mobile-btn { display: block; }
  .nav-mobile-menu { padding: 16px 24px 28px; }

  .hero-inner {
    grid-template-columns: 1fr;
    padding: 60px 24px 80px;
    min-height: auto;
    gap: 40px;
  }
  .hero-photo-wrap { align-items: center; order: -1; padding: 0; }
  .hero-photo { max-width: 300px; max-height: 420px; }
  .hero-buttons { flex-direction: column; }
  .btn-primary, .btn-secondary { justify-content: center; }

  .about-inner { grid-template-columns: 1fr; gap: 56px; }
  .about-photo { order: -1; max-width: 300px; margin: 0 auto; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .about-stat { padding-right: 24px; margin-right: 24px; }

  .impact-grid { grid-template-columns: repeat(2, 1fr); gap: 0; }
  .impact-item {
    padding: 40px 24px 0 0;
    margin-right: 0;
  }
  .impact-item:nth-child(2) { border-right: none; }
  .impact-item:nth-child(3) { border-right: 1px solid var(--gray-200); margin-right: 0; }
  .impact-item:nth-child(3),
  .impact-item:nth-child(4) { border-top: 1px solid var(--gray-200); padding-top: 40px; margin-top: 40px; }

  .care-cards { grid-template-columns: repeat(3, 1fr); }
  .care-card:nth-child(3) { border-right: none; }
  .care-card:nth-child(4),
  .care-card:nth-child(5),
  .care-card:nth-child(6) { border-top: 1px solid var(--gray-100); }
  .care-card:nth-child(6) { border-right: none; }

  .homecare-inner { grid-template-columns: 1fr; gap: 48px; }
  .homecare-photo { order: -1; }

  .treat-grid { grid-template-columns: repeat(3, 1fr); }
  .treat-card:nth-child(3) { border-right: none; }
  .treat-card:nth-child(4),
  .treat-card:nth-child(5),
  .treat-card:nth-child(6) { border-top: 1px solid var(--gray-100); }

  .review-gallery { gap: 20px; }

  .contact-grid { grid-template-columns: 1fr; border-top: none; }
  .contact-item {
    padding: 32px 0;
    border-right: none;
    margin-right: 0;
    border-bottom: 1px solid var(--gray-100);
  }
  .contact-item:last-child { border-bottom: none; }

  .vision-quote { margin-bottom: 48px; }
}

@media (max-width: 540px) {
  .footer-inner,
  .footer-links {
    justify-content: flex-start;
    width: 100%;
  }
  .footer-links { gap: 12px 18px; }
  .impact-grid { grid-template-columns: repeat(2, 1fr); }
  .care-cards { grid-template-columns: repeat(2, 1fr); }
  .care-card:nth-child(2) { border-right: none; }
  .care-card:nth-child(3) { border-right: 1px solid var(--gray-100); border-top: 1px solid var(--gray-100); }
  .care-card:nth-child(4) { border-right: none; }
  .care-card:nth-child(5) { border-right: 1px solid var(--gray-100); }
  .treat-grid { grid-template-columns: repeat(2, 1fr); }
  .treat-card:nth-child(2) { border-right: none; }
  .treat-card:nth-child(3) { border-right: 1px solid var(--gray-100); border-top: 1px solid var(--gray-100); }
  .treat-card:nth-child(4) { border-right: none; border-top: 1px solid var(--gray-100); }
  .treat-card:nth-child(5) { border-top: 1px solid var(--gray-100); }
  .treat-card:nth-child(6) { border-right: none; border-top: 1px solid var(--gray-100); }
  .review-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .review-photo { padding: 5px; }
  .review-lightbox { padding: 68px 14px 24px; }
  .review-lightbox img { max-height: calc(100vh - 108px); }
  .review-lightbox-close {
    top: 14px;
    right: 14px;
  }
}
