/**
 * Portada rediseñada (page-home.php · template-parts/home/*).
 *
 * Misma familia visual que las Signature Stories (papel, tinta, menta, sol;
 * Archivo + Newsreader + JetBrains Mono) pero con efectos propios para que
 * no se repitan: título que se ensancha letra a letra, marcador, filetes que
 * se dibujan y texto que se enfoca, recorrido trazado con el scroll, ciclo
 * anual, mazo de cartas, brillo que sigue al puntero, fondo vivo y persianas.
 *
 * Todo estado «oculto» vive bajo .hm-motion (lo pone home.js): sin JS se lee
 * todo. 1rem = 10px en este tema → aquí px y clamp().
 * Sin franjas de color a la izquierda, sin huecos entre secciones con fondo,
 * sin color-mix() ni data: URIs (la CSP de los blogs no EN los bloquea).
 */

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 500 900;
    font-stretch: 62% 125%;
    font-display: swap;
    src: url("../fonts/stories/archivo-var-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Newsreader";
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url("../fonts/stories/newsreader-var-latin.woff2") format("woff2");
}

@font-face {
    font-family: "Newsreader";
    font-style: italic;
    font-weight: 400 500;
    font-display: swap;
    src: url("../fonts/stories/newsreader-italic-var-latin.woff2") format("woff2");
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url("../fonts/stories/jetbrains-mono-var-latin.woff2") format("woff2");
}

@property --hm-deg {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

.hm {
    --paper: #f7f1e8;
    --paper-2: #efe5d6;
    --ink: #17393b;
    --ink-soft: #4b6264;
    --night: #0f2729;
    --night-2: #173b3d;
    --line: rgb(23 57 59 / .16);
    --mint: #52caa4;
    --mint-soft: #e2f3ea;
    --sun: #f2b544;
    --coral: #ee8b63;

    --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
    --f-serif: "Newsreader", Georgia, "Times New Roman", serif;
    --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

    --wide: 1240px;
    --gutter: clamp(20px, 5vw, 56px);
    --pad: clamp(72px, 10vw, 140px);
    --ease: cubic-bezier(.2, .7, .1, 1);

    display: block;
    overflow-x: clip;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--f-serif);
    font-size: 19px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.hm *,
.hm *::before,
.hm *::after {
    box-sizing: border-box;
}

:where(.hm) :where(p, h1, h2, h3, figure, ol, ul, li) {
    margin: 0;
    padding: 0;
}

:where(.hm) :where(ol, ul) {
    list-style: none;
}

:where(.hm) img {
    display: block;
    max-width: 100%;
    height: auto;
}

.hm-wrap {
    width: 100%;
    max-width: calc(var(--wide) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* ---------- Botón píldora con flecha (efecto: imán) ---------- */

.hm-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 8px 8px 8px 26px;
    border-radius: 999px;
    font-family: var(--f-display);
    font-size: 17px;
    font-weight: 600;
    font-synthesis: none;
    letter-spacing: .01em;
    text-decoration: none !important;
    transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), transform .35s var(--ease);
    will-change: transform;
}

.hm-btn__dot {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: transform .4s var(--ease);
}

.hm-btn:hover .hm-btn__dot,
.hm-btn:focus-visible .hm-btn__dot {
    transform: rotate(-45deg);
}

.hm-btn:focus-visible {
    outline: 3px solid var(--sun);
    outline-offset: 3px;
}

.hm-btn--ink {
    background: var(--ink);
    color: #fff !important;
}

.hm-btn--ink .hm-btn__dot {
    background: var(--mint);
    color: var(--ink);
}

.hm-btn--ink:hover {
    box-shadow: 0 14px 30px -12px rgb(23 57 59 / .6);
}

.hm-btn--mint {
    background: var(--mint);
    color: var(--night) !important;
}

.hm-btn--mint .hm-btn__dot {
    background: var(--night);
    color: var(--mint);
}

.hm-btn--mint:hover {
    background: #6fd8b6;
}

/* ---------- 1 · Portada ---------- */

.hm-hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: max(520px, min(calc(100vh - 92px), 860px));
    overflow: hidden;
    background: var(--night);
    color: #fff;
}

