:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --accent: #22d3ee;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
    --gradient-glow: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ================================
   Animated Background Effects
   ================================ */
.automation-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.circuit-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: circuit-flow 3s ease-in-out infinite;
    opacity: 0.3;
}

.circuit-line:nth-child(1) {
    top: 20%;
    left: -100%;
    width: 200%;
    animation-delay: 0s;
}

.circuit-line:nth-child(2) {
    top: 50%;
    left: -100%;
    width: 150%;
    animation-delay: 1.5s;
}

.circuit-line:nth-child(3) {
    top: 80%;
    left: -100%;
    width: 180%;
    animation-delay: 3s;
}

@keyframes circuit-flow {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateX(25%);
        opacity: 0;
    }
}

.floating-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent);
    animation: float 15s infinite ease-in-out;
    opacity: 0.6;
}

.floating-particle:nth-child(4) {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-particle:nth-child(5) {
    top: 70%;
    left: 80%;
    animation-delay: 3s;
}

.floating-particle:nth-child(6) {
    top: 40%;
    left: 90%;
    animation-delay: 6s;
}

.floating-particle:nth-child(7) {
    top: 80%;
    left: 20%;
    animation-delay: 9s;
}

.floating-particle:nth-child(8) {
    top: 20%;
    left: 60%;
    animation-delay: 12s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(50px, -50px) scale(1.2);
        opacity: 0.8;
    }
    50% {
        transform: translate(-30px, 30px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(40px, 20px) scale(1.1);
        opacity: 0.7;
    }
}

/* ================================
   Navigation
   ================================ */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.25rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--light);
    transition: all 0.3s;
}

/* ================================
   Buttons
   ================================ */
.cta-button {
    background: var(--gradient);
    color: var(--white);
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.whatsapp-icon {
    width: 20px;
    height: 20px;
}

.secondary-button {
    background: transparent;
    color: var(--light);
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-button:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* ================================
   Hero Section
   ================================ */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 8rem 5% 4rem;
    position: relative;
    z-index: 1;
    gap: 4rem;
}

.hero-content {
    max-width: 650px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.gradient-text {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.hero p {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hero Visual - Automation Grid */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.automation-grid {
    position: relative;
    width: 400px;
    height: 400px;
}

.grid-node {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    animation: node-pulse 3s ease-in-out infinite;
}

.node-1 { top: 0; left: 50%; transform: translateX(-50%); }
.node-2 { top: 50%; right: 0; }
.node-3 { bottom: 0; left: 50%; transform: translateX(-50%); }
.node-4 { top: 50%; left: 0; }
.node-5 { top: 25%; right: 25%; }
.node-6 { bottom: 25%; left: 25%; }

@keyframes node-pulse {
    0%, 100% {
        transform: scale(1) translateX(-50%);
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    }
    50% {
        transform: scale(1.2) translateX(-50%);
        box-shadow: 0 0 50px rgba(99, 102, 241, 0.8);
    }
}

.connection-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: connection-flow 2s linear infinite;
    opacity: 0.5;
}

.line-1 { top: 10%; left: 50%; width: 50%; transform: rotate(45deg); animation-delay: 0s; }
.line-2 { top: 50%; left: 10%; width: 40%; animation-delay: 0.5s; }
.line-3 { top: 40%; left: 60%; width: 30%; transform: rotate(-30deg); animation-delay: 1s; }
.line-4 { bottom: 30%; left: 30%; width: 40%; transform: rotate(60deg); animation-delay: 1.5s; }
.line-5 { top: 20%; left: 30%; width: 35%; transform: rotate(-45deg); animation-delay: 2s; }

@keyframes connection-flow {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
        transform: scaleX(1.5);
    }
}

/* ================================
   Section Styles
   ================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* ================================
   Services Section
   ================================ */
.services {
    padding: 6rem 5%;
    background: var(--dark-light);
    position: relative;
    z-index: 1;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--dark);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.service-hover-effect {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(99, 102, 241, 0.1), transparent);
    transition: bottom 0.4s;
    pointer-events: none;
}

.service-card:hover .service-hover-effect {
    bottom: 0;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 30px;
    height: 30px;
    color: var(--white);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.service-card p {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ================================
   About Section
   ================================ */
.about {
    padding: 6rem 5%;
    position: relative;
    z-index: 1;
}

.about-content {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.about-text p {
    color: var(--gray);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.about-text strong {
    color: var(--light);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    color: var(--white);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ================================
   Contact Section
   ================================ */
.contact {
    padding: 6rem 5%;
    background: var(--dark-light);
    position: relative;
    z-index: 1;
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-info > p {
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.contact-method:hover {
    border-color: var(--primary);
    transform: translateX(10px);
}

.method-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-icon svg {
    width: 24px;
    height: 24px;
    color: var(--white);
}

.contact-method h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-method p {
    color: var(--gray);
    font-size: 0.95rem;
}

/* Contact Form */
.contact-form-container {
    background: var(--dark);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.contact-form h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--dark-light);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--light);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-button {
    width: 100%;
    background: var(--gradient);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.submit-button svg {
    width: 20px;
    height: 20px;
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.form-disclaimer {
    text-align: center;
    margin-top: 1rem;
    color: var(--gray);
    font-size: 0.875rem;
}

.form-disclaimer a {
    color: var(--primary);
    text-decoration: none;
}

.form-disclaimer a:hover {
    text-decoration: underline;
}

/* ================================
   Footer
   ================================ */
footer {
    padding: 4rem 5% 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--gray);
    max-width: 300px;
}

.footer-links h4,
.footer-legal h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 0.75rem;
}

.footer-links a,
.footer-legal a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--gray);
    font-size: 0.9rem;
}

/* ================================
   Legal Pages Styles
   ================================ */
.legal-page {
    padding: 8rem 5% 4rem;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--dark-light);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.legal-content h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

.legal-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--secondary);
}

.legal-content p,
.legal-content li {
    color: var(--gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-content ul {
    margin-left: 1.5rem;
}

.legal-content a {
    color: var(--primary);
    text-decoration: none;
}

.legal-content a:hover {
    text-decoration: underline;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: color 0.3s;
}

.legal-back:hover {
    color: var(--primary);
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 10rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .automation-grid {
        width: 300px;
        height: 300px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand p {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--dark);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

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

    .legal-content {
        padding: 2rem;
    }
}
