/* ============================================================
   FLOWBRAIN — index.css
   Styles specific to index.html (dark theme page)
   ============================================================ */

/* ── Dark-theme CSS tokens ── */
:root {
    --gray-950: #07080d;
    --gray-900: #0f1117;
    --gray-800: #181a22;
    --gray-700: #252733;
    --gray-600: #3a3d4d;
    --gray-400: rgba(255, 255, 255, 0.45);
    --gray-200: rgba(255, 255, 255, 0.82);
    --black: #000000;
    --font-display: 'Syne', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --accent-dim: rgba(0, 232, 122, 0.08);
    --nav-h: 72px;
    --nav-height: 72px;
}

/* ── Keyframes ── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(-1deg);
    }

    50% {
        transform: translateY(-12px) rotate(1deg);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes circuitPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .5;
        transform: scale(.75);
    }
}

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

    100% {
        transform: translateX(-50%);
    }
}

@keyframes wapPulse {

    0%,
    100% {
        box-shadow: 0 6px 28px rgba(37, 211, 102, .45), 0 0 0 0 rgba(37, 211, 102, .3);
    }

    50% {
        box-shadow: 0 6px 28px rgba(37, 211, 102, .45), 0 0 0 14px rgba(37, 211, 102, 0);
    }
}

/* ── Full dark page base ── */
body {
    background: var(--gray-950);
    color: var(--gray-200);
}

/* ── Preloader ── */
#preloader {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .5s, visibility .5s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── Scroll progress ── */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    z-index: 9999;
    transition: width .1s linear;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

/* ── Grid lines ── */
.grid-lines {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    z-index: 1000;
    transition: background .3s, border .3s, box-shadow .3s;
}

.navbar.scrolled {
    background: rgba(7, 8, 13, .92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 2px 20px rgba(0, 0, 0, .4);
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 clamp(1rem, 5vw, 2.5rem);
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 34px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: .15rem;
    list-style: none;
}

.nav-link {
    padding: .45rem .9rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .6);
    transition: all .3s;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .07);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: .45rem;
    border-radius: 6px;
    cursor: pointer;
    background: none;
    border: none;
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all .3s;
    display: block;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(7, 8, 13, .96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    padding: 1.25rem;
    z-index: 999;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all .3s;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-menu .nav-link {
    display: block;
    padding: .75rem 1rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, .7);
    border-left: 3px solid transparent;
}

.mobile-menu .nav-link:hover {
    background: rgba(255, 255, 255, .06);
    border-left-color: var(--accent);
    color: #fff;
}

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--gray-950);
    padding-top: var(--nav-h);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: calc(100vh - var(--nav-h));
    padding-block: 4rem;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2.6rem, 5.5vw, 5rem);
    line-height: 1.03;
    letter-spacing: -.04em;
    color: #fff;
    margin-bottom: 24px;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    flex-wrap: wrap;
}

.stat-num {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1;
    color: #fff;
    display: block;
}

.stat-label {
    font-size: .75rem;
    color: rgba(255, 255, 255, .4);
    margin-top: 4px;
    display: block;
}

/* ── Utilities ── */
.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    color: #fff;
    margin-bottom: .9rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 232, 122, .08);
    color: var(--accent);
    border: 1px solid rgba(0, 232, 122, .25);
    border-radius: 100px;
    padding: 4px 14px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

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

/* ── Cards (dark) ── */
.card {
    background: var(--gray-900);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 24px;
    transition: all .32s;
}

.card:hover {
    border-color: rgba(0, 232, 122, .2);
}

.card-animated {
    padding: 2rem;
}

.card-animated:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
}

/* ── Portfolio overlay ── */
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s;
}

.portfolio-overlay span {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s, transform .3s;
    font-family: var(--font-display);
    font-size: .85rem;
    font-weight: 600;
    color: #fff;
    border: 1px solid #fff;
    padding: 8px 16px;
    border-radius: 4px;
}

.portfolio-item:hover .portfolio-overlay {
    background: rgba(0, 0, 0, .7);
}

.portfolio-item:hover .portfolio-overlay span {
    opacity: 1;
    transform: translateY(0);
}

/* ── Marquee ── */
.marquee-wrapper {
    overflow: hidden;
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marqueeScroll 28s linear infinite;
    will-change: transform;
}

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

