/*
  sections.css
  Estilos específicos de cada sección del landing (layout, no componentes sueltos).
*/

/* ---------- HERO ---------- */
.hero {
    padding-top: clamp(56px, 8vw, 96px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -160px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(124, 92, 191, 0.16), transparent 70%);
    z-index: 0;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -160px;
    left: -140px;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(59, 189, 160, 0.14), transparent 70%);
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.hero-copy h1 {
    font-size: clamp(36px, 5vw, 56px);
    margin: 18px 0 20px;
}

.hero-copy p {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-trust {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-trust .avatars {
    display: flex;
}

.hero-trust .avatars img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2.5px solid #fff;
    object-fit: cover;
    margin-left: -10px;
    box-shadow: var(--shadow-sm);
}

.hero-trust .avatars img:first-child {
    margin-left: 0;
}

.hero-trust span {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.hero-visual {
    /* Medidas que usa Numa para ubicarse en la esquina del celular.
       --phone-w debe ser igual al ancho de .phone-frame en cada pantalla. */
    --phone-w: min(300px, 78vw);
    --numa-w: 92px;

    display: flex;
    justify-content: center;
    position: relative;
    z-index: 0;
}

/* Numa sobre la esquina superior izquierda del celular.
   El "+ 22px" es cuánto se encima sobre el celular (súbelo para que entre más). */
.hero-visual .float-numa {
    position: absolute;
    width: var(--numa-w);
    top: -24px;
    left: calc(50% - var(--phone-w) / 2 - var(--numa-w) + 22px);
    z-index: 5;
    filter: drop-shadow(0 12px 20px rgba(90, 63, 160, 0.25));
    animation: floatY 3.6s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* ---------- STATS ---------- */
.stats {
    padding: 40px 0;
    background: #fff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 16px;
}

.stats-grid .num {
    font-family: var(--font-display);
    font-size: clamp(26px, 3vw, 34px);
    color: var(--purple-dark);
    font-weight: 700;
}

.stats-grid .label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}


/* ---------- SHOWCASE (duo) ---------- */
.showcase-duo {
    display: flex;
    flex-direction: column;
    gap: 100px;
}

.showcase-item {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    align-items: center;
    position: relative;
}

.showcase-item-reverse {
    grid-template-columns: 1.15fr 0.85fr;
}

.showcase-item-reverse .showcase-phone {
    order: 2;
}

.showcase-item-reverse .showcase-copy {
    order: 1;
    text-align: right;
}

.showcase-phone {
    position: relative;
    display: flex;
    justify-content: center;
}

.showcase-glow {
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    filter: blur(10px);
    z-index: 0;
    opacity: .55;
}

.showcase-glow-purple {
    background: radial-gradient(circle, rgba(124, 92, 191, .35), transparent 70%);
    top: -40px;
    left: 10%;
}

.showcase-glow-pink {
    background: radial-gradient(circle, rgba(232, 84, 122, .3), transparent 70%);
    top: -40px;
    right: 10%;
}

.showcase-phone .phone-frame {
    position: relative;
    z-index: 1;
    width: min(280px, 70vw);
}

/* ---------- CARRUSEL DE PANTALLAS (showcase) ---------- */
.phone-carousel {
    position: relative;
}

.phone-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    opacity: 0;
    transition: opacity .8s ease;
}

.phone-carousel img.is-active {
    opacity: 1;
}

.showcase-float {
    position: absolute;
    z-index: 2;
    font-size: 24px;
    background: #fff;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    animation: floatY 3.6s ease-in-out infinite;
}

.showcase-float-1 {
    top: 6%;
    right: -6%;
}

.showcase-float-2 {
    bottom: 10%;
    left: -8%;
    animation-delay: .8s;
}

.showcase-copy h3 {
    font-size: clamp(24px, 3vw, 32px);
    margin: 14px 0 14px;
}

.showcase-copy p {
    color: var(--text-muted);
    font-size: 15.5px;
    max-width: 420px;
}

.showcase-item-reverse .showcase-copy p {
    margin-left: auto;
}

/* ---------- CÓMO FUNCIONA ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
}

.steps::before {
    content: "";
    position: absolute;
    top: 26px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    text-align: center;
}

.step-num {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--purple-dark));
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    box-shadow: 0 8px 18px rgba(90, 63, 160, 0.3);
}

.step h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.step p {
    font-size: 13.5px;
    color: var(--text-muted);
}

/* ---------- ASISTENTE IA (split) ---------- */
.ai-section {
    background: linear-gradient(180deg, #fff 0%, var(--purple-light) 100%);
}

.ai-inner {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
    align-items: center;
}

.ai-copy .eyebrow { margin-bottom: 14px; }

.ai-copy h2 {
    font-size: clamp(26px, 3.4vw, 36px);
    margin-bottom: 16px;
}

.ai-copy > p {
    color: var(--text-muted);
    margin-bottom: 26px;
    font-size: 15.5px;
}

.ai-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ai-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 14.5px;
    font-weight: 600;
}

.ai-list .check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.ai-visual {
    display: flex;
    justify-content: center;
}

/* ---------- TESTIMONIOS ---------- */
.testimonials {
    background: var(--bg-dark);
    color: var(--text-on-dark);
}

.testimonials .section-head h2,
.testimonials .section-head p {
    color: #fff;
}

.testimonials .section-head p {
    color: rgba(237, 233, 255, 0.65);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 26px;
}

.stars {
    color: #FFC24B;
    font-size: 13px;
    letter-spacing: 2px;
    margin-bottom: 14px;
}

.testimonial-card p {
    font-size: 14.5px;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
    color: rgba(237, 233, 255, 0.9);
}

.testimonial-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, .15);
}

