/* ============================================
   VISINOVA — PREMIUM DARK DESIGN SYSTEM
   SaaS-style with blue/purple gradients
   ============================================ */

:root {
    --bg: #06060b;
    --bg-surface: #0b0b14;
    --bg-surface-2: #10101c;
    --bg-card: rgba(255, 255, 255, 0.025);
    --bg-card-hover: rgba(255, 255, 255, 0.045);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --blue: #3b82f6;
    --purple: #8b5cf6;
    --indigo: #6366f1;
    --cyan: #22d3ee;
    --emerald: #34d399;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ---- Hero Section ---- */
.visinova-hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #05050a;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 6%;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url("images/hero-process.png");
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    animation: heroFloat 18s ease-in-out infinite alternate;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 8% 45%, rgba(132, 88, 255, 0.1), transparent 25%),
        linear-gradient(90deg, rgba(5,5,10,0.95) 0%, rgba(5,5,10,0.85) 20%, rgba(5,5,10,0.3) 38%, rgba(5,5,10,0) 55%, rgba(5,5,10,0.15) 100%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 380px;
    padding-top: 64px;
}
.hero-content h1 {
    margin: 0;
    font-size: 2.6rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 800;
}
.hero-content h1 span {
    display: block;
    margin-top: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0;
    line-height: 1.5;
    background: linear-gradient(90deg, #d4c4ff, #b99cff, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-description {
    max-width: 360px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    line-height: 1.65;
}
.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.btn-hero-primary, .btn-hero-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-hero-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #7c4dff, #b99cff);
    box-shadow: 0 0 28px rgba(124, 77, 255, 0.4);
}
.btn-hero-secondary {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
}
.btn-hero-primary:hover, .btn-hero-secondary:hover { transform: translateY(-3px); }
.btn-hero-primary:hover { box-shadow: 0 0 42px rgba(124, 77, 255, 0.6); }
.btn-hero-secondary:hover { background: rgba(255, 255, 255, 0.12); }
@keyframes heroFloat {
    from { transform: scale(1.01) translate3d(0, 0, 0); }
    to { transform: scale(1.04) translate3d(-10px, -5px, 0); }
}
/* Laptop */
@media (max-width: 1280px) {
    .hero-content { max-width: 360px; }
    .hero-content h1 { font-size: 2.3rem; }
}
/* Tablet */
@media (max-width: 1024px) {
    .visinova-hero { padding: 0 5%; }
    .hero-content { max-width: 340px; }
    .hero-content h1 { font-size: 2.1rem; }
    .hero-content h1 span { font-size: 1rem; }
    .hero-description { font-size: 0.85rem; }
    .hero-overlay {
        background:
            linear-gradient(90deg, rgba(5,5,10,0.96) 0%, rgba(5,5,10,0.8) 25%, rgba(5,5,10,0.2) 45%, rgba(5,5,10,0) 100%);
    }
}
/* Mobile */
@media (max-width: 768px) {
    .visinova-hero {
        min-height: 100vh;
        padding: 0 20px 90px;
        align-items: flex-end;
    }
    .hero-bg {
        background-position: center top;
    }
    .hero-overlay {
        background:
            linear-gradient(180deg, rgba(5,5,10,0) 0%, rgba(5,5,10,0.2) 30%, rgba(5,5,10,0.8) 55%, rgba(5,5,10,0.98) 70%, rgba(5,5,10,1) 100%);
    }
    .hero-content {
        max-width: 100%;
        padding-top: 0;
    }
    .hero-content h1 { font-size: 2rem; }
    .hero-content h1 span { font-size: 0.95rem; }
    .hero-description { font-size: 0.85rem; max-width: 100%; }
    .hero-actions { flex-direction: column; gap: 10px; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; min-height: 48px; font-size: 0.9rem; }
}
/* Small mobile */
@media (max-width: 390px) {
    .hero-content h1 { font-size: 1.75rem; }
    .visinova-hero { padding-bottom: 100px; }
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ---- Selection ---- */
::selection { background: rgba(99,102,241,0.3); color: white; }


/* ============================================
   GRADIENT TEXT
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-strong {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-wide {
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ============================================
   GLOW EFFECTS
   ============================================ */
.glow {
    position: absolute;
    border-radius: 9999px;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    contain: layout paint;
}
.glow-blue { background: rgba(59,130,246,0.15); }
.glow-purple { background: rgba(139,92,246,0.12); }
.glow-indigo { background: rgba(99,102,241,0.12); }
.glow-cyan { background: rgba(34,211,238,0.08); }


/* ============================================
   GLASS CARD
   ============================================ */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.35s cubic-bezier(0.16,1,0.3,1);
}
.glass:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}


