/* ==========================================================================
   Enyty – home
   Caricato solo dalla home (index.blade.php, @push('css-after')), dopo
   enyty-refresh.css. Il movimento è in js/enyty-motion.js.
   La pagina alterna notte e giorno: notte all'apertura e nella prima sezione,
   poi l'alba verso il bianco; una seconda notte per il "cielo dei ricordi";
   la rosa e il resto sul bianco.
   Regole con "html.mo-on": valgono solo se il movimento è attivo. Senza
   JavaScript o con "riduci animazioni" la pagina è ferma e tutta visibile.

   Indice
     1. Basi                 6. Racconto (telefono)     10. Resta vicino
     2. Barra in alto        7. Cielo dei ricordi       11. Comparse
     3. Apertura             8. Agenzie e manifesto     12. Telefono e tablet
     4. Capitoli             9. Rosa e sostegno         13. Meno animazioni
     5. Onorare (01)
   ========================================================================== */

/* ---------- 1. Basi -------------------------------------------------------- */
.hm {
    --hm-ink: var(--enyty-ink, #1c2434);
    --hm-text: var(--enyty-text, rgba(28, 36, 52, .74));
    --hm-blue: var(--enyty-blue, #465a7b);
    --hm-strong: var(--enyty-blue-strong, #456297);
    --hm-sky: var(--enyty-sky, #b3d4e7);
    --hm-night: #172033;
    --hm-night-2: #1d2840;
    --hm-ivory: #fbf8f2;
    --hm-light: rgba(226, 233, 243, .78);
    --hm-candle: #fff3d6;
    --hm-mist: #eef4f9;
    --hm-line: rgba(70, 90, 123, .14);
    --hm-rose: #d97fa2;
    --hm-ease: cubic-bezier(.16, 1, .3, 1);
    position: relative;
    overflow-x: clip;
    background: #fff;
}
.hm ::selection { background: rgba(179, 212, 231, .75); color: var(--hm-ink); }
.hm img { max-width: 100%; }
.hm-anchor { position: relative; top: -1px; height: 1px; }
.hm section { padding: 0; }   /* user_profile/style.css dà padding a tutte le <section> */

/* pulsanti e link */
.hm-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    min-height: 54px; padding: 0 1.8rem; border: 0; border-radius: 999px;
    font-family: Larsseit-Bold, sans-serif; font-size: 1.02rem; letter-spacing: .01em;
    text-decoration: none; cursor: pointer;
    transition: transform .25s var(--hm-ease), box-shadow .25s ease, background-color .2s ease, color .2s ease;
}
.hm-btn--primary { background: var(--hm-strong); color: #fff; box-shadow: 0 14px 30px -14px rgba(69, 98, 151, .95); }
.hm-btn--primary:hover, .hm-btn--primary:focus-visible { background: #3a5586; color: #fff; transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(69, 98, 151, 1); }
.hm-btn--light { background: var(--hm-ivory); color: var(--hm-ink); box-shadow: 0 0 0 1px rgba(255, 255, 255, .4), 0 16px 40px -12px rgba(255, 226, 170, .45); }
.hm-btn--light:hover, .hm-btn--light:focus-visible { background: #fff; color: var(--hm-ink); transform: translateY(-2px); box-shadow: 0 0 0 1px #fff, 0 20px 50px -10px rgba(255, 226, 170, .7); }
.hm-btn:active { transform: translateY(0); }

.hm-link {
    display: inline-flex; align-items: center; gap: .5rem;
    font-family: Larsseit-Bold, sans-serif; font-size: 1.04rem; color: var(--hm-strong);
    text-decoration: none; padding-bottom: 3px;
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1.5px;
    transition: background-size .35s var(--hm-ease), color .2s ease;
}
.hm-link:hover, .hm-link:focus-visible { color: var(--hm-strong); background-size: 100% 1.5px; }
.hm-link--sky, .hm-link--sky:hover, .hm-link--sky:focus-visible { color: var(--hm-sky); }
.hm-link__arrow { display: inline-block; transition: transform .35s var(--hm-ease); }
.hm-link:hover .hm-link__arrow { transform: translateX(5px); }
.hm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; }

/* ---------- 2. Barra in alto: notte sopra l'apertura ----------------------- */
body.is-night-top .top-nav-bg { background: #111827 !important; box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
/* colori della barra principale sopra la notte: in css/enyty-nav.css */
body.is-night-top .navbar-brand:hover .enyty-logo--nav .lg-dot { fill: #fff3d6; filter: drop-shadow(0 0 4px rgba(255, 226, 170, .9)); }
body.is-night-top .enyty-logo--nav.is-twinkle .lg-dot { animation-name: lg-twinkle-night; }
@keyframes lg-twinkle-night {
    0%, 100% { fill: currentColor; filter: none; }
    45%      { fill: #fff3d6; filter: drop-shadow(0 0 5px rgba(255, 226, 170, .95)); }
}

/* ---------- 3. Apertura ---------------------------------------------------- */
.hm-opening {
    position: relative; isolation: isolate;
    background:
        radial-gradient(70% 55% at 50% 30%, rgba(69, 98, 151, .38), rgba(69, 98, 151, 0) 70%),
        linear-gradient(180deg, #111827 0, var(--hm-night) 18%, var(--hm-night-2) 62%, #24324f 84%, #2f4163 100%);
    color: var(--hm-ivory);
}
.mo-petals { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* style.css forza ogni <canvas> a 413 px di altezza (resto della vecchia rosa): qui le tele della home
   devono riempire il loro spazio, altrimenti i petali restano chiusi in una fascia in alto */
canvas.mo-petals, .tree-sequence canvas { width: 100% !important; height: 100% !important; }
.mo-petals--back { z-index: 0; }
.mo-petals--front { z-index: 6; }

.hm-intro {
    position: relative; z-index: 1;
    min-height: 100vh; min-height: 100svh;
    display: flex; align-items: center; justify-content: center;
    padding: 7.5rem 1.25rem 7rem !important;
    text-align: center;
}
.hm-intro__nebula {
    position: absolute; inset: -10% -6% 0; z-index: -1; pointer-events: none;
    background:
        url('../Assets/night/flowers.webp') right -8% top 6% / min(62vw, 900px) auto no-repeat,
        url('../Assets/night/flowers.webp') left -14% bottom -6% / min(46vw, 640px) auto no-repeat;
    opacity: .2;
    -webkit-mask-image: linear-gradient(#000 55%, transparent 96%);
            mask-image: linear-gradient(#000 55%, transparent 96%);
    animation: hm-nebula 38s ease-in-out infinite alternate;
}
@keyframes hm-nebula { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-2%, 1.5%, 0) scale(1.06); } }
.hm-intro__inner {
    position: relative; width: 100%; max-width: 62rem;
    translate: 0 calc(var(--ip, 0) * -70px);
    opacity: calc(1 - var(--ip, 0) * 1.1);
}

/* il logo si disegna */
.hm-intro__logo { width: min(700px, 82vw); height: auto; margin: 0 auto; color: #fff; overflow: visible; }
.hm-intro__logo .lg-stroke {
    transform-box: fill-box; transform-origin: 0 50%;
    animation: hm-stroke 1s var(--hm-ease) calc(.25s + var(--k) * .11s) both;
}
.hm-intro__logo .lg-stroke--diag { transform-origin: 50% 0; animation-name: hm-stroke-diag; }
@keyframes hm-stroke      { from { opacity: 0; transform: scaleX(0); } to { opacity: 1; transform: none; } }
@keyframes hm-stroke-diag { from { opacity: 0; transform: scaleY(0); } to { opacity: 1; transform: none; } }
/* i quattro punti si accendono come lumini */
.hm-intro__logo .lg-dot {
    fill: var(--hm-candle);
    transform-box: fill-box; transform-origin: center;
    animation:
        hm-ignite 1.3s ease calc(1.05s + var(--k) * .2s) both,
        hm-candle 3.4s ease-in-out calc(2.6s + var(--k) * .6s) infinite alternate;
    translate: 0 calc(var(--ip, 0) * -26px);
}
@keyframes hm-ignite {
    0%   { opacity: 0; scale: .1; filter: none; }
    40%  { opacity: 1; scale: 1.5; filter: drop-shadow(0 0 7px rgba(255, 236, 196, 1)) drop-shadow(0 0 22px rgba(255, 214, 150, .9)); }
    100% { opacity: 1; scale: 1;   filter: drop-shadow(0 0 4px rgba(255, 236, 196, .95)) drop-shadow(0 0 12px rgba(255, 214, 150, .6)); }
}
@keyframes hm-candle {
    from { filter: drop-shadow(0 0 4px rgba(255, 236, 196, .95)) drop-shadow(0 0 12px rgba(255, 214, 150, .6)); }
    to   { filter: drop-shadow(0 0 6px rgba(255, 236, 196, 1))   drop-shadow(0 0 22px rgba(255, 214, 150, .85)); }
}
/* la frase si illumina parola per parola */
.hm-intro__line {
    margin: clamp(2.2rem, 5vh, 3.4rem) auto 0 !important; max-width: 23ch;
    font-family: "DM Serif Display", serif; font-weight: 400;
    font-size: clamp(1.9rem, 1.1rem + 2.8vw, 3.5rem) !important; line-height: 1.2 !important; letter-spacing: -.01em;
    color: #fff !important; text-wrap: balance;
}
.hm-w { display: inline-block; animation: hm-word-light 1.1s ease calc(1.55s + var(--i) * 48ms) both; }
@keyframes hm-word-light {
    from { opacity: .08; filter: blur(6px); transform: translateY(6px); }
    to   { opacity: 1;   filter: blur(0);   transform: none; }
}
.hm-intro__actions {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 2rem;
    margin-top: clamp(2.2rem, 5vh, 3.2rem);
    animation: mo-rise 1.1s var(--hm-ease) 2.75s both;
}
@keyframes mo-rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.hm-intro__scroll {
    position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .6rem;
    color: rgba(226, 233, 243, .7); text-decoration: none;
    font-family: Larsseit-Bold, sans-serif; font-size: .7rem; letter-spacing: .3em; text-transform: uppercase;
    animation: mo-rise 1s var(--hm-ease) 3.3s both;
}
.hm-intro__scroll:hover { color: #fff; }
.hm-intro__scroll-line { position: relative; display: block; width: 1px; height: 52px; background: linear-gradient(rgba(255, 255, 255, .05), rgba(255, 255, 255, .4)); }
.hm-intro__scroll-line > span {
    position: absolute; left: -3px; top: 0; width: 7px; height: 7px; border-radius: 50%;
    background: var(--hm-candle); box-shadow: 0 0 10px 2px rgba(255, 226, 170, .8);
    animation: hm-scroll-dot 2.6s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes hm-scroll-dot { 0% { top: -2px; opacity: 0; } 18% { opacity: 1; } 78% { opacity: 1; } 100% { top: 46px; opacity: 0; } }

/* ---------- 4. Capitoli ---------------------------------------------------- */
.hm-ch { position: relative; padding: clamp(5rem, 9vw, 8.5rem) 1.25rem !important; }
.hm-chhead { position: relative; z-index: 1; max-width: 52rem; margin: 0 auto; text-align: center; }
.hm-chhead__thread { position: relative; display: block; width: 1px; height: 88px; margin: 0 auto 1.6rem; }
.hm-chhead__line {
    position: absolute; inset: 0; transform-origin: 50% 0;
    background: linear-gradient(rgba(69, 98, 151, 0), rgba(69, 98, 151, .55));
    transition: transform 1.1s var(--hm-ease);
}
.hm-chhead__dot {
    position: absolute; left: -4.5px; bottom: -5px; width: 10px; height: 10px; border-radius: 50%;
    background: var(--hm-strong);
    box-shadow: 0 0 0 6px rgba(179, 212, 231, .45), 0 0 22px 6px rgba(69, 98, 151, .28);
    transition: transform .7s var(--hm-ease) .75s, box-shadow 1.2s ease .75s;
}
html.mo-on .hm-chhead:not(.is-lit) .hm-chhead__line { transform: scaleY(0); }
html.mo-on .hm-chhead:not(.is-lit) .hm-chhead__dot { transform: scale(0); box-shadow: 0 0 0 0 rgba(179, 212, 231, 0), 0 0 0 0 rgba(69, 98, 151, 0); }
.hm-chhead__kicker {
    display: inline-flex; align-items: center; gap: .8rem; margin: 0 0 1.1rem;
    font-family: Larsseit-Bold, sans-serif; font-size: .78rem; letter-spacing: .24em; text-transform: uppercase;
    color: var(--hm-strong);
}
.hm-chhead__n { font-variant-numeric: tabular-nums; letter-spacing: .08em; color: var(--hm-blue); opacity: .7; display: inline-flex; align-items: center; gap: .8rem; }
.hm-chhead__n::after { content: ""; width: 26px; height: 1px; background: currentColor; }
.hm-chhead__title {
    margin: 0 auto; max-width: 18ch;
    font-family: "DM Serif Display", serif; font-weight: 400;
    font-size: clamp(2.2rem, 1.25rem + 3vw, 3.9rem) !important; line-height: 1.04 !important; letter-spacing: -.02em;
    color: var(--hm-ink);
}
.hm-chhead__lead { margin: 1.4rem auto 0; max-width: 40rem; font-size: clamp(1.05rem, 1rem + .3vw, 1.22rem); line-height: 1.6; color: var(--hm-text); }
/* su fondo scuro: testo chiaro e punto "acceso" come quelli del logo */
.hm-chhead--light .hm-chhead__title { color: var(--hm-ivory); }
.hm-chhead--light .hm-chhead__lead { color: var(--hm-light); }
.hm-chhead--light .hm-chhead__kicker, .hm-chhead--light .hm-chhead__n { color: var(--hm-sky); }
.hm-chhead--light .hm-chhead__line { background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .45)); }
.hm-chhead--light .hm-chhead__dot { background: var(--hm-candle); box-shadow: 0 0 0 6px rgba(255, 243, 214, .14), 0 0 22px 6px rgba(255, 214, 150, .5); }
.hm-chhead--left { text-align: left; margin: 0; }
.hm-chhead--left .hm-chhead__thread { margin-left: 4px; }
.hm-chhead--left .hm-chhead__title, .hm-chhead--left .hm-chhead__lead { margin-left: 0; }

/* ---------- 5. Onorare (01) e alba ---------------------------------------- */
.hm-honor { z-index: 1; padding-top: clamp(2.5rem, 5vw, 4rem) !important; padding-bottom: 2rem !important; }
.hm-honor__grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center;
    gap: clamp(2rem, 5vw, 5rem); max-width: 1220px; margin: 0 auto;
}
.hm-honor__grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); }
.hm-honor .hm-chhead__title { max-width: 17ch; font-size: clamp(2.2rem, 1.2rem + 2.5vw, 3.45rem) !important; }
.hm-honor__more { margin: 2rem 0 0; }
.hm-honor__cards { position: relative; }
.hm-honor__halo {
    position: absolute; left: 50%; top: 50%; width: 120%; aspect-ratio: 1; translate: -50% -50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(255, 226, 170, .2), rgba(179, 212, 231, .1) 55%, rgba(179, 212, 231, 0));
}
.hm .hero__cards { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .8s var(--hm-ease); }
.hm .ricordino {
    animation: ricordino-in .9s cubic-bezier(.2, .7, .2, 1) both, ricordino-float 7s ease-in-out 1.4s infinite;
    box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .3), 0 0 60px -20px rgba(255, 226, 170, .35);
}
.hm .ricordino--1 { animation-delay: .05s, 1.4s; }
.hm .ricordino--2 { animation-delay: .16s, 2.2s; animation-duration: .9s, 8.6s; }
.hm .ricordino--3 { animation-delay: .27s, 3s;   animation-duration: .9s, 7.8s; }
@keyframes ricordino-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -11px; } }
html.mo-on .hm .hero__cards:not(.is-in) .ricordino { animation-play-state: paused; }

/* l'alba: dal blu della notte al bianco del giorno */
.hm-dawn {
    position: relative; z-index: 1; height: clamp(9rem, 24vh, 15rem); margin-top: -1px;
    background: linear-gradient(180deg, rgba(47, 65, 99, 0) 0, rgba(70, 90, 123, .55) 28%, rgba(179, 212, 231, .75) 62%, #f4f8fb 86%, #fff 100%);
}

/* ---------- 6. Racconto: la pagina d'esempio nel telefono ------------------ */
.hm-story { padding-top: clamp(2rem, 4vw, 3rem) !important; padding-bottom: 0 !important; }
.hm-story__grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6.5rem); align-items: start;
    max-width: 1160px; margin: clamp(2rem, 5vw, 4rem) auto 0;
}
.hm-story__steps { list-style: none; margin: 0; padding: 0; }
.hm-step {
    position: relative; min-height: 74vh; display: flex; flex-direction: column; justify-content: center;
    padding: 2rem 0 2rem 4.5rem;
    opacity: .3; transition: opacity .6s ease;
}
.hm-step.is-active { opacity: 1; }
.hm-step__n {
    position: absolute; left: 0; top: 50%; translate: 0 -50%;
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    border: 1px solid var(--hm-line); background: #fff;
    font-family: "DM Serif Display", serif; font-size: 1.15rem; color: var(--hm-blue);
    transition: background-color .5s ease, color .5s ease, box-shadow .5s ease, border-color .5s ease;
}
.hm-step.is-active .hm-step__n { background: var(--hm-strong); border-color: var(--hm-strong); color: #fff; box-shadow: 0 0 0 7px rgba(179, 212, 231, .45); }
.hm-step__title { margin: 0 0 .8rem; font-family: "DM Serif Display", serif; font-weight: 400; font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.5rem) !important; line-height: 1.1 !important; color: var(--hm-ink); }
.hm-step__text { margin: 0; max-width: 30rem; font-size: 1.14rem; line-height: 1.62; color: var(--hm-text); }
.hm-step__cta { align-self: flex-start; margin-top: 1.8rem; }

.hm-story__stage {
    position: sticky; top: 0; height: 100vh; height: 100svh;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4rem;
}
/* i quattro punti del logo in orbita: uno per passo */
.hm-orbit { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px; pointer-events: none; }
.hm-orbit__ring {
    position: absolute; inset: 0; border-radius: 50%;
    border: 1px dashed rgba(69, 98, 151, .2);
    background: radial-gradient(closest-side, rgba(179, 212, 231, .32), rgba(179, 212, 231, .08) 60%, rgba(179, 212, 231, 0));
    animation: hm-orbit 22s ease-in-out infinite alternate;
}
/* l'anello oscilla piano: i punti restano sempre ai lati del telefono, mai dietro */
@keyframes hm-orbit { from { transform: rotate(-20deg); } to { transform: rotate(20deg); } }
.hm-orbit__ring i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; }
.hm-orbit__ring i::before {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    background: var(--hm-sky); box-shadow: 0 0 0 5px rgba(179, 212, 231, .25);
    transition: background-color .6s ease, box-shadow .6s ease, transform .6s var(--hm-ease);
}
.hm-orbit__ring i:nth-child(1) { transform: rotate(-150deg) translateX(280px); }
.hm-orbit__ring i:nth-child(2) { transform: rotate(-30deg)  translateX(280px); }
.hm-orbit__ring i:nth-child(3) { transform: rotate(30deg)   translateX(280px); }
.hm-orbit__ring i:nth-child(4) { transform: rotate(150deg)  translateX(280px); }
.hm-story__stage[data-active="0"] .hm-orbit__ring i:nth-child(1),
.hm-story__stage[data-active="1"] .hm-orbit__ring i:nth-child(2),
.hm-story__stage[data-active="2"] .hm-orbit__ring i:nth-child(3),
.hm-story__stage[data-active="3"] .hm-orbit__ring i:nth-child(4) { z-index: 1; }
.hm-story__stage[data-active="0"] .hm-orbit__ring i:nth-child(1)::before,
.hm-story__stage[data-active="1"] .hm-orbit__ring i:nth-child(2)::before,
.hm-story__stage[data-active="2"] .hm-orbit__ring i:nth-child(3)::before,
.hm-story__stage[data-active="3"] .hm-orbit__ring i:nth-child(4)::before {
    background: var(--hm-strong); transform: scale(1.5);
    box-shadow: 0 0 0 6px rgba(179, 212, 231, .55), 0 0 26px 8px rgba(69, 98, 151, .45);
}

.hm-phone {
    /* misura fissa: lo script la rimpicciolisce in proporzione (zoom) se lo schermo è basso */
    position: relative; z-index: 1; flex-shrink: 0; width: 300px; height: 620px;
    padding: 11px; border-radius: 46px;
    background: linear-gradient(145deg, #2a3449, #121826 60%, #222b3d);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .06) inset,
        0 50px 90px -40px rgba(28, 36, 52, .65),
        0 30px 60px -30px rgba(69, 98, 151, .45);
    transform: perspective(1400px) rotateY(var(--py, -8deg)) rotateX(var(--px, 3deg));
    transition: transform .9s var(--hm-ease);
}
.hm-phone::before { /* fotocamera */
    content: ""; position: absolute; z-index: 3; top: 20px; left: 50%; width: 82px; height: 22px; margin-left: -41px;
    border-radius: 20px; background: #0b0f18;
}
.hm-phone__tag {
    position: absolute; z-index: 4; top: -15px; left: 50%; transform: translateX(-50%);
    padding: .38rem .9rem; border-radius: 999px; white-space: nowrap;
    background: #fff; color: var(--hm-blue); box-shadow: 0 8px 22px -10px rgba(28, 36, 52, .45), 0 0 0 1px var(--hm-line);
    font-family: Larsseit-Bold, sans-serif; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
}
.hm-phone__screen {
    position: relative; height: 100%; overflow: hidden; border-radius: 36px;
    background: #fff url('../Assets/Group 14.webp') center top / 220% auto no-repeat;
}
.hm-phone__screen::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(rgba(255, 255, 255, .25), rgba(255, 255, 255, .8) 38%, #fff 70%);
}
.hm-scr {
    position: absolute; inset: 0; z-index: 1;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 64px 22px 26px;
    opacity: 0; visibility: hidden; transform: translateY(24px) scale(.97);
    transition: opacity .6s ease, transform .8s var(--hm-ease), visibility 0s linear .8s;
}
.hm-phone[data-active="0"] [data-screen="0"],
.hm-phone[data-active="1"] [data-screen="1"],
.hm-phone[data-active="2"] [data-screen="2"],
.hm-phone[data-active="3"] [data-screen="3"] { opacity: 1; visibility: visible; transform: none; transition: opacity .7s ease .12s, transform .9s var(--hm-ease) .12s, visibility 0s; z-index: 2; }

.hm-scr__kicker { font-size: .72rem; color: var(--hm-text); }
.hm-scr__script { font-size: 1.9rem; line-height: 1; color: var(--hm-blue); margin: .1rem 0 .8rem; }
.hm-scr__photo { width: 64%; aspect-ratio: 5 / 6; object-fit: cover; border-radius: 999px 999px 12px 12px; box-shadow: 0 18px 30px -20px rgba(28, 36, 52, .55), 0 0 0 5px #fff, 0 0 0 6px var(--hm-line); }
.hm-scr__name { margin-top: 1.1rem; font-size: 1.85rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em; color: var(--hm-ink); }
.hm-scr__dates { margin-top: .45rem; font-size: .78rem; color: var(--hm-text); font-variant-numeric: tabular-nums; }
.hm-scr__place { margin-top: .2rem; font-size: .72rem; color: var(--hm-blue); opacity: .8; }
.hm-phone[data-active="0"] .hm-scr__photo { animation: hm-pop .9s var(--hm-ease) .2s both; }
.hm-phone[data-active="0"] .hm-scr__name { animation: hm-letters 1.1s var(--hm-ease) .35s both; }
@keyframes hm-pop { from { transform: scale(.88); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes hm-letters { from { letter-spacing: .3em; opacity: 0; } to { letter-spacing: .04em; opacity: 1; } }
.hm-scr__h { font-family: "DM Serif Display", serif; font-size: 1.45rem; color: var(--hm-ink); margin-bottom: .9rem; }
.hm-scr__lines { display: flex; flex-direction: column; gap: 7px; width: 100%; margin-bottom: 1.1rem; }
.hm-scr__lines i { display: block; height: 7px; border-radius: 4px; background: linear-gradient(90deg, #e3ebf4, #f1f5fa, #e3ebf4); background-size: 200% 100%; animation: hm-shimmer 2.4s linear infinite; }
.hm-scr__lines i:nth-child(1) { width: 100%; } .hm-scr__lines i:nth-child(2) { width: 92%; }
.hm-scr__lines i:nth-child(3) { width: 97%; } .hm-scr__lines i:nth-child(4) { width: 58%; }
@keyframes hm-shimmer { to { background-position: -200% 0; } }
.hm-scr__gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
.hm-scr__gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; box-shadow: 0 10px 18px -12px rgba(28, 36, 52, .6); }
.hm-phone[data-active="1"] .hm-scr__gallery img { animation: hm-pop .7s var(--hm-ease) calc(.25s + var(--k) * .1s) both; }
.hm-scr__by { margin-top: auto; font-size: .72rem; font-style: italic; color: var(--hm-text); }
.hm-scr__tribute {
    display: flex; gap: .6rem; align-items: flex-start; width: 100%; margin-bottom: .6rem;
    padding: .7rem .75rem; border-radius: 14px; text-align: left;
    background: #fff; box-shadow: 0 10px 22px -16px rgba(28, 36, 52, .45), 0 0 0 1px var(--hm-line);
    font-size: .74rem; line-height: 1.4; color: var(--hm-text);
}
.hm-scr__tribute img { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.hm-scr__tribute b { display: block; font-family: Larsseit-Bold, sans-serif; font-weight: 400; color: var(--hm-ink); font-size: .74rem; margin-bottom: .1rem; }
.hm-phone[data-active="2"] .hm-scr__tribute { animation: hm-slide .75s var(--hm-ease) calc(.2s + var(--k) * .14s) both; }
@keyframes hm-slide { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.hm-scr__write { margin-top: auto; padding: .55rem 1.1rem; border-radius: 999px; background: var(--hm-strong); color: #fff; font-family: Larsseit-Bold, sans-serif; font-size: .74rem; }
.hm-scr__hearts { position: absolute; left: 0; right: 0; bottom: 60px; height: 0; pointer-events: none; }
.hm-scr__hearts i { position: absolute; bottom: 0; font-style: normal; color: var(--hm-rose); opacity: 0; font-size: 14px; }
.hm-scr__hearts i:nth-child(1) { left: 22%; } .hm-scr__hearts i:nth-child(2) { left: 40%; font-size: 11px; --hk: .7s; }
.hm-scr__hearts i:nth-child(3) { left: 55%; font-size: 17px; --hk: 1.5s; } .hm-scr__hearts i:nth-child(4) { left: 70%; font-size: 12px; --hk: 2.2s; }
.hm-scr__hearts i:nth-child(5) { left: 82%; --hk: 2.9s; }
.hm-phone[data-active="2"] .hm-scr__hearts i { animation: hm-heart 3.6s ease-in calc(.6s + var(--hk, 0s)) infinite; }
@keyframes hm-heart { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: .9; } 100% { opacity: 0; transform: translateY(-150px) translateX(12px) scale(1.1); } }
.hm-scr--qr { justify-content: center; }
.hm-scr__stone {
    position: relative; width: 82%; padding: 2.2rem 1rem 1.4rem;
    display: flex; flex-direction: column; align-items: center; gap: .3rem;
    border-radius: 120px 120px 14px 14px;
    background:
        radial-gradient(120% 80% at 30% 10%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 60%),
        linear-gradient(160deg, #d9dde3, #b9bfc8 55%, #a7aeb9);
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, .6), inset 0 -8px 18px rgba(28, 36, 52, .18), 0 26px 40px -24px rgba(28, 36, 52, .7);
}
.hm-scr__stone-name { font-family: "League Gothic", sans-serif; font-size: 1.45rem; letter-spacing: .06em; text-transform: uppercase; color: #6d7480; text-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 -1px 0 rgba(28, 36, 52, .35); }
.hm-scr__stone-dates { font-size: .72rem; color: #6d7480; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.hm-scr__plate { position: relative; margin-top: .9rem; padding: 8px; border-radius: 10px; background: #fff; box-shadow: 0 6px 14px -8px rgba(28, 36, 52, .6); overflow: hidden; }
.hm-scr__plate img { display: block; width: 92px; height: 92px; }
.hm-scr__beam {
    position: absolute; left: 4%; right: 4%; top: 10%; height: 2px; border-radius: 2px;
    background: linear-gradient(90deg, transparent, var(--hm-strong), transparent);
    box-shadow: 0 0 12px 2px rgba(69, 98, 151, .5);
    animation: hm-scan 2.2s ease-in-out infinite alternate;
}
@keyframes hm-scan { from { top: 8%; } to { top: 88%; } }
.hm-scr__scan { margin-top: 1.4rem; font-family: Larsseit-Bold, sans-serif; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--hm-blue); }
.hm-phone[data-active="3"] .hm-scr__stone { animation: hm-pop .9s var(--hm-ease) .15s both; }
.hm-story__dots { position: relative; z-index: 1; display: flex; gap: .55rem; }
.hm-story__dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(69, 98, 151, .22); transition: background-color .4s ease, transform .4s var(--hm-ease); }
.hm-story__dots i.is-on { background: var(--hm-strong); transform: scale(1.35); }

/* ---------- 7. Il cielo dei ricordi (seconda notte) ------------------------ */
.hm-sky {
    padding: clamp(11rem, 22vh, 15rem) 1.25rem !important;
    color: var(--hm-ivory); overflow: hidden;
    background:
        radial-gradient(60% 40% at 50% 55%, rgba(69, 98, 151, .35), rgba(69, 98, 151, 0) 70%),
        linear-gradient(180deg, #fff 0, #eef5fa 2.5%, #c9dfec 5.5%, #96b3cb 8.5%, #64809f 11.5%, #3d5172 14.5%, #26334e 17.5%, var(--hm-night) 21%,
                                var(--hm-night) 79%, #26334e 82.5%, #3d5172 85.5%, #64809f 88.5%, #96b3cb 91.5%, #c9dfec 94.5%, #eef5fa 97.5%, #fff 100%);
}
.hm-sky__stars { position: absolute; left: 0; right: 0; top: 20%; bottom: 20%; pointer-events: none; }
.hm-sky__stars i {
    position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%;
    background: #fff; opacity: .15; box-shadow: 0 0 6px rgba(255, 255, 255, .5);
    animation: hm-star var(--t) ease-in-out var(--o) infinite alternate;
}
@keyframes hm-star { from { opacity: .08; } to { opacity: .75; } }
.hm-sky__leaves {
    position: absolute; left: 0; right: 0; bottom: 21%; height: 34%; pointer-events: none; opacity: .22;
    background: url('../Assets/night/leaves.webp') center bottom / auto 100% repeat-x;
    -webkit-mask-image: linear-gradient(transparent, #000 50%, #000 72%, transparent);
            mask-image: linear-gradient(transparent, #000 50%, #000 72%, transparent);
}
.hm-sky__inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; }
.hm-sky .hm-chhead__title { max-width: 16ch; }

.hm-constellation { position: relative; height: clamp(360px, 52vh, 560px); margin: clamp(1.5rem, 4vw, 3rem) auto 0; }
.hm-constellation__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.hm-constellation__lines polyline {
    fill: none; stroke: rgba(179, 212, 231, .38); stroke-width: 1px; vector-effect: non-scaling-stroke;
}
/* le linee si tracciano da sinistra a destra, insieme alle stelle che si accendono */
.hm-constellation__lines { clip-path: inset(0 0 0 0); transition: clip-path 3.4s cubic-bezier(.45, 0, .25, 1) .5s; }
html.mo-on .hm-constellation:not(.is-lit) .hm-constellation__lines { clip-path: inset(0 100% 0 0); }
.hm-constellation__list { list-style: none; margin: 0; padding: 0; }
.hm-star { position: absolute; left: var(--x); top: var(--y); width: 0; height: 0; z-index: 1; }
.hm-star:hover, .hm-star:focus-within { z-index: 5; }
.hm-star__link { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; display: block; }
.hm-star__light {
    position: absolute; left: 50%; top: 50%; width: calc(9px * var(--s)); height: calc(9px * var(--s)); border-radius: 50%;
    translate: -50% -50%;
    background: var(--hm-candle);
    box-shadow: 0 0 calc(10px * var(--s)) calc(3px * var(--s)) rgba(255, 226, 170, .75), 0 0 calc(34px * var(--s)) calc(8px * var(--s)) rgba(255, 214, 150, .25);
    transition: scale .5s var(--hm-ease), opacity 1s ease calc(.3s + var(--k) * 150ms);
    animation: hm-twinkle calc(3.5s + var(--k) * .17s) ease-in-out calc(var(--k) * .3s) infinite alternate;
}
@keyframes hm-twinkle { from { filter: brightness(.85); } to { filter: brightness(1.25); } }
html.mo-on .hm-constellation:not(.is-lit) .hm-star__light { opacity: 0; scale: .2; }
.hm-star__link:hover .hm-star__light, .hm-star__link:focus-visible .hm-star__light { scale: 1.7; }
.hm-star__link:focus-visible { outline: 2px solid var(--hm-candle); outline-offset: 4px; }
.hm-star__card {
    position: absolute; left: 50%; bottom: calc(100% + 6px); translate: -50% 8px;
    display: flex; align-items: center; gap: .75rem; padding: .6rem .9rem .6rem .6rem; width: max-content; max-width: 270px;
    border-radius: 16px; background: rgba(251, 248, 242, .97); color: var(--hm-ink);
    box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .5);
    font-size: .85rem; line-height: 1.3; text-align: left;
    opacity: 0; pointer-events: none; transition: opacity .3s ease, translate .4s var(--hm-ease);
}
.hm-star__card img { width: 46px; height: 54px; object-fit: cover; border-radius: 999px 999px 6px 6px; flex-shrink: 0; }
.hm-star__card b { display: block; font-family: "League Gothic", sans-serif; font-weight: 400; font-size: 1.25rem; letter-spacing: .03em; text-transform: uppercase; color: var(--hm-ink); }
.hm-star__link:hover .hm-star__card, .hm-star__link:focus-visible .hm-star__card { opacity: 1; translate: -50% 0; }
.hm-star--left .hm-star__card { left: auto; right: -10px; translate: 0 8px; }
.hm-star--left .hm-star__link:hover .hm-star__card, .hm-star--left .hm-star__link:focus-visible .hm-star__card { translate: 0 0; }
.hm-star--below .hm-star__card { bottom: auto; top: calc(100% + 6px); }
.hm-sky__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem 2rem; margin: 2rem 0 0; text-align: center; }
.hm-sky__count { font-family: "DM Serif Display", serif; font-size: 1.3rem; color: var(--hm-ivory); }

/* ---------- 8. Agenzie e manifesto ----------------------------------------- */
.hm-agency { padding-left: 0 !important; padding-right: 0 !important; padding-bottom: 0 !important; }
.hm-agency__panel {
    position: relative; overflow: hidden;
    background: #e6eef6 url('../Assets/background_images_types.webp') center / cover no-repeat;
    clip-path: inset(0 calc((1 - var(--g, 1)) * 7vw) round calc((1 - var(--g, 1)) * 48px + 0px));
}
/* l'acquerello blu si scioglie nel bianco invece di finire con un taglio dritto (solo lo sfondo:
   manifesto e messaggio restano pieni, stanno sopra) */
.hm-agency__panel::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 11rem; z-index: 0; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .7) 55%, #fff);
}
.hm-agency__panel::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(90% 70% at 50% 40%, rgba(255, 255, 255, .86), rgba(255, 255, 255, .55) 70%, rgba(255, 255, 255, .35));
}
.hm-agency__inner { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: clamp(4.5rem, 8vw, 7.5rem) 1.25rem; }
.hm-agency__grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 6vw, 6rem); align-items: center; margin-top: clamp(2.5rem, 5vw, 4rem);
}
.hm-agency__visual { position: relative; padding-bottom: 2.5rem; }
.hm-poster {
    position: relative; margin: 0 auto 0 0; width: 100%; max-width: 380px;
    padding: 2.1rem 1.9rem 1.6rem; text-align: center;
    background: radial-gradient(140% 90% at 20% 0%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 60%), #fffdf8;
    outline: 1px solid rgba(28, 36, 52, .55); outline-offset: -12px;
    box-shadow: 0 50px 80px -46px rgba(28, 36, 52, .7), 0 0 0 1px rgba(28, 36, 52, .08);
    transform: perspective(1200px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) rotate(-1.5deg);
    transition: transform .8s var(--hm-ease);
}
.hm-poster__tag {
    position: absolute; top: -12px; right: 18px; padding: .3rem .8rem; border-radius: 999px;
    background: var(--hm-strong); color: #fff; font-family: Larsseit-Bold, sans-serif; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase;
}
.hm-poster__logo { width: 74px; height: auto; margin: 0 auto .9rem; color: var(--hm-ink); }
.hm-poster__logo .lg-dot { fill: var(--hm-strong); }
.hm-poster p { margin: 0; }
.hm-poster__intro { font-family: "DM Serif Display", serif; font-style: italic; font-size: 1.02rem; color: var(--hm-text); }
.hm-poster__photo { display: block; width: 104px; height: 126px; margin: 1rem auto .8rem; object-fit: cover; border-radius: 50% / 46%; box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(28, 36, 52, .15); }
.hm-poster__name { font-size: 2.3rem; line-height: 1; text-transform: uppercase; letter-spacing: .04em; color: var(--hm-ink); }
.hm-poster__age { margin-top: .35rem !important; font-size: .9rem; color: var(--hm-text); }
.hm-poster__announce { margin-top: .9rem !important; font-size: .86rem; line-height: 1.5; color: var(--hm-ink); }
.hm-poster__info { margin: 1rem 0 0; padding: .9rem 0 0; border-top: 1px solid rgba(28, 36, 52, .12); display: grid; gap: .55rem; font-size: .8rem; }
.hm-poster__info dt { font-family: Larsseit-Bold, sans-serif; font-weight: 400; color: var(--hm-ink); }
.hm-poster__info dd { margin: 0; color: var(--hm-text); }
.hm-poster__qr { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-top: 1.1rem; font-family: Larsseit-Bold, sans-serif; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--hm-blue); }
.hm-poster__qrimg { position: relative; display: block; padding: 4px; background: #fff; border-radius: 6px; box-shadow: 0 0 0 1px var(--hm-line); overflow: hidden; }
.hm-poster__qrimg img { display: block; width: 52px; height: 52px; }

/* il manifesto condiviso in una chat */
.hm-chat {
    position: absolute; right: -4%; bottom: 0; z-index: 2; width: min(300px, 78%);
    padding: .8rem .9rem .55rem; border-radius: 18px 18px 4px 18px;
    background: #e7f3e3; color: #1d2a1f;
    box-shadow: 0 30px 50px -24px rgba(28, 36, 52, .55), 0 0 0 1px rgba(28, 36, 52, .06);
    font-size: .84rem; line-height: 1.4;
    animation: hm-chat-float 6s ease-in-out infinite;
}
.hm-chat__who { display: block; font-family: Larsseit-Bold, sans-serif; font-size: .76rem; color: #2f7a4f; margin-bottom: .2rem; }
.hm-chat__msg { margin: 0 0 .6rem; }
.hm-chat__link { display: flex; align-items: center; gap: .6rem; padding: .45rem; border-radius: 10px; background: rgba(255, 255, 255, .75); }
.hm-chat__link img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.hm-chat__link b { display: block; font-family: Larsseit-Bold, sans-serif; font-weight: 400; font-size: .8rem; color: #1d2a1f; }
.hm-chat__link span { font-size: .72rem; color: #5b6b5d; }
.hm-chat__time { display: block; text-align: right; font-size: .66rem; color: #5b6b5d; margin-top: .3rem; }
.hm-chat__time i { font-style: normal; color: #4a9be0; letter-spacing: -.2em; margin-left: .2rem; }
@keyframes hm-chat-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
html.mo-on .hm-agency__visual:not(.is-in) .hm-chat { opacity: 0; scale: .9; }
.hm-agency__visual .hm-chat { transition: opacity .8s ease .5s, scale .8s var(--hm-ease) .5s; transform-origin: 100% 100%; }

.hm-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; }
.hm-points li { position: relative; padding-left: 2.2rem; font-family: "DM Serif Display", serif; font-size: clamp(1.25rem, 1rem + .7vw, 1.6rem); line-height: 1.25; color: var(--hm-ink); }
.hm-points__dot { position: absolute; left: 4px; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--hm-strong); box-shadow: 0 0 0 6px rgba(179, 212, 231, .55); }
.hm-agency__note { margin: 1.8rem 0 1.8rem; max-width: 30rem; font-size: 1.08rem; line-height: 1.6; color: var(--hm-text); }

/* ---------- 9. Rosa e sostegno (sul bianco) -------------------------------- */
.hm-rose { position: relative; height: 200vh; height: 200svh; background: linear-gradient(180deg, #fff 0, #fdf8fa 26%, #fbf3f6 58%, #fff 100%); }
.hm-rose__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; }
/* l'acquerello rosa: compare mentre la sezione entra (--rose-in) e si apre insieme alla rosa (--rose) */
.hm-rose__wash {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    opacity: calc(var(--rose-in, 1) * (.35 + var(--rose, 1) * .65));
    /* mentre la sezione entra l'acquerello sfuma verso l'alto: nessun bordo dritto */
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 calc((1 - var(--rose-in, 1)) * 45% + 12%));
            mask-image: linear-gradient(180deg, transparent 0, #000 calc((1 - var(--rose-in, 1)) * 45% + 12%));
    background:
        radial-gradient(36% 44% at calc(50% + min(300px, 24vw)) 50%, rgba(236, 160, 190, .32), rgba(236, 160, 190, 0) 72%),
        radial-gradient(30% 34% at calc(50% + min(470px, 36vw)) 26%, rgba(250, 205, 186, .26), rgba(250, 205, 186, 0) 72%),
        radial-gradient(34% 38% at calc(50% + min(140px, 11vw)) 80%, rgba(206, 186, 236, .22), rgba(206, 186, 236, 0) 72%);
}
.hm-rose__wash::before {
    content: ""; position: absolute; left: calc(50% + min(300px, 24vw)); top: 50%;
    width: min(1180px, 108vw); aspect-ratio: 1100 / 1004;
    translate: -50% -50%;
    scale: calc(.74 + var(--rose, 1) * .3);
    rotate: calc((1 - var(--rose, 1)) * 12deg);
    opacity: .5;
}
.hm-rose.is-near .hm-rose__wash::before { background: url('../Assets/night/flowers-rose.webp') center / contain no-repeat; }
.hm-rose__grid { position: relative; z-index: 1; }
/* onda di luce allo sboccio: due cerchi rosati che si allargano come una goccia nell'acqua */
.hm-rose__ripple { position: absolute; left: 50%; top: 50%; z-index: 0; width: min(78%, 430px); aspect-ratio: 1; translate: -50% -50%; pointer-events: none; }
.hm-rose__ripple::before, .hm-rose__ripple::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; opacity: 0;
    border: 1.5px solid rgba(214, 120, 158, .5);
    box-shadow: 0 0 34px 6px rgba(236, 160, 190, .32), inset 0 0 30px 4px rgba(236, 160, 190, .22);
}
.hm-rose__flower.is-bloom .hm-rose__ripple::before { animation: hm-ripple 2.2s cubic-bezier(.16, .8, .3, 1) both; }
.hm-rose__flower.is-bloom .hm-rose__ripple::after { animation: hm-ripple 2.4s cubic-bezier(.16, .8, .3, 1) .38s both; }
.hm-rose__flower.is-bloom .tree-sequence::before { animation: hm-bloom-glow 2.4s ease-out both; }
@keyframes hm-ripple { 0% { opacity: 0; scale: .5; } 14% { opacity: 1; } 100% { opacity: 0; scale: 1.75; } }
@keyframes hm-bloom-glow { 0% { filter: blur(24px) brightness(1); } 30% { filter: blur(30px) brightness(1.25) saturate(1.25); } 100% { filter: blur(24px) brightness(1); } }
.hm-rose__grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center;
    gap: clamp(1.5rem, 5vw, 5rem); width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 1.25rem;
}
.hm-rose__text .hm-chhead__kicker, .hm-rose__text .hm-chhead__n { color: #b2557d; }
.hm-rose__title { margin: 0 0 1.2rem; font-family: "DM Serif Display", serif; font-weight: 400; font-size: clamp(2.3rem, 1.3rem + 3vw, 4rem) !important; line-height: 1.04 !important; letter-spacing: -.02em; color: var(--hm-ink); }
.hm-rose__lead { margin: 0 0 2rem; max-width: 30rem; font-size: 1.12rem; line-height: 1.62; color: var(--hm-text); }
.hm-rose__donate { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; }
.hm-rose__donate .hero-btn.nav-link {
    display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
    min-height: 54px; height: auto !important; padding: 0 1.9rem !important; border-radius: 999px;
    background: var(--hm-strong) !important; color: #fff !important;
    font-family: Larsseit-Bold, sans-serif; font-size: 1.05rem; letter-spacing: .06em;
    box-shadow: 0 16px 34px -14px rgba(69, 98, 151, .95);
}
.hm-rose__donate .hero-btn.nav-link:hover { background: #3a5586 !important; transform: translateY(-2px); }
.hm-rose__donate .hero-btn.nav-link img { filter: brightness(0) invert(1); }
.hm-rose__secure { margin: 1.2rem 0 0; font-size: .86rem; color: var(--hm-text); }
.hm-rose__flower { position: relative; }
.tree-sequence { position: relative; width: 100%; max-width: 560px; aspect-ratio: 7 / 6; margin: 0 auto; }
.tree-sequence::before {
    content: ""; position: absolute; inset: 4%; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(226, 140, 172, .45), rgba(226, 140, 172, 0));
    filter: blur(24px); opacity: var(--rose, 1); scale: calc(.5 + var(--rose, 1) * .7);
}
.tree-sequence canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    mix-blend-mode: multiply;
    scale: calc(.86 + var(--rose, 1) * .16);
    rotate: calc((1 - var(--rose, 1)) * -8deg);
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 97%);
            mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 97%);
}

/* ---------- 10. Resta vicino ----------------------------------------------- */
/* la firma finale: il logo grande e tenue, i quattro punti si accendono */
.hm-close { overflow: hidden; padding-bottom: calc(min(900px, 88vw) * .23 + clamp(4.5rem, 8vw, 7rem)) !important;
    background: radial-gradient(60% 50% at 50% 100%, rgba(179, 212, 231, .32), rgba(179, 212, 231, 0) 70%), #fff; }
.hm-close__sign { position: absolute; left: 50%; bottom: clamp(1.5rem, 3vw, 2.5rem); width: min(900px, 88vw); translate: -50% 0; pointer-events: none; }
.hm-close__logo { display: block; width: 100%; height: auto; overflow: visible; color: rgba(69, 98, 151, .07); }
.hm-close__logo .lg-dot { fill: #f6dca8; filter: drop-shadow(0 0 3px rgba(255, 214, 150, .9)) drop-shadow(0 0 8px rgba(255, 200, 120, .55)); }
html.mo-on .hm-close__sign .lg-dot { opacity: 0; transition: opacity 1.2s ease calc(.4s + var(--k) * .35s); }
html.mo-on .hm-close__sign.is-in .lg-dot { opacity: 1; }
.hm-close .hm-chhead, .hm-close__grid { position: relative; z-index: 1; }
.hm-close__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; max-width: 980px; margin: clamp(2.5rem, 5vw, 3.5rem) auto 0; }
.hm-card {
    display: flex; flex-direction: column; gap: 1rem;
    padding: clamp(1.6rem, 3vw, 2.4rem); border-radius: 26px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 30px 60px -40px rgba(28, 36, 52, .45), 0 0 0 1px var(--hm-line);
}
.hm-card__title { margin: 0; font-family: "DM Serif Display", serif; font-weight: 400; font-size: 1.6rem !important; line-height: 1.15 !important; color: var(--hm-ink); }
.hm-card__text { margin: 0; color: var(--hm-text); font-size: 1.02rem; }
.hm-card__actions { display: flex; flex-wrap: wrap; gap: .8rem; padding: 0 !important; background: none !important; }
.hm-pill {
    display: inline-flex; align-items: center; gap: .65rem; min-height: 50px; padding: 0 1.25rem;
    border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px var(--hm-line);
    color: var(--hm-ink); text-decoration: none; font-family: Larsseit-Bold, sans-serif; font-size: .98rem;
    transition: transform .2s var(--hm-ease), box-shadow .2s ease, background-color .2s ease;
}
.hm-pill:hover, .hm-pill:focus-visible { color: var(--hm-ink); background: var(--hm-mist); transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(28, 36, 52, .5), 0 0 0 1px rgba(69, 98, 151, .3); }
.hm-pill img { width: 22px; height: 22px; }
.hm-news { position: relative; display: flex; gap: .6rem; margin-top: .2rem; }
.hm-news__input.form-control { flex: 1 1 auto; min-width: 0; min-height: 52px; padding: 0 1.3rem; border-radius: 999px; border: 1px solid var(--hm-line); box-shadow: none; font-size: 1rem; }
.hm-news__input.form-control:focus { border-color: var(--hm-strong); box-shadow: 0 0 0 4px rgba(69, 98, 151, .14); }
.hm-news__btn { flex-shrink: 0; letter-spacing: .08em; }
.hm-news .email-msg { position: absolute; left: 1.1rem; top: calc(100% + .4rem); }
.hm-news .email-msg small { color: #a12c3c; font-size: .85rem; }

/* ---------- 11. Comparse mentre si scorre ---------------------------------- */
html.mo-on .hm [data-reveal] {
    transition: opacity 1s var(--hm-ease) var(--d, 0ms), translate 1s var(--hm-ease) var(--d, 0ms), scale 1s var(--hm-ease) var(--d, 0ms), filter 1s ease var(--d, 0ms);
}
html.mo-on .hm [data-reveal]:not(.is-in) { opacity: 0; translate: 0 36px; filter: blur(4px); }
html.mo-on .hm [data-reveal="zoom"]:not(.is-in) { translate: 0 24px; scale: .94; }
html.mo-on .hm [data-reveal="left"]:not(.is-in) { translate: -52px 0; }

/* ---------- 12. Telefono e tablet ------------------------------------------ */
@media (max-width: 991px) {
    .hm-intro { padding-top: 7rem !important; padding-bottom: 6rem !important; }
    .hm-honor__grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
    .hm-honor .hm-chhead--left { text-align: center; }
    .hm-honor .hm-chhead--left .hm-chhead__thread { margin-left: auto; }
    .hm-honor .hm-chhead--left .hm-chhead__title, .hm-honor .hm-chhead--left .hm-chhead__lead { margin-left: auto; }
    .hm-honor__more { text-align: center; }
    .hm .hero__cards { height: 400px; max-width: 560px; width: 100%; margin: 0 auto; }

    .hm-story__grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .hm-story__stage {
        order: -1; z-index: 2; top: 0; height: 60vh; height: 60svh; gap: .8rem;
        background: linear-gradient(#fff 92%, rgba(255, 255, 255, 0));
        margin: 0 -1.25rem; padding: 1.4rem 0 1rem;
    }
    .hm-phone { --py: 0deg; --px: 0deg; }
    .hm-step { min-height: 52svh; justify-content: flex-start; padding: 2.5rem 0 2rem 3.6rem; }
    .hm-step__n { top: 2.6rem; translate: 0 0; width: 40px; height: 40px; font-size: 1rem; }
    .hm-step__text { font-size: 1.05rem; }

    .hm-constellation { height: clamp(420px, 60vh, 560px); }

    .hm-agency__grid { grid-template-columns: minmax(0, 1fr); }
    .hm-poster { max-width: 340px; margin: 0 auto; }
    .hm-chat { right: 0; }

    .hm-rose { height: 185svh; }
    /* sul telefono la rosa sta in alto al centro: l'acquerello la segue */
    .hm-rose__wash { background:
        radial-gradient(60% 34% at 50% 28%, rgba(236, 160, 190, .32), rgba(236, 160, 190, 0) 72%),
        radial-gradient(50% 26% at 78% 12%, rgba(250, 205, 186, .26), rgba(250, 205, 186, 0) 72%); }
    .hm-rose__wash::before { left: 50%; top: 28%; width: 150vw; }
    .hm-rose__grid { grid-template-columns: minmax(0, 1fr); gap: 0; text-align: center; }
    .hm-rose__flower { order: -1; }
    .tree-sequence { max-width: 330px; }
    .hm-rose__lead { margin-left: auto; margin-right: auto; font-size: 1.02rem; margin-bottom: 1.4rem; }
    .hm-rose__donate { justify-content: center; }
    .hm-rose__title { font-size: clamp(2rem, 1.4rem + 3vw, 2.6rem) !important; margin-bottom: .8rem; }

    .hm-close__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575px) {
    .hm-ch { padding-top: 4.2rem !important; padding-bottom: 4.2rem !important; }
    .hm-chhead__thread { height: 64px; margin-bottom: 1.2rem; }
    .hm-intro__line { font-size: clamp(1.6rem, 1.1rem + 3.4vw, 2.1rem) !important; }
    .hm .hero__cards { height: 330px; }
    .hm-sky { padding-top: 9rem !important; padding-bottom: 9rem !important; }
    .hm-agency__visual { padding-bottom: 7rem; }
    .hm-chat { left: 7%; right: auto; width: 86%; }
    .hm-news { flex-direction: column; }
    .hm-news .email-msg { position: static; }
    .hm-rose__secure { font-size: .8rem; }
}
@media (hover: none) {
    /* sul telefono la scheda della stella compare toccandola: il tocco apre la pagina */
    .hm-star__light { scale: 1.15; }
}

/* ---------- 13. Meno animazioni -------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .hm-intro__nebula, .hm-intro__logo .lg-stroke, .hm-intro__logo .lg-dot, .hm-w, .hm-intro__actions, .hm-intro__scroll,
    .hm .ricordino, .hm-orbit__ring, .hm-chat, .hm-star__light { animation: none !important; }
    .hm-intro__logo .lg-dot { filter: drop-shadow(0 0 4px rgba(255, 236, 196, .95)) drop-shadow(0 0 12px rgba(255, 214, 150, .6)); }
    .hm-rose { height: auto; }
    .hm-rose__sticky { position: relative; height: auto; padding: 6rem 0; }
    .hm-scr, .hm-scr * { animation: none !important; transition: none !important; }
}