@supports (height: 1svh) {
    .hm-hero { min-height: max(520px, min(calc(100svh - 92px), 860px)); }
}

.hm-hero__media,
.hm-hero__shade {
    position: absolute;
    inset: 0;
}

.hm-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    object-position: 50% 35%;
    opacity: 0;
    transition: opacity 1.4s ease;
}

.hm-hero__img.is-on {
    opacity: 1;
}

/* Zoom lento de entrada (una sola imagen o la activa) */
.hm-hero__img.is-on {
    animation: hm-drift 16s var(--ease) both;
}

@keyframes hm-drift {
    from { transform: scale(1.1); }
    to   { transform: scale(1); }
}

.hm-hero__shade {
    background:
        linear-gradient(180deg, rgb(15 39 41 / .35) 0%, rgb(15 39 41 / 0) 30%),
        linear-gradient(0deg, rgb(15 39 41 / .92) 0%, rgb(15 39 41 / .55) 38%, rgb(15 39 41 / 0) 70%);
}

.hm-hero__body {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: calc(var(--wide) + var(--gutter) * 2);
    margin-inline: auto;
    padding: 0 var(--gutter) clamp(64px, 9vw, 120px);
}

.hm .hm-hero__title {
    max-width: 14ch;
    color: #fff;
    font-family: var(--f-display);
    font-size: clamp(48px, 9vw, 136px);
    font-weight: 800;
    font-stretch: 100%;
    font-synthesis: none;
    line-height: .92;
    letter-spacing: -.02em;
    text-transform: none;
    text-wrap: balance;
}

/* Letras divididas por home.js: cada una anima su ancho (eje wdth) */
.hm-hero__word {
    display: inline-block;
    white-space: nowrap;
}

.hm-hero__char {
    display: inline-block;
    font-variation-settings: "wdth" var(--wd, 86);
}

.hm .hm-hero__sub {
    margin-top: clamp(20px, 2.4vw, 32px);
    max-width: 40ch;
    font-family: var(--f-serif);
    font-size: clamp(21px, 2.2vw, 30px);
    font-style: italic;
    line-height: 1.3;
}

