/* ==========================================================================
   HORNOI V2 — CHROME (header + footer)
   ========================================================================== */

/* --------------------------------------------------------------------------
   HEADER
   -------------------------------------------------------------------------- */
.hc-hdr {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 200;
    /* L'header è fuori da ogni .theme-*: senza questo eredita il nero del body
       e sparisce sopra le hero scure. */
    color: #fff;
    transition: transform .4s var(--ease), background .3s var(--ease-io),
                border-color .3s var(--ease-io), backdrop-filter .3s var(--ease-io);
    border-bottom: 1px solid transparent;
}

.hc-hdr .hc-hdr__in { color: inherit; }

/* stato iniziale: trasparente sopra la hero scura */
.hc-hdr__in {
    display: flex;
    align-items: center;
    gap: 28px;
    width: 100%;
    max-width: var(--cw);
    margin-inline: auto;
    padding: 0 var(--gut);
    height: 74px;
    transition: height .3s var(--ease-io);
}

/* dopo lo scroll */
.hc-hdr.is-stuck {
    background: rgba(10, 10, 10, .72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(255, 255, 255, .1);
}
.hc-hdr.is-stuck .hc-hdr__in { height: 64px; }

/* variante su pagine a hero chiara */
.hc-hdr--light-top { color: var(--ink); }
.hc-hdr--light-top.is-stuck {
    background: rgba(255, 255, 255, .78);
    border-bottom-color: rgba(10, 10, 10, .1);
}

/* nascondi scrollando in basso */
.hc-hdr.is-hidden { transform: translateY(-102%); }

/* logo */
.hc-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    flex: none;
    color: inherit;
}

.hc-logo__mark {
    width: 34px;
    height: 34px;
    flex: none;
    overflow: visible;
}

.hc-logo__mark .lm-box   { stroke: currentColor; opacity: .3; }
.hc-logo__mark .lm-s     { stroke: currentColor; }
.hc-logo__mark .lm-h     { stroke: var(--orange); }
.hc-logo__mark .lm-dot   { fill: var(--orange); }

/* il monogramma si ridisegna all'hover */
.hc-logo:hover .lm-s,
.hc-logo:hover .lm-h {
    animation: lm-redraw 1.1s var(--ease) forwards;
}
.hc-logo:hover .lm-h { animation-delay: .1s; }

@keyframes lm-redraw {
    0%   { stroke-dashoffset: 0; }
    45%  { stroke-dashoffset: var(--len); }
    100% { stroke-dashoffset: 0; }
}

.hc-logo:hover .lm-box { animation: lm-spin 1.1s var(--ease); }
@keyframes lm-spin {
    0%   { transform: rotate(0); }
    100% { transform: rotate(90deg); }
}
.hc-logo__mark .lm-box { transform-box: fill-box; transform-origin: center; }

.hc-logo__txt {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1;
}
.hc-logo__name {
    font-family: var(--f-display);
    font-size: .98rem;
    font-weight: 650;
    letter-spacing: -.022em;
}
.hc-logo__role {
    font-size: .625rem;
    font-weight: 500;
    letter-spacing: .11em;
    text-transform: uppercase;
    opacity: .55;
}

/* nav */
.hc-nav { margin-left: auto; }

.hc-nav__list {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hc-nav__list a,
.hc-nav__list > li > .hc-nav__toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    font-size: .91rem;
    font-weight: 450;
    letter-spacing: -.006em;
    border-radius: 8px;
    opacity: .78;
    transition: opacity var(--t-fast), background var(--t-fast);
}

.hc-nav__list a:hover,
.hc-nav__list .current-menu-item > a,
.hc-nav__list li.is-active > a {
    opacity: 1;
    background: rgba(255, 255, 255, .07);
}

