/* ============================================================
   SENIOR-LEVEL DESIGNS 2026
   ------------------------------------------------------------
   Basado en: Stripe (WebGL gradients), Linear (product-first),
   Vercel (dark+neon), scroll-driven animations
   ============================================================ */

/* ===== SERVICES — TIMELINE VERTICAL CON CONTADOR ===== */
/* Inspirado en Linear + Notion - NO es grid */
.services-grid {
    display: block;
    max-width: 1000px;
    margin: 48px auto 0;
    position: relative;
    padding-left: 120px;
}

/* Línea vertical continua */
.services-grid::before {
    content: '';
    position: absolute;
    left: 60px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg,
        var(--color-accent) 0%,
        var(--color-highlight) 50%,
        var(--color-accent) 100%);
    opacity: 0.2;
}

.service-card {
    padding: 0 0 60px 0;
    background: transparent;
    border: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:last-child {
    padding-bottom: 20px;
}

/* Número grande en la línea */
.service-card::before {
    content: counter(service-counter, decimal-leading-zero);
    counter-increment: service-counter;
    position: absolute;
    left: -120px;
    top: 0;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: 900;
    color: var(--color-text-primary);
    opacity: 0.08;
    line-height: 1;
    transition: all 0.4s;
}

.service-card:hover::before {
    opacity: 0.15;
    transform: scale(1.1);
    color: var(--color-accent);
}

/* Dot en la línea */
.service-card::after {
    content: '';
    position: absolute;
    left: -68px;
    top: 24px;
    width: 16px;
    height: 16px;
    background: var(--color-bg);
    border: 3px solid var(--color-border-light);
    border-radius: 50%;
    transition: all 0.4s;
}

.service-card:hover::after {
    border-color: var(--color-accent);
    background: var(--color-accent);
    box-shadow: 0 0 20px rgba(0, 102, 204, 0.4);
    transform: scale(1.3);
}

.services-grid {
    counter-reset: service-counter;
}

.service-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.service-icon-box {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,
        rgba(0, 102, 204, 0.1),
        rgba(0, 102, 204, 0.05));
    border: 1.5px solid rgba(0, 102, 204, 0.15);
    border-radius: 14px;
    color: var(--color-accent);
    font-size: 26px;
    transition: all 0.3s;
}

.service-card:hover .service-icon-box {
    background: linear-gradient(135deg,
        rgba(0, 102, 204, 0.15),
        rgba(255, 129, 8, 0.1));
    border-color: var(--color-highlight);
    transform: rotate(-5deg);
}

.service-title {
    font-size: clamp(1.5rem, 2vw, 2.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 12px 0;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

.service-desc {
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--color-text-secondary);
    margin: 0;
    max-width: 600px;
}

.service-metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-highlight);
    background: linear-gradient(135deg,
        rgba(255, 129, 8, 0.12),
        rgba(255, 129, 8, 0.06));
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 129, 8, 0.2);
    margin-top: 16px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.service-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-accent);
    font-size: var(--text-base);
    font-weight: 600;
    text-decoration: none;
    margin-top: 16px;
    transition: all 0.2s;
}

.service-cta:hover {
    gap: 12px;
    color: var(--color-highlight);
}

/* Responsive */
@media (max-width: 767px) {
    .services-grid {
        padding-left: 60px;
        margin-top: 40px;
    }

    .services-grid::before {
        left: 24px;
    }

    .service-card {
        padding-bottom: 60px;
    }

    .service-card::before {
        left: -60px;
        width: 60px;
        height: 60px;
        font-size: 32px;
    }

    .service-card::after {
        left: -32px;
        width: 12px;
        height: 12px;
        border-width: 2px;
    }

    .service-icon-box {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }
}

/* ===== INDUSTRIES — STACKED CARDS CON STICKY SCROLL ===== */
/* Inspirado en Vercel/Stripe - cada card se apila encima */
.industries-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 48px;
    padding: 0 0 16px 0;
}

.industry-card {
    position: sticky;
    top: 80px;
    padding: 48px 40px;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center top;
}

/* Cada card posterior se apila encima con scale progresivo */
.industry-card:nth-child(1) {
    top: calc(80px + 0 * 20px);
    z-index: 1;
}

.industry-card:nth-child(2) {
    top: calc(80px + 1 * 20px);
    z-index: 2;
}

.industry-card:nth-child(3) {
    top: calc(80px + 2 * 20px);
    z-index: 3;
}

.industry-card:nth-child(4) {
    top: calc(80px + 3 * 20px);
    z-index: 4;
}

.industry-card:nth-child(5) {
    top: calc(80px + 4 * 20px);
    z-index: 5;
}

.industry-card:nth-child(6) {
    top: calc(80px + 5 * 20px);
    z-index: 6;
}

.industry-card:nth-child(7) {
    top: calc(80px + 6 * 20px);
    z-index: 7;
}

.industry-card:nth-child(8) {
    top: calc(80px + 7 * 20px);
    z-index: 8;
}

.industry-card:nth-child(9) {
    top: calc(80px + 8 * 20px);
    z-index: 9;
}

.industry-card:nth-child(10) {
    top: calc(80px + 9 * 20px);
    z-index: 10;
}

.industry-card:nth-child(11) {
    top: calc(80px + 10 * 20px);
    z-index: 11;
}

.industry-card:nth-child(12) {
    top: calc(80px + 11 * 20px);
    z-index: 12;
}

/* Gradient border top - diferentes colores */
.industry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        var(--color-accent) 0%,
        var(--color-highlight) 100%);
    border-radius: 24px 24px 0 0;
    opacity: 0;
    transition: opacity 0.4s;
}

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

/* Variación de colores por card */
.industry-card:nth-child(3n+1)::before {
    background: linear-gradient(90deg, #0066CC 0%, #1a8cff 100%);
}

.industry-card:nth-child(3n+2)::before {
    background: linear-gradient(90deg, #ff8108 0%, #ff9933 100%);
}

.industry-card:nth-child(3n+3)::before {
    background: linear-gradient(90deg, #0066CC 0%, #ff8108 100%);
}

.industry-card:hover {
    border-color: rgba(0, 102, 204, 0.3);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 102, 204, 0.1);
    transform: translateY(-2px);
}

.industry-title {
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 24px 0;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-border-light);
    display: flex;
    align-items: center;
    gap: 16px;
}

.industry-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.industry-challenge,
.industry-solution,
.industry-impact {
    font-size: var(--text-base);
    line-height: 1.65;
    color: var(--color-text-secondary);
}

.industry-challenge strong,
.industry-solution strong,
.industry-impact strong {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 1023px) {
    .industries-grid {
        padding-bottom: 120px;
    }

    .industry-card {
        padding: 36px 32px;
    }

    .industry-detail {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .industries-grid {
        padding-bottom: 60px;
        gap: 16px;
    }

    .industry-card {
        padding: 28px 24px;
        position: relative !important;
        top: auto !important;
    }

    .industry-card:nth-child(n) {
        position: relative !important;
        top: auto !important;
    }
}
