/* ===== Base & Reset ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(232, 96, 75, 0.3);
    color: #f6f6f6;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #141414;
}
::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #E8604B;
}

/* ===== Animations ===== */
@keyframes pulse-slow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes scroll-line {
    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; }
}

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

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ===== Reveal Animations (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Fallback: always visible if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Navbar ===== */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(232, 96, 75, 0.1);
}

/* ===== Mobile Menu ===== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ===== Menu Button ===== */
.menu-line {
    display: block;
}

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

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

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

/* ===== Menu Tabs ===== */
.menu-tab {
    background: transparent;
    color: #747474;
    border: none;
    cursor: pointer;
}

.menu-tab.active {
    background: #E8604B;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(232, 96, 75, 0.3);
}

/* ===== Menu Content ===== */
.menu-content {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== Scroll Line ===== */
.animate-scroll-line {
    animation: scroll-line 2s ease-in-out infinite;
}

/* ===== Pulse Slow ===== */
.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* ===== Hover Card Lift ===== */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* ===== Selection highlight for inputs ===== */
input::placeholder, textarea::placeholder {
    color: #565656;
}

input:focus, textarea:focus, select:focus {
    outline: none;
}

/* ===== Select arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23747474' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Hero text shimmer (subtle) ===== */
@media (prefers-reduced-motion: no-preference) {
    #hero h1 {
        animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }
    #hero > div > div:nth-child(2) {
        animation: fadeInUp 1s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    #hero > div > div:nth-child(3) {
        animation: fadeInUp 1s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
    #hero > div > div:nth-child(4) {
        animation: fadeInUp 1s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
    }
}

/* ===== Image hover zoom ===== */
.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== Button focus states ===== */
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid #E8604B;
    outline-offset: 2px;
}
