/* ─── Home (public/pages/home.php) ───────────────────────────────────────────
   Hero nuevo con el estilo de la landing /start: primero celular, texto corto
   y celulares con capturas REALES de la app (assets/images/landing/*.webp).
   Prefijo hm- para no chocar con styles.css ni landing-antigravity.css.
   Paleta del kit de marca: Tinta #0F172A, Azul #2563EB, Menta #9DD9A5. */

.hm-page {
    --hm-ink: #0F172A;
    --hm-blue: #2563EB;
    --hm-mint: #9DD9A5;
    --hm-mint-soft: #D1FAE5;
    --hm-green: #047857;
    --hm-cloud: #F8FAFC;
    --hm-gray: #64748B;
    --hm-line: #E2E8F0;
}
.hm-page h1,
.hm-page h2 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    letter-spacing: -0.02em;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */
.hm-hero {
    position: relative;
    overflow: hidden;
    /* deja espacio para el menú fijo (~56px en celular) */
    padding: 76px 0 0;
    background:
        radial-gradient(420px 280px at 0% 0%, rgba(37, 99, 235, .12), transparent 70%),
        radial-gradient(380px 300px at 100% 55%, rgba(157, 217, 165, .32), transparent 70%),
        var(--hm-cloud);
}
.hm-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: center;
}
.hm-hero-copy { text-align: center; }

.hm-badge {
    display: inline-block;
    background: var(--hm-mint-soft);
    color: var(--hm-green);
    font-weight: 700;
    font-size: .8rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    margin-bottom: .85rem;
}
.hm-title {
    font-weight: 800;
    color: var(--hm-ink);
    font-size: clamp(1.95rem, 8.2vw, 2.6rem);
    line-height: 1.12;
    margin: 0 0 .75rem;
    text-wrap: balance;
    overflow-wrap: break-word;
}
.hm-lead {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.5;
    max-width: 520px;
    margin: 0 auto 1.25rem;
}
.hm-ctas {
    display: grid;
    gap: 10px;
}
.hm-ctas .ag-btn { min-height: 52px; width: 100%; }
.hm-note {
    color: var(--hm-gray);
    font-size: .85rem;
    margin: .7rem 0 0;
}
.hm-play-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    color: var(--hm-gray);
    font-size: .85rem;
}

/* Celulares: el del centro adelante, dos detrás inclinados. Solo se ve la
   parte de arriba y se desvanece hacia la siguiente sección. */
.hm-hero-visual { position: relative; }
.hm-phones {
    --hm-w: min(42vw, 210px);
    position: relative;
    height: calc(var(--hm-w) * 1.62);
    margin: 0 -12px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(#000 72%, transparent);
            mask-image: linear-gradient(#000 72%, transparent);
}
.hm-phone {
    position: absolute;
    top: 14px;
    left: 50%;
    width: var(--hm-w);
    aspect-ratio: 1 / 2.05;
    margin: 0;
    padding: 6px;
    background: var(--hm-ink);
    border-radius: 30px;
    box-shadow: 0 24px 50px -24px rgba(15, 23, 42, .55);
    transform-origin: 50% 100%;
}
.hm-phone img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 24px;
    background: #fff;
}
/* Posición final de cada celular (variables, así la animación termina
   exactamente donde se queda). En celular los de los lados se quedan dentro
   de la pantalla para que no se corte el texto ("Miércoles"). */
.hm-phones {
    --hm-left:  translateX(-104%) rotate(-5deg) scale(.84);
    --hm-right: translateX(4%) rotate(5deg) scale(.84);
}
.hm-phone-front {
    z-index: 3;
    transform: translateX(-50%);
    animation: hm-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.hm-phone-left {
    z-index: 1;
    top: 40px;
    transform: var(--hm-left);
    animation: hm-rise-left .8s .12s cubic-bezier(.2, .8, .2, 1) both;
}
.hm-phone-right {
    z-index: 2;
    top: 40px;
    transform: var(--hm-right);
    animation: hm-rise-right .8s .2s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes hm-rise {
    from { opacity: 0; transform: translateX(-50%) translateY(40px); }
    to   { opacity: 1; transform: translateX(-50%); }
}
@keyframes hm-rise-left {
    from { opacity: 0; transform: translateX(-70%) translateY(40px) scale(.84); }
    to   { opacity: 1; transform: var(--hm-left); }
}
@keyframes hm-rise-right {
    from { opacity: 0; transform: translateX(-30%) translateY(40px) scale(.84); }
    to   { opacity: 1; transform: var(--hm-right); }
}

/* ── Beneficios en una línea ───────────────────────────────────────────── */
.hm-benefits-wrap {
    background: #fff;
    border-top: 1px solid var(--hm-line);
    border-bottom: 1px solid var(--hm-line);
    padding: 18px 0;
    position: relative;
    z-index: 2;
}
.hm-benefits {
    list-style: none;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 10px;
}
.hm-benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--hm-ink);
}
.hm-icon {
    flex-shrink: 0;
    display: inline-flex;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, .08);
    color: var(--hm-blue);
}

