/* ============================================
   NAKSHAMART MODERN CSS
   Harvey.ai-Inspired Dark Theme
   ============================================ */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

/* Hidden state for animated elements */
[data-animate] {
    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);
}

[data-animate="fade-left"] {
    transform: translateX(50px);
}

[data-animate="fade-right"] {
    transform: translateX(-50px);
}

[data-animate="fade-up"] {
    transform: translateY(30px);
}

[data-animate="scale-up"] {
    transform: scale(0.95);
}

/* Visible state */
[data-animate].is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Stagger delays */
[data-animate][data-delay="100"] { transition-delay: 0.1s; }
[data-animate][data-delay="200"] { transition-delay: 0.2s; }
[data-animate][data-delay="300"] { transition-delay: 0.3s; }
[data-animate][data-delay="400"] { transition-delay: 0.4s; }
[data-animate][data-delay="500"] { transition-delay: 0.5s; }

/* Stagger children */
[data-animate="stagger"] > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="stagger"].is-visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   FLOATING ANIMATIONS
   ============================================ */

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.3; transform: scale(1.05); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
    animation-delay: -2s;
}

.animate-pulse-glow {
    animation: pulse-glow 4s ease-in-out infinite;
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */

@keyframes scroll-down {
    0% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(6px); opacity: 0.5; }
    100% { transform: translateY(0); opacity: 1; }
}

.animate-scroll-down {
    animation: scroll-down 1.5s ease-in-out infinite;
}

/* ============================================
   ACCORDION STYLES
   ============================================ */

.accordion-item.active .accordion-trigger {
    background: rgba(26, 26, 26, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
    background: rgba(237, 51, 85, 0.2);
}

.accordion-item.active .accordion-icon i {
    color: #ed3355;
}

.accordion-item.active .accordion-content {
    max-height: 200px;
    padding-top: 0.5rem;
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */

#main-nav {
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}

#main-nav.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hamburger menu animation */
.hamburger-line {
    width: 24px;
    height: 2px;
    background: white;
    position: relative;
    transition: all 0.3s ease;
}

.hamburger-line::before,
.hamburger-line::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
}

.hamburger-line::before { top: -8px; }
.hamburger-line::after { bottom: -8px; }

.menu-open .hamburger-line {
    background: transparent;
}

.menu-open .hamburger-line::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-open .hamburger-line::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ============================================
   BUTTON HOVER EFFECTS
   ============================================ */

.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-glow:hover::before {
    width: 300px;
    height: 300px;
}

/* ============================================
   CARD HOVER EFFECTS
   ============================================ */

