/* ── Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }

/* ── Nav ────────────────────────────────────────── */
#nav {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(125,79,166,0.08);
}
#nav.scrolled {
  box-shadow: 0 4px 24px rgba(125,79,166,0.08);
}
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #7d4fa6, #fbbf24);
  border-radius: 2px;
  transition: width 0.25s ease;
}
.nav-link:hover::after { width: 100%; }

/* ── Mobile menu ────────────────────────────────── */
.menu-line { transition: all 0.3s ease; }
#mobile-menu.open .menu-line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
#mobile-menu.open .menu-line:nth-child(2) { opacity: 0; }
#mobile-menu.open .menu-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); width: 5px; margin-left: 0; }
.mobile-link { border-radius: 0.75rem; }

/* ── Card hover ─────────────────────────────────── */
.card-hover { will-change: transform; }

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

/* ── Floating cards animation ───────────────────── */
@keyframes float1 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
@keyframes float2 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
}
@keyframes float3 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}
.floating-1 { animation: float1 4s ease-in-out infinite; }
.floating-2 { animation: float2 5s ease-in-out infinite 0.5s; }
.floating-3 { animation: float3 3.5s ease-in-out infinite 1s; }
.floating-4 { animation: float1 4.5s ease-in-out infinite 1.5s; }

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f5f0f9; }
::-webkit-scrollbar-thumb { background: #d6c4e6; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #ba9bd5; }

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

/* ── Print ──────────────────────────────────────── */
@media print {
  #nav, #mobile-menu, button { display: none !important; }
  body { color: #000; background: #fff; }
  section { page-break-inside: avoid; }
}