.testimonial-avatar-logo {
    object-fit: contain;
    background: #05070d;
    padding: 4px;
}

.testimonial-person .name {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
}

.testimonial-person .role {
    font-size: 12px;
    color: rgba(237, 233, 255, 0.55);
}

/* ---------- CTA FINAL ---------- */
.final-cta {
    text-align: center;
}

.final-cta h2 {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 16px;
}

.final-cta > p {
    color: var(--text-muted);
    max-width: 460px;
    margin: 0 auto 32px;
}

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-dark);
    color: #fff;
    padding: 11px 22px;
    border-radius: 14px;
    font-size: 13px;
}

.store-btn .top {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    display: block;
}

.store-btn .bottom {
    font-weight: 700;
    font-size: 14.5px;
}

.final-cta .fine-print {
    font-size: 12.5px;
    color: var(--text-muted);
}

/* ---------- RESPONSIVE SECCIONES ---------- */
@media (max-width: 980px) {
    .hero-inner,
    .ai-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions,
    .hero-trust {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .ai-list li {
        text-align: left;
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 40px;
    }

    .steps::before {
        display: none;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .showcase-item,
    .showcase-item-reverse {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .showcase-item-reverse .showcase-phone,
    .showcase-item-reverse .showcase-copy {
        order: initial;
    }

    .showcase-copy,
    .showcase-item-reverse .showcase-copy {
        text-align: center;
    }

    .showcase-copy p,
    .showcase-item-reverse .showcase-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .showcase-duo {
        gap: 64px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 52px;
    }

    .container {
        padding: 0 18px;
    }

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

    .steps {
        grid-template-columns: 1fr;
    }

    /* En celular el marco mide min(250px, 72vw) y Numa es más chica */
    .hero-visual {
        --phone-w: min(250px, 72vw);
        --numa-w: 68px;
    }

    .hero-visual .float-numa {
        top: -20px;
        z-index: 5;
    }

    .phone-frame {
        width: min(250px, 72vw);
    }
}

@media (max-width: 480px) {
    .hero-copy h1 {
        font-size: 30px;
        margin: 14px 0 16px;
    }

    .hero-copy p {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 28px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section-head {
        margin-bottom: 32px;
    }

    .section-head h2 {
        font-size: 26px;
    }

    .showcase-float {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .showcase-glow {
        width: 240px;
        height: 240px;
    }
}

/* ---------- COVERFLOW (Home) ---------- */
.coverflow {
    position: relative;
    width: 100%;
    max-width: 560px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coverflow-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.coverflow-slide {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    aspect-ratio: 300 / 610;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: #0d0b16;
    border: 6px solid #0d0b16;
    transition: transform .6s ease, opacity .6s ease;
    will-change: transform, opacity;
}

.coverflow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 20px;
    display: block;
}

.coverflow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--purple-dark);
    font-size: 22px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s ease;
}

.coverflow-arrow:hover {
    transform: translateY(-50%) scale(1.08);
}

.coverflow-arrow-prev { left: 0; }
.coverflow-arrow-next { right: 0; }

@media (max-width: 480px) {
    .coverflow {
        height: 300px;
    }

    .coverflow-slide {
        width: 118px;
    }
}

/* ---------- GALERÍA DE PERSONAS REALES ---------- */
.people-proof {
    background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
}

/* Carrusel de fotos: centrado, grande y con la foto completa */
.coverflow-photos {
    /* Ancho de la foto central: crece con la pantalla hasta 460px */
    --photo-w: clamp(230px, 40vw, 460px);
    /* Alto = ancho × --photo-h.
       0.75 = foto horizontal (4:3). Si tus fotos son verticales (3:4) usa 1.333
       y baja --photo-w a clamp(180px, 30vw, 300px). */
    --photo-h: 0.75;

    max-width: none;
    margin: 0 auto;
    height: calc(var(--photo-w) * var(--photo-h) + 90px);
}

.coverflow-photos .coverflow-arrow {
    z-index: 20;
}

.coverflow-slide--photo {
    width: var(--photo-w);
    height: calc(var(--photo-w) * var(--photo-h));
    aspect-ratio: auto;
    border: 6px solid #fff;
    border-radius: var(--radius);
    background: var(--purple-light);
    box-shadow: var(--shadow-lg);
}

/* contain = la foto se ve COMPLETA, sin recortes */
.coverflow-slide--photo img {
    border-radius: calc(var(--radius) - 6px);
    object-fit: contain;
    object-position: center;
}

@media (max-width: 480px) {
    .coverflow-slide--photo {
        border-width: 4px;
        border-radius: 16px;
    }

    .coverflow-slide--photo img {
        border-radius: 12px;
    }
}