:root {
    /* Colors */
    --bg-color: #050505;
    --bg-secondary: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;

    /* Brand Colors */
    --primary: #F5821F;
    /* Logo Orange */
    --secondary: #00AEEF;
    /* Logo Blue */
    --accent: #8BC53F;
    /* Logo Green */
    --highlight: #2d2d2d;

    /* Gradients */
    --gradient-main: linear-gradient(to right, var(--accent), var(--primary), var(--secondary));
    /* Main Gradient: Green -> Orange -> Blue */
    --gradient-accent: linear-gradient(135deg, var(--secondary), var(--accent));

    --glass-bg: rgba(20, 20, 20, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --header-height: 80px;
    --section-spacing: 120px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 4rem;
    margin-bottom: 24px;
}

h2 {
    font-size: 3rem;
    margin-bottom: 16px;
}

p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 16px;
}

.gradient-text {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Flama Buttons V5/V6 */
.btn {
    display: inline-block;
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 1;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    font-size: 1.1rem;
    text-transform: uppercase;
}

/* Header Button V7 - Perfectly Aligned */
.nav-links .btn {
    padding: 10px 24px;
    font-size: 0.95rem;
    border-radius: 8px;
    box-shadow: none;
    margin-left: 10px;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    height: 44px;
}

.nav-links .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 174, 239, 0.3);
}

.btn-primary {
    background: var(--gradient-main);
    background-size: 200% auto;
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(139, 197, 63, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 174, 239, 0.4);
    background-position: right center;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    border-color: var(--secondary);
    background: rgba(0, 174, 239, 0.1);
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.2);
    transform: translateY(-2px);
}

/* Header V9: More Transparent for Bloom Visibility */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.6);
    /* V9: Lower opacity */
    backdrop-filter: blur(12px);
    /* Slightly less blur to see colors */
    border-bottom: 1px solid var(--glass-border);
    transition: 0.3s;
}

#main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
}

.dot {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a:not(.btn) {
    font-weight: 500;
    font-size: 1rem;
    display: inline-block;
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Typography V12 */
#hero h1 {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    /* Larger */
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -1px;
}

/* Hero Section */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--header-height);
}

/* V7: Subtitle White & Shadow */
#hero p {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 400;
    opacity: 0.95;
    font-size: 1.3rem;
    /* Larger Subtitle */
    line-height: 1.6;
}

.hero-content {
    max-width: 900px;
    z-index: 2;
}

.hero-actions {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}


/* V6/V8 "Plasma" */
.hero-background-animated {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    filter: blur(50px);
    opacity: 0.8;
    background: #020202;
}

.shape {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: screen;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Increased speeds (8s - 12s) */
.shape-1 {
    width: 65vw;
    height: 65vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 65%);
    /* Green (Design) */
    top: -15%;
    left: -15%;
    animation: plasma 8s infinite alternate;
}

/* V12: Swap - Blue is now Protagonist (Development) */
.shape-2 {
    width: 75vw;
    /* Huge */
    height: 75vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    /* Blue */
    bottom: -10%;
    right: -10%;
    animation: plasma 14s infinite alternate-reverse;
    opacity: 1;
    mix-blend-mode: screen;
    z-index: 0;
}

/* V12: Swap - Orange is Union (Center) */
.shape-3 {
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, #FF8000 0%, transparent 65%);
    /* Orange */
    top: 30%;
    /* Centered mixing area */
    left: 40%;
    animation: plasma 12s infinite alternate;
    opacity: 1;
    /* V17: Boost Opacity to be visible against Blue */
    z-index: 1;
    /* V17: Bring forward slightly */
}

/* V17: Balance - Change to Green (Design) to reduce Blue dominance */
.shape-4 {
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
    /* Green */
    bottom: 10%;
    left: 10%;
    animation: plasma 14s infinite alternate-reverse;
    opacity: 0.7;
}

@keyframes plasma {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    100% {
        transform: translate(25%, 25%) scale(1.15) rotate(15deg);
    }
}

