/* ── Base & Animations ── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

/* ── Fade-in-up animation ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseSlow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

@keyframes scrollLine {
    0% { opacity: 0; transform: scaleY(0); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { opacity: 0; transform: scaleY(0); transform-origin: bottom; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-pulse-slow {
    animation: pulseSlow 4s ease-in-out infinite;
}

.animate-scroll-line {
    animation: scrollLine 1.8s ease-in-out infinite;
}

/* ── Scroll reveal ── */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ── Navigation ── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ── Navbar scroll state ── */
.navbar-scrolled {
    background: rgba(26, 10, 62, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(251, 191, 36, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ── Mobile menu ── */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-line.active:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-line.active:nth-child(2) {
    opacity: 0;
}

.menu-line.active:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* ── Gold accent line on sections ── */
section::before {
    content: '';
    display: block;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a0a3e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7c3aed, #fbbf24);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a855f7, #fcd34d);
}

/* ── Selection ── */
::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

/* ── Input autofill ── */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0d0520 inset !important;
    -webkit-text-fill-color: #f0f0f0 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ── Image hover container ── */
.rounded-3xl.overflow-hidden {
    will-change: transform;
}

/* ── Responsive tweaks ── */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
}
