:root {
    --stone-bg: #e6dcca;
    --stone-text: #798d7b;
    --accent-earth: #af8859;
    --gunmetal: #2a3439;
}

.fenix-home-active .bg-gunmetal { background-color: var(--gunmetal) !important; }
.fenix-home-active .bg-stone-bg { background-color: var(--stone-bg) !important; }
.fenix-home-active .bg-stone-text { background-color: var(--stone-text) !important; }
.fenix-home-active .bg-stone-text\/20 { background-color: rgba(121, 141, 123, 0.2) !important; }

.fenix-home-active .text-stone-bg { color: var(--stone-bg) !important; }
.fenix-home-active .text-stone-bg\/60 { color: rgba(230, 220, 202, 0.6) !important; }
.fenix-home-active .text-stone-bg\/70 { color: rgba(230, 220, 202, 0.7) !important; }
.fenix-home-active .text-stone-bg\/80 { color: rgba(230, 220, 202, 0.8) !important; }
.fenix-home-active .text-stone-bg\/90 { color: rgba(230, 220, 202, 0.9) !important; }

.fenix-home-active .text-stone-text { color: var(--stone-text) !important; }
.fenix-home-active .text-stone-text\/70 { color: rgba(121, 141, 123, 0.7) !important; }
.fenix-home-active .text-stone-text\/80 { color: rgba(121, 141, 123, 0.8) !important; }
.fenix-home-active .text-stone-text\/90 { color: rgba(121, 141, 123, 0.9) !important; }

.fenix-home-active .text-accent-earth,
.fenix-home-active .\!text-accent-earth { color: var(--accent-earth) !important; }

.fenix-home-active .text-gunmetal,
.fenix-home-active .\!text-gunmetal { color: var(--gunmetal) !important; }
.fenix-home-active .text-gunmetal\/30 { color: rgba(42, 52, 57, 0.3) !important; }
.fenix-home-active .text-gunmetal\/40 { color: rgba(42, 52, 57, 0.4) !important; }
.fenix-home-active .text-gunmetal\/70 { color: rgba(42, 52, 57, 0.7) !important; }

.fenix-home-active .border-stone-text\/10 { border-color: rgba(121, 141, 123, 0.1) !important; }
.fenix-home-active .border-stone-text\/20 { border-color: rgba(121, 141, 123, 0.2) !important; }
.fenix-home-active .border-gunmetal\/20 { border-color: rgba(42, 52, 57, 0.2) !important; }
.fenix-home-active .border-accent-earth\/20 { border-color: rgba(175, 136, 89, 0.2) !important; }
.fenix-home-active .border-white\/5 { border-color: rgba(255, 255, 255, 0.05) !important; }

.fenix-home-active .hover\:border-accent-earth:hover { border-color: var(--accent-earth) !important; }
.fenix-home-active .hover\:text-accent-earth:hover { color: var(--accent-earth) !important; }
.fenix-home-active .hover\:text-gunmetal:hover { color: var(--gunmetal) !important; }
.fenix-home-active .focus\:border-accent-earth:focus { border-color: var(--accent-earth) !important; }

body.fenix-home-active {
    background-color: var(--stone-bg);
    color: var(--stone-text);
    overflow-x: hidden;
    cursor: default;
}

body.fenix-home-active.fenix-menu-open {
    overflow: hidden;
}

body.fenix-home-active #main-content,
body.fenix-home-active #main-content > .container,
body.fenix-home-active #left-area,
body.fenix-home-active .et-l--post,
body.fenix-home-active .et_builder_inner_content,
body.fenix-home-active .et-l--post .et_pb_section,
body.fenix-home-active .et-l--post .et_pb_row,
body.fenix-home-active .et-l--post .et_pb_column,
body.fenix-home-active .et-l--post .et_pb_module,
body.fenix-home-active .et-l--post .et_pb_text_inner,
body.fenix-home-active .entry-content,
body.fenix-home-active article,
body.fenix-home-active .post {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body.fenix-home-active #main-content .container::before {
    display: none;
}

body.fenix-home-active .et-l--post .et_pb_section,
body.fenix-home-active .et-l--post .et_pb_row,
body.fenix-home-active .et-l--post .et_pb_column,
body.fenix-home-active .et-l--post .et_pb_module {
    min-height: 0;
}

