/* ===== BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f5f0f7;
}
::-webkit-scrollbar-thumb {
  background: #b88fbf;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #7a4482;
}

/* ===== SELECTION ===== */
::selection {
  background: #d4bcd9;
  color: #2a1430;
}

/* ===== FOCUS ===== */
:focus-visible {
  outline: 2px solid #ffaa00;
  outline-offset: 2px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== REVEAL ANIMATIONS (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .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; }
  .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ===== MOBILE MENU TRANSITION ===== */
#mobile-menu {
  animation: fadeIn 0.2s ease;
}

/* ===== CARD HOVER RAISE ===== */
article.group {
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
article.group:hover {
  transform: translateY(-4px);
}

/* ===== BUTTON RIPPLE EFFECT ===== */
button, a[role="button"] {
  position: relative;
  overflow: hidden;
}

/* ===== NAV SCROLL STATE ===== */
#site-header.scrolled {
  background: rgba(42, 20, 48, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* ===== MAP HOVER ===== */
iframe:hover {
  filter: brightness(1.02);
}

/* ===== FORM INPUTS ===== */
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(255, 170, 0, 0.15);
}

/* ===== ACCESSIBILITY: SKIP LINK ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: #7a4482;
  color: #fff;
  padding: 0.75rem 1.5rem;
  z-index: 100;
  font-weight: 600;
}
.skip-link:focus {
  top: 0;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 640px) {
  .font-display {
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
