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

/* ── Hero Mesh Pattern ── */
.hero-mesh {
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(168, 85, 247, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.25) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(147, 51, 234, 0.2) 0%, transparent 50%);
}

/* ── Hero Orbs Animation ── */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.05); }
}
@keyframes float-medium {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, 30px) scale(1.03); }
}
@keyframes float-fast {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(15px, -15px); }
}
.hero-orb--1 { animation: float-slow 12s ease-in-out infinite; }
.hero-orb--2 { animation: float-medium 10s ease-in-out infinite; }
.hero-orb--3 { animation: float-fast 8s ease-in-out infinite; }
.testimonial-orb { animation: float-slow 14s ease-in-out infinite; }
.testimonial-orb2 { animation: float-medium 11s ease-in-out infinite; }
.cta-orb { animation: float-medium 9s ease-in-out infinite; }
.cta-orb2 { animation: float-fast 7s ease-in-out infinite; }

/* ── Navbar Scroll State ── */
#navbar.scrolled {
    background: rgba(59, 7, 100, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* ── 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.revealed:first-child { transition-delay: 0ms; }
}

/* ── Service Card Hover Glow ── */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #9333ea, #f59e0b);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.service-card:hover::before {
    opacity: 1;
}

/* ── Gallery Item Hover ── */
.gallery-item {
    position: relative;
}
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(88, 28, 135, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}
.gallery-item:hover::after {
    opacity: 1;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #faf5ff; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #9333ea, #f59e0b);
    border-radius: 4px;
}

/* ── Selection ── */
::selection {
    background: rgba(147, 51, 234, 0.2);
    color: #581c87;
}

/* ── Focus Visible ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Mobile Menu Transition ── */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Form Input Focus ── */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}