/* ── Títulos de sección ─────────────────────────────────────────────────── */
.hm-h2 {
    font-weight: 800;
    color: var(--hm-ink);
    font-size: 1.6rem;
    line-height: 1.15;
    margin: 0 0 .6rem;
}
.hm-center { text-align: center; }
.hm-sub {
    text-align: center;
    color: #475569;
    max-width: 560px;
    margin: 0 auto 1.4rem;
}

/* ── Bloques de dos columnas (texto + imagen) ──────────────────────────── */
.hm-split { padding: 44px 0; position: relative; z-index: 2; background: #fff; }
.hm-split-cloud { background: var(--hm-cloud); }
.hm-split-loyalty {
    background:
        radial-gradient(380px 260px at 100% 0%, rgba(157, 217, 165, .35), transparent 70%),
        radial-gradient(360px 260px at 0% 100%, rgba(37, 99, 235, .10), transparent 70%),
        var(--hm-cloud);
}
.hm-split-grid { display: grid; grid-template-columns: 1fr; gap: 26px; align-items: center; }
.hm-split-lead { color: #475569; margin: 0 0 1rem; font-size: 1.02rem; }
.hm-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hm-checks li { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; color: var(--hm-ink); line-height: 1.35; }
.hm-check {
    flex-shrink: 0; display: inline-flex; width: 26px; height: 26px; border-radius: 8px;
    align-items: center; justify-content: center; background: var(--hm-mint-soft); color: var(--hm-green);
}
.hm-pill {
    display: inline-block; margin-top: 1.1rem; padding: .35rem .8rem; border-radius: 999px;
    background: var(--hm-ink); color: var(--hm-mint); font-weight: 700; font-size: .82rem;
}

/* Un celular solo (sección del equipo): se ve la parte de arriba y se desvanece */
.hm-solo-phone {
    width: min(64vw, 270px); margin: 0 auto; aspect-ratio: 4 / 5; overflow: hidden;
    background: var(--hm-ink); padding: 8px 8px 0; border-radius: 34px 34px 0 0;
    box-shadow: 0 30px 50px -30px rgba(15, 23, 42, .5);
    -webkit-mask-image: linear-gradient(#000 70%, transparent);
            mask-image: linear-gradient(#000 70%, transparent);
}
.hm-solo-phone img { display: block; width: 100%; height: auto; border-radius: 27px 27px 0 0; background: #fff; }

/* Tarjeta de lealtad: misma estructura que la real (franja con fondo de la
   galería, velo oscuro y sellos blancos). Las estrellas llenas se encienden
   una por una cuando la tarjeta entra en pantalla (.is-in, desde home.js). */
.hm-card-stage { position: relative; width: min(84vw, 340px); margin: 14px auto; }
.hm-lcard {
    position: relative; overflow: hidden; text-align: center;
    background: #fff; border: 1px solid var(--hm-line); border-radius: 22px;
    padding: 22px 20px 20px; color: #111827;
    box-shadow: 0 30px 60px -28px rgba(15, 23, 42, .45);
    transform: rotate(-2deg);
}
.hm-lcard-logo {
    display: inline-flex; width: 56px; height: 56px; border-radius: 50%; align-items: center; justify-content: center;
    background: var(--hm-ink); color: #fff; font-weight: 800; font-size: 1.15rem; margin-bottom: 10px;
}
.hm-lcard-name { display: block; font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; }
.hm-lcard-strip {
    position: relative; margin: 0 -20px 16px; aspect-ratio: 1032 / 336;
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hm-lcard-strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hm-lcard-strip::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(0, 0, 0, .45); }
.hm-lcard-stamps {
    position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, 30px);
    gap: 4px 12px; justify-content: center;
}
.hm-stamp {
    display: flex; align-items: center; justify-content: center; width: 30px; height: 30px;
    font-size: 28px; line-height: 1; color: #fff; opacity: .28;
}
.hm-stamp.is-on { transform: scale(.4); transition: opacity .25s ease, transform .45s cubic-bezier(.34, 1.8, .64, 1); transition-delay: calc(.35s + var(--i) * .35s); }
.hm-card-stage.is-in .hm-stamp.is-on { opacity: 1; transform: scale(1); text-shadow: 0 0 14px rgba(255, 255, 255, .55); }
.hm-lcard-left { font-size: 1.05rem; margin: 0 0 2px; }
.hm-lcard-reward { color: #6B7280; font-size: .95rem; margin: 0 0 16px; }
.hm-lcard-reward strong { color: #111827; }
.hm-lcard-btn {
    display: block; padding: 13px 16px; border-radius: 14px; background: #1E3A8A; color: #fff;
    font-weight: 600; font-size: 1rem;
}
.hm-float {
    position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid var(--hm-line); border-radius: 12px;
    padding: .45rem .7rem; font-size: .8rem; font-weight: 600; color: var(--hm-ink);
    box-shadow: 0 14px 30px -18px rgba(15, 23, 42, .45); white-space: nowrap;
}
.hm-float b { color: var(--hm-blue); }
.hm-float-top { top: -14px; right: -6px; }
.hm-float-bottom { bottom: -12px; left: -6px; }
.hm-card-stage .hm-float { opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .4s ease; }
.hm-card-stage.is-in .hm-float-top { opacity: 1; transform: none; transition-delay: 1.5s; animation: hm-bob 4s 2s ease-in-out infinite; }
.hm-card-stage.is-in .hm-float-bottom { opacity: 1; transform: none; transition-delay: 2s; animation: hm-bob 4s 3s ease-in-out infinite; }
.hm-float-bottom::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #25D366; }
@keyframes hm-bob { 50% { transform: translateY(-5px); } }

/* ── Todo lo que incluye (iconos) ──────────────────────────────────────── */
.hm-tools { padding: 44px 0; background: #fff; position: relative; z-index: 2; }
.hm-tools-grid {
    list-style: none; margin: 1.2rem 0 0; padding: 0;
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.hm-tools-grid li {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    text-align: center; padding: 16px 10px; border-radius: 16px;
    background: var(--hm-cloud); border: 1px solid var(--hm-line);
    font-weight: 600; font-size: .9rem; color: var(--hm-ink); line-height: 1.25;
}
.hm-tool-icon {
    display: inline-flex; width: 42px; height: 42px; border-radius: 12px; align-items: center; justify-content: center;
    background: rgba(37, 99, 235, .09); color: var(--hm-blue); font-size: 1.1rem;
}

/* ── Cierre ─────────────────────────────────────────────────────────────── */
.hm-final { background: var(--hm-ink); color: #fff; text-align: center; padding: 48px 0 52px; position: relative; z-index: 2; }
.hm-final .hm-h2 { color: #fff; font-size: 1.9rem; }
.hm-final-sub { color: #CBD5E1; margin: 0 0 1.2rem; }
.hm-btn-mint { background: var(--hm-mint); color: var(--hm-ink) !important; min-height: 54px; padding-inline: 2rem; }
.hm-btn-mint:hover { background: #B8E8BE; transform: translateY(-2px); }
.hm-final-play { margin: 1.2rem 0 .8rem; display: flex; justify-content: center; }
.hm-final-wa { color: var(--hm-mint) !important; font-weight: 600; text-decoration: none; }
.hm-final-wa:hover { text-decoration: underline; }

/* ── Panel web (demo de los 4 gráficos, estilos en dashboard-demo.css) ── */
.hm-web { background: #fff; padding: 44px 0; position: relative; z-index: 2; }
.hm-web .mac-window { max-width: 1080px; margin: 0 auto; }
.hm-eyebrow {
    display: block; color: var(--hm-blue); font-weight: 700;
    font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .4rem;
}

/* ── Tablet ─────────────────────────────────────────────────────────────── */
@media (min-width: 576px) {
    .hm-ctas { grid-auto-flow: column; justify-content: center; }
    .hm-ctas .ag-btn { width: auto; }
}
@media (min-width: 720px) {
    .hm-benefits { grid-template-columns: repeat(4, 1fr); }
    .hm-tools-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; }
    .hm-split, .hm-tools { padding: 64px 0; }
    .hm-final { padding: 64px 0 70px; }
    .hm-final .hm-h2 { font-size: 2.4rem; }
    .hm-h2 { font-size: 2rem; }
}

/* ── Escritorio: texto a la izquierda, celulares a la derecha ──────────── */
@media (min-width: 992px) {
    .hm-hero { padding: 110px 0 0; }
    .hm-hero-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .hm-hero-copy { text-align: left; padding-bottom: 64px; }
    .hm-title { font-size: clamp(2.8rem, 4.2vw, 3.6rem); }
    .hm-lead { font-size: 1.2rem; margin-left: 0; }
    .hm-ctas, .hm-play-row { justify-content: flex-start; }
    .hm-phones {
        --hm-w: 250px;
        --hm-left:  translateX(-96%) rotate(-5deg) scale(.86);
        --hm-right: translateX(-4%) rotate(5deg) scale(.86);
        margin: 0;
        height: 560px;
        -webkit-mask-image: linear-gradient(#000 82%, transparent);
                mask-image: linear-gradient(#000 82%, transparent);
    }
    .hm-phone, .hm-phone-left, .hm-phone-right { top: 30px; }
    .hm-split-grid { grid-template-columns: 1fr 1fr; gap: 56px; }
    .hm-split-reverse .hm-split-copy { order: 2; }
    .hm-split .hm-h2 { font-size: 2.1rem; }
    .hm-solo-phone { width: 290px; }
    .hm-card-stage { width: 370px; }
    .hm-web { padding: 64px 0; }
    .hm-phone-left, .hm-phone-right { top: 70px; }
}

@media (prefers-reduced-motion: reduce) {
    .hm-phone-front, .hm-phone-left, .hm-phone-right, .hm-float { animation: none !important; }
    .hm-stamp.is-on, .hm-card-stage .hm-float { opacity: 1; transform: none; transition: none; }
}
