/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette: white / black / onyx only */
  --onyx: #353839;
  --onyx-dark: #202224;
  --onyx-light: #4a4d4f;
  --black: #111111;
  --dark: #1a1a1a;
  --gray: #6b6b6b;
  --light-gray: #f5f4f2;
  --white: #ffffff;
  --crimson: #a51c30; /* Harvard Crimson RGB 165, 28, 48 */
  --crimson-dark: #8a1728;
  --font-serif: 'Noto Serif KR', serif;
  --font-sans: 'Noto Sans KR', sans-serif;
  --nav-h: 100px;
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }

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

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.25s var(--ease);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--crimson);
  color: var(--white);
}
.btn-primary:hover { background: var(--crimson-dark); transform: translateY(-1px); }

.btn-white {
  background: var(--white);
  color: var(--onyx);
}
.btn-white:hover { background: var(--light-gray); }

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.7);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); }

.btn-sm { padding: 10px 22px; font-size: 0.88rem; }

/* ── IMAGE PLACEHOLDERS ──
   Every real photo/logo in this build is swapped in later. Until then,
   each slot below renders a labeled placeholder so the layout, the
   hero scroll-reveal mechanic, and the gallery/doctor sections are all
   fully visible and testable. To finalize: replace the .img-placeholder
   div in index.html with an <img src="assets/images/…" alt="…" /> that
   fills the same parent element — no CSS changes needed. */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, var(--onyx) 0%, var(--onyx-dark) 100%);
}
.img-placeholder svg { width: 34px; height: 34px; stroke: rgba(255,255,255,0.55); flex-shrink: 0; }
.img-placeholder .ph-label {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
}
.img-placeholder .ph-note {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.4);
  max-width: 220px;
  line-height: 1.5;
}

/* ── LOGO WORDMARK (placeholder for logo file) ── */
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
  color: var(--white);
  transition: color 0.4s;
}
.logo-text em {
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
  transition: color 0.4s;
}
.navbar.scrolled .logo-text { color: var(--onyx); }
.navbar.scrolled .logo-text em { color: var(--gray); }
.footer-brand .logo-text { color: var(--white); margin-bottom: 20px; }
.footer-brand .logo-text em { color: rgba(255,255,255,0.5); }

/* ── SECTION LABELS ── */
.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--onyx);
  margin-bottom: 12px;
}
.section-label.light { color: rgba(255,255,255,0.7); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--black);
  margin-bottom: 20px;
}
.section-title.light { color: var(--white); }

.section-header { text-align: center; margin-bottom: 60px; }
.section-header .section-title { margin-bottom: 16px; }
.section-desc { color: var(--gray); font-size: 1rem; line-height: 1.7; }

/* ── REVEAL ANIMATIONS ── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.reveal-right {
  transform: translateX(36px);
}
.reveal.visible {
  opacity: 1;
  transform: translate(0);
}

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s, box-shadow 0.4s;
}
.navbar.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo img {
  height: 72px;
  width: auto;
  object-fit: contain;
  transition: opacity 0.4s;
}
.navbar.scrolled .nav-logo img { opacity: 1; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--white); }
.navbar.scrolled .nav-links a { color: var(--dark); }
.navbar.scrolled .nav-links a:hover { color: var(--onyx); }

.nav-links .nav-cta {
  background: var(--crimson);
  color: var(--white) !important;
  padding: 9px 22px;
  border-radius: 2px;
  font-size: 0.88rem;
}
.nav-links .nav-cta:hover { background: var(--crimson-dark); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 2px;
  padding: 5px 10px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: border-color 0.2s;
}
.navbar.scrolled .lang-toggle { border-color: rgba(0,0,0,0.2); }
.lang-opt {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.navbar.scrolled .lang-opt { color: var(--gray); }
.lang-opt.active {
  color: var(--white);
  font-weight: 700;
}
.navbar.scrolled .lang-opt.active { color: var(--onyx); }
.lang-divider {
  color: rgba(255,255,255,0.3);
  font-size: 0.7rem;
}
.navbar.scrolled .lang-divider { color: rgba(0,0,0,0.2); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: background 0.4s;
}
.navbar.scrolled .hamburger span { background: var(--dark); }

/* ── HERO ── */
.hero-section {
  height: 250vh;
  position: relative;
}
.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.hero-layer {
  position: absolute;
  inset: 0;
}
.hero-base img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* CSS trick to reduce the yellow-green reflection tint — apply once the real entrance photo is in place */
  filter: brightness(0.75) saturate(0.55) contrast(1.05);
}
.hero-base .img-placeholder,
.hero-reveal .img-placeholder {
  /* keep placeholder copy clear of the hero headline, which sits mid/lower */
  justify-content: flex-start;
  padding-top: 10vh;
}
.hero-base .img-placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, #2b2d2e 0%, #161718 100%);
}
.reflection-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,5,5,0.35) 0%,
    rgba(0,0,0,0.1) 40%,
    rgba(0,0,0,0.45) 100%
  );
}
.hero-reveal {
  clip-path: inset(0 50% 0 50%);
  transition: clip-path 0.05s linear;
}
.hero-reveal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-reveal .img-placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, var(--onyx-light) 0%, var(--onyx) 100%);
}
.hero-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
}

