/* ============================================================
   CS Marine Advisors — Animaciones + scroll reveal + media queries
   ============================================================ */

/* ── Scroll reveal ──────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.72s cubic-bezier(.16,1,.3,1),
                transform 0.72s cubic-bezier(.16,1,.3,1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Variantes direccionales — aplicar clase reveal--left / reveal--right / reveal--scale */
.reveal--left  { transform: translateX(-40px); }
.reveal--right { transform: translateX(40px);  }
.reveal--scale { transform: scale(0.94);       }
.reveal--left.visible,
.reveal--right.visible { transform: translateX(0); }
.reveal--scale.visible { transform: scale(1); }

/* ── Section divider gradient suave entre light y dark ───────── */
.section--light + .section--dark,
.section--light + .section--navy {
    position: relative;
}
.section--light + .section--dark::before,
.section--light + .section--navy::before {
    content: '';
    position: absolute;
    top: -1px; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(56,187,197,0.25), transparent);
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0);    }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1);    }
    50%      { opacity: 1;   transform: scaleY(1.2);  }
}

/* Respeta prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .reveal { opacity: 1; transform: none; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .enfoque__inner { grid-template-columns: 1fr; gap: 48px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .service-card:nth-child(1),
    .service-card:nth-child(2),
    .service-card:nth-child(3),
    .service-card:nth-child(4),
    .service-card:nth-child(5) { grid-column: span 1; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-cta    { display: none; }
    .nav-toggle { display: flex; }
    .lang-switcher { display: none; }

    .questions-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 16px;
        margin: 0 calc(-1 * var(--pad-x));
        padding: 0 var(--pad-x) 24px;
    }
    .questions-grid::-webkit-scrollbar { display: none; }
    .question-card {
        flex: 0 0 80vw;
        max-width: 320px;
        scroll-snap-align: start;
    }
    .question-card:last-child { margin-right: var(--pad-x); }
    .services-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 16px;
        margin: 0 calc(-1 * var(--pad-x));
        padding: 0 var(--pad-x) 24px;
    }
    .services-grid::-webkit-scrollbar { display: none; }
    .service-card {
        flex: 0 0 80vw;
        max-width: 300px;
        scroll-snap-align: start;
    }
    .service-card:last-child { margin-right: var(--pad-x); }
    .stats-marquee-wrap {
        overflow: hidden;
        margin: 0 calc(-1 * var(--pad-x));
        padding-bottom: 24px;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
        mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    }
    .stats-grid {
        display: flex;
        flex-direction: row;
        gap: 16px;
        width: max-content;
        animation: statsMarquee 18s linear infinite;
        padding: 4px var(--pad-x) 0;
    }
    .stat--clone { display: flex; }
    .stat {
        flex: 0 0 72vw;
        max-width: 260px;
        scroll-snap-align: unset;
    }
    .stat:last-child { margin-right: 0; }
    @keyframes statsMarquee {
        from { transform: translateX(0); }
        to   { transform: translateX(-50%); }
    }
    .video-card        { flex: 0 0 86vw; }
    .video-card--short { flex: 0 0 54vw; }
    .press-logos {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        justify-content: flex-start;
        margin: 0 -32px;
        padding: 4px 32px 8px;
        -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
                mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    }
    .press-logos::-webkit-scrollbar { display: none; }
    .press-logo {
        flex: 0 0 auto;
        min-width: 40vw;
        padding: 0 12px;
        scroll-snap-align: center;
        border-right: none;
        opacity: 0.85;
    }
    .team-grid        { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }
    .team-card__photo { height: 340px; }
    .team-card__photo img { object-position: 50% 100%; }
    .scenarios-grid   { grid-template-columns: 1fr; }
    .form-wrapper     { grid-template-columns: 1fr; }
    .form-row         { grid-template-columns: 1fr; }
    .hero__ctas       { flex-direction: column; width: 100%; align-items: center; }
    .hero__ctas .btn  { width: 100%; max-width: 300px; }
    .footer__top      { flex-direction: column; gap: 24px; }
    .footer__nav      { gap: 16px; }
    .footer__bottom   { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    :root { --section: 56px; }
    .press-logo { padding: 0 12px; font-size: 1.4rem; min-width: 46vw; }
    .team-grid { max-width: 320px; }
    .team-card__photo { height: 300px; }
    .section__title { font-size: clamp(1.55rem, 5vw, 2rem); }
    .footer__copy { font-size: 0.72rem; }
    .footer__legal-links { gap: 10px; font-size: 0.72rem; }

    .hero {
        padding-top: 100px;
        padding-bottom: 64px;
        min-height: auto;
    }
    .hero__eyebrow {
        font-size: 0.6rem;
        letter-spacing: 0.18em;
        margin-bottom: 16px;
    }
    .hero__title {
        font-size: 1.85rem !important;
        line-height: 1.12;
        margin-bottom: 18px;
    }
    .hero__subtitle {
        font-size: 0.95rem;
        margin-bottom: 32px;
        line-height: 1.65;
    }
    .hero__ctas .btn--large {
        padding: 15px 28px;
        font-size: 0.78rem;
    }
}