body.fenix-home-active .et-l--post .et_pb_row::after,
body.fenix-home-active .et-l--post .et_pb_row::before {
    display: none;
}

body.fenix-home-active .et-l--post .et_pb_row,
body.fenix-home-active .et-l--post .et_pb_column {
    float: none;
}

body.fenix-home-active .fenix-home-shell.et_pb_section,
body.fenix-home-active .fenix-home-row.et_pb_row,
body.fenix-home-active .fenix-home-col.et_pb_column,
body.fenix-home-active .fenix-home-module.et_pb_module {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body.fenix-home-active .fenix-home-row.et_pb_row {
    display: block;
}

body.fenix-home-active .fenix-home-col.et_pb_column {
    float: none;
}

body.fenix-home-active .et_pb_post .entry-content {
    padding-top: 0;
}

body.fenix-home-active .et_pb_post {
    margin-bottom: 0;
}

body.fenix-home-active .post-meta,
body.fenix-home-active .entry-title,
body.fenix-home-active .main_title,
body.fenix-home-active #sidebar {
    display: none;
}

/*
 * Reset tag-level su .fenix-home-active. Avvolto in :where() → specificity 0,0,0
 * così le utility Tailwind (0,1,0) vincono senza bisogno del prefisso !important.
 */
:where(.fenix-home-active a,
.fenix-home-active abbr,
.fenix-home-active acronym,
.fenix-home-active address,
.fenix-home-active applet,
.fenix-home-active b,
.fenix-home-active big,
.fenix-home-active blockquote,
.fenix-home-active body,
.fenix-home-active button,
.fenix-home-active center,
.fenix-home-active cite,
.fenix-home-active code,
.fenix-home-active dd,
.fenix-home-active del,
.fenix-home-active dfn,
.fenix-home-active div,
.fenix-home-active dl,
.fenix-home-active dt,
.fenix-home-active em,
.fenix-home-active fieldset,
.fenix-home-active font,
.fenix-home-active form,
.fenix-home-active h1,
.fenix-home-active h2,
.fenix-home-active h3,
.fenix-home-active h4,
.fenix-home-active h5,
.fenix-home-active h6,
.fenix-home-active i,
.fenix-home-active iframe,
.fenix-home-active img,
.fenix-home-active ins,
.fenix-home-active kbd,
.fenix-home-active label,
.fenix-home-active legend,
.fenix-home-active li,
.fenix-home-active object,
.fenix-home-active ol,
.fenix-home-active p,
.fenix-home-active pre,
.fenix-home-active q,
.fenix-home-active s,
.fenix-home-active samp,
.fenix-home-active section,
.fenix-home-active small,
.fenix-home-active span,
.fenix-home-active strike,
.fenix-home-active strong,
.fenix-home-active sub,
.fenix-home-active sup,
.fenix-home-active tt,
.fenix-home-active u,
.fenix-home-active ul,
.fenix-home-active var) {
    margin: 0;
    border: 0;
    outline: 0;
    vertical-align: baseline;
}

:where(.fenix-home-active p,
.fenix-home-active h1,
.fenix-home-active h2,
.fenix-home-active h3,
.fenix-home-active h4,
.fenix-home-active h5,
.fenix-home-active h6) {
    padding-bottom: 0;
}

:where(.fenix-home-active ol,
.fenix-home-active ul) {
    list-style: none;
}

:where(.fenix-home-active button,
.fenix-home-active input,
.fenix-home-active select,
.fenix-home-active textarea) {
    font-family: inherit;
}

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

::selection {
    background: var(--accent-earth);
    color: var(--stone-bg);
}

.fenix-nav-logo {
    width: min(132px, 22vw);
    height: auto;
    display: block;
}

.fenix-nav-left {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.fenix-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(230, 220, 202, 0.94);
    cursor: none;
}

.fenix-menu-icon {
    width: 22px;
    height: 22px;
    overflow: visible;
}

