/* ── Base ── */
*, *::before, *::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow-x: hidden;
}

::selection {
  background: #7B2D3B;
  color: #FFF8F6;
}

/* ── Navbar ── */
#navbar {
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background: rgba(253, 249, 246, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

.nav-link {
  position: relative;
}

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

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

.nav-logo-text {
  transition: color 0.3s ease;
}

/* ── Mobile Menu ── */
.mobile-bar {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

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

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

#mobile-menu.open .mobile-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#mobile-menu.open .mobile-bar:nth-child(2) {
  opacity: 0;
}

#mobile-menu.open .mobile-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
  width: 24px;
}

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

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

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

/* ── Floating Cards ── */
.floating-card {
  animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
  animation-delay: 0s;
}

.floating-card:nth-child(3) {
  animation-delay: 1.3s;
}

.floating-card:nth-child(4) {
  animation-delay: 2.6s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

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

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

/* ── Stagger children ── */
.stagger-children .reveal:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ── Image hover ── */
img {
  max-width: 100%;
  height: auto;
}

/* ── Focus styles ── */
a:focus-visible, button:focus-visible {
  outline: 2px solid #7B2D3B;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Responsive tweaks ── */
@media (max-width: 767px) {
  .font-serif {
    line-height: 1.15;
  }
}