/* ============================================
   GRADIENT BORDER CARD
   ============================================ */
.gradient-border {
    position: relative;
    background: var(--bg-surface);
    border-radius: 1rem;
    overflow: hidden;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(59,130,246,0.3), rgba(139,92,246,0.3), rgba(59,130,246,0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}


/* ============================================
   BUTTONS
   ============================================ */
.btn-gradient {
    background: linear-gradient(135deg, var(--blue), var(--indigo));
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.btn-gradient:hover {
    box-shadow: 0 0 28px -4px rgba(99,102,241,0.5);
    transform: translateY(-1px);
}

.btn-outline {
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}
.btn-outline:hover {
    border-color: var(--border-hover);
    background: rgba(255,255,255,0.03);
    transform: translateY(-1px);
}


/* ============================================
   GRID PATTERN
   ============================================ */
.grid-pattern {
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 64px 64px;
}


/* ============================================
   NAVBAR
   ============================================ */
.nav-scrolled {
    background: rgba(6,6,11,0.85) !important;
    border-bottom-color: var(--border) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, var(--blue), var(--purple));
    transition: width 0.3s cubic-bezier(0.16,1,0.3,1);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: white; }

/* ---- Mobile Menu — Full-screen slide panel ---- */
.mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 6, 11, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 40;
}
.mobile-menu.open { transform: translateX(0); }

body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.mobile-menu-link {
    display: block;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease, color 0.2s ease;
}
.mobile-menu.open .mobile-menu-link { opacity: 1; transform: translateX(0); }
.mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.06s; }
.mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.12s; }
.mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.18s; }
.mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.24s; }
.mobile-menu.open .mobile-menu-link:nth-child(5) { transition-delay: 0.30s; }
.mobile-menu-link.active { color: #fff !important; background: rgba(255, 255, 255, 0.05); }
.mobile-menu-link:active { background: rgba(255, 255, 255, 0.04); }

.mobile-menu-cta {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease 0.3s, transform 0.35s ease 0.3s;
}
.mobile-menu.open .mobile-menu-cta { opacity: 1; transform: translateY(0); }

/* ---- Hamburger icon animation ---- */
.hamburger {
    width: 44px;
    height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    -webkit-tap-highlight-color: transparent;
}
.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform-origin: center;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================================
   MARQUEE
   ============================================ */
.marquee {
    overflow: hidden;
    white-space: nowrap;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
    display: inline-flex;
    gap: 48px;
    animation: marquee-scroll 30s linear infinite;
    will-change: transform;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

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

.marquee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.marquee-item:hover { opacity: 1; }
.marquee-item img {
    height: 28px;
    width: auto;
}


/* ============================================
   TEXT SPLIT
   ============================================ */
[data-split] .word {
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
}
[data-split] .word-inner {
    display: inline-block;
    will-change: transform;
}
.text-gradient .word-inner {
    background: linear-gradient(135deg, #60a5fa, #a78bfa, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-gradient-strong .word-inner {
    background: linear-gradient(135deg, var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-gradient-wide .word-inner {
    background: linear-gradient(90deg, #60a5fa, #a78bfa, #22d3ee);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ============================================
   SCROLL ANIMATIONS
   Elements are VISIBLE by default.
   JS adds .will-animate, then .animated.
   ============================================ */
.will-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1);
}
.will-animate.animated {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.will-animate[data-animate="fade-left"] { transform: translateX(-30px); }
.will-animate[data-animate="fade-right"] { transform: translateX(30px); }
.will-animate[data-animate="fade-down"] { transform: translateY(-30px); }
.will-animate[data-animate="scale"], .will-animate[data-animate="scale-up"] { transform: scale(0.95) translateY(20px); }

.will-animate.animated[data-animate="fade-left"],
.will-animate.animated[data-animate="fade-right"],
.will-animate.animated[data-animate="fade-down"],
.will-animate.animated[data-animate="scale"],
.will-animate.animated[data-animate="scale-up"] {
    transform: translateY(0) translateX(0) scale(1);
}


/* ============================================
   TILT CARD
   ============================================ */
.tilt-card {
    transition: transform 0.15s ease;
}


/* ============================================
   3D HERO CANVAS
   ============================================ */
#hero-canvas {
    pointer-events: none;
}
#hero-canvas canvas {
    display: block;
    width: 100%;
    height: 100%;
}


/* ============================================
   DASHBOARD MOCKUP
   ============================================ */
.mockup-shadow {
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.06),
        0 25px 80px -15px rgba(0,0,0,0.6),
        0 0 120px -30px rgba(59,130,246,0.12);
}


/* ============================================
   CHART BAR
   ============================================ */
.chart-bar { transform-origin: bottom; }
.chart-bar.animated { animation: grow-bar 1s cubic-bezier(0.16,1,0.3,1) forwards; }
@keyframes grow-bar { from { transform: scaleY(0); } to { transform: scaleY(1); } }


/* ============================================
   PROCESS CONNECTOR
   ============================================ */
.process-line {
    background: linear-gradient(90deg, rgba(59,130,246,0.3), rgba(139,92,246,0.3));
}


/* ============================================
   PROJECT CARD
   ============================================ */
.project-card {
    display: block;
    overflow: hidden;
    border-radius: 1rem;
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.16,1,0.3,1);
}
.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(59,130,246,0.15);
}
.project-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.project-card:hover img { transform: scale(1.05); }
.project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6,6,11,0.95) 0%, rgba(6,6,11,0.8) 40%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    z-index: 5;
}
.project-card:hover .project-card-overlay { opacity: 1; }


