/* ============================================
   Yūgen Dental — v4
   Warm · Earthy · Editorial · Restrained
   Inspired by thehundred.jp & headspatokyo.com
   ============================================ */

:root {
  --forest: #323E2B;
  --moss: #79785D;
  --cobalt: #455160;
  --charcoal: #1D1D1D;
  --amber: #F3AA4B;
  --clay: #84593D;
  --stone: #E5E3DD;
  --earth: #DDD3C8;

  --warm-bg: #EDE8E2;
  --cream: #F6F3EF;
  --white: #FAFAF8;

  --font-heading: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', sans-serif;

  --ease: 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-slow: 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  color: #444;
  background: var(--cream);
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
}

.label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 20px;
  display: block;
}


/* ====================== NAV ====================== */

.nav {
  position: fixed;
  top: 0; left: 0; width: 100%;
  z-index: 100;
  padding: 28px 0;
  transition: all var(--ease);
}

.nav.scrolled {
  background: rgba(246, 243, 239, 0.95);
  backdrop-filter: blur(12px);
  padding: 16px 0;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 54px;
  transition: all var(--ease);
}

/* Hero state: black logo, white links over forest green half */
.nav--hero .nav-logo img { filter: none; }
.nav--hero .nav-link { color: rgba(255,255,255,0.85); }
.nav--hero .nav-toggle span { background: #fff; }

.nav.scrolled .nav-logo img { filter: none; }
.nav.scrolled .nav-link { color: var(--charcoal); }
.nav.scrolled .nav-toggle span { background: var(--charcoal); }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(28px, 3.5vw, 48px);
}

.nav-link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--charcoal);
  transition: opacity 0.3s;
}
.nav-link:hover { opacity: 0.5; }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > .nav-link { cursor: pointer; }
.nav-dropdown > .nav-link::after {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  margin-left: 6px;
  margin-bottom: 2px;
  transition: transform 0.3s;
}
.nav-dropdown:hover > .nav-link::after {
  transform: rotate(-135deg);
}
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  padding: 14px 0;
  min-width: 260px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 9px 28px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #444;
  transition: all 0.2s;
}
.nav-dropdown-menu a:hover {
  background: var(--cream);
  color: var(--forest);
}

/* Mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none;
  cursor: pointer; padding: 4px;
}
.nav-toggle span {
  display: block; width: 24px; height: 1.5px;
  background: var(--charcoal);
  transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -5px); }


/* ====================== HERO (Split Layout) ====================== */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--cream);
}

.hero-image {
  position: relative;
  overflow: hidden;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 20% 65%;
  transform: none;
  will-change: transform;
}

.hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(48px, 6vw, 100px) clamp(36px, 5vw, 80px);
  background: var(--forest);
  overflow: hidden;
}
/* Decorative branded Y image */
.deco-y {
  position: absolute;
  pointer-events: none;
  filter: brightness(0) invert(1);
  opacity: 0.05;
  height: clamp(600px, 70vw, 1000px);
  width: auto;
  right: -15%;
  top: 50%;
  transform: translateY(-50%);
}
.deco-y--footer {
  opacity: 0.04;
  height: clamp(500px, 60vw, 800px);
  right: auto;
  left: -8%;
}

.hero h1 {
  color: #fff;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 1s ease 0.3s forwards;
}

.hero-sub {
  color: rgba(255,255,255,0.6);
  font-size: clamp(0.88rem, 1.05vw, 0.96rem);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.85;
  opacity: 0;
  animation: fadeUp 1s ease 0.55s forwards;
}