.menu-line {
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 52;
    stroke-dashoffset: 52;
    transform-origin: center;
    transform-box: fill-box;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease, stroke-dashoffset 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-line-top {
    animation: fenixMenuTop 2.8s cubic-bezier(0.25, 1, 0.75, 0) infinite;
}

.menu-line-middle {
    animation: fenixMenuMiddle 2.8s cubic-bezier(0.25, 1, 0.75, 0) infinite;
}

.menu-line-bottom {
    animation: fenixMenuBottom 2.8s cubic-bezier(0.25, 1, 0.75, 0) infinite;
}

.fenix-menu-trigger.is-open .menu-line {
    animation: none;
    stroke-dashoffset: 0;
}

.fenix-menu-trigger.is-closing .menu-line {
    animation: none;
    stroke-dashoffset: 0;
}

.fenix-menu-trigger.is-open .menu-line-top {
    transform: translateY(5px) rotate(45deg);
}

.fenix-menu-trigger.is-open .menu-line-middle {
    opacity: 0;
    transform: scaleX(0.6);
}

.fenix-menu-trigger.is-open .menu-line-bottom {
    transform: translateY(-5px) rotate(-45deg);
}

.fenix-menu-trigger.is-closing .menu-line-top {
    transform: translateY(0) rotate(0deg);
}

.fenix-menu-trigger.is-closing .menu-line-middle {
    opacity: 1;
    transform: scaleX(1);
}

.fenix-menu-trigger.is-closing .menu-line-bottom {
    transform: translateY(0) rotate(0deg);
}

@keyframes fenixMenuTop {
    0%, 14% { stroke-dashoffset: 52; transform: translateY(0); }
    34%, 58% { stroke-dashoffset: 0; transform: translateY(0); }
    76% { stroke-dashoffset: 0; transform: translateY(5px); }
    100% { stroke-dashoffset: 52; transform: translateY(0); }
}

@keyframes fenixMenuMiddle {
    0%, 20% { stroke-dashoffset: 52; opacity: 1; transform: scaleX(1); }
    36%, 58% { stroke-dashoffset: 0; opacity: 1; transform: scaleX(1); }
    76% { stroke-dashoffset: 0; opacity: 0; transform: scaleX(0.6); }
    100% { stroke-dashoffset: 52; opacity: 1; transform: scaleX(1); }
}

@keyframes fenixMenuBottom {
    0%, 8% { stroke-dashoffset: 52; transform: translateY(0); }
    30%, 58% { stroke-dashoffset: 0; transform: translateY(0); }
    76% { stroke-dashoffset: 0; transform: translateY(-5px); }
    100% { stroke-dashoffset: 52; transform: translateY(0); }
}

#fenix-menu-panel {
    position: fixed;
    inset: 0;
    z-index: 45;
    display: none;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(42, 52, 57, 0.84) 0%, rgba(42, 52, 57, 0.58) 38%, rgba(42, 52, 57, 0.2) 100%);
    backdrop-filter: blur(8px);
}

.fenix-menu-panel-inner {
    position: relative;
    width: min(360px, 84vw);
    height: 100%;
    padding: 7.4rem 2.2rem 2.5rem;
    background: rgba(42, 52, 57, 0.8);
    border-right: 1px solid rgba(230, 220, 202, 0.16);
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.fenix-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.25rem;
}

.fenix-menu-link {
    position: relative;
    color: rgba(230, 220, 202, 0.92);
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    letter-spacing: 0.04em;
    line-height: 1.2;
    display: inline-block;
    padding: 0.2rem 0;
    width: fit-content;
    transition: color 0.45s ease, transform 0.55s cubic-bezier(0.19, 1, 0.22, 1);
}

.fenix-menu-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.16rem;
    width: 0;
    height: 1px;
    background-color: rgba(175, 136, 89, 0.9);
    transition: width 0.58s cubic-bezier(0.19, 1, 0.22, 1);
}

.fenix-menu-link:hover {
    color: rgba(175, 136, 89, 1);
    transform: translateX(7px);
}

.fenix-menu-link:hover::after {
    width: 100%;
}

.fenix-menu-divider {
    position: relative;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(175, 136, 89, 0.58) 0%, rgba(175, 136, 89, 0.14) 74%, rgba(175, 136, 89, 0) 100%);
    margin-top: 0.15rem;
    overflow: hidden;
}