/* ============================================
   FAQ ACCORDION
   ============================================ */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-weight: 500;
    transition: color 0.2s;
}
.faq-question:hover { color: var(--blue); }
.faq-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
    flex-shrink: 0;
    margin-left: 16px;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16,1,0.3,1), padding 0.3s;
}
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 20px; }


/* ============================================
   PRICING
   ============================================ */
.pricing-popular {
    box-shadow:
        0 0 0 1px rgba(99,102,241,0.4),
        0 0 50px -10px rgba(99,102,241,0.25);
}


/* ============================================
   CHECK ICON
   ============================================ */
.feature-check {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59,130,246,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
    padding-top: 140px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

/* ============================================
   STAT NUMBER
   ============================================ */
.stat-number { font-variant-numeric: tabular-nums; }


/* ============================================
   FLOATING ANIMATION
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}
.float { animation: float 6s ease-in-out infinite; }


/* ============================================
   ANIMATED GRADIENT
   ============================================ */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.animated-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}


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

/* Tablet & mobile */
@media (max-width: 768px) {
    .page-hero { padding-top: 100px; padding-bottom: 48px; }

    /* Performance: reduce blur on mobile */
    .glow { filter: blur(80px); }
    .glass { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
    .nav-scrolled { backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important; }

    /* Lighter mockup shadow */
    .mockup-shadow {
        box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 12px 40px -10px rgba(0,0,0,0.5);
    }

    /* Touch-friendly FAQ */
    .faq-question { padding: 18px 0; min-height: 48px; }
    .faq-answer { font-size: 0.875rem; }

    /* Tighter footer on mobile */
    footer { padding-top: 2rem; padding-bottom: 5rem; }
    footer .grid { gap: 1.5rem; }
    footer .grid > div:first-child p { display: none; }
    footer .grid > div h4 { margin-bottom: 0.5rem; font-size: 0.75rem; }
    footer .grid > div ul { gap: 0.25rem; }
    footer .grid > div ul li a { font-size: 0.75rem; }
    footer .flex.mt-16 { margin-top: 1.5rem; padding-top: 1rem; }

    /* Prevent horizontal overflow on small screens */
    .glow { max-width: 100vw; }

    /* Space for bottom tab nav */
    body { padding-bottom: 64px; }
}


/* ============================================
   MOBILE BOTTOM TAB NAV
   ============================================ */
.mobile-tab-nav {
    display: none;
}
@media (max-width: 767px) {
    .mobile-tab-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        height: 64px;
        background: rgba(6, 6, 11, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        align-items: center;
        justify-content: space-around;
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mobile-tab-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        padding: 6px 0;
        color: #64748b;
        text-decoration: none;
        transition: color 0.2s;
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-tab-nav a span {
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.01em;
    }
    .mobile-tab-nav a svg {
        width: 20px;
        height: 20px;
    }
    .mobile-tab-nav a.active {
        color: #818cf8;
    }
    .mobile-tab-nav a:active {
        color: #a78bfa;
    }

    /* Hide hamburger when tab nav is present */
    .hamburger { display: none !important; }
    .mobile-menu { display: none !important; }
}

/* Small phones */
@media (max-width: 374px) {
    .page-hero { padding-top: 88px; padding-bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .marquee-track { animation: none !important; }
    .mobile-menu { transition: none !important; }
    .mobile-menu-link { transition: none !important; opacity: 1 !important; transform: none !important; }
    .mobile-menu-cta { transition: none !important; opacity: 1 !important; transform: none !important; }
}
