/* ================================================
   INDEX.CSS — Diseño visual específico del index
   Requiere: base.css · styles.css
   ================================================ */

/* ── HERO ──────────────────────────────────────────── */

.hero {
    padding: calc(var(--space-xxl) * 1.15) 0 calc(var(--space-xxl) * 1.35);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Engineering line grid */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(0, 102, 255, 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 102, 255, 0.055) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Soft vignette fading grid downward */
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to bottom, transparent, var(--color-white));
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: min(400px, 84%);
    height: auto;
    margin: 0 auto var(--space-md);
    display: block;
    filter: drop-shadow(0 2px 14px rgba(0, 102, 255, 0.1));
}

.hero-role-tags {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.role-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.875rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-primary);
    background: rgba(0, 102, 255, 0.07);
    border: 1px solid rgba(0, 102, 255, 0.18);
}

.hero-description {
    font-size: 1.05rem;
    line-height: 1.8;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    color: var(--color-text-light);
}

@media (max-width: 768px) {
    .hero {
        padding: var(--space-xl) 0 var(--space-xxl);
    }

    .hero-logo {
        width: min(272px, 80%);
        margin-bottom: var(--space-sm);
    }

    .hero-role-tags {
        gap: 0.4rem;
        margin-bottom: var(--space-md);
    }

    .role-tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.7rem;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.65;
    }
}

/* ── DUAL PROFILE ──────────────────────────────────── */

.dual-profile {
    background: var(--color-bg);
}

.profile-card {
    position: relative;
    overflow: hidden;
}

/* Numbered watermark */
.profile-card::before {
    content: attr(data-index);
    font-family: var(--font-mono);
    font-size: 7rem;
    font-weight: 700;
    color: var(--color-primary);
    opacity: 0.042;
    position: absolute;
    bottom: -1rem;
    right: 1.25rem;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.profile-card:nth-child(2)::before {
    color: var(--color-accent);
}

/* All direct children above watermark */
.profile-card > * {
    position: relative;
    z-index: 1;
}

/* Icon container */
.profile-icon {
    color: var(--color-primary);
    background: rgba(0, 102, 255, 0.07);
    border-radius: var(--radius-md);
    font-size: 0;
    line-height: 0;
}

.profile-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}

.profile-card:nth-child(2) .profile-icon {
    color: var(--color-accent);
    background: rgba(0, 212, 170, 0.08);
}

/* Subtitle → monospaced label */
.profile-subtitle {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-light);
}

/* ── SECTION TITLES ────────────────────────────────── */

.section-title {
    font-size: clamp(1.6rem, 2.2vw, 2.1rem);
    letter-spacing: -0.035em;
    line-height: 1.15;
    font-weight: 700;
}

/* ── HIGHLIGHTS STRIP ──────────────────────────────── */

.highlights-section {
    background: var(--color-bg);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.highlight-card {
    padding: 2.5rem 1.75rem;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--color-border);
    background: var(--color-white);
    box-shadow: none;
    transition: var(--transition);
    text-align: center;
}

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

.highlight-card:hover {
    background: var(--color-surface-accent);
    transform: none;
    box-shadow: none;
}

.highlight-number {
    font-family: var(--font-mono);
    font-size: clamp(2.25rem, 3.5vw, 3.25rem);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.625rem;
    letter-spacing: -0.03em;
}

.highlight-text {
    font-size: 0.82rem;
    color: var(--color-text-light);
    font-weight: 500;
    line-height: 1.5;
    max-width: 110px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        border-radius: var(--radius-lg);
    }

    .highlight-card {
        padding: 1.75rem 1.5rem;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
    }

    .highlight-card:nth-child(odd) {
        border-right: 1px solid var(--color-border);
    }

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

    .highlight-text {
        max-width: none;
    }
}

/* ── CTA SECTION ───────────────────────────────────── */

.cta-section {
    background: var(--color-text);
    padding: var(--space-xxl) 0;
    position: relative;
    overflow: hidden;
}

/* Grid echo */
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Blue-to-teal accent line at top */
.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, var(--color-primary), var(--color-accent));
}

.cta-container {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--color-white);
    letter-spacing: -0.035em;
    margin-bottom: var(--space-sm);
}

.cta-subtitle {
    font-size: 0.975rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.65;
    max-width: 480px;
    margin: 0 auto var(--space-xl);
}

.cta-buttons {
    gap: 0.75rem;
}

.cta-buttons .btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: 2px solid var(--color-primary);
    box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
}

.cta-buttons .btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.35);
}

.cta-buttons .btn-secondary {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cta-buttons .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--color-white);
}

@media (max-width: 768px) {
    .cta-title {
        font-size: 1.5rem;
    }

    .cta-subtitle {
        font-size: 0.9rem;
        margin-bottom: var(--space-lg);
    }
}

/* ── SCROLL REVEAL ─────────────────────────────────── */

@keyframes ix-rise {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero — auto-play on load, staggered */
.hero-logo {
    animation: ix-rise var(--dur-slow) var(--ease-out) both;
}

.hero-role-tags {
    animation: ix-rise var(--dur-slow) var(--ease-out) 0.15s both;
}

.hero-description {
    animation: ix-rise var(--dur-slow) var(--ease-out) 0.28s both;
}

.hero-cta {
    animation: ix-rise var(--dur-slow) var(--ease-out) 0.4s both;
}

/* Scroll-triggered */
[data-animate] {
    opacity: 0;
    transform: translateY(22px);
}

[data-animate].is-visible {
    animation: ix-rise 0.55s var(--ease-out) forwards;
}

[data-animate][data-delay="1"].is-visible { animation-delay:  80ms; }
[data-animate][data-delay="2"].is-visible { animation-delay: 160ms; }
[data-animate][data-delay="3"].is-visible { animation-delay: 240ms; }
[data-animate][data-delay="4"].is-visible { animation-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
    .hero-logo,
    .hero-role-tags,
    .hero-description,
    .hero-cta,
    [data-animate],
    [data-animate].is-visible {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
}