.fenix-menu-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(230, 220, 202, 0.85) 50%, transparent 100%);
    transform: translateX(-100%);
    animation: fenixDividerShimmer 4.5s cubic-bezier(0.55, 0, 0.1, 1) infinite;
    pointer-events: none;
}

@keyframes fenixDividerShimmer {
    0%   { transform: translateX(-100%); }
    55%  { transform: translateX(260%); }
    100% { transform: translateX(260%); }
}

@media (prefers-reduced-motion: reduce) {
    .fenix-menu-divider::after {
        animation: none;
        display: none;
    }
}

.fenix-menu-contact {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    padding-bottom: 4.8rem;
}

.fenix-menu-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
    width: fit-content;
    color: rgba(230, 220, 202, 0.82);
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.09em;
    transition: color 0.34s ease, transform 0.34s ease;
}

.fenix-menu-contact-item svg {
    width: 15px;
    height: 15px;
    stroke: rgba(175, 136, 89, 0.95);
    stroke-width: 1.6;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.32s ease, stroke 0.32s ease;
}

.fenix-menu-contact-item:hover {
    color: rgba(230, 220, 202, 0.98);
    transform: translateX(2px);
}

.fenix-menu-contact-item:hover svg {
    transform: scale(1.05);
    stroke: rgba(230, 220, 202, 0.95);
}

.fenix-menu-close-bubble {
    position: absolute;
    right: 1.45rem;
    bottom: 1.5rem;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(230, 220, 202, 0.16);
    border-radius: 50%;
    background: transparent;
    color: rgba(230, 220, 202, 0.82);
    cursor: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: color 0.6s cubic-bezier(0.19, 1, 0.22, 1), border-color 0.6s ease, transform 0.32s ease;
}

.fenix-menu-close-bubble::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-color: var(--stone-bg);
    transform: scale(0);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 0;
}

.fenix-menu-close-bubble svg {
    position: relative;
    z-index: 1;
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.75;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fenix-menu-close-bubble:hover {
    border-color: var(--stone-bg);
    color: var(--gunmetal);
    transform: translateX(-2px);
}

.fenix-menu-close-bubble:hover::before {
    transform: scale(1);
}

.fenix-menu-close-bubble:hover svg {
    transform: translateX(-2px) scale(1.08);
}

.nav-scrolled .fenix-menu-trigger {
    color: rgba(42, 52, 57, 0.88);
}

body.fenix-menu-open #navbar .btn-elegant {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

@media (max-width: 767px) {
    .fenix-nav-left {
        gap: 0.6rem;
    }

    .fenix-menu-trigger {
        width: 38px;
        height: 38px;
    }

    .fenix-menu-icon {
        width: 20px;
        height: 20px;
    }

    .fenix-menu-panel-inner {
        width: min(330px, 88vw);
        padding: 6.1rem 1.5rem 2rem;
    }

    .fenix-menu-links {
        margin-top: 1.05rem;
    }

    .fenix-menu-contact {
        gap: 0.82rem;
        padding-bottom: 4.55rem;
    }

    .fenix-menu-contact-item {
        font-size: 0.73rem;
        letter-spacing: 0.08em;
    }

    .fenix-menu-close-bubble {
        right: 1rem;
        bottom: 1.15rem;
        width: 42px;
        height: 42px;
    }
}

.fenix-footer-logo {
    width: min(148px, 32vw);
    height: auto;
    display: block;
}

.fenix-footer-logo-center {
    width: min(220px, 40vw);
    height: auto;
    display: block;
}

.fenix-footer-logo {
    width: min(220px, 44vw);
    height: auto;
    display: block;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    margin-top: -1.5rem;
}

.footer-quote {
    max-width: 16rem;
    color: rgba(230, 220, 202, 0.78);
    font-family: 'Manrope', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    line-height: 1.9;
    text-transform: uppercase;
}

.footer-grid {
    width: 100%;
    max-width: 1050px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
    justify-items: center;
}

.fenix-home-active .footer-grid {
    margin: 0 auto !important;
}

.footer-col {
    flex: 0 1 auto;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-col h4 {
    padding-bottom: 1.25rem;
}

.footer-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 1rem;
}

.footer-bottom {
    width: 100%;
    max-width: 1050px;
}

.fenix-home-active .footer-bottom {
    margin: 0 auto !important;
}

.footer-bottom-social {
    display: flex;
    gap: 1rem;
    justify-self: center;
}

.footer-bottom-cta {
    justify-self: center;
}

.footer-copyright {
    margin: 0;
    text-align: center;
    justify-self: center;
}

.split-text {
    visibility: hidden;
}

.split-text.is-ready {
    visibility: visible;
}

.word-wrapper {
    display: inline-block;
    vertical-align: top;
}

.word-inner {
    display: inline-block;
    transform-origin: bottom left;
    opacity: 0;
    filter: blur(12px);
    transform: translateY(0.6em);
    will-change: transform, opacity, filter;
}

.img-mask {
    overflow: hidden;
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    position: relative;
}

.img-parallax {
    width: 100%;
    height: 130%;
    object-fit: cover;
    position: absolute;
    top: -15%;
    left: 0;
    transform-origin: center;
}

.filosofia-grid {
    max-width: 1320px;
    margin-left: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 6rem);
    padding-right: clamp(2rem, 5vw, 5rem);
}