/* --------------------------------------------------------------------------
   TENDINE

   Aprono su :hover e su :focus-within, così funzionano anche senza
   JavaScript e con la sola tastiera: entrando con Tab nel link padre il
   pannello compare, e i Tab successivi scorrono le figlie.

   I selettori .sub-menu / .menu-item-has-children coprono il caso in cui il
   menu venga costruito dalla bacheca invece che da hc_nav_items().
   -------------------------------------------------------------------------- */
.hc-nav__list > li { position: relative; }

.hc-nav__list > li.has-sub > a > svg,
.hc-nav__list > li.menu-item-has-children > a::after {
    width: 13px;
    height: 13px;
    margin-left: 2px;
    opacity: .6;
    transition: transform var(--t-fast), opacity var(--t-fast);
}

.hc-nav__list > li.has-sub:hover > a > svg,
.hc-nav__list > li.has-sub:focus-within > a > svg {
    transform: rotate(180deg);
    opacity: 1;
}

.hc-nav__sub,
.hc-nav__list > li > .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    z-index: 10;
    width: 320px;
    padding: 0;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -6px);
    transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}

/* Ponte invisibile: senza, spostando il mouse dal link al pannello si
   attraversano 10px di vuoto e la tendina si chiude a metà strada. */
.hc-nav__sub::before,
.hc-nav__list > li > .sub-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.hc-nav__list > li.has-sub:hover > .hc-nav__sub,
.hc-nav__list > li.has-sub:focus-within > .hc-nav__sub,
.hc-nav__list > li.has-sub.is-open > .hc-nav__sub,
.hc-nav__list > li.menu-item-has-children:hover > .sub-menu,
.hc-nav__list > li.menu-item-has-children:focus-within > .sub-menu,
.hc-nav__list > li.menu-item-has-children.is-open > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.hc-nav__sub-in,
.hc-nav__list > li > .sub-menu {
    display: grid;
    gap: 2px;
    padding: 8px;
    border-radius: var(--r-lg);
    background: rgba(18, 18, 20, .92);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

.hc-nav__sub a,
.hc-nav__list > li > .sub-menu a {
    display: block;
    padding: 11px 13px;
    border-radius: 10px;
    opacity: 1;
    color: #fff;
    font-size: .88rem;
    line-height: 1.35;
}

.hc-nav__sub a:hover,
.hc-nav__sub a:focus-visible,
.hc-nav__list > li > .sub-menu a:hover {
    background: rgba(255, 255, 255, .09);
}

.hc-nav__sub b {
    display: block;
    font-weight: 550;
    letter-spacing: -.01em;
}

.hc-nav__sub small {
    display: block;
    margin-top: 2px;
    font-size: .76rem;
    color: rgba(255, 255, 255, .5);
}

.hc-nav__sub a:hover small { color: rgba(255, 255, 255, .68); }

/* Su header chiaro il pannello resta scuro: è un livello sopra la pagina,
   non parte della pagina. Serve però ripristinare il colore del testo. */
.hc-hdr--light-top .hc-nav__sub a,
.hc-hdr--light-top .hc-nav__list > li > .sub-menu a { color: #fff; }

/* Con sei voci più la CTA la barra è piena: sotto i 1280px recupero
   spazio dai padding invece di far andare a capo la navigazione. */
@media (max-width: 1280px) {
    .hc-nav__list a { padding-inline: 10px; font-size: .88rem; }
    .hc-hdr__in { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .hc-nav__sub,
    .hc-nav__list > li > .sub-menu,
    .hc-nav__list > li.has-sub > a > svg { transition: none; }
}

.hc-hdr--light-top:not(.is-stuck) .hc-nav__list a:hover,
.hc-hdr--light-top.is-stuck .hc-nav__list a:hover {
    background: rgba(10, 10, 10, .05);
}

/* pallino arancione sulla voce attiva */
.hc-nav__list .current-menu-item > a::before,
.hc-nav__list li.is-active > a::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 4px;
    height: 4px;
    margin-left: -2px;
    border-radius: 50%;
    background: var(--orange);
}

/* azioni a destra */
.hc-hdr__act {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.hc-hdr__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    font-size: .89rem;
    font-weight: 550;
    letter-spacing: -.008em;
    line-height: 1;
    color: #fff;
    background: var(--orange);
    border-radius: 8px;
    transition: background var(--t-fast), box-shadow var(--t-fast);
    box-shadow: 0 8px 20px -10px rgba(255, 90, 31, .7);
}
.hc-hdr__cta:hover { background: var(--orange-lo); }
.hc-hdr__cta .arw { transition: transform .3s var(--ease); }
.hc-hdr__cta:hover .arw { transform: translateX(3px); }
.hc-hdr__cta svg { width: 14px; height: 14px; }

/* hamburger */
.hc-burger {
    display: none;
    position: relative;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 8px;
    border: 1px solid currentColor;
    opacity: .5;
    transition: opacity var(--t-fast);
}
.hc-burger:hover { opacity: .9; }

.hc-burger span {
    position: absolute;
    left: 11px;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    border-radius: 2px;
    transition: transform .38s var(--ease), opacity .2s var(--ease-io);
}
.hc-burger span:nth-child(1) { top: 15px; }
.hc-burger span:nth-child(2) { top: 20px; }
.hc-burger span:nth-child(3) { top: 25px; }

body.hc-nav-open .hc-burger span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
body.hc-nav-open .hc-burger span:nth-child(2) { opacity: 0; transform: scaleX(.4); }
body.hc-nav-open .hc-burger span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   PANNELLO MOBILE — navigazione a due livelli

   Il contenitore non scorre: scorrono i singoli pannelli. Così entrando in
   un sottomenu la posizione di scroll del primo livello resta dov'era.
   -------------------------------------------------------------------------- */
.hc-mob {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: var(--ink);
    color: #fff;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    /* Il pannello corrente riafferma visibility: visible (gli serve per la
       transizione fra livelli) e quel visible vince anche a menu chiuso: il
       riquadro restava agganciato agli eventi sopra tutta la pagina e ogni
       clic sulla cover finiva su un link del menu invisibile. */
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity .34s var(--ease), transform .34s var(--ease), visibility .34s;
}

/* stessa ragione: a menu chiuso nessun pannello è visibile né raggiungibile
   con Tab, qualunque cosa dica .is-current */
body:not(.hc-nav-open) .hc-mob__pane { visibility: hidden; }

body.hc-nav-open .hc-mob {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
}

body.hc-nav-open { overflow: hidden; }

.hc-mob__panes { position: absolute; inset: 0; }

.hc-mob__pane {
    position: absolute;
    inset: 0;
    padding: 100px var(--gut) 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .38s var(--ease), opacity .28s var(--ease-io), visibility .38s;
}

.hc-mob__pane.is-current {
    transform: none;
    visibility: visible;
}

/* Il primo livello non sparisce: arretra, così il ritorno indietro ha una
   direzione leggibile invece di essere un dissolvenza qualsiasi. */
.hc-mob__pane.is-past {
    transform: translateX(-26%);
    opacity: 0;
    visibility: hidden;
}

.hc-mob__list { display: grid; gap: 2px; }

.hc-mob__list > li > a,
.hc-mob__list > li > .hc-mob__drill {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 0;
    border: 0;
    background: none;
    text-align: left;
    color: inherit;
    font-family: var(--f-display);
    font-size: 1.6rem;
    font-weight: 650;
    letter-spacing: -.028em;
    cursor: pointer;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s var(--ease), transform .5s var(--ease), color var(--t-fast);
}

.hc-mob__list > li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.hc-mob__list > li:last-child { border-bottom: 0; }

.hc-mob__list > li > a:hover,
.hc-mob__list > li > .hc-mob__drill:hover { color: var(--orange); }

.hc-mob__list > li > a span,
.hc-mob__list > li > .hc-mob__drill span {
    margin-left: auto;
    font-family: var(--f-mono);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .04em;
    color: var(--orange);
    opacity: .7;
}

/* chevron: ruotato di -90°, così indica "si entra" e non "si apre" */
.hc-mob__drill > svg {
    width: 18px;
    height: 18px;
    flex: none;
    opacity: .45;
    transform: rotate(-90deg);
}

/* L'animazione si aggancia al pannello corrente, non al menu aperto:
   anche il secondo livello entra con la stessa cascata. */
.hc-mob__pane.is-current .hc-mob__list > li > a,
.hc-mob__pane.is-current .hc-mob__list > li > .hc-mob__drill { opacity: 1; transform: none; }

.hc-mob__pane.is-current .hc-mob__list > li:nth-child(1) > * { transition-delay: .08s; }
.hc-mob__pane.is-current .hc-mob__list > li:nth-child(2) > * { transition-delay: .13s; }
.hc-mob__pane.is-current .hc-mob__list > li:nth-child(3) > * { transition-delay: .18s; }
.hc-mob__pane.is-current .hc-mob__list > li:nth-child(4) > * { transition-delay: .23s; }
.hc-mob__pane.is-current .hc-mob__list > li:nth-child(5) > * { transition-delay: .28s; }
.hc-mob__pane.is-current .hc-mob__list > li:nth-child(6) > * { transition-delay: .33s; }
.hc-mob__pane.is-current .hc-mob__list > li:nth-child(n+7) > * { transition-delay: .38s; }

/* ── secondo livello ── */
.hc-mob__back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    padding: 10px 16px 10px 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .72);
    font-size: .82rem;
    font-weight: 550;
    cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast);
}