/* Efecto marcador: la franja menta se pinta de izquierda a derecha */
.hm-mark {
    padding: 0 .18em;
    background-image: linear-gradient(transparent 58%, rgb(82 202 164 / .55) 58%, rgb(82 202 164 / .55) 92%, transparent 92%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.hm-motion .hm-mark {
    background-size: 0% 100%;
    transition: background-size 1.1s var(--ease) .9s;
}

.hm-motion .hm-mark.is-in {
    background-size: 100% 100%;
}

.hm-hero__dots {
    position: absolute;
    right: var(--gutter);
    bottom: clamp(64px, 9vw, 120px);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hm-hero__dot {
    width: 28px;
    height: 4px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: rgb(255 255 255 / .4);
    cursor: pointer;
    transition: width .4s var(--ease), background-color .3s;
}

.hm-hero__dot.is-on {
    width: 52px;
    background: var(--mint);
}

/* ---------- Aparición común (subir + enfocar) ---------- */

.hm-motion [data-hm-rise] {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(26px);
    transition: opacity .9s var(--ease), filter .9s var(--ease), transform .9s var(--ease);
}

.hm-motion [data-hm-rise].is-in {
    opacity: 1;
    filter: none;
    transform: none;
}

/* ---------- 2 · Why join ---------- */

.hm-why {
    padding-block: var(--pad);
    background: var(--paper);
}

.hm-why__grid {
    display: grid;
    gap: clamp(36px, 5vw, 80px);
}

@media (min-width: 960px) {
    .hm-why__grid {
        grid-template-columns: 5fr 7fr;
        align-items: start;
    }

    .hm-why__title {
        position: sticky;
        top: 110px;
    }
}

.hm .hm-why__title {
    color: var(--ink);
    font-family: var(--f-display);
    font-size: clamp(36px, 5vw, 68px);
    font-weight: 800;
    font-stretch: 82%;
    font-synthesis: none;
    line-height: .98;
    letter-spacing: -.01em;
    text-transform: uppercase;
    text-wrap: balance;
}

.hm-why__item {
    position: relative;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    align-items: baseline;
    padding: 26px 0 28px;
}

/* Filete superior que se dibuja */
.hm-why__item::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: var(--ink);
    opacity: .25;
    transform-origin: left;
}

.hm-why__item:last-child {
    border-bottom: 1px solid var(--line);
}

.hm-why__num {
    font-family: var(--f-mono);
    font-size: 15px;
    color: #2f8f73;
}

.hm-why__text {
    font-size: clamp(21px, 2vw, 27px);
    line-height: 1.35;
}

.hm-motion .hm-why__item::before {
    transform: scaleX(0);
    transition: transform 1.1s var(--ease);
}

.hm-motion .hm-why__item .hm-why__text,
.hm-motion .hm-why__item .hm-why__num {
    opacity: 0;
    filter: blur(10px);
    transition: opacity .9s var(--ease) .25s, filter .9s var(--ease) .25s;
}

.hm-motion .hm-why__item.is-in::before {
    transform: scaleX(1);
}

.hm-motion .hm-why__item.is-in .hm-why__text,
.hm-motion .hm-why__item.is-in .hm-why__num {
    opacity: 1;
    filter: none;
}

.hm-why .hm-btn {
    margin-top: 40px;
}

/* ---------- 3 · Recorrido (primer año) y ciclo (cada año) ---------- */

.hm-journey {
    background: var(--night);
    color: #e9f1ee;
}

.hm-route {
    padding-top: var(--pad);
}

.hm .hm-journey__title {
    margin-bottom: clamp(40px, 5vw, 72px);
    color: var(--mint);
    font-family: var(--f-display);
    font-size: clamp(44px, 7vw, 104px);
    font-weight: 800;
    font-stretch: 75%;
    font-synthesis: none;
    line-height: .9;
    letter-spacing: -.01em;
}

.hm .hm-journey__title--sun {
    color: var(--coral);
}

.hm-route__list {
    position: relative;
    display: grid;
    gap: 44px;
    padding-left: 76px;
}

/* Vía: base tenue + relleno que avanza con el scroll (--p de 0 a 1) */
.hm-route__track {
    position: absolute;
    top: 28px;
    bottom: 28px;
    left: 27px;
    width: 3px;
    border-radius: 3px;
    background: rgb(255 255 255 / .12);
}

.hm-route__fill {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, var(--mint), #a9e8cf);
    transform-origin: top;
    transform: scaleY(var(--p, 1));
}

.hm-route__step {
    position: relative;
}

.hm-route__node {
    position: absolute;
    left: -76px;
    top: 0;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--night-2);
    box-shadow: 0 0 0 2px rgb(255 255 255 / .14);
    transition: background-color .5s var(--ease), box-shadow .5s var(--ease), transform .5s var(--ease);
}

.hm-route__node img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: grayscale(1) brightness(1.6);
    opacity: .6;
    transition: filter .5s, opacity .5s;
}

.hm-route__step.is-on .hm-route__node {
    background: var(--mint);
    box-shadow: 0 0 0 8px rgb(82 202 164 / .18);
    transform: scale(1.06);
}

.hm-route__step.is-on .hm-route__node img {
    filter: none;
    opacity: 1;
}

.hm-route__label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--f-mono);
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgb(233 241 238 / .6);
}

.hm .hm-route__name,
.hm .hm-cycle__name {
    margin-bottom: 10px;
    color: #fff;
    font-family: var(--f-display);
    font-size: clamp(23px, 2.1vw, 29px);
    font-weight: 700;
    font-synthesis: none;
    line-height: 1.1;
}

.hm .hm-route__text,
.hm .hm-cycle__text {
    color: rgb(233 241 238 / .78);
    font-size: 17px;
    line-height: 1.55;
}

.hm-motion .hm-route__step > :not(.hm-route__node) {
    opacity: .28;
    transition: opacity .6s var(--ease);
}

.hm-motion .hm-route__step.is-on > * {
    opacity: 1;
}

