/* =============================================
   The Arkanzen — Custom Styles
   ============================================= */

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

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

body {
    background-color: #030f1a;
    color: #d1d9e6;
}

/* Selection */
::selection {
    background-color: rgba(116, 223, 191, 0.3);
    color: #f0f4f8;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a2540;
}
::-webkit-scrollbar-thumb {
    background: #1a3f65;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d5580;
}

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

#navbar.scrolled {
    background: rgba(3, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(45, 85, 128, 0.2);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #7dd4b8;
    transition: width 0.3s ease;
}

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

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

#mobile-menu.open .mobile-link {
    animation: fadeSlideIn 0.4s ease forwards;
}

#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; }

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

/* Menu button active state */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* =============================================
   Hero Floating Cards
   ============================================= */
.floating-card {
    will-change: transform;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.floating-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(116, 223, 191, 0.15);
}

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

.floating-card[data-float="1"] { animation: float 4s ease-in-out infinite; }
.floating-card[data-float="2"] { animation: float 5s ease-in-out infinite 0.5s; }
.floating-card[data-float="3"] { animation: float 4.5s ease-in-out infinite 1s; }
.floating-card[data-float="4"] { animation: float 3.5s ease-in-out infinite 0.3s; }

/* =============================================
   Reveal Animations (progressive enhancement)
   ============================================= */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Default state: content is visible (no JS needed) */
.reveal {
    transform: translateY(0);
    opacity: 1;
}

/* JS-enhanced: add subtle entrance for below-fold */
.js .reveal {
    opacity: 0.95;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.js .reveal:nth-child(1) { transition-delay: 0s; }
.js .reveal:nth-child(2) { transition-delay: 0.1s; }
.js .reveal:nth-child(3) { transition-delay: 0.2s; }
.js .reveal:nth-child(4) { transition-delay: 0.3s; }
.js .reveal:nth-child(5) { transition-delay: 0.4s; }
.js .reveal:nth-child(6) { transition-delay: 0.5s; }

/* 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;
    }
    .floating-card {
        animation: none !important;
    }
}

/* =============================================
   Product Card Hover
   ============================================= */
.group:hover img {
    transform: scale(1.08);
}

/* =============================================
   Button Focus States
   ============================================= */
a:focus-visible, button:focus-visible {
    outline: 2px solid #7dd4b8;
    outline-offset: 3px;
    border-radius: 4px;
}

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

/* =============================================
   Print Styles
   ============================================= */
@media print {
    #navbar, #mobile-menu {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
    .floating-card {
        display: none;
    }
}