.hc-mob__back:hover { color: #fff; border-color: rgba(255, 255, 255, .3); }
.hc-mob__back > svg { width: 16px; height: 16px; transform: rotate(180deg); }

.hc-mob__pane-t {
    margin-bottom: 6px;
    font-family: var(--f-mono);
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--orange);
}

.hc-mob__list--sub > li > a {
    display: block;
    padding: 17px 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.hc-mob__list--sub b { display: block; font-weight: inherit; }

.hc-mob__list--sub small {
    display: block;
    margin-top: 3px;
    font-family: var(--f-body);
    font-size: .84rem;
    font-weight: 400;
    letter-spacing: 0;
    color: rgba(255, 255, 255, .5);
}

.hc-mob__foot {
    margin-top: 40px;
    display: grid;
    gap: 18px;
}
.hc-mob__foot .btn { width: 100%; }
.hc-mob__mail {
    font-size: .95rem;
    color: rgba(255, 255, 255, .6);
}
.hc-mob__mail:hover { color: var(--orange); }

@media (prefers-reduced-motion: reduce) {
    .hc-mob__pane { transition: none; }
    .hc-mob__pane.is-current .hc-mob__list > li > * { transition-delay: 0s; }
}

@media (max-width: 980px) {
    .hc-nav { display: none; }
    .hc-burger { display: block; }
    .hc-hdr__act { margin-left: auto; }
}
@media (max-width: 520px) {
    .hc-hdr__cta { display: none; }
    .hc-logo__txt { display: none; }
}

/* quando il pannello è aperto l'header resta nero */
body.hc-nav-open .hc-hdr {
    color: #fff;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    transform: none;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.hc-ftr {
    position: relative;
    background: var(--ink);
    color: #fff;
    overflow: hidden;
    --bg: var(--ink);
    --fg: #fff;
    --fg-soft: rgba(255,255,255,.74);
    --fg-muted: rgba(255,255,255,.5);
    --fg-faint: rgba(255,255,255,.3);
    --line: rgba(255,255,255,.11);
    --line-soft: rgba(255,255,255,.06);
    --surface: var(--ink-2);
    --surface-2: var(--ink-3);
    --invert-bg: #fff;
    --invert-fg: var(--ink);
}

/* CTA finale — una domanda sola, al centro, con tutto lo spazio che merita */
.hc-ftr__cta {
    position: relative;
    padding-block: clamp(70px, 9vw, 130px);
    border-bottom: 1px solid var(--line);
    text-align: center;
    overflow: hidden;
}

.hc-ftr__cta .bg-glow {
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 76vw;
}

.hc-ftr__cta-b { max-width: 60ch; margin-inline: auto; }

.hc-ftr__cta-t {
    margin: 0;
    font-size: clamp(1.9rem, 3.4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.hc-ftr__cta-q {
    margin: clamp(20px, 2.4vw, 30px) 0 0;
    font-family: var(--f-display);
    font-size: clamp(1.15rem, 1.9vw, 1.6rem);
    font-weight: 500;
    line-height: 1.42;
    letter-spacing: -.02em;
    color: var(--fg-soft);
    text-wrap: balance;
}

.hc-ftr__cta-row {
    justify-content: center;
    margin-top: clamp(30px, 3.4vw, 44px);
    gap: 14px;
}

/* firma personale sotto la CTA */
.hc-ftr__sig {
    justify-content: center;
    text-align: left;
    margin-top: clamp(30px, 3.4vw, 44px);
    padding-top: clamp(24px, 2.8vw, 34px);
    border-top: 1px solid var(--line);
}
@media (max-width: 460px) {
    .hc-ftr__sig { flex-direction: column; text-align: center; gap: 12px; }
    .hc-ftr__sig .sig__t { justify-items: center; }
}

/* colonne */
.hc-ftr__main {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, .8fr));
    gap: clamp(28px, 3.2vw, 48px);
    padding-block: clamp(56px, 6vw, 84px);
}

@media (max-width: 1120px) {
    .hc-ftr__main { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .hc-ftr__brand { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .hc-ftr__main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
    .hc-ftr__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .hc-ftr__main { grid-template-columns: minmax(0, 1fr); }
}

.hc-ftr__brand { max-width: 38ch; }
.hc-ftr__brand .hc-logo { margin-bottom: 22px; }
.hc-ftr__brand p {
    font-size: .94rem;
    line-height: 1.62;
    color: var(--fg-muted);
}

.hc-ftr__col-t {
    margin-bottom: 20px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--fg-faint);
}

.hc-ftr__col { display: grid; align-content: start; }
.hc-ftr__col a {
    padding: 7px 0;
    font-size: .93rem;
    color: var(--fg-muted);
    transition: color var(--t-fast), transform var(--t-fast);
}
.hc-ftr__col a:hover { color: var(--orange); transform: translateX(3px); }

/* social */
.hc-ftr__soc { display: flex; gap: 8px; margin-top: 26px; }
.hc-ftr__soc a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    color: var(--fg-muted);
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.hc-ftr__soc a:hover {
    color: var(--orange);
    border-color: rgba(255, 90, 31, .4);
    background: rgba(255, 90, 31, .08);
}
.hc-ftr__soc svg { width: 17px; height: 17px; }

/* barra legale */
.hc-ftr__bot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-block: 28px;
    border-top: 1px solid var(--line);
    font-size: .82rem;
    color: var(--fg-faint);
}
.hc-ftr__legal { display: flex; flex-wrap: wrap; gap: 22px; }
.hc-ftr__legal a { transition: color var(--t-fast); }
.hc-ftr__legal a:hover { color: var(--fg-soft); }

.hc-ftr__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
/* hc-pulse-g è definita in core.css, insieme a .pill--live */
.hc-ftr__status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: hc-pulse-g 2.6s var(--ease-io) infinite;
}

/* firma grande in fondo, tagliata dal bordo */
.hc-ftr__sign {
    position: relative;
    overflow: hidden;
    height: clamp(60px, 11vw, 150px);
    pointer-events: none;
}
.hc-ftr__sign span {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    font-family: var(--f-display);
    font-size: clamp(4rem, 16vw, 15rem);
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: .85;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, .09);
}

/* Il widget WhatsApp fisso non è più nel tema: in produzione lo mette un
   plugin dedicato, e due bottoni flottanti nello stesso angolo sarebbero
   finiti uno sopra l'altro. */