@media (min-width: 900px) {
    .hm-route__list {
        grid-template-columns: repeat(var(--n, 4), 1fr);
        gap: clamp(24px, 3vw, 48px);
        padding-left: 0;
        padding-top: 92px;
    }

    .hm-route__track {
        top: 27px;
        bottom: auto;
        left: 29px;
        right: 0;
        width: auto;
        height: 3px;
    }

    .hm-route__fill {
        transform-origin: left;
        transform: scaleX(var(--p, 1));
    }

    .hm-route__node {
        left: 0;
        top: -92px;
    }
}

/* Ciclo anual */

.hm-cycle {
    position: relative;
    padding-block: var(--pad);
}

.hm-cycle__grid {
    position: relative;
    display: grid;
    gap: 20px;
}

.hm-cycle__title {
    grid-row: 1;
}

.hm-cycle__list {
    display: grid;
    gap: 16px;
    counter-reset: hm-cycle;
}

.hm-cycle__step {
    position: relative;
    padding: 26px 26px 28px;
    border-radius: 22px;
    background: rgb(255 255 255 / .04);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1);
    transition: background-color .6s var(--ease), box-shadow .6s var(--ease), transform .6s var(--ease);
}

.hm-cycle__step.is-on {
    background: rgb(238 139 99 / .14);
    box-shadow: inset 0 0 0 1px rgb(238 139 99 / .7);
    transform: translateY(-4px);
}

.hm-cycle__head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.hm-cycle__head .hm-route__label {
    margin: 0;
}

.hm-cycle__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgb(238 139 99 / .18);
    transition: background-color .6s var(--ease);
}

.hm-cycle__step.is-on .hm-cycle__icon {
    background: var(--coral);
}

.hm-cycle__icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.hm-cycle__hub {
    display: none;
}

@media (min-width: 1000px) {
    .hm-cycle__grid {
        grid-template-columns: 1fr 340px 1fr;
        grid-template-rows: auto auto auto;
        column-gap: clamp(24px, 3vw, 48px);
        row-gap: 28px;
        align-items: center;
    }

    .hm-cycle__title {
        grid-column: 1 / -1;
        text-align: center;
    }

    /* Los 4 pasos alrededor del anillo, en sentido horario: 1 ↖ · 2 ↗ · 3 ↘ · 4 ↙ */
    .hm-cycle__list {
        display: contents;
    }

    .hm-cycle__step:nth-child(1) { grid-column: 1; grid-row: 2; }
    .hm-cycle__step:nth-child(2) { grid-column: 3; grid-row: 2; }
    .hm-cycle__step:nth-child(3) { grid-column: 3; grid-row: 3; }
    .hm-cycle__step:nth-child(4) { grid-column: 1; grid-row: 3; }
    .hm-cycle__step:nth-child(n+5) { grid-column: 1 / -1; }

    .hm-cycle__hub {
        position: relative;
        display: block;
        grid-column: 2;
        grid-row: 2 / span 2;
        width: 100%;
        aspect-ratio: 1;
    }
}

.hm-cycle__ring {
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: rotate(-90deg);
}

.hm-cycle__base,
.hm-cycle__arc {
    fill: none;
    stroke-width: 2.5;
}

.hm-cycle__base {
    stroke: rgb(255 255 255 / .12);
    stroke-dasharray: 2 5;
}

.hm-cycle__arc {
    stroke: var(--coral);
    stroke-linecap: round;
    stroke-dasharray: 100 100;
    stroke-dashoffset: 0;
}

.hm-motion .hm-cycle__arc {
    stroke-dashoffset: 100;
}

/* Punto que orbita el anillo (una vuelta por paso) */
.hm-cycle__orbit {
    position: absolute;
    inset: 0;
    transform: rotate(var(--rot, 0deg));
    transition: transform 1.2s var(--ease);
}

.hm-cycle__orbit span {
    position: absolute;
    left: 50%;
    top: calc(7% - 9px);
    width: 18px;
    height: 18px;
    margin-left: -9px;
    border-radius: 50%;
    background: var(--coral);
    box-shadow: 0 0 0 7px rgb(238 139 99 / .25), 0 0 26px 4px rgb(238 139 99 / .5);
}

.hm-journey__cta {
    padding-bottom: var(--pad);
    text-align: center;
}

.hm .hm-journey__pre {
    margin-bottom: 18px;
    color: #fff;
    font-family: var(--f-serif);
    font-size: clamp(24px, 2.6vw, 34px);
    font-style: italic;
}

