/* ============================================
   OCTAHUB MODERN ANIMATIONS & EFFECTS
   ============================================ */

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.cursor-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
}

/* Hide custom cursor on touch devices */
@media (hover: none) {
    .custom-cursor,
    .cursor-dot {
        display: none;
    }
}

/* ============================================
   GRADIENT ANIMATIONS
   ============================================ */

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ============================================
   LUXURY ENTRANCE ANIMATIONS
   ============================================ */

@keyframes fast-lux-entry {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

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

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

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

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

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

/* ============================================
   GLOW EFFECTS
   ============================================ */

.glow {
    box-shadow: 
        0 0 10px rgba(99, 102, 241, 0.5),
        0 0 20px rgba(99, 102, 241, 0.3),
        0 0 40px rgba(99, 102, 241, 0.1);
    animation: pulseGlow 3s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 
            0 0 10px rgba(99, 102, 241, 0.5),
            0 0 20px rgba(99, 102, 241, 0.3),
            0 0 40px rgba(99, 102, 241, 0.1);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(99, 102, 241, 0.7),
            0 0 40px rgba(99, 102, 241, 0.5),
            0 0 60px rgba(99, 102, 241, 0.3);
    }
}

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

.btn-large {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-large::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

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

.btn-large:active {
    transform: scale(0.95);
}

/* Modern Button Shine Effect */
.btn-lux-primary,
.btn-premium {
    position: relative;
    overflow: hidden;
}

.btn-lux-primary::after,
.btn-premium::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 50%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transform: skewX(-25deg);
    animation: btn-shine 3s ease-in-out infinite;
}

@keyframes btn-shine {
    0% {
        left: -100%;
    }
    20%, 100% {
        left: 200%;
    }
}

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

.tool-card {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.5s ease;
}

.tool-card:hover::before {
    animation: shine 1.5s ease;
}

@keyframes shine {
    0% {
        top: -50%;
        left: -50%;
    }
    100% {
        top: 150%;
        left: 150%;
    }
}

/* ============================================
   GLASS MORPHISM ENHANCED
   ============================================ */

.glass-card-enhanced {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

/* ============================================
   HEADER SCROLL EFFECT
   ============================================ */

.main-header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   OCTAHUB LUXURY 2026 - ELEGANT DESIGN
   ============================================ */

:root {
    --primary: #6366f1;
    --accent: #0ea5e9;
    --luxury-gold: #c5a358;
    --bg-dark: #0a0a0a;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --glass-border: rgba(0,0,0,0.08);
}

body {
    background-color: #ffffff;
    color: var(--text-main);
    font-family: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
    letter-spacing: -0.02em;
}

/* Luxury Background - Modern 2026 */
.luxury-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* Animated Gradient Orbs */
.luxury-bg::before,
.luxury-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float-orb 20s ease-in-out infinite;
}

.luxury-bg::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.luxury-bg::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation-delay: -10s;
}

@keyframes float-orb {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* Gradient Blob Shapes */
.gradient-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    z-index: -1;
    mix-blend-mode: multiply;
}

.gradient-blob-1 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    top: 10%;
    right: 15%;
    animation: blob-float-1 25s ease-in-out infinite;
}

.gradient-blob-2 {
    width: 350px;
    height: 350px;
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    bottom: 20%;
    left: 10%;
    animation: blob-float-2 30s ease-in-out infinite;
}

.gradient-blob-3 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    top: 50%;
    left: 50%;
    animation: blob-float-3 20s ease-in-out infinite;
}

@keyframes blob-float-1 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(-50px, 50px) rotate(120deg);
    }
    66% {
        transform: translate(50px, -30px) rotate(240deg);
    }
}

@keyframes blob-float-2 {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(40px, -60px) rotate(-120deg);
    }
    66% {
        transform: translate(-40px, 40px) rotate(-240deg);
    }
}

@keyframes blob-float-3 {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
}

/* Grid Pattern Overlay */
.grid-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
}

/* Noise Texture for depth */
.noise-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Hero Typography */
.hero-lux {
    text-align: center;
    padding: 12rem 2rem 8rem;
}

.hero-lux h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 800;
    line-height: 0.9;
    letter-spacing: -0.05em;
    margin-bottom: 2rem;
    color: var(--primary);
}

.hero-lux p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 220px;
    gap: 1.5rem;
    padding: 4rem 0;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 180px;
    }
}

.bento-item {
    position: relative;
    background: #ffffff;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.bento-item:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 30px 60px rgba(99,102,241,0.12);
}

.bento-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0a0a0a;
}

.bento-item p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.bento-item .icon-box {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
}

/* Tool Icon Colors */
.icon-scraper {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

.icon-seo {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.3);
}

.icon-audit {
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.icon-crawler {
    background: linear-gradient(135deg, #10b981, #14b8a6);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.icon-map {
    background: linear-gradient(135deg, #f59e0b, #eab308);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.icon-keywords {
    background: linear-gradient(135deg, #ec4899, #f43f5e);
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.3);
}

/* Navigation LUX */
.nav-lux {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 0.5rem 2rem;
    border-radius: 100px;
    z-index: 1000;
    display: flex;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.nav-lux a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

.nav-lux a:hover {
    opacity: 0.6;
}

/* Elegant Buttons */
.btn-lux {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.4s ease;
    cursor: pointer;
}

.btn-lux-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
}

.btn-lux-primary:hover {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* Remove old styles */
.text-stripe, .stripe-content, .stripe-text { display: none; }
.mesh-gradient, .noise-overlay { opacity: 0.02; }

    background: rgba(255, 255, 255, 0.98) !important;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1rem 0 !important;
}

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

/* Animation initiale pour data-reveal */
[data-reveal] {
    opacity: 0;
    animation: fade-up 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

[data-reveal="fade-up"] {
    opacity: 0;
    animation: fade-up 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

[data-reveal="fade-in"] {
    opacity: 0;
    animation: fade-in 1s ease forwards;
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   PARALLAX LAYERS
   ============================================ */

.parallax-layer {
    will-change: transform;
}

/* ============================================
   SMOOTH SCROLL BEHAVIOR
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* ============================================
   LOADING ANIMATIONS
   ============================================ */

.loading-dots {
    display: inline-flex;
    gap: 0.5rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

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

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

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ============================================
   GRADIENT BORDERS
   ============================================ */

.gradient-border {
    position: relative;
    border-radius: 40px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 40px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ============================================
   TILT EFFECT (3D)
   ============================================ */

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

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

/* ============================================
   BACKGROUND PATTERNS
   ============================================ */

.pattern-dots {
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.pattern-grid {
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

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

@media (max-width: 768px) {
    .tool-card:hover {
        transform: translateY(-10px) !important;
    }

    .btn-large:hover {
        transform: translateY(-2px) scale(1.02);
    }

    /* Reduce animation complexity on mobile */
    .blob {
        animation: none;
    }

    .custom-cursor,
    .cursor-dot {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

.will-animate {
    will-change: transform, opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