.hero .btn {
  opacity: 0;
  animation: fadeUp 1s ease 0.8s forwards;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 16px 42px;
  border: 1px solid;
  transition: all var(--ease);
  cursor: pointer;
}
.btn-hero {
  color: var(--amber);
  border-color: rgba(243,170,75,0.4);
  background: transparent;
  box-shadow: 0 0 20px rgba(243,170,75,0.08);
}
.btn-hero:hover {
  background: rgba(243,170,75,0.1);
  border-color: var(--amber);
  box-shadow: 0 0 30px rgba(243,170,75,0.15);
}
.btn-light {
  color: rgba(255,255,255,0.8);
  border-color: rgba(255,255,255,0.35);
  background: transparent;
}
.btn-light:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.6);
}
.btn-dark {
  color: var(--forest);
  border-color: var(--forest);
  background: transparent;
  box-shadow: 0 4px 16px rgba(50,62,43,0.1);
}
.btn-dark:hover {
  background: var(--forest);
  color: #fff;
  box-shadow: 0 6px 24px rgba(50,62,43,0.2);
}
.btn-solid {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
}
.btn-solid:hover {
  background: #252e1f;
  border-color: #252e1f;
}


/* =================== PHILOSOPHY BANNER =================== */

.philosophy {
  position: relative;
  padding: clamp(100px, 12vw, 160px) 0;
  text-align: center;
  overflow: hidden;
}
.philosophy-bg {
  position: absolute; inset: 0;
}
.philosophy-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.philosophy-overlay {
  position: absolute; inset: 0;
  background: rgba(50,62,43,0.7);
}

.philosophy-inner {
  position: relative; z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 60px);
}

.philosophy h2 {
  color: #fff;
  margin-bottom: 28px;
}
.philosophy p {
  color: rgba(255,255,255,0.6);
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  line-height: 2;
}


/* ===================== COUPLE (Sticky Image + Text) ==================== */

.couple {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--cream);
}

.couple-img {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.couple-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.couple-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 10vw, 140px) clamp(36px, 5vw, 80px);
}

.couple-content h2 {
  color: var(--forest);
  margin-bottom: 24px;
}
.couple-content p {
  color: #666;
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  line-height: 1.9;
}
.couple-content .btn,
.dentist-content .btn,
.experience-content .btn {
  margin-top: 20px;
  align-self: flex-start;
}


/* =================== EXPERIENCE (Full-bleed 50/50 Split) =================== */

.experience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: #fff;
}

.experience-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 10vw, 140px) clamp(36px, 5vw, 80px);
}

.experience-content h2 {
  color: var(--forest);
  margin-bottom: 24px;
}
.experience-content p {
  color: #666;
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  line-height: 1.9;
}

.experience-img {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.experience-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}

.amenities {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.amenity {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: #555;
}
.amenity svg {
  flex-shrink: 0;
  color: var(--forest);
  opacity: 0.7;
}


/* =================== DENTIST (Full-bleed 50/50 Split) =================== */

.dentist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  background: var(--cream);
}

.dentist-portrait {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.dentist-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(0.1);
}

.dentist-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 10vw, 140px) clamp(36px, 5vw, 80px);
}

.dentist-content h2 {
  color: var(--forest);
  margin-bottom: 8px;
}
.dentist-content .qual {
  font-size: 12px;
  color: var(--moss);
  letter-spacing: 0.06em;
  margin-bottom: 28px;
}
.dentist-content p {
  color: #666;
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  line-height: 1.9;
}


/* =================== SERVICES =================== */

.services {
  padding: clamp(100px, 12vw, 160px) 0;
  background: var(--warm-bg);
}

.services-header {
  text-align: center;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.services-header h2 { color: var(--forest); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.5vw, 32px);
  max-width: 1000px;
  margin: 0 auto;
}

.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--cream);
  padding: clamp(32px, 3vw, 44px) clamp(24px, 2.5vw, 36px);
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.4s ease;
}
.service-card.in-view {
  opacity: 1;
  transform: translateY(0);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(50,62,43,0.08);
}

.service-icon {
  margin-bottom: 24px;
}
.service-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.service-card h3 {
  color: var(--charcoal);
  margin-bottom: 10px;
}
.service-card p {
  color: #888;
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 24px;
}
.service-card .btn {
  margin-top: auto;
  padding: 12px 28px;
  font-size: 9px;
}


/* =================== CTA =================== */

