/* ============================================
   Servios — Custom Styles
   ============================================ */

/* ── Animations ── */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

/* ── Initial Animations ── */
.animate-fade-up {
    animation: fade-up 0.8s ease-out forwards;
}

.delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

/* Staggered reveals */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* ── Navbar ── */
#navbar {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark #navbar {
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.05);
}

.dark #navbar.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.3);
}

/* ── Phone Mockup ── */
.phone-mockup {
    animation: float 6s ease-in-out infinite;
}

.phone-mockup > div:last-child {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* ── Feature Cards ── */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
}

/* ── Store Buttons ── */
.store-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

/* ── Smooth Scroll ── */
html {
    scroll-behavior: smooth;
}

/* ── Selection Color ── */
::selection {
    background: rgba(99, 102, 241, 0.2);
    color: inherit;
}

.dark ::selection {
    background: rgba(129, 140, 248, 0.3);
}

/* ── Mobile Menu Transition ── */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    padding: 0;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    max-height: 300px;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 100px;
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #6366F1;
    outline-offset: 2px;
    border-radius: 8px;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .phone-mockup,
    .phone-mockup > div:last-child {
        animation: none;
    }

    .reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .animate-fade-up {
        animation: none;
        opacity: 1;
    }

    .delay-200 {
        animation: none;
        opacity: 1;
    }

    * {
        transition-duration: 0.01ms !important;
    }
}