.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* ============================================
   GRADIENT TEXT ANIMATION
   ============================================ */

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-text-animated {
    background: linear-gradient(90deg, #ed3355, #ff6b6b, #ed3355);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */

.counter {
    font-variant-numeric: tabular-nums;
}

/* ============================================
   MOBILE MENU
   ============================================ */

#mobile-menu {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

#mobile-menu nav a {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    color: white;
    padding: 1rem 0;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s, color 0.3s;
}

#mobile-menu.active nav a {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.active nav a:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.active nav a:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.active nav a:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.active nav a:nth-child(4) { transition-delay: 0.25s; }

#mobile-menu nav a:hover {
    color: #ed3355;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

#back-to-top {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   IMAGE EFFECTS
   ============================================ */

.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* ============================================
   GRID PATTERN BACKGROUND
   ============================================ */

.bg-grid-pattern {
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 1024px) {
    [data-animate] {
        transform: translateY(20px);
    }

    [data-animate="fade-left"],
    [data-animate="fade-right"] {
        transform: translateY(20px);
    }
}

@media (max-width: 640px) {
    .counter {
        font-size: 2.5rem !important;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    [data-animate] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-float,
    .animate-float-delayed,
    .animate-pulse-glow,
    .animate-scroll-down {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* ============================================
   SELECTION STYLES
   ============================================ */

::selection {
    background: rgba(237, 51, 85, 0.3);
    color: white;
}

::-moz-selection {
    background: rgba(237, 51, 85, 0.3);
    color: white;
}

/* ============================================
   TEXT SHIMMER EFFECT
   ============================================ */

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.text-shimmer {
    background: linear-gradient(
        90deg,
        #ed3355 0%,
        #ff6b6b 25%,
        #ffffff 50%,
        #ff6b6b 75%,
        #ed3355 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* ============================================
   STAGGERED CARD REVEAL
   ============================================ */

[data-animate="stagger"].is-visible > *:nth-child(1) { transition-delay: 0.05s; }
[data-animate="stagger"].is-visible > *:nth-child(2) { transition-delay: 0.1s; }
[data-animate="stagger"].is-visible > *:nth-child(3) { transition-delay: 0.15s; }
[data-animate="stagger"].is-visible > *:nth-child(4) { transition-delay: 0.2s; }
[data-animate="stagger"].is-visible > *:nth-child(5) { transition-delay: 0.25s; }
[data-animate="stagger"].is-visible > *:nth-child(6) { transition-delay: 0.3s; }
[data-animate="stagger"].is-visible > *:nth-child(7) { transition-delay: 0.35s; }
[data-animate="stagger"].is-visible > *:nth-child(8) { transition-delay: 0.4s; }

/* ============================================
   HOVER RIPPLE EFFECT
   ============================================ */

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1) translate(-50%, -50%);
    transform-origin: 0 0;
}

.btn-ripple:hover::after {
    animation: ripple 0.75s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0) translate(-50%, -50%);
        opacity: 0.5;
    }
    100% {
        transform: scale(100) translate(-50%, -50%);
        opacity: 0;
    }
}

/* ============================================
   GLOW BORDER ANIMATION
   ============================================ */

@keyframes glow-border {
    0%, 100% {
        box-shadow: 0 0 5px rgba(237, 51, 85, 0.2),
                    0 0 20px rgba(237, 51, 85, 0.1);
    }
    50% {
        box-shadow: 0 0 10px rgba(237, 51, 85, 0.4),
                    0 0 30px rgba(237, 51, 85, 0.2);
    }
}

.glow-border {
    animation: glow-border 3s ease-in-out infinite;
}

/* ============================================
   TESTIMONIAL CARD HOVER
   ============================================ */

.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
}

/* ============================================
   SMOOTH UNDERLINE ANIMATION
   ============================================ */

.underline-animation {
    position: relative;
    display: inline-block;
}

.underline-animation::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ed3355, #0ab4ff);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.underline-animation:hover::after {
    width: 100%;
}

/* ============================================
   BLUR IN ANIMATION
   ============================================ */

@keyframes blur-in {
    0% {
        filter: blur(20px);
        opacity: 0;
    }
    100% {
        filter: blur(0);
        opacity: 1;
    }
}

.blur-in {
    animation: blur-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================
   SLIDE UP FADE
   ============================================ */

@keyframes slide-up-fade {
    0% {
        transform: translateY(40px);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-up-fade {
    animation: slide-up-fade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ============================================
   CUSTOM CURSOR EFFECTS
   ============================================ */

.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(237, 51, 85, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor-glow.active {
    opacity: 1;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #ed3355;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10000;
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease;
}

.cursor-dot.hover {
    width: 40px;
    height: 40px;
    background: rgba(237, 51, 85, 0.2);
    border: 2px solid #ed3355;
}

/* Magnetic button effect */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Card tilt effect */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
}

/* Hover reveal effect */
.hover-reveal {
    position: relative;
    overflow: hidden;
}

.hover-reveal::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(237, 51, 85, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    pointer-events: none;
}

.hover-reveal:hover::before {
    width: 400px;
    height: 400px;
}

/* Hide custom cursor on mobile */
@media (max-width: 1024px) {
    .cursor-glow,
    .cursor-dot {
        display: none !important;
    }
}
