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

body {
  overflow-x: hidden;
}

::selection {
  background: #a7f3d0;
  color: #064e3b;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fefdf8;
}
::-webkit-scrollbar-thumb {
  background: #a7f3d0;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #6ee7b7;
}

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

#site-header.scrolled {
  background: rgba(254, 253, 248, 0.88);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 1px 0 rgba(6, 95, 70, 0.08), 0 4px 24px rgba(6, 95, 70, 0.06);
}

.nav-link {
  position: relative;
}

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

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

/* ===== MOBILE MENU ===== */
#mobile-menu {
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-nav-link {
  position: relative;
}

/* ===== HERO ===== */
.hero-orb {
  animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb:nth-child(2) {
  animation-delay: -3s;
  animation-duration: 10s;
}

.hero-orb:nth-child(3) {
  animation-delay: -5s;
  animation-duration: 7s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 15px) scale(0.97); }
}

.hero-fade {
  opacity: 0;
  animation: heroFadeIn 0.8s ease forwards;
}

.hero-fade:nth-child(1) { animation-delay: 0.1s; }
.hero-fade:nth-child(2) { animation-delay: 0.3s; }
.hero-fade:nth-child(3) { animation-delay: 0.5s; }
.hero-fade:nth-child(4) { animation-delay: 0.7s; }

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

.scroll-dot {
  animation: scrollBounce 1.5s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { top: 0; }
  50% { top: calc(100% - 12px); }
}

/* ===== SCROLL REVEAL ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="left"] {
  transform: translateX(-32px);
}

[data-reveal="left"].revealed {
  transform: translateX(0);
}

[data-reveal="right"] {
  transform: translateX(32px);
}

[data-reveal="right"].revealed {
  transform: translateX(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-fade {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hero-orb {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ===== MENU CARDS ===== */
.menu-card {
  background: #fefdf8;
  border: 1px solid #d1fae5;
  border-radius: 1.25rem;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px -12px rgba(6, 95, 70, 0.15);
  border-color: #a7f3d0;
}

/* ===== MENU TABS ===== */
.menu-tab {
  background: transparent;
  color: #065f46;
  border: none;
  cursor: pointer;
}

.menu-tab.active {
  background: #065f46;
  color: #fefdf8;
  box-shadow: 0 4px 12px rgba(6, 95, 70, 0.3);
}

.menu-tab:not(.active):hover {
  background: #ecfdf5;
}

/* ===== FORM ===== */
#contact-form input:focus,
#contact-form select:focus,
#contact-form textarea:focus {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .font-display {
    font-size: clamp(2rem, 8vw, 3.5rem);
  }
}