.filosofia-media {
    margin-left: calc(50% - 50vw);
}

.filosofia-image-shell {
    width: 100%;
    height: clamp(520px, 74vh, 900px);
    background: rgba(42, 52, 57, 0.08);
}

.filosofia-image {
    object-position: center center;
    filter: saturate(0.96) contrast(1.02);
}

.filosofia-copy {
    max-width: 42rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

@media (max-width: 980px) {
    .filosofia-grid {
        grid-template-columns: 1fr;
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .filosofia-media {
        margin-left: 0;
    }

    .filosofia-image-shell {
        height: 68vh;
    }

    .filosofia-copy {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .filosofia-section {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }

    .filosofia-grid {
        gap: 2.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .filosofia-image-shell {
        height: 56vh;
    }
}

.bubble-window {
    border-radius: 50%;
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

.bubble-img-wrapper {
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#hero-video-shell {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    will-change: transform, width, height, border-radius, opacity;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 0;
    background: var(--gunmetal);
}

#hero-bg {
    width: 100%;
    height: 100%;
    will-change: transform, opacity;
    transform-origin: center center;
    object-position: center center;
    transform: scale(1.02);
}

.hero-video-vignette {
    background:
        radial-gradient(circle at center, rgba(0, 0, 0, 0) 36%, rgba(0, 0, 0, 0.04) 62%, rgba(0, 0, 0, 0.12) 100%);
    opacity: 0.18;
    will-change: opacity;
}

@media (pointer: fine) {
    body.fenix-home-active {
        cursor: none;
    }
}

#magic-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 48px;
    height: 48px;
    background-color: var(--accent-earth);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    will-change: transform, opacity;
    opacity: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.magic-cursor-audio {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.magic-cursor-audio-icon {
    position: absolute;
    width: 12px;
    height: 12px;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

#magic-cursor.is-audio-toggle {
    width: 38px;
    height: 38px;
    background: rgba(42, 52, 57, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.72);
    color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

#magic-cursor.is-footer-mode {
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.62);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(4px);
}

#magic-cursor.is-footer-mode .magic-cursor-audio {
    opacity: 0;
    transform: scale(0.8);
}

#magic-cursor.is-audio-toggle .magic-cursor-audio {
    opacity: 1;
    transform: scale(1);
}

#magic-cursor.is-audio-toggle.is-muted .icon-sound-on,
#magic-cursor.is-audio-toggle.is-unmuted .icon-sound-off {
    opacity: 1;
    transform: scale(1);
}

.reveal-layer {
    clip-path: circle(var(--clip-size, 0px) at var(--clip-x, 50%) var(--clip-y, 50%));
    -webkit-clip-path: circle(var(--clip-size, 0px) at var(--clip-x, 50%) var(--clip-y, 50%));
}

@supports (-moz-appearance: none) {
    .reveal-layer {
        will-change: clip-path;
        contain: paint;
        transform: translateZ(0);
    }
}

.menu-row {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-row:hover {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.hover-img {
    position: fixed;
    top: 0;
    left: 0;
    width: 360px;
    height: 360px;
    object-fit: cover;
    pointer-events: none;
    opacity: 0;
    z-index: 5;
    transform: translate(-50%, -50%) scale(0.8);
    border-radius: 50%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    filter: brightness(0.9);
    will-change: transform, opacity;
}

.btn-elegant {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    overflow: hidden;
    transition: border-color 0.8s ease;
    cursor: none;
}

.btn-elegant::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 1.1s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 0;
}

.btn-elegant:hover::before {
    transform: scaleY(1);
}

.btn-elegant .btn-text {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    text-align: center;
    padding-left: 0.3em;
    color: #ffffff;
    font-family: 'Manrope', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.8s ease;
}

.btn-elegant:hover .btn-text {
    color: var(--gunmetal);
}

.social-bubble-btn {
    position: relative;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(230, 220, 202, 0.6);
    overflow: hidden;
    transition: color 0.6s cubic-bezier(0.19, 1, 0.22, 1), border-color 0.6s ease;
}

.social-bubble-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--stone-bg);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 0;
}

