  /* ── Base ── */
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 80px; }
  body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  img { display: block; max-width: 100%; }

  /* ── Navbar scroll state ── */
  #navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
  }
  #navbar.scrolled {
    background: rgba(250, 245, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(124, 58, 137, 0.08);
  }

  /* ── Hero orbs animation ── */
  @keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -25px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
  }
  .hero-orb {
    animation: float 8s ease-in-out infinite;
  }
  .hero-orb:nth-child(2) { animation-delay: -2s; animation-duration: 10s; }
  .hero-orb:nth-child(3) { animation-delay: -4s; animation-duration: 12s; }

  /* ── Reveal animations (progressive enhancement) ── */
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      opacity: 0;
      transform: translateY(30px);
      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:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
    .reveal:nth-child(5) { transition-delay: 0.4s; }
    .reveal:nth-child(6) { transition-delay: 0.5s; }
  }

  /* When JS is unavailable, ensure reveals are always visible */
  .no-js .reveal,
  .js-enabled .reveal.always-visible {
    opacity: 1;
    transform: none;
  }

  /* ── Card hover ── */
  .card-hover {
    transform: translateY(0);
  }

  /* ── Mobile menu transition ── */
  #mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }
  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* ── Back to top ── */
  #back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* ── Custom scrollbar ── */
  ::-webkit-scrollbar { width: 8px; }
  ::-webkit-scrollbar-track { background: #faf5ff; }
  ::-webkit-scrollbar-thumb { background: #c084fc; border-radius: 999px; }
  ::-webkit-scrollbar-thumb:hover { background: #a855f7; }

  /* ── Focus visible ── */
  :focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
    border-radius: 4px;
  }

  /* ── Selection ── */
  ::selection {
    background: #e9d5ff;
    color: #581c87;
  }