.hero-text {
  position: absolute;
  bottom: 14%;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: var(--white);
  width: 90%;
  max-width: 600px;
  z-index: 10;
  transition: opacity 0.3s;
}
.hero-sub {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 14px;
}
.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.hero-title span {
  font-size: 0.45em;
  letter-spacing: 0.15em;
  display: block;
  opacity: 0.85;
  margin-top: 8px;
}
.hero-tagline {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 36px;
  font-weight: 300;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  z-index: 10;
  transition: opacity 0.3s;
}
.scroll-line {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.4);
  animation: scrollLine 1.8s ease-in-out infinite;
}
@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── ABOUT ── */
.about-section {
  padding: 120px 0;
  background: var(--white);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-text p {
  color: var(--gray);
  line-height: 1.85;
  font-size: 0.97rem;
  margin-bottom: 20px;
}
.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid #e8e8e8;
}
.stat strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--onyx);
  font-weight: 400;
}
.stat span {
  font-size: 0.82rem;
  color: var(--gray);
  letter-spacing: 0.03em;
}
.about-image {
  height: 500px;
  overflow: hidden;
}
.about-image img { transition: transform 0.8s var(--ease); }
.about-image:hover img { transform: scale(1.03); }

/* ── SERVICES ── */
.services-section {
  padding: 120px 0;
  background: var(--light-gray);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.service-card-wide {
  grid-column: span 2;
}
.service-card {
  background: var(--white);
  padding: 48px 36px;
  transition: background 0.3s;
}
.service-card:hover { background: var(--onyx); }
.service-card:hover h3,
.service-card:hover p,
.service-card:hover .service-icon { color: var(--white); }

.service-icon {
  width: 44px;
  height: 44px;
  color: var(--onyx);
  margin-bottom: 24px;
  transition: color 0.3s;
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 14px;
  transition: color 0.3s;
}
.service-card p {
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.75;
  transition: color 0.3s;
}

/* ── GALLERY ── */
.gallery-section { padding: 120px 0; background: var(--white); }
.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 640px;
  margin-top: 0;
}
.gallery-item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
}
.gallery-large { grid-row: 1 / 3; }
.gallery-item img { transition: transform 0.7s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 20px 24px;
  opacity: 0;
  transition: opacity 0.3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay span {
  color: var(--white);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
}

/* ── DOCTOR ── */
.doctor-section {
  padding: 120px 0;
  background: var(--light-gray);
}
.doctor-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 80px;
  align-items: start;
  background: var(--white);
  padding: 60px;
}
.doctor-photo {
  aspect-ratio: 3/4;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.doctor-role {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--onyx);
  margin-bottom: 12px;
}
.doctor-name {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 36px;
  line-height: 1.3;
}
.doctor-name em { font-size: 1rem; font-style: normal; color: var(--gray); }
.doctor-creds { display: flex; flex-direction: column; gap: 28px; }
.cred-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.cred-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
.cred-item strong {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--onyx);
  margin-bottom: 4px;
}
.cred-item p {
  font-size: 0.9rem;
  color: var(--gray);
  line-height: 1.7;
}

/* ── RESERVATION ── */
.reservation-section {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
}
.reservation-bg {
  position: absolute;
  inset: 0;
  background: var(--crimson);
  /* subtle texture */
  background-image: radial-gradient(circle at 70% 50%, rgba(255,255,255,0.10) 0%, transparent 60%);
}
.reservation-content {
  position: relative;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  color: var(--white);
}
.reservation-content p {
  margin-bottom: 40px;
  opacity: 0.85;
  line-height: 1.8;
  font-size: 1rem;
}
.reservation-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.reservation-note {
  font-size: 0.8rem !important;
  opacity: 0.6 !important;
  margin-bottom: 0 !important;
}