.social-bubble-btn:hover::before {
    transform: scale(1);
}

.social-bubble-btn svg {
    position: relative;
    z-index: 1;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-bubble-btn:hover svg {
    transform: scale(1.1);
    color: var(--gunmetal);
}

.social-bubble-btn:hover {
    border-color: var(--stone-bg);
}

.link-reveal {
    position: relative;
    display: inline-block;
    min-width: 260px;
    padding: 8px 16px;
    color: var(--accent-earth);
    font-family: 'Manrope', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.75rem;
    cursor: none;
    transition: color 0.4s ease;
    text-align: center;
    z-index: 1;
    white-space: nowrap;
}

.link-reveal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background-color: rgba(175, 136, 89, 0.7);
    transition: height 0.6s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
    transform-origin: bottom;
}

.link-reveal:hover {
    color: var(--stone-bg);
}

.link-reveal:hover::after {
    height: 100%;
    opacity: 1;
}

.contact-underline {
    position: relative;
    display: inline-block;
    transition: color 0.4s ease;
}

.contact-underline::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-earth);
    transition: width 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.contact-underline:hover::after {
    width: 100%;
}

.nav-scrolled .btn-elegant {
    border-top-color: rgba(42, 52, 57, 0.2);
    border-bottom-color: rgba(42, 52, 57, 0.2);
}

.nav-scrolled .btn-elegant::before {
    background-color: rgba(42, 52, 57, 0.4);
}

.nav-scrolled .btn-elegant .btn-text {
    color: var(--gunmetal);
}

.nav-scrolled .btn-elegant:hover .btn-text {
    color: var(--stone-bg);
}

footer .btn-elegant {
    border-top-color: rgba(175, 136, 89, 0.3);
    border-bottom-color: rgba(175, 136, 89, 0.3);
}

footer .btn-elegant::before {
    background-color: rgb(175 136 89 / 88%);
}

footer .btn-elegant .btn-text {
    color: var(--stone-bg);
}

footer .btn-elegant:hover .btn-text {
    color: var(--gunmetal);
}

@media (max-width: 980px) {
    .footer-grid {
        flex-direction: column;
        align-items: center;
        gap: 4rem;
    }

    .footer-col {
        max-width: 420px;
    }

    .footer-bottom-row {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .footer-bottom-social,
    .footer-bottom-cta {
        justify-self: center;
    }
}

#ai-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(42, 52, 57, 0.8);
    backdrop-filter: blur(15px);
    z-index: 100;
    opacity: 0;
}

.ai-modal-content {
    background: var(--stone-bg);
    max-width: 600px;
    width: 90%;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 3rem;
    border: 1px solid var(--accent-earth);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
}

#ai-response {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
}

#ai-response::-webkit-scrollbar {
    width: 4px;
}

#ai-response::-webkit-scrollbar-thumb {
    background: var(--accent-earth);
}

.loader-dots span {
    animation: bounce 0.6s infinite alternate;
    background: var(--accent-earth);
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin: 0 2px;
}

