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

body {
  overflow-x: hidden;
}

::selection {
  background-color: rgba(107, 27, 42, 0.15);
  color: #6B1B2A;
}

/* === Reveal Animations === */
.reveal {
  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);
}

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

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* === Navbar === */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(107, 27, 42, 0.06);
}

.nav-link {
  position: relative;
}

/* === Mobile Menu === */
#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.closed {
  opacity: 0;
  pointer-events: none;
}

.mobile-link {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
}

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

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

/* === Hero Text Animation === */
#hero h1 {
  opacity: 0;
  transform: translateY(30px);
  animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

#hero p {
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

#hero .flex-col,
#hero .flex-row {
  opacity: 0;
  transform: translateY(20px);
  animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards;
}

#hero .absolute.bottom-10 {
  opacity: 0;
  animation: fadeIn 1s ease 1.2s forwards;
}

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

@keyframes fadeIn {
  to { opacity: 1; }
}

/* === Decorative Divider === */
section > .max-w-7xl > div:first-child > div {
  opacity: 0;
  animation: fadeIn 0.8s ease 0.5s forwards;
}

/* === Menu Item Hover === */
#menu section .group:hover h3 {
  transform: translateX(4px);
  transition: transform 0.2s ease;
}

#menu section .group h3 {
  display: inline-block;
}

/* === Image Hover === */
.rounded-2xl.overflow-hidden img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-2xl.overflow-hidden:hover img {
  transform: scale(1.03);
}

/* === Form Focus === */
input:focus,
textarea:focus {
  outline: none;
}

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

/* === Responsive adjustments === */
@media (max-width: 768px) {
  .font-serif {
    line-height: 1.1;
  }
}

/* === Print === */
@media print {
  #navbar, #mobile-menu { display: none; }
  body { background: white; }
}