/* ---------- Tarjetas con formulario (Gravity Forms) ---------- */

.hm-card {
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 1px 0 rgb(23 57 59 / .06), 0 30px 60px -30px rgb(15 39 41 / .35);
    padding: clamp(24px, 3.4vw, 44px);
}

.hm-form .gform_wrapper.gravity-theme {
    margin: 0 !important;
    font-family: var(--f-display);
}

.hm-form .gform_wrapper.gravity-theme .gform_fields {
    row-gap: 18px;
}

.hm-form .gform_wrapper.gravity-theme input[type="text"],
.hm-form .gform_wrapper.gravity-theme input[type="email"] {
    width: 100% !important;
    height: 54px;
    padding: 0 20px !important;
    border: 1.5px solid var(--line) !important;
    border-radius: 14px !important;
    background: var(--paper) !important;
    color: var(--ink);
    font-family: var(--f-display);
    font-size: 17px !important;
    transition: border-color .25s, background-color .25s, box-shadow .25s;
}

.hm-form .gform_wrapper.gravity-theme input[type="text"]:focus,
.hm-form .gform_wrapper.gravity-theme input[type="email"]:focus {
    outline: none;
    border-color: var(--mint) !important;
    background: #fff !important;
    box-shadow: 0 0 0 4px rgb(82 202 164 / .22);
}

.hm-form .gform_wrapper.gravity-theme .gfield--type-consent {
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink-soft);
}

.hm-form .gform_wrapper.gravity-theme input[type="checkbox"] {
    accent-color: var(--ink);
    width: 18px;
    height: 18px;
}

.hm-form .gform_wrapper.gravity-theme .gform_footer,
.hm-form .gform_wrapper.gravity-theme .gfield--type-submit {
    margin-top: 6px;
    padding: 0;
}

.hm-form .gform_wrapper.gravity-theme input[type="submit"] {
    min-height: 52px;
    padding: 0 30px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--ink) !important;
    color: #fff !important;
    font-family: var(--f-display);
    font-size: 17px !important;
    font-weight: 600;
    font-synthesis: none;
    cursor: pointer;
    transition: background-color .25s, transform .25s var(--ease);
}

.hm-form .gform_wrapper.gravity-theme input[type="submit"]:hover {
    background: #0b2224 !important;
    transform: translateY(-2px);
}

/* ---------- 4 · Not ready to enroll ---------- */

.hm-enroll {
    padding-block: var(--pad);
    background: var(--mint-soft);
    perspective: 1400px;
}

.hm-enroll__grid {
    display: grid;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

@media (min-width: 960px) {
    .hm-enroll__grid {
        grid-template-columns: 5fr 7fr;
    }
}

.hm .hm-enroll__title {
    color: var(--ink);
    font-family: var(--f-display);
    font-size: clamp(40px, 6vw, 84px);
    font-weight: 800;
    font-stretch: 78%;
    font-synthesis: none;
    line-height: .94;
    text-transform: uppercase;
    text-wrap: balance;
}

.hm .hm-enroll__sub {
    margin-top: 22px;
    max-width: 30ch;
    color: var(--ink-soft);
    font-size: clamp(20px, 1.9vw, 25px);
    font-style: italic;
    line-height: 1.35;
}

/* Efecto: la tarjeta se endereza en 3D al entrar */
.hm-motion [data-hm-tilt] {
    opacity: 0;
    transform: rotateX(16deg) rotateY(-10deg) translateY(50px);
    transform-origin: 50% 100%;
    transition: opacity 1s var(--ease), transform 1.2s var(--ease);
}

.hm-motion [data-hm-tilt].is-in {
    opacity: 1;
    transform: none;
}

/* ---------- 5 · Testimonios (mazo de cartas) ---------- */

.hm-voices {
    padding-block: var(--pad);
    background: var(--paper);
    overflow: hidden;
}

.hm-voices__grid {
    display: grid;
    gap: clamp(36px, 5vw, 72px);
    align-items: center;
}

@media (min-width: 960px) {
    .hm-voices__grid {
        grid-template-columns: 4fr 8fr;
    }
}

.hm .hm-voices__title {
    color: var(--ink);
    font-family: var(--f-display);
    font-size: clamp(40px, 5.4vw, 76px);
    font-weight: 800;
    font-stretch: 80%;
    font-synthesis: none;
    line-height: .95;
    text-transform: uppercase;
    text-wrap: balance;
}

.hm-voices__nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
}