.marquee-group {
    display: flex;
    align-items: center;
    gap: 40px;
    padding-right: 40px;
    white-space: nowrap;
    flex-shrink: 0;
}

.marquee-dot {
    color: rgba(255, 255, 255, .2);
}

/* Override reduced-motion para el marquee — es decorativo y debe moverse siempre */
@media (prefers-reduced-motion: reduce) {
    .marquee-track {
        animation-duration: 28s !important;
        animation-iteration-count: infinite !important;
    }
}

.text-mono {
    font-family: var(--font-mono);
}

/* ── Testimonials ── */
.testimonials-slider-wrap {
    position: relative;
    overflow: hidden;
    width: 100%;
}

#testimonialsTrack {
    display: flex;
    width: 100%;
    transition: transform .5s cubic-bezier(.16, 1, .3, 1);
}

.testimonial-card {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    padding: 0 8px;
    box-sizing: border-box;
}

.testimonial-card .card {
    max-width: 700px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    box-sizing: border-box;
    word-break: break-word;
    overflow-wrap: break-word;
}

.testimonial-dot.active {
    background: #fff !important;
    transform: scale(1.3);
}

/* ── Steps ── */
.step-num {
    display: block;
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(255, 255, 255, .05);
    letter-spacing: -.05em;
    margin-bottom: 12px;
    /* Reset circle styles from styles.css */
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    border: none;
    box-shadow: none;
    position: static;
    z-index: auto;
    transition: none;
}

.step-item:hover .step-num {
    background: none;
    border-color: transparent;
    color: rgba(0, 232, 122, .15);
    box-shadow: none;
}

/* ── WhatsApp float ── */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 900;
    width: 58px;
    height: 58px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 28px rgba(37, 211, 102, .45);
    transition: transform .3s;
    animation: wapPulse 2.5s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.pulse-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, .35);
    animation: wapPulse 2.5s ease-in-out infinite;
    pointer-events: none;
}

/* ── Footer ── */
footer {
    background: var(--gray-950);
    border-top: 1px solid rgba(255, 255, 255, .07);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand img {
    height: 100px;
    width: auto;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: .875rem;
    color: var(--gray-400);
    line-height: 1.7;
}

.footer-col h5 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: .9rem;
    color: #fff;
    margin-bottom: 16px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}

.footer-col ul li a {
    font-size: .875rem;
    color: var(--gray-400);
    transition: color .2s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .5);
    transition: all .3s;
}

.social-link:hover {
    background: rgba(0, 232, 122, .1);
    color: var(--accent);
    border-color: rgba(0, 232, 122, .3);
}

.social-link svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .82rem;
    color: var(--gray-400);
}

.footer-bottom a {
    color: var(--gray-400);
    transition: color .2s;
}

.footer-bottom a:hover {
    color: #fff;
}

/* ── CTA bg ── */
.cta-bg {
    background: radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0, 232, 122, .06) 0%, transparent 70%),
        var(--gray-950);
}

/* ── Layout helpers ── */
.benefits-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.stats-grid4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .hamburger {
        display: flex !important;
    }

    .nav-links {
        display: none !important;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .benefits-layout {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: 1fr !important;
        gap: 32px;
    }

    .hero-visual {
        display: none !important;
    }

    .steps-grid {
        grid-template-columns: 1fr !important;
    }

    .hero-title {
        font-size: clamp(2.2rem, 8vw, 3.5rem) !important;
    }

    .section-title {
        font-size: clamp(1.6rem, 6vw, 2.4rem) !important;
    }

    .hero-stats {
        gap: 1.2rem;
        padding-top: 1.5rem;
    }

    .stat-num {
        font-size: clamp(1.4rem, 5vw, 2rem) !important;
    }

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .stagger[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .stats-grid4 {
        grid-template-columns: 1fr 1fr !important;
    }

    .footer-grid {
        grid-template-columns: 1fr !important;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-stats>div[style*="width:1px"] {
        display: none !important;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        padding: 0 4px;
    }

    .tag {
        font-size: .65rem;
        padding: 3px 10px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* ── Portfolio thumbs (index) ── */
.portfolio-thumb {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--gray-800);
}

.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform .4s ease;
}

.portfolio-item:hover .portfolio-thumb img {
    transform: scale(1.04);
}