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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(232, 106, 91, 0.3);
    color: #f5f5f7;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1d30;
}
::-webkit-scrollbar-thumb {
    background: #3f445a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #535870;
}

/* === Animations === */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

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

@keyframes scroll-line {
    0% { top: -100%; }
    100% { top: 100%; }
}

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

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

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

.float-slow { animation: float-slow 6s ease-in-out infinite; }
.float-medium { animation: float-medium 4.5s ease-in-out infinite; }
.float-fast { animation: float-fast 3.5s ease-in-out infinite; }
.animate-scroll-line { animation: scroll-line 2s ease-in-out infinite; }

.floating-card-1 { animation: card-float-1 5s ease-in-out infinite; }
.floating-card-2 { animation: card-float-2 4.2s ease-in-out infinite 0.5s; }
.floating-card-3 { animation: card-float-3 4.8s ease-in-out infinite 1s; }

/* === Scroll Reveal === */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* 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; }
    .reveal { opacity: 1; transform: none; }
}

/* === Navbar === */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(14, 16, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05), 0 20px 40px rgba(0,0,0,0.3);
}

.nav-link {
    position: relative;
}

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

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

/* === Mobile Menu === */
#mobile-menu.open {
    transform: translateX(0);
}

.menu-line:nth-child(3) {
    width: 1.2rem;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(3.5px) rotate(45deg);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: translateY(-3.5px) rotate(-45deg);
    background: #E86A5B;
}

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

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

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

/* === Menu Cards === */
.menu-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.menu-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

/* === Feature Cards === */
.feature-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* === Form === */
#contact-form 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='%239a9db0' 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;
}

#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus {
    border-color: rgba(232, 106, 91, 0.6);
    box-shadow: 0 0 0 3px rgba(232, 106, 91, 0.15);
}

/* === Responsive === */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2,
    .floating-card-3 {
        display: none;
    }

    #hero {
        min-height: 100vh;
    }
}