.hm-round {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: background-color .25s, color .25s, transform .25s var(--ease);
}

.hm-round:hover,
.hm-round:focus-visible {
    background: var(--ink);
    color: #fff;
}

.hm-round:active {
    transform: scale(.94);
}

.hm-voices__count {
    font-family: var(--f-mono);
    font-size: 15px;
    color: var(--ink-soft);
}

.hm-voices__count b {
    color: var(--ink);
    font-weight: 500;
}

/* Sin JS: lista normal. Con JS: cartas apiladas. */
.hm-deck {
    display: grid;
    gap: 20px;
}

.hm-voice {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(28px, 4vw, 52px);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 1px 0 rgb(23 57 59 / .06), 0 26px 50px -30px rgb(15 39 41 / .45);
}

.hm-voice__quote {
    font-size: clamp(20px, 2vw, 26px);
    font-style: italic;
    line-height: 1.45;
    color: var(--ink);
}

.hm-voice__quote p + p {
    margin-top: .8em;
}

.hm-voice__who {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.hm-voice__photo {
    flex: none;
    width: 68px;
    height: 68px !important;
    border-radius: 50%;
    object-fit: cover;
}

.hm-voice__name {
    display: block;
    font-family: var(--f-display);
    font-size: 18px;
    font-weight: 700;
    font-synthesis: none;
    line-height: 1.2;
}

.hm-voice__role {
    display: block;
    margin-top: 4px;
    font-family: var(--f-display);
    font-size: 14px;
    line-height: 1.35;
    color: var(--ink-soft);
}

.hm-deck.is-stack {
    position: relative;
    display: grid;
    gap: 0;
    touch-action: pan-y;
    user-select: none;
}

.hm-deck.is-stack .hm-voice {
    grid-area: 1 / 1;
    cursor: grab;
    transform-origin: 50% 120%;
    transition: transform .7s var(--ease), opacity .5s var(--ease), box-shadow .5s;
}

/* --d = distancia a la carta de arriba (0 = arriba) */
.hm-deck.is-stack .hm-voice {
    z-index: calc(10 - var(--d, 0));
    transform: translate(calc(var(--d, 0) * 14px), calc(var(--d, 0) * -14px)) rotate(calc(var(--d, 0) * 2.2deg)) scale(calc(1 - var(--d, 0) * .04));
}

@media (max-width: 599px) {
    .hm-deck.is-stack .hm-voice {
        transform: translateY(calc(var(--d, 0) * -12px)) rotate(calc(var(--d, 0) * 1.4deg)) scale(calc(1 - var(--d, 0) * .05));
    }

    .hm-deck.is-stack {
        padding-top: 30px;
    }
}

.hm-deck.is-stack .hm-voice.is-far {
    opacity: 0;
}

.hm-deck.is-stack .hm-voice:not(.is-top) {
    pointer-events: none;
}

.hm-deck.is-stack .hm-voice:not(.is-top) > * {
    opacity: .35;
}

.hm-deck.is-stack .hm-voice.is-top {
    box-shadow: 0 1px 0 rgb(23 57 59 / .06), 0 40px 70px -30px rgb(15 39 41 / .5);
}

.hm-deck.is-stack .hm-voice.is-drag {
    cursor: grabbing;
    transition: none;
}

.hm-deck.is-stack .hm-voice.is-leaving {
    z-index: 20;
    transform: translate(calc(var(--dir, -1) * 115%), 30px) rotate(calc(var(--dir, -1) * 14deg));
    opacity: 0;
}

/* ---------- 6 · La Plataforma (brillo que sigue al puntero) ---------- */

.hm-platform {
    padding-block: var(--pad);
    background: var(--night);
    color: #e9f1ee;
}

.hm-platform__head {
    max-width: 900px;
    margin: 0 auto clamp(48px, 6vw, 84px);
    text-align: center;
}

.hm .hm-platform__title {
    color: #fff;
    font-family: var(--f-display);
    font-size: clamp(38px, 5.2vw, 74px);
    font-weight: 800;
    font-stretch: 82%;
    font-synthesis: none;
    line-height: .98;
    text-wrap: balance;
}

.hm .hm-platform__text {
    margin-top: 26px;
    color: rgb(233 241 238 / .82);
    font-size: clamp(19px, 1.7vw, 23px);
    line-height: 1.55;
}

.hm-platform__list {
    display: grid;
    gap: 18px;
}

@media (min-width: 820px) {
    .hm-platform__list {
        grid-template-columns: repeat(3, 1fr);
    }
}

.hm-tool {
    --mx: 50%;
    --my: 0%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    padding: clamp(32px, 3.4vw, 48px) 28px;
    border-radius: 26px;
    background:
        radial-gradient(420px circle at var(--mx) var(--my), rgb(82 202 164 / .16), transparent 45%),
        rgb(255 255 255 / .035);
    text-align: center;
    isolation: isolate;
}

/* Borde que se ilumina cerca del puntero */
.hm-tool::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    padding: 1px;
    border-radius: inherit;
    background: radial-gradient(260px circle at var(--mx) var(--my), rgb(82 202 164 / .95), rgb(255 255 255 / .12) 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

/* Anillo cónico que se completa al entrar */
.hm-tool__ring {
    position: relative;
    display: grid;
    place-items: center;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: conic-gradient(var(--mint) var(--hm-deg), rgb(255 255 255 / .1) 0);
    transition: --hm-deg 1.6s var(--ease);
    --hm-deg: 360deg;
}

.hm-tool__ring::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--night);
}

