/* ==========================================================
   Home Page — Modern Styles
   ========================================================== */

/* ----------------------------------------------------------
   Hero Section
   ---------------------------------------------------------- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 8rem 0 4rem;
    background-color: var(--clr-bg-primary);
}

/* Mesh gradient layers */
.hero-mesh {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.mesh-layer {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    will-change: transform;
}

.mesh-1 {
    width: 60vw;
    height: 60vw;
    max-width: 700px;
    max-height: 700px;
    background: var(--clr-accent-primary);
    top: -20%;
    left: -15%;
    animation: meshFloat1 14s ease-in-out infinite;
}

.mesh-2 {
    width: 50vw;
    height: 50vw;
    max-width: 550px;
    max-height: 550px;
    background: var(--clr-accent-secondary);
    bottom: -15%;
    right: -10%;
    animation: meshFloat2 18s ease-in-out infinite;
}

.mesh-3 {
    width: 35vw;
    height: 35vw;
    max-width: 400px;
    max-height: 400px;
    background: var(--clr-accent-tertiary);
    top: 40%;
    left: 50%;
    opacity: 0.15;
    animation: meshFloat3 20s ease-in-out infinite;
}

@keyframes meshFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(5%, 8%) scale(1.05); }
    66% { transform: translate(-3%, -5%) scale(0.97); }
}

@keyframes meshFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-6%, -4%) scale(1.03); }
    66% { transform: translate(4%, 6%) scale(0.96); }
}

@keyframes meshFloat3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-8%, 10%); }
}

.mesh-4 {
    width: 30vw;
    height: 30vw;
    max-width: 350px;
    max-height: 350px;
    background: linear-gradient(135deg, #ae70f1, #22d3ee);
    top: 10%;
    right: 15%;
    opacity: 0.12;
    animation: meshFloat4 16s ease-in-out infinite;
}

@keyframes meshFloat4 {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(6%, -5%) rotate(3deg) scale(1.06); }
    66% { transform: translate(-4%, 7%) rotate(-2deg) scale(0.95); }
}

/* Mouse-following glow */
.hero-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(174, 112, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    will-change: left, top;
    z-index: 1;
}

.hero-section:hover .hero-glow { opacity: 1; }

/* Dot grid */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 1;
}

/* Hero pills */
.hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--clr-text-secondary);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
}

.hero-pill i {
    color: var(--clr-accent-primary);
    font-size: 0.7rem;
}

/* Floating particles */
.hero-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.hero-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(174, 112, 241, 0.4);
    border-radius: 50%;
    /* GSAP handles animation */
}

/* Text cycling */
.text-cycle {
    display: block;
    position: relative;
    background: linear-gradient(135deg, #ae70f1, #22d3ee, #ff4a9e, #ae70f1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientTextShift 6s ease infinite;
}

/* Text cycling — GSAP handles enter/exit animations */

/* Hero content */
.hero-title {
    font-weight: 800;
    margin-bottom: var(--space-lg);
    line-height: 1.08;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--clr-text-secondary);
    max-width: 560px;
    margin-bottom: var(--space-xl);
}

.hero-cta {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--clr-text-tertiary);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--clr-accent-primary);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { top: 6px; opacity: 1; }
    50% { top: 20px; opacity: 0.3; }
}

/* ----------------------------------------------------------
   Bento Services Grid
   ---------------------------------------------------------- */
.bento-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-lg);
}

.bento-large {
    grid-row: span 2;
}

.bento-large .service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.bento-large .service-card p {
    flex-grow: 1;
}

/* ----------------------------------------------------------
   Feature Cards (Why Choose Us)
   ---------------------------------------------------------- */
.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 2rem 1.5rem;
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.feature-card:hover {
    border-color: rgba(174, 112, 241, 0.2);
    transform: translateY(-3px);
}

.feature-num {
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-family: var(--ff-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.08;
    pointer-events: none;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    background: rgba(174, 112, 241, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto var(--space-lg);
    transition: all var(--transition-base);
}

.feature-icon i {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card:hover .feature-icon {
    background: var(--gradient-brand);
    box-shadow: 0 0 20px rgba(174, 112, 241, 0.3);
}

.feature-card:hover .feature-icon i {
    background: none;
    -webkit-text-fill-color: #fff;
    color: #fff;
}

.feature-card h4 { margin-bottom: var(--space-sm); }
.feature-card p { font-size: 0.9rem; margin-bottom: 0; }

/* ----------------------------------------------------------
   Stats Bar
   ---------------------------------------------------------- */
.stats-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-2xl);
    padding: var(--space-xl) var(--space-lg);
}

.stat-item {
    text-align: center;
    flex: 1;
    padding: 0 var(--space-lg);
}

.stat-number {
    font-family: var(--ff-heading);
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 800;
    display: block;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--clr-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    font-family: var(--ff-mono);
}

.stat-divider {
    width: 1px;
    height: 50px;
    background: var(--glass-border);
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   Marquee Section
   ---------------------------------------------------------- */
.marquee-section {
    padding: var(--space-lg) 0;
    overflow: hidden;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(14, 14, 20, 0.4);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 30s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.marquee-content {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.marquee-content > span {
    font-family: var(--ff-mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--clr-text-tertiary);
    white-space: nowrap;
    padding: 0 var(--space-lg);
    transition: color var(--transition-fast);
}

.marquee-content > span:not(.marquee-dot):hover {
    color: var(--clr-accent-primary);
}

.marquee-dot {
    width: 5px !important;
    height: 5px;
    background: var(--clr-accent-primary);
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    padding: 0 !important;
    opacity: 0.5;
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ----------------------------------------------------------
   Tilt Card + Spotlight
   ---------------------------------------------------------- */
.tilt-card {
    transform-style: preserve-3d;
    will-change: transform;
}

.card-spotlight {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    background: radial-gradient(circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%), rgba(174, 112, 241, 0.12), transparent 60%);
    /* GSAP handles opacity */
}

/* ----------------------------------------------------------
   CTA Particles
   ---------------------------------------------------------- */
.cta-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.cta-particles .cta-particle {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(174, 112, 241, 0.3);
    border-radius: 50%;
    /* GSAP handles animation */
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 991.98px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-large {
        grid-row: span 1;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: var(--space-lg);
        padding: var(--space-lg);
    }

    .stat-item {
        flex: 0 0 45%;
        padding: var(--space-md) 0;
    }

    .stat-divider { display: none; }

    .hero-glow { display: none; }
    .hero-particles { display: none; }
}

@media (max-width: 575.98px) {
    .hero-section { padding: 7rem 0 3rem; }

    .stat-item { flex: 0 0 100%; }

    .hero-pills { gap: 0.3rem; }

    .marquee-content > span { font-size: 0.8rem; padding: 0 var(--space-md); }

    /* text-cycle is display: block — no min-width needed */
}
