/* ===== Base & Typography ===== */
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

::selection {
  background: #C0603C;
  color: #fff;
}

/* ===== Navigation ===== */
#nav {
  background: transparent;
  border-bottom: 1px solid transparent;
}

#nav.scrolled {
  background: rgba(253, 251, 247, 0.95);
  backdrop-filter: blur(12px);
  border-bottom-color: rgba(200, 190, 175, 0.3);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.nav-link {
  position: relative;
}

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

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

/* ===== Mobile Menu ===== */
#mobileMenu.open {
  transform: translateX(0);
}

#mobileMenu .menu-btn-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 50;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Procedure Cards ===== */
.procedure-card {
  padding: 0 0 0 0;
  transition: all 0.5s ease;
}

.procedure-card:hover {
  transform: translateY(-2px);
}

/* ===== Form ===== */
input:focus,
textarea:focus {
  border-bottom-color: #C0603C !important;
}

input::placeholder,
textarea::placeholder {
  color: #c0b8ad;
  font-weight: 300;
}

/* ===== Subtle Animations ===== */
@keyframes pulse-slow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #FAF5EC;
}
::-webkit-scrollbar-thumb {
  background: #d4c8b8;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a39080;
}

/* ===== Mobile Menu Animations ===== */
.menu-line {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menuBtn.active .menu-line:nth-child(3) {
  width: 6;
  transform: translateY(-4px) rotate(-45deg);
}

/* ===== Mobile Link Animations ===== */
.mobile-link {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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