/* ── INFO / HOURS ── */
.info-section {
  padding: 120px 0;
  background: var(--white);
}
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.info-hours h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 32px;
}
.hours-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}
.hours-table td {
  padding: 12px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid #eeeeee;
}
.hours-table td:first-child { color: var(--gray); width: 55%; }
.hours-table td:last-child { font-weight: 500; }
.hours-table tr.closed td { color: #bbb; }
.badge {
  font-size: 0.7rem;
  background: var(--onyx);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 2px;
  margin-left: 8px;
  vertical-align: middle;
}
.hours-note {
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 36px;
}
.contact-details { display: flex; flex-direction: column; gap: 12px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--gray);
}

.map-link {
  display: block;
  height: 380px;
  background: var(--light-gray);
  border: 1px solid #e8e8e8;
  transition: border-color 0.2s;
}
.map-link:hover { border-color: var(--onyx); }
.map-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.map-placeholder p {
  font-size: 0.9rem;
  color: var(--gray);
}
.map-placeholder span {
  font-size: 0.82rem;
  color: var(--onyx);
  letter-spacing: 0.05em;
}

/* ── FOOTER ── */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand img {
  height: 48px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  margin-bottom: 20px;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.8; }
.footer-links h4, .footer-contact h4 {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links ul li a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-links ul li a:hover { color: var(--white); }
.footer-contact .btn { margin-bottom: 16px; }
.footer-legal { font-size: 0.75rem; color: rgba(255,255,255,0.3); line-height: 1.6; }
.footer-bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.25);
}

/* ── NAV OVERLAY (mobile backdrop) ── */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 98;
  pointer-events: none;
}
.nav-overlay.open { display: block; pointer-events: auto; }

/* ── MOBILE ── */
@media (max-width: 900px) {
  .hamburger { display: flex; }

  /* Full-width dropdown from below navbar */
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 16px;
    gap: 0;
    transform: translateY(-110%);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 99;
    border-top: 3px solid #a51c30;
  }
  .nav-links.open { transform: translateY(0); }

  .nav-links a {
    color: #1a1a1a !important;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    padding: 15px 28px;
    border-bottom: 1px solid #f0f0f0;
    letter-spacing: 0.02em;
    display: block;
    text-align: left;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links .nav-cta {
    margin: 12px 28px 0;
    width: auto !important;
    display: block;
    text-align: center;
    padding: 13px 28px !important;
    border-radius: 2px;
    border-bottom: none !important;
    background: #a51c30 !important;
    color: #ffffff !important;
  }

  .navbar { background: rgba(255,255,255,0.97) !important; backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(0,0,0,0.08); }
  .nav-logo img { filter: none !important; }
  .hamburger span { background: #1a1a1a !important; }

  /* Ensure logo and hamburger always appear above the dropdown panel.
     backdrop-filter on .navbar creates a stacking context, so we need
     z-index > 99 (the dropdown's z-index) to keep these elements on top. */
  .nav-logo { position: relative; z-index: 101; }
  .nav-right { position: relative; z-index: 101; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image { height: 320px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; }
  .service-card-wide { grid-column: span 1; }
  .gallery-grid { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .gallery-large { grid-row: auto; }
  .gallery-item { height: 280px; }
  .doctor-card { grid-template-columns: 1fr; gap: 40px; padding: 40px 24px; }
  .doctor-photo { aspect-ratio: 1/1; max-height: 300px; }
  .info-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .about-stats { gap: 24px; }
}

@media (max-width: 560px) {
  :root { --nav-h: 72px; }
  .container { padding: 0 20px; }
  .nav-inner { padding: 0 16px; }
  .nav-logo img { height: 46px; }
  .lang-toggle { padding: 4px 8px; font-size: 0.7rem; gap: 4px; }
  .nav-right { gap: 10px; }

  .hero-title { font-size: 2rem; }
  .hero-tagline { font-size: 0.9rem; }

  .about-section, .services-section, .gallery-section,
  .doctor-section, .reservation-section, .info-section { padding: 64px 0; }

  .services-grid { grid-template-columns: 1fr; gap: 2px; }
  .service-card-wide { grid-column: span 1; }

  .doctor-name { font-size: 1.8rem; }
  .cred-item { gap: 12px; }

  .reservation-content p { font-size: 0.95rem; }

  .hours-table td { font-size: 0.9rem; }
  .contact-item span { font-size: 0.88rem; }

  .footer-grid { grid-template-columns: 1fr; }
  .about-stats { flex-wrap: wrap; }
}