.loader-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    to {
        transform: translateY(-10px);
    }
}

.menu-bg-line-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.menu-bg-line {
    stroke: white;
    stroke-width: 1px;
    fill: none;
    opacity: 0.4;
}

::-webkit-scrollbar {
    display: none;
}

body.admin-bar.fenix-home-active #navbar {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar.fenix-home-active #navbar {
        top: 46px;
    }
}

/* ==========================================================================
   Visual Builder Divi — overrides per editing
   Quando il body ha .et-fb (VB attivo) o .et_fb_iframe, neutralizziamo
   le strutture che dipendono da JS (pin, scrub, sticky, overflow:hidden con
   contenuto orizzontale, overlay) per dare visibilità completa di ogni blocco.
   ========================================================================== */

/* Hero — riduci a altezza pulita per editing (resta full-screen comunque) */
body.et-fb #hero-collapse,
body.et_fb_iframe #hero-collapse {
    height: auto !important;
    min-height: 100vh;
}
body.et-fb #hero-collapse .sticky,
body.et_fb_iframe #hero-collapse .sticky {
    position: relative !important;
    top: auto !important;
}
body.et-fb #hero-video-shell,
body.et_fb_iframe #hero-video-shell {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    opacity: 1 !important;
    min-height: 100vh;
}
body.et-fb .hero-video-vignette,
body.et_fb_iframe .hero-video-vignette {
    opacity: 0.22 !important;
}

/* Dual Reveal — disattiva l'overlay scuro che copre tutto il contenuto base */
body.et-fb .reveal-layer,
body.et_fb_iframe .reveal-layer {
    display: none !important;
}

/* Bubble — non occupare 200vh in editing, e disattiva sticky per vedere il contenuto in flusso */
body.et-fb #bubble-trigger,
body.et_fb_iframe #bubble-trigger {
    height: auto !important;
    min-height: 100vh;
}
body.et-fb #bubble-trigger .sticky,
body.et_fb_iframe #bubble-trigger .sticky {
    position: relative !important;
    top: auto !important;
}
body.et-fb .bubble-window,
body.et_fb_iframe .bubble-window {
    width: 60vw !important;
    height: 50vh !important;
}

/* Horizontal Gallery — converti la striscia orizzontale in griglia 2 colonne per editing */
body.et-fb #horizontal-sec,
body.et_fb_iframe #horizontal-sec {
    height: auto !important;
    overflow: visible !important;
    padding: 4rem 0;
}
body.et-fb #horizontal-sec .horizontal-container,
body.et_fb_iframe #horizontal-sec .horizontal-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    width: 100% !important;
    gap: 1rem !important;
    padding: 0 2rem !important;
}
body.et-fb #horizontal-sec .horizontal-container > div,
body.et_fb_iframe #horizontal-sec .horizontal-container > div {
    width: 100% !important;
    height: 50vh !important;
    flex: none !important;
}
body.et-fb #horizontal-sec .horizontal-container > div:last-child,
body.et_fb_iframe #horizontal-sec .horizontal-container > div:last-child {
    display: none !important; /* spacer finale */
}

body.et-fb .filosofia-grid,
body.et_fb_iframe .filosofia-grid {
    grid-template-columns: 1fr !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

body.et-fb .filosofia-media,
body.et_fb_iframe .filosofia-media {
    margin-left: 0 !important;
}

/* AI Modal — nascondilo nel VB, è un overlay che coprirebbe tutto */
body.et-fb #ai-modal,
body.et_fb_iframe #ai-modal,
body.et-fb #magic-cursor,
body.et_fb_iframe #magic-cursor {
    display: none !important;
}

/* Navbar — non fissarla nel VB, scorre col contenuto per non coprire altri moduli */
body.et-fb .fenix-home-active #navbar,
body.et_fb_iframe .fenix-home-active #navbar {
    position: relative !important;
    top: auto !important;
}

/* Cursor-none su dual-reveal-section — riattiva il cursor normale per editing */
body.et-fb .dual-reveal-section,
body.et_fb_iframe .dual-reveal-section {
    cursor: auto !important;
}