/* Services Section */
#servicios {
    padding: var(--section-spacing) 0;
    background: linear-gradient(to bottom, #020202, #080808);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 48px 36px;
    border-radius: 20px;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
    overflow: hidden;
    /* Contain the full gradient */
}

/* V8: "The Crema Effect" - Full Card Animated Gradient */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    /* Full coverage logic */
    background: linear-gradient(45deg, var(--accent), var(--secondary), var(--accent));
    /* Green-Blue-Green */
    background-size: 200% 200%;
    /* For animation */
    opacity: 0;
    transition: opacity 0.2s ease;
    /* V12: INSTANT (0.2s) */
    z-index: -1;
    /* Behind content */
}

.service-card:hover::before {
    opacity: 0.15;
    /* Subtly colored full background */
    animation: gradientMove 3s linear infinite;
    /* MOVING */
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Full Card Borders (via box-shadow since ::before is used for filling) */
.service-card:hover {
    transform: translateY(-8px);
    /* Complex box-shadow for Green/Blue border feel + bottom glow */
    box-shadow:
        0 0 0 1px rgba(139, 197, 63, 0.5),
        /* Green Thread Border */
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 40px 80px -20px rgba(0, 174, 239, 0.3),
        /* Blue Glow */
        inset 0 0 60px rgba(139, 197, 63, 0.05);
    /* Inner Depth */
}

.icon-box {
    width: 64px;
    height: 64px;
    margin-bottom: 24px;
    color: var(--primary);
    transition: 0.3s;
}

/* V9: Icon turns White on Hover */
.service-card:hover .icon-box {
    transform: scale(1.1);
    color: #ffffff;
    /* WHITE */
}

.icon-box svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: #fff;
    transition: 0.3s;
}

/* V9: Title Gradient (Green to Blue Union) */
.service-card:hover h3 {
    background: linear-gradient(to right, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

/* Stats Section */
#trayectoria {
    padding: var(--section-spacing) 0;
    position: relative;
    /* Optional: glass background for stats area if needed,
       but currently it sits on the body bg */
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* V15/V16: Beast Mode Stats */
.number {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    /* V16: Even Bigger */
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: 2px;
    /* V16: Synthetic Ultra Bold (Heavier Shadow) */
    text-shadow:
        0 0 4px currentColor,
        0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Re-implementing correctly for Gradient Text + Boldness */
.stat-item .number {
    /* Reset text-shadow to avoid ugly artifacts with gradient text */
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* To make it "thicker", we can use text-stroke if supported,
       otherwise just the massive size does the heavy lifting. */
    -webkit-text-stroke: 1px transparent;
}

/* V4/V14/V15: Gradient Text Colors for Stats (Restored & Verified) */
.num-green {
    background: linear-gradient(to right, #8BC53F, #a8e063);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.num-orange {
    background: linear-gradient(to right, #FF8000, #FFB347);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.num-blue {
    background: linear-gradient(to right, #00AEEF, #4FC3F7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-item .label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Contact Section */
#contacto {
    padding: var(--section-spacing) 0;
    text-align: center;
}

.contact-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.contact-info h2 {
    font-size: 3.5rem;
    margin-bottom: 24px;
}

.action-area {
    margin: 48px 0;
}

.btn-large {
    font-size: 1.2rem;
    padding: 16px 48px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.contact-details-inline {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 24px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.small-text {
    font-size: 0.9rem;
    margin-top: 8px;
    opacity: 0.7;
}

/* Footer V8: Minimalist */
footer {
    padding: 24px 0;
    /* Reduced padding */
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    /* Fainter border */
    text-align: center;
}

.footer-logo {
    display: none;
    /* Hide if still present */
}

footer p {
    font-size: 0.85rem;
    /* Smaller font */
    opacity: 0.5;
    /* More subtle */
    margin: 0;
}

.social-links {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        background: #000;
        flex-direction: column;
        justify-content: center;
        transition: 0.3s;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-toggle {
        display: block;
        z-index: 1000;
    }

    .mobile-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: #fff;
        margin: 6px 0;
        transition: 0.3s;
    }

    .contact-wrapper,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}