/* ── Base & Typography ── */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 150, 12, 0.3);
    color: #f0f2f8;
}

/* ── Hero Gradient ── */
.hero-gradient {
    background: radial-gradient(ellipse 80% 60% at 50% 40%, #1B2A4A 0%, #0d1422 50%, #070a12 100%);
}

/* ── Hero Animations ── */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-gradient {
    background: linear-gradient(135deg, #070a12 0%, #1B2A4A 35%, #243152 55%, #0d1422 80%, #070a12 100%);
    background-size: 300% 300%;
    animation: gradientShift 12s ease infinite;
}

.hero-shape {
    animation: float 8s ease-in-out infinite;
}

.hero-shape-1 { animation-delay: 0s; }
.hero-shape-2 { animation-delay: -3s; }
.hero-shape-3 { animation-delay: -5s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-line {
    animation: expandLine 1s ease-out forwards;
    transform-origin: center;
}

@keyframes expandLine {
    from { transform: scaleX(0); opacity: 0; }
    to { transform: scaleX(1); opacity: 1; }
}

.hero-fade {
    opacity: 0;
    animation: fadeUp 0.8s ease-out forwards;
}

.hero-fade:nth-child(1) { animation-delay: 0.2s; }
.hero-fade:nth-child(2) { animation-delay: 0.4s; }
.hero-fade:nth-child(3) { animation-delay: 0.6s; }
.hero-fade:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-scroll {
    animation: fadeIn 1s ease-out 1.5s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ── Grain texture overlay ── */
.hero-grain {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 128px 128px;
}

/* ── Scroll Reveal (below fold only) ── */
.reveal-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.reveal-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

/* Reduced motion: skip animations */
@media (prefers-reduced-motion: reduce) {
    .hero-gradient { animation: none; }
    .hero-shape { animation: none; }
    .hero-fade { animation: none; opacity: 1; }
    .hero-line { animation: none; transform: scaleX(1); }
    .hero-scroll { animation: none; opacity: 1; }
    .reveal-up, .reveal-left, .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Navbar ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(7, 10, 18, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(200, 150, 12, 0.1);
}

#navbar.scrolled .menu-line {
    background: #f0f2f8;
}

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

#mobile-menu.open .mobile-link {
    animation: slideIn 0.4s ease-out forwards;
    opacity: 0;
}

#mobile-menu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Menu hover effects ── */
#menu section > div > div > div > div > div:hover span:first-child {
    /* handled by Tailwind group-hover */
}

/* ── Image hover ── */
#gallery img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Button focus ── */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C8960C;
    outline-offset: 2px;
}

/* ── Smooth image loading ── */
img {
    image-rendering: auto;
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #070a12;
}
::-webkit-scrollbar-thumb {
    background: #1B2A4A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C8960C;
}