/* Indicatore visivo: badge "Sezione Fenix" su ogni Code Module che contiene contenuto Fenix */
body.et-fb .et_pb_code:has(.fenix-home-active),
body.et_fb_iframe .et_pb_code:has(.fenix-home-active) {
    outline: 1px dashed rgba(175, 136, 89, 0.4);
    outline-offset: 4px;
}

/* Strong footer CTA hover fill override */
footer .btn-elegant:hover::before {
    background-color: rgb(175 136 89 / 100%) !important;
    opacity: 1 !important;
}

/* I Crudi Fenix: il child theme definisce su .img-mask un box-shadow + fondo sage.
   La shadow viene tagliata dal clip-path rettangolare che GSAP applica a tutte le
   .img-mask come reveal animation → "rettangolo" scuro visibile dietro la pillola.
   Rimuoviamo entrambi: la pillola resta pulita su qualsiasi sfondo. */
body.fenix-home-active #menu-section.fenix-gemini-menu-section .img-mask {
    box-shadow: none !important;
    background-color: transparent !important;
}

/* I Crudi Fenix: hover swap preview img.
   Il child theme definisce .menu-preview-img a opacity:0/visibility:hidden ma non
   ha la regola .is-active per il pattern .fenix-gemini-menu-section. Aggiunta qui.
   Note: visibility non transita "smooth" → uso visibility 0s con delay = durata
   opacity sull'uscita, 0s istantaneo sull'entrata. Cross-fade + zoom-in soft. */
body.fenix-home-active #menu-section.fenix-gemini-menu-section .menu-preview-img {
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0.7s;
    transform: scale(1.06);
}
body.fenix-home-active #menu-section.fenix-gemini-menu-section .menu-preview-img.is-active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.9s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s linear 0s;
}

/* Fire Sequence: sezione 300vh con wrapper interno position:sticky.
   Sticky tiene il video fisso nel viewport per 200vh di scroll mentre GSAP
   scrubba currentTime. Pattern CSS native (no GSAP pin) per massima
   compatibilità mobile/touch — niente conflitti con Lenis smooth scroll. */
.fenix-fire-seq {
    position: relative;
    width: 100%;
    height: 300vh;
    background-color: #2a3439;
}
.fenix-fire-seq__sticky {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #2a3439;
}
.fenix-fire-seq__video,
.fenix-fire-seq__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
/* Default: video visibile su desktop, canvas nascosto. */
.fenix-fire-seq__canvas {
    display: none;
    background-color: #2a3439;
}
/* Mobile (touch device <=768px): canvas image-sequence al posto del <video>.
   Pattern Apple AirPods Pro: scroll-scrub via canvas drawImage frame-by-frame
   bypassa il decoder mobile (frame perfect anche su Android Chrome / iOS Safari). */
@media only screen and (max-width: 768px) {
    .fenix-fire-seq__video {
        display: none;
    }
    .fenix-fire-seq__canvas {
        display: block;
    }
}

/* ─── Fix sfarfallio Chrome/Chromium (aggiunto 29/05) ─────────────────────────
   Su Blink, `cursor: none` (usato per nascondere il cursore nativo a favore del
   pallino magico) fa ridipingere i layer compositati (footer, gallery, ...) ad
   ogni movimento del mouse → sfarfallio. Su Firefox/Safari non accade.
   La classe `fenix-cursor-native` (aggiunta su <html> via inline script nel <head>
   solo per Chromium) ripristina il cursore nativo: niente più sfarfallio, e il
   pallino resta comunque visibile. Firefox/Safari NON ricevono la classe → design
   originale invariato (solo pallino). */
html.fenix-cursor-native body.fenix-home-active,
html.fenix-cursor-native body.fenix-home-active * {
    cursor: auto !important;
}
html.fenix-cursor-native body.fenix-home-active a,
html.fenix-cursor-native body.fenix-home-active button,
html.fenix-cursor-native body.fenix-home-active [role="button"],
html.fenix-cursor-native body.fenix-home-active .et_pb_button,
html.fenix-cursor-native body.fenix-home-active input[type="submit"],
html.fenix-cursor-native body.fenix-home-active label[for] {
    cursor: pointer !important;
}