.hm-tool__ring img {
    position: relative;
    z-index: 1;
    width: 66px;
    height: 66px !important;
    object-fit: contain;
}

.hm-motion .hm-tool__ring {
    --hm-deg: 0deg;
}

.hm-motion .hm-tool.is-in .hm-tool__ring {
    --hm-deg: 360deg;
}

.hm .hm-tool__name {
    color: #fff;
    font-family: var(--f-display);
    font-size: clamp(20px, 1.8vw, 24px);
    font-weight: 600;
    font-synthesis: none;
    line-height: 1.25;
    text-wrap: balance;
}

.hm-motion .hm-tool {
    opacity: 0;
    transform: translateY(36px) scale(.96);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
}

.hm-motion .hm-tool.is-in {
    opacity: 1;
    transform: none;
}

/* ---------- 7 · Suscripción (fondo vivo) ---------- */

.hm-subscribe {
    position: relative;
    padding-block: var(--pad);
    background: var(--paper-2);
    overflow: hidden;
    isolation: isolate;
}

.hm-subscribe__blobs {
    position: absolute;
    inset: 0;
    z-index: -1;
    filter: blur(70px);
    opacity: .7;
}

.hm-subscribe__blobs span {
    position: absolute;
    border-radius: 50%;
    animation: hm-float 22s ease-in-out infinite alternate;
}

.hm-subscribe__blobs span:nth-child(1) {
    left: -8%;
    top: -20%;
    width: 46vw;
    height: 46vw;
    background: rgb(82 202 164 / .55);
}

.hm-subscribe__blobs span:nth-child(2) {
    right: -10%;
    top: 10%;
    width: 38vw;
    height: 38vw;
    background: rgb(242 181 68 / .45);
    animation-duration: 26s;
    animation-delay: -6s;
}

.hm-subscribe__blobs span:nth-child(3) {
    left: 30%;
    bottom: -30%;
    width: 34vw;
    height: 34vw;
    background: rgb(238 139 99 / .3);
    animation-duration: 30s;
    animation-delay: -12s;
}

@keyframes hm-float {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(6vw, 4vw) scale(1.12); }
    100% { transform: translate(-4vw, 2vw) scale(.92); }
}

