:root {
    --bg-dark: #020617;
    /* Very dark slate */
    --bg-card: #0f172a;
    /* Dark slate for cards */
    --primary: #10b981;
    /* Emerald green */
    --primary-glow: rgba(16, 185, 129, 0.15);
    --text-light: #f8fafc;
    /* Crisp white */
    --text-muted: #94a3b8;
    /* Soft blue-gray */
    --glass-bg: rgba(15, 23, 42, 0.4);
    --glass-border: rgba(51, 65, 85, 0.5);
    --glass-border-hover: rgba(16, 185, 129, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    scroll-behavior: smooth;
    line-height: 1.5;
}

/* Background effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 0%, var(--primary-glow) 0%, transparent 50%),
        radial-gradient(circle at 85% 100%, var(--primary-glow) 0%, transparent 50%);
    pointer-events: none;
}

/* Grid overlay */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    pointer-events: none;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(2, 6, 23, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

nav.scrolled {
    border-bottom: 1px solid var(--glass-border);
    padding: 15px 5%;
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
}

.nav-center {
    display: flex;
    gap: 32px;
    list-style: none;
    background: var(--glass-bg);
    padding: 8px 24px;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
}

.nav-center a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

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

.btn-small {
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--primary);
    color: #020617;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #34d399;
    /* Lighter emerald */
    transform: translateY(-1px);
}

/* General Section */
section {
    padding: 120px 5%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.section-header {
    margin-bottom: 60px;
    max-width: 600px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 16px;
    color: var(--text-light);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Hero */
.hero {
    position: relative;
    padding-top: 180px;
    padding-bottom: 80px;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Trend Background */
.trend-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 128%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.6;
}

.trend-bg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.hero>*:not(.trend-bg) {
    position: relative;
    z-index: 1;
}

.trend-line {
    animation: drawLine 3.5s ease-out forwards;
    stroke-dasharray: 3000;
    stroke-dashoffset: 3000;
}

.trend-area {
    animation: fadeArea 3.5s ease-out forwards;
    opacity: 0;
}

.trend-dot {
    animation: popDot 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 3s forwards;
    opacity: 0;
    transform-origin: 1200px 50px;
    transform: scale(0);
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeArea {
    to {
        opacity: 1;
    }
}

@keyframes popDot {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero h1 {
    font-size: 5rem;
    font-weight: 600;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-light);
    max-width: 900px;
}

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

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border-radius: 6px;
    background: var(--primary);
    color: #020617;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn:hover {
    background: #34d399;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-light);
}

.btn-outline:hover {
    background: rgba(16, 185, 129, 0.05);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
}

/* Marquee / Technologies */
.marquee-container {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    white-space: nowrap;
    position: relative;
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-dark), transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-dark), transparent);
}

.marquee-content {
    display: flex;
    gap: 60px;
    padding-left: 60px;
    animation: marquee 25s linear infinite;
}

.marquee-item {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.6;
    transition: all 0.3s;
}

.marquee-item:hover {
    opacity: 1;
    color: var(--primary);
    transform: scale(1.05);
}

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

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

/* Icons */
.float-icon {
    /* Animation removed based on user feedback */
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.stat-card {
    text-align: center;
    padding: 30px;
    border-right: 1px solid var(--glass-border);
}

.stat-card:last-child {
    border-right: none;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #34d399 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Methodology Steps */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 44px;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-glow) 0%, transparent 100%);
    z-index: 0;
}

.steps-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 44px;
    width: 2px;
    height: 0;
    background: var(--primary);
    z-index: 0;
    transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

.steps-container:has(.step-card:nth-child(1):hover)::after {
    height: 15%;
}

.steps-container:has(.step-card:nth-child(2):hover)::after {
    height: 45%;
}

.steps-container:has(.step-card:nth-child(3):hover)::after {
    height: 75%;
}

.steps-container:has(.step-card:nth-child(4):hover)::after {
    height: 100%;
}

.steps-container:has(.step-card:nth-child(1):hover) .step-card:nth-child(-n+1) .step-number {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.steps-container:has(.step-card:nth-child(2):hover) .step-card:nth-child(-n+2) .step-number {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.steps-container:has(.step-card:nth-child(3):hover) .step-card:nth-child(-n+3) .step-number {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.steps-container:has(.step-card:nth-child(4):hover) .step-card:nth-child(-n+4) .step-number {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.step-card {
    display: flex;
    gap: 30px;
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateX(10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s;
}

.step-card:hover .step-number {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-light);
}

.step-content p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(280px, auto);
    gap: 24px;
}

/* Cards (Bento/Glass) */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 40px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, var(--primary-glow), transparent 50%);
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.glass-card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.glass-card:hover::before {
    opacity: 1;
}

/* Portafolio Cards */
.portfolio-card {
    padding: 0;
    grid-column: span 4;
}

.portfolio-img {
    width: 100%;
    height: 200px;
    background: #020617;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.portfolio-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(16, 185, 129, 0.05) 100%);
    pointer-events: none;
}

.portfolio-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-light);
}

.portfolio-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: #34d399;
}

/* Servicios Cards */
.servicios-card {
    grid-column: span 4;
}

.card-icon {
    margin-bottom: 24px;
    color: var(--primary);
}

.glass-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-light);
}

.glass-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.price-tag {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Precios */
.pricing-card {
    text-align: left;
}

.pricing-card.popular {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, transparent 100%);
}

.popular-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--primary);
    color: #020617;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plan-name {
    font-size: 1.25rem;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-light);
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary);
    letter-spacing: -1px;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 0;
}

.plan-features {
    list-style: none;
    margin-bottom: 40px;
    margin-top: 30px;
}

.plan-features li {
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.plan-features li::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 60px;
}

.contact-info h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    color: var(--text-light);
}

.contact-info p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 16px;
    background: rgba(2, 6, 23, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

textarea.form-control {
    height: 140px;
    resize: vertical;
}

/* CTA Final */
.cta-section {
    text-align: center;
    padding: 120px 5%;
    margin-top: 60px;
    border-top: 1px solid var(--glass-border);
    align-items: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.cta-section h2 {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-light);
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 40px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    background: var(--bg-dark);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

/* Responsive */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-card,
    .servicios-card {
        grid-column: span 1;
    }

    .bento-grid {
        display: flex;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card {
        border-bottom: 1px solid var(--glass-border);
    }

    .stat-card:nth-child(even) {
        border-right: none;
    }

    .stat-card:nth-child(3),
    .stat-card:nth-child(4) {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .nav-center {
        display: none;
    }

    .hero h1 {
        font-size: 3rem;
        letter-spacing: -1px;
    }

    .section-title {
        font-size: 2rem;
    }

    .grid-2,
    .grid-3,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
        padding: 40px 20px;
    }

    .cta-section h2 {
        font-size: 2.2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .step-card {
        flex-direction: column;
        gap: 20px;
        padding: 30px;
    }

    .steps-container::before,
    .steps-container::after {
        left: 24px;
    }

    .stat-card {
        border-right: none;
    }

    .stat-card:nth-child(3) {
        border-bottom: 1px solid var(--glass-border);
    }
}