/* ===== Base & Typography ===== */
html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: #B8E6D4;
  color: #0A2342;
}

/* ===== Navigation ===== */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: #B8E6D4;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

#navbar.scrolled .nav-link {
  color: #0A2342;
}

#navbar.scrolled .nav-logo-color {
  fill: #0A2342;
}

#navbar.scrolled .nav-logo-text {
  color: #0A2342;
}

#navbar.scrolled .nav-logo-sub {
  color: #7BC8A8;
}

#navbar.scrolled .nav-menu-btn {
  border-color: rgba(10, 35, 66, 0.2);
  color: #0A2342;
}

#navbar.hero-bg .nav-link {
  color: rgba(255, 255, 255, 0.8);
}

#navbar.hero-bg .nav-logo-color {
  fill: #B8E6D4;
}

#navbar.hero-bg .nav-logo-text {
  color: #ffffff;
}

#navbar.hero-bg .nav-logo-sub {
  color: #B8E6D4;
}

#navbar.hero-bg .nav-menu-btn {
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

/* ===== Mobile Menu ===== */
.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

body.menu-open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

body.menu-open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
body.menu-open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
body.menu-open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
body.menu-open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
body.menu-open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

body.menu-open #mobileMenu {
  opacity: 1;
  pointer-events: all;
}

body.menu-open #menuBtn .nav-bar-1 {
  transform: translateY(3px) rotate(45deg);
}

body.menu-open #menuBtn .nav-bar-2 {
  opacity: 0;
}

body.menu-open #menuBtn .nav-bar-3 {
  transform: translateY(-3px) rotate(-45deg);
  width: 1.25rem;
}

/* ===== Hero Animations ===== */
.hero-subtitle {
  animation: slideUp 0.8s ease forwards;
  animation-delay: 0.2s;
  opacity: 0;
  transform: translateY(30px);
}

.hero-line {
  animation: slideUp 0.8s ease forwards;
  animation-delay: 0.4s;
  opacity: 0;
  transform: translateY(100%);
}

.hero-line:nth-child(2) { animation-delay: 0.55s; }
.hero-line:nth-child(3) { animation-delay: 0.7s; }
.hero-line:nth-child(4) { animation-delay: 0.85s; }

.hero-text {
  animation: slideUp 0.8s ease forwards;
  animation-delay: 1s;
  opacity: 0;
  transform: translateY(30px);
}

.hero-cta {
  animation: slideUp 0.8s ease forwards;
  animation-delay: 1.15s;
  opacity: 0;
  transform: translateY(30px);
}

.hero-image {
  animation: scaleIn 1.2s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
  transform: scale(0.95);
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== Section Animations ===== */
.section-label,
.section-title,
.service-card,
.about-label,
.about-title,
.about-text,
.care-label,
.care-title,
.care-text,
.care-step,
.contact-label,
.contact-title {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section-label.visible,
.section-title.visible,
.about-label.visible,
.about-title.visible,
.about-text.visible,
.care-label.visible,
.care-title.visible,
.care-text.visible,
.contact-label.visible,
.contact-title.visible {
  opacity: 1;
  transform: translateY(0);
}

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

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

.care-step { transition-delay: 0.1s; }
.care-step:nth-child(2) { transition-delay: 0.2s; }
.care-step:nth-child(3) { transition-delay: 0.3s; }

/* ===== Service Cards ===== */
.service-card {
  will-change: transform;
}

/* ===== Form Styles ===== */
input:focus,
select:focus,
textarea:focus {
  border-color: #7BC8A8 !important;
  box-shadow: 0 0 0 3px rgba(184, 230, 212, 0.2);
}

/* ===== Smooth Scroll Offset ===== */
section[id] {
  scroll-margin-top: 80px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .font-serif.text-5xl,
  .font-serif.text-6xl {
    font-size: 2.5rem;
    line-height: 1.1;
  }

  .font-serif.text-4xl {
    font-size: 2rem;
  }
}

@media (max-width: 640px) {
  section[id] {
    scroll-margin-top: 60px;
  }
}
