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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* ── Scroll Reveal (progressive enhancement) ─────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .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);
  }

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

  .reveal.delay-100 { transition-delay: 100ms; }
  .reveal.delay-200 { transition-delay: 200ms; }
  .reveal.delay-300 { transition-delay: 300ms; }
}

/* Fallback: always show content if JS is disabled or reduced motion preferred */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ── Custom scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDF6FF;
}
::-webkit-scrollbar-thumb {
  background: #D88AFF;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #A83DBF;
}

/* ── Selection ────────────────────────────────────────────────────────── */
::selection {
  background: #D88AFF;
  color: #321236;
}

/* ── Focus visible ────────────────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid #D88AFF;
  outline-offset: 2px;
}

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

/* ── Snap scroll for gallery ──────────────────────────────────────────── */
.snap-x {
  scrollbar-width: none;
}
.snap-x::-webkit-scrollbar {
  display: none;
}

/* ── Mobile menu animation ────────────────────────────────────────────── */
#mobile-menu.show {
  opacity: 1;
}

/* ── Smooth anchor offsets ────────────────────────────────────────────── */
section[id] {
  scroll-margin-top: 80px;
}
