/* ============================================
   ArtikaWeb 2026 - Custom Styles
   Complementary to Tailwind CSS
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Header --- */
#header {
    background: transparent;
    transition: all 0.3s ease;
}

#header.scrolled {
    background: rgba(79, 107, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* --- Hero Animation --- */
.hero-illustration {
    animation: heroFloat 6s ease-in-out infinite;
}

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

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #4F6BF6, #00D4FF);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* --- Product Cards --- */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(79, 107, 246, 0.1);
}

/* --- Fade In Animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.35s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(7) { transition-delay: 0.45s; }
.stagger-children.visible > *:nth-child(8) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(9) { transition-delay: 0.55s; }

.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* --- Nav link underline effect --- */
.nav-link {
    position: relative;
}

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

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

/* --- Pulse animation for decorative dots --- */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

/* --- Form focus styles --- */
input:focus, textarea:focus {
    outline: none;
}

/* --- Back to top button --- */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* --- Gradient text utility --- */
.text-gradient {
    background: linear-gradient(135deg, #4F6BF6, #00D4FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Selection color --- */
::selection {
    background: rgba(79, 107, 246, 0.3);
    color: inherit;
}

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

::-webkit-scrollbar-track {
    background: #F0F4FF;
}

::-webkit-scrollbar-thumb {
    background: #4F6BF6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3A4FD6;
}

/* --- Mobile menu animation --- */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

#mobile-menu.open {
    max-height: 500px;
    display: block;
}

/* --- Profile Drawer --- */
#profile-drawer.open {
    visibility: visible;
}

#profile-drawer.open #profile-backdrop {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

#profile-drawer.open #profile-panel {
    transform: translateX(0);
}

#profile-panel {
    scrollbar-width: thin;
    scrollbar-color: #4F6BF6 #F0F4FF;
}

#profile-panel::-webkit-scrollbar {
    width: 6px;
}

#profile-panel::-webkit-scrollbar-track {
    background: #F0F4FF;
}

#profile-panel::-webkit-scrollbar-thumb {
    background: #4F6BF6;
    border-radius: 3px;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    .hero-illustration {
        animation: none;
    }

    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }
}