.cta {
  position: relative;
  padding: clamp(100px, 14vw, 200px) 0;
  text-align: center;
  overflow: hidden;
}
.cta-bg {
  position: absolute; inset: 0;
}
.cta-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.cta-overlay {
  position: absolute; inset: 0;
  background: rgba(50,62,43,0.7);
}
.cta-content {
  position: relative; z-index: 2;
  max-width: 580px;
  margin: 0 auto;
  padding: 0 24px;
}
.cta h2 {
  color: #fff;
  margin-bottom: 20px;
}
.cta p {
  color: rgba(255,255,255,0.65);
  margin-bottom: 36px;
  font-size: clamp(0.92rem, 1.1vw, 1rem);
}


/* =================== FOOTER =================== */

.footer {
  position: relative;
  background: var(--forest);
  padding: clamp(60px, 7vw, 88px) 0 40px;
  color: rgba(255,255,255,0.55);
  overflow: hidden;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: clamp(24px, 3vw, 48px);
}

.footer-logo {
  height: 42px;
  opacity: 0.8;
  margin-bottom: 20px;
}
.footer-brand p {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255,255,255,0.4);
}

.footer-col h4 {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  opacity: 0.6;
  margin-bottom: 18px;
}

.footer-contact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.footer-contact svg {
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.4;
}
.footer-contact span,
.footer-contact a {
  margin-bottom: 0 !important;
}
.footer-col a,
.footer-col span {
  display: block;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 10px;
  transition: color 0.3s;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  margin-top: clamp(40px, 5vw, 60px);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}


/* =================== ANIMATIONS =================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Staggered content reveals */
.stagger-reveal > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.stagger-reveal.in-view > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0s; }
.stagger-reveal.in-view > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.stagger-reveal.in-view > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
.stagger-reveal.in-view > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.36s; }
.stagger-reveal.in-view > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.48s; }
.stagger-reveal.in-view > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }
.stagger-reveal.in-view > *:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 0.72s; }

/* Image reveal — fade in */
.img-reveal {
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.img-reveal.in-view {
  opacity: 1;
}

/* Parallax images — vertical shift applied via JS */
.parallax-img img {
  will-change: transform;
  transform: scale(1.05);
}

/* Philosophy inner parallax — applied via JS */
.philosophy-inner {
  will-change: transform;
}


/* =================== RESPONSIVE =================== */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-image {
    height: 50vh;
    min-height: 320px;
  }
  .hero-content {
    padding: clamp(48px, 8vw, 80px) clamp(24px, 5vw, 48px);
  }

  .couple {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .couple-img {
    position: relative;
    height: 60vh;
  }

  .dentist {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .dentist-portrait {
    position: relative;
    height: 60vh;
  }

  .experience {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .experience-img {
    position: relative;
    height: 60vh;
  }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100dvh;
    background: rgba(246,243,239,0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    opacity: 0; visibility: hidden;
    transition: all var(--ease);
  }
  .nav-links.active { opacity: 1; visibility: visible; }
  .nav-link { font-size: 13px !important; color: var(--charcoal) !important; }
  .nav-toggle { display: flex; z-index: 101; }
  .nav-toggle.active span { background: var(--charcoal) !important; }

  .nav-dropdown-menu {
    position: static; transform: none !important;
    box-shadow: none; background: transparent;
    padding: 6px 0 0; opacity: 1; visibility: visible;
    min-width: auto; display: none;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-dropdown-menu a {
    padding: 6px 0 !important; text-align: center;
    font-size: 12px !important; color: var(--moss) !important;
  }
  .nav-dropdown > .nav-link::after { display: none; }

}

@media (max-width: 480px) {
  .btn { width: 100%; text-align: center; padding: 14px 32px; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .stagger-reveal > * { opacity: 1; transform: none; }
  .img-reveal { opacity: 1; }
  .service-card { opacity: 1; transform: none; }
  .parallax-img img { transform: none !important; }
  .hero-image img { transform: none !important; }
}