.hm-subscribe__grid {
    display: grid;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

@media (min-width: 960px) {
    .hm-subscribe__grid {
        grid-template-columns: 6fr 6fr;
    }
}

.hm .hm-subscribe__title {
    color: var(--ink);
    font-family: var(--f-display);
    font-size: clamp(34px, 4.4vw, 60px);
    font-weight: 800;
    font-stretch: 85%;
    font-synthesis: none;
    line-height: 1;
    text-wrap: balance;
}

.hm-subscribe__text {
    margin-top: 22px;
    color: var(--ink-soft);
    font-size: clamp(19px, 1.6vw, 22px);
    line-height: 1.55;
}

.hm-subscribe__text p + p {
    margin-top: .8em;
}

/* ---------- 8 · Imagen final (persianas) ---------- */

.hm-finale {
    position: relative;
    height: clamp(320px, 62vh, 680px);
    overflow: hidden;
    background: var(--paper-2);
}

.hm-finale__img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
}

.hm-finale::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 35%;
    background: linear-gradient(0deg, rgb(15 39 41 / .45), transparent);
    pointer-events: none;
}

.hm-finale__blinds {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    pointer-events: none;
}

.hm-finale__blinds span {
    background: var(--paper-2);
    transform-origin: 50% 0;
    transform: scaleY(0);
}

.hm-motion .hm-finale__blinds span {
    transform: scaleY(1);
}

/* ---------- Movimiento reducido ---------- */
/* Las apariciones siguen (petición expresa: el equipo lo tiene activo);
   se quitan lo continuo y lo que sigue al puntero. */

@media (prefers-reduced-motion: reduce) {
    .hm-hero__img.is-on,
    .hm-subscribe__blobs span {
        animation: none;
    }
}

/* Every Year simétrico (25-nov): las 4 tarjetas con el mismo alto, en filas
   iguales a ambos lados del anillo; la activa no se desplaza. */
.hm-cycle__step,
.hm-cycle__step.is-on {
    transform: none;
}

@media (min-width: 1000px) {
    .hm-cycle__grid {
        grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
    }

    .hm-cycle__step {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .hm-cycle__hub {
        align-self: center;
    }
}

.hm-cycle__step.is-on {
    box-shadow: inset 0 0 0 1px rgb(238 139 99 / .7), 0 0 0 6px rgb(238 139 99 / .08);
}

/* ======================================================================
   Mezcla tipográfica de los títulos (dic 2026, como las landings):
   la parte final en Newsreader cursiva con el color de acento (home.js).
   ====================================================================== */
.hm {
    --it-color: #2f8f73;
}

.hm-journey,
.hm-platform,
.pg-tiles,
.pg-dusk,
.pg-ohero,
.pg-ne > .section--green-light-top:not(.section--green-light) {
    --it-color: var(--mint);
}

.hm .hm-it {
    color: var(--it-color);
    font-family: var(--f-serif);
    font-size: 1.02em;
    font-style: italic;
    font-weight: 400;
    font-stretch: normal;
    font-synthesis: none;
    letter-spacing: -.015em;
    text-transform: none;
}

.hm .hm-it--line {
    display: block;
}

/* Every Year va en coral: su cursiva también */
.hm .hm-journey__title--sun .hm-it {
    color: var(--coral);
}

/* La sección que «anochece» cambia de color con el scroll: la cursiva lo sigue */
.pg-dusk .hm-it {
    color: inherit;
    opacity: .9;
}

.hm-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ======================================================================
   Capa de scroll (dic 2026): progreso de lectura, paralaje y desplazamientos.
   Las variables --sx/--sy las pone home.js (scrollLayer) y se aplican con
   `translate`, independiente de `transform` (apariciones y hover).
   ====================================================================== */
.hm-progress {
    position: fixed;
    inset: 0 0 auto;
    z-index: 600;
    height: 3px;
    pointer-events: none;
}

.hm-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #52caa4, #f2b544);
    transform: scaleX(0);
    transform-origin: 0 50%;
}

.hm-sx {
    translate: var(--sx, 0) var(--sy, 0);
    will-change: translate;
}

/* Paralaje: la foto es un 14 % más alta que su marco para que no asome el fondo */
.hm-plx {
    height: calc(100% + 80px) !important;
    margin-top: -40px;
    object-fit: cover;
}

.pg-hero__media,
.pg-lib__media,
.hm-finale,
.pg-ohero__media,
.pg-book__cover {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .hm-sx { translate: none; }
}
