/* ==========================================================================
   0. VARIABILI GLOBALI & RESET
   ========================================================================== */
:root {
    --bg-dark: #0d1812;
    --bg-darker: #070c09;
    --surface: #16241c;
    --green-deep: #1f7a4d;
    --green-mid: #36b56e;
    --green-bright: #7be8a4;
    --gradient-green: linear-gradient(115deg, var(--green-deep) 0%, var(--green-mid) 55%, var(--green-bright) 100%);
    --green-soft: rgba(54, 181, 110, 0.16);
    --gold: #ffc857;
    --orange-progress: #ff7a30;
    --blue-logo: #2e9fe0;
    --red-closed: #e0524a;
    --cream: #f7f5ec;
    --cream-2: #efece0;
    --ink: #11140f;
    --ink-soft: #5e695f;
    --accent: #2f7a52;
    --white: #ffffff;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 110px;
}

body {
    font-family: var(--font-body);
    background-color: var(--cream);
    color: var(--ink);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: default;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ==========================================================================
   1. UTILITY: SCROLL PROGRESS, CURSORE, REVEAL
   ========================================================================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: var(--gradient-green);
    z-index: 2000;
    transition: width 0.1s linear;
}

.cursor-ring {
    position: fixed;
    top: -18px;
    left: -18px;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--green-bright);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1999;
    opacity: 0;
    transition: width 0.25s ease, height 0.25s ease, margin 0.25s ease, opacity 0.3s ease, background 0.25s ease;
    mix-blend-mode: difference;
}

.cursor-ring.hover {
    width: 64px;
    height: 64px;
    top: -32px;
    left: -32px;
    background: rgba(123, 232, 164, 0.14);
}

.reveal,
.reveal-img {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.reveal.is-visible,
.reveal-img.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.eyebrow {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-head {
    max-width: 740px;
    margin: 0 auto 70px;
    text-align: center;
}

.section-head.light {
    color: var(--cream);
}

.section-head.light .eyebrow {
    color: var(--green-bright);
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto;
}

.section-head.light .section-desc {
    color: rgba(247, 245, 236, 0.65);
}

/* ==========================================================================
   2. BOTTONI
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 50px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s ease, background-position 0.5s ease, color 0.35s ease, border-color 0.35s ease;
}

.btn-primary {
    background: var(--gradient-green);
    background-size: 160% 160%;
    background-position: 0% 50%;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(54, 181, 110, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(54, 181, 110, 0.4);
    background-position: 100% 50%;
}

.btn-ghost {
    background: transparent;
    color: var(--cream);
    border: 1.5px solid rgba(247, 245, 236, 0.28);
}

.btn-ghost:hover {
    border-color: var(--green-bright);
    color: var(--green-bright);
    transform: translateY(-3px);
}

.btn-block {
    width: 100%;
    margin-top: 6px;
}

/* ==========================================================================
   3. NAVBAR
   ========================================================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 26px 0;
    transition: padding 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    padding: 14px 0;
    background-color: rgba(13, 24, 18, 0.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.nav-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 6vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--cream);
}

.nav-logo img {
    height: 64px;
    width: auto;
}

.hero-logo {
    position: absolute;
    top: 110px;
    right: 6vw;
    z-index: 5;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.4s ease;
    display: none;
}

.hero-logo img {
    height: clamp(140px, 14vw, 230px);
    width: auto;
}

@media (min-width: 901px) {
    .hero-logo {
        display: block;
    }

    .hero {
        align-items: flex-start;
    }

    .hero-content {
        padding-top: 110px;
    }

    .hero-content::before {
        content: '';
        display: block;
        flex-shrink: 0;
        height: clamp(140px, 14vw, 230px);
    }

    body.in-hero .nav-logo {
        opacity: 0;
        pointer-events: none;
    }

    body:not(.in-hero) .hero-logo {
        opacity: 0;
        pointer-events: none;
    }
}

.nav-links {
    display: flex;
    gap: 34px;
    list-style: none;
}

.nav-links a {
    position: relative;
    color: rgba(247, 245, 236, 0.78);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 2px;
    background: var(--gradient-green);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lang-switch {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 30px;
    padding: 4px;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    color: rgba(247, 245, 236, 0.6);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 7px 13px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-btn .flag {
    font-size: 1rem;
}

.lang-btn.active,
.lang-btn:hover {
    background: var(--gradient-green);
    color: #ffffff;
}

.nav-cta {
    padding: 11px 24px;
    font-size: 0.78rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--cream);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   4. HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100vh;
    background: var(--bg-dark);
    color: var(--cream);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-visual {
    position: absolute;
    inset: -5% -5% -5% -5%;
    clip-path: polygon(0 0, 64% 0, 50% 100%, 0 100%);
    will-change: transform;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: -8%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 1.6s var(--ease), transform 6s linear;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1.16);
    z-index: 1;
}

.hero-visual-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(200deg, rgba(31, 122, 77, 0.25) 0%, rgba(7, 12, 9, 0.35) 60%, rgba(7, 12, 9, 0.7) 100%);
    z-index: 2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, rgba(7, 12, 9, 0.05) 0%, rgba(7, 12, 9, 0.55) 45%, var(--bg-dark) 66%);
    z-index: 1;
}

.hero-roi-cta {
    position: absolute;
    bottom: 8%;
    left: 6%;
    z-index: 5;
    animation: pulse-glow 2.6s ease-in-out infinite;
}

.nav-roi-link {
    display: none;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 10px 30px rgba(54, 181, 110, 0.3); }
    50% { box-shadow: 0 10px 40px rgba(123, 232, 164, 0.55); }
}

.hero-content {
    position: relative;
    z-index: 4;
    width: min(640px, 92%);
    margin-left: auto;
    margin-right: 6vw;
    padding-top: 110px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    text-align: right;
    align-items: flex-end;
}

.hero-content .eyebrow {
    color: var(--green-bright);
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.2s both;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    line-height: 1.08;
    letter-spacing: -2px;
}

.hero-title .line {
    display: block;
    overflow: hidden;
}

.hero-title .word {
    display: inline-block;
    animation: revealWord 1s var(--ease) both;
}

.hero-title .line:nth-child(1) .word { animation-delay: 0.15s; }
.hero-title .line:nth-child(2) .word { animation-delay: 0.3s; }
.hero-title .line:nth-child(3) .word { animation-delay: 0.45s; }

.word-accent {
    background: var(--gradient-green);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes revealWord {
    from { transform: translateY(110%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-sub {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(247, 245, 236, 0.78);
    max-width: 480px;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.6s both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
    opacity: 0;
    animation: fadeUp 0.8s var(--ease) 0.75s both;
}

/* ==========================================================================
   5. MARQUEE
   ========================================================================== */
.marquee {
    background: var(--gradient-green);
    color: #ffffff;
    overflow: hidden;
    padding: 18px 0;
    white-space: nowrap;
}

.marquee-track {
    display: inline-flex;
    align-items: center;
    animation: marqueeScroll 32s linear infinite;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 1px;
}

.marquee-group {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    padding-right: 28px;
}

.marquee-track i {
    font-style: normal;
    font-size: 0.6rem;
    opacity: 0.4;
}

@keyframes marqueeScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ==========================================================================
   6. MANIFESTO
   ========================================================================== */
.manifesto {
    background-color: rgb(13, 18, 14);
    min-height: 130vh;
    position: relative;
}

.manifesto-inner {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 6vw;
    width: 100%;
}

.manifesto-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.manifesto-text-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.manifesto-video-col {
    width: 100%;
    display: flex;
    justify-content: center;
}

.manifesto-video-frame {
    position: relative;
    width: 100%;
    max-width: 520px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.manifesto-video {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #000;
}

.video-controls {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(13, 18, 14, 0.55);
    backdrop-filter: blur(6px);
    border-radius: 30px;
    padding: 8px 14px;
}

.video-mute-btn {
    background: none;
    border: none;
    color: var(--cream);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.video-mute-btn svg {
    width: 20px;
    height: 20px;
}

.video-volume {
    width: 70px;
    accent-color: var(--green-bright);
    cursor: pointer;
}

.manifesto-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.3rem, 2vw, 1.9rem);
    line-height: 1.55;
    letter-spacing: 0.2px;
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

@media (min-width: 901px) {
    .manifesto-grid {
        flex-direction: row;
        align-items: center;
        gap: 60px;
    }

    .manifesto-video-col {
        order: -1;
        flex: 1;
    }

    .manifesto-text-col {
        flex: 1;
    }

    .manifesto-video-frame {
        max-width: 680px;
    }
}

.m-word {
    color: transparent;
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease, color 0.6s ease;
}

.m-word.lit {
    color: var(--cream);
    opacity: 1;
    transform: translateY(0);
}

.manifesto-signature {
    align-self: flex-end;
    margin-top: clamp(40px, 8vw, 80px);
    margin-right: clamp(0px, 4vw, 60px);
    font-family: 'Mrs Saint Delafield', cursive;
    font-weight: 400;
    font-size: clamp(2.6rem, 4.4vw, 3.6rem);
    color: var(--green-bright);
    opacity: 0;
    transform: translateY(10px) rotate(-1.5deg);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.manifesto-signature.lit {
    opacity: 1;
    transform: translateY(0) rotate(-1.5deg);
}

/* ==========================================================================
   7. SERVIZI (percorso a tappe alternate)
   ========================================================================== */
.services {
    background: var(--cream-2);
    padding: 100px 6vw 120px;
}

.services-route {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 110px;
}

.route-line {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: rgba(17, 20, 15, 0.08);
    border-radius: 4px;
    overflow: hidden;
}

.route-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--gradient-green);
    transition: height 0.1s linear;
}

.service-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 70px;
}

.service-row.reverse .service-media {
    order: 2;
}

.service-row.reverse .service-content {
    order: 1;
    text-align: right;
    align-items: flex-end;
}

.service-media {
    position: relative;
    height: 380px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(17, 20, 15, 0.15);
}

.service-img {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

.service-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 40px;
}

.route-dot {
    position: absolute;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--cream-2);
    border: 3px solid var(--green-mid);
    transition: background 0.4s ease, transform 0.4s ease, box-shadow 0.4s ease;
}

.service-row .route-dot {
    left: -12px;
}

.service-row.reverse .route-dot {
    left: auto;
    right: -12px;
}

.route-dot.active {
    background: var(--gradient-green);
    border-color: var(--green-bright);
    transform: scale(1.25);
    box-shadow: 0 0 0 8px var(--green-soft);
}

.service-num {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 4rem;
    line-height: 1;
    letter-spacing: -2px;
    color: rgba(31, 122, 77, 0.16);
    margin-bottom: 6px;
}

.service-content h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    letter-spacing: -1px;
    margin-bottom: 14px;
}

.service-content p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 460px;
}

.btn-discover {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 12px 26px;
    border-radius: 50px;
    background: var(--gradient-green);
    background-size: 160% 160%;
    background-position: 0% 50%;
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    box-shadow: 0 10px 24px rgba(54, 181, 110, 0.25);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-position 0.5s ease;
}

.btn-discover:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(54, 181, 110, 0.4);
    background-position: 100% 50%;
}

/* ==========================================================================
   PAGINE DI APPROFONDIMENTO (CER / Agrivoltaico)
   ========================================================================== */
.page-hero {
    position: relative;
    min-height: 56vh;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
    color: var(--cream);
    padding: 160px 6vw 80px;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 12, 9, 0.25) 0%, rgba(7, 12, 9, 0.9) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.page-hero .eyebrow {
    color: var(--green-bright);
}

.page-hero h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    letter-spacing: -2px;
    line-height: 1.08;
    margin-top: 14px;
    margin-bottom: 18px;
}

.page-hero p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(247, 245, 236, 0.78);
    max-width: 560px;
}

.page-cta {
    background: var(--gradient-green);
    color: #ffffff;
    text-align: center;
    padding: 100px 6vw;
}

.page-cta .eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

.page-cta h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3rem);
    letter-spacing: -1px;
    margin: 14px 0 32px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================================
   8. FOCUS (Agrivoltaico / CER)
   ========================================================================== */
.focus {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 70px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 110px 6vw;
}

.focus.reverse .focus-media {
    order: 2;
}

.focus.reverse .focus-content {
    order: 1;
}

.focus-media {
    position: relative;
    height: 480px;
    border-radius: 28px;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 86%, 86% 100%, 0 100%);
    box-shadow: 0 30px 70px rgba(17, 20, 15, 0.12);
}

.focus.reverse .focus-media {
    clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%, 0 14%);
}

.focus-img {
    position: absolute;
    inset: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    will-change: transform;
}

/* ==========================================================================
   PARALLAX-IMG (utility per service-img / focus-img)
   ========================================================================== */
.parallax-img {
    position: relative;
    overflow: hidden;
}

.focus-content h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 4.5vw, 3rem);
    letter-spacing: -1px;
    margin-bottom: 18px;
}

.focus-content p {
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 16px;
}

/* ==========================================================================
   9. PROCESSO / TIMELINE
   ========================================================================== */
.process {
    background: var(--bg-dark);
    color: var(--cream);
    padding: 120px 6vw;
}

.timeline {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    padding-left: 56px;
}

.timeline-line {
    position: absolute;
    left: 15px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: rgba(247, 245, 236, 0.1);
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0%;
    background: var(--gradient-green);
    transition: height 0.1s linear;
}

.timeline-step {
    position: relative;
    padding-bottom: 70px;
}

.timeline-step:last-child {
    padding-bottom: 0;
}

.step-num {
    position: absolute;
    left: -56px;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--green-bright);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--green-bright);
}

.step-body h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.step-body p {
    color: rgba(247, 245, 236, 0.62);
    line-height: 1.75;
    max-width: 520px;
    font-size: 1rem;
}

/* ==========================================================================
   10. PORTFOLIO / LAVORI
   ========================================================================== */
.portfolio {
    background: var(--cream);
    padding: 100px 6vw;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 280px);
    grid-auto-rows: 280px;
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
}

.portfolio-item.progress {
    grid-column: 1 / -1;
    grid-row: span 2;
    border: 3px solid var(--orange-progress);
}

.portfolio-item.progress .portfolio-tag {
    color: var(--orange-progress);
}

.portfolio-item {
    position: relative;
    display: block;
    border-radius: 24px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transition: transform 0.1s ease-out;
}

.portfolio-item.big {
    grid-column: span 2;
    grid-row: span 2;
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(13, 24, 18, 0) 35%, rgba(13, 24, 18, 0.94) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: #ffffff;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-tag {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--green-bright);
    margin-bottom: 8px;
}

.portfolio-overlay h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.portfolio-overlay p {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ==========================================================================
   11. SIMULATORE ROI
   ========================================================================== */
.roi {
    background: var(--gradient-green);
    color: #ffffff;
    padding: 100px 6vw;
}

.roi .section-head .eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

.roi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    max-width: 1100px;
    margin: 60px auto 0;
}

.roi-widget {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    padding: 44px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
    transition: transform 0.4s var(--ease), background 0.4s ease;
}

.roi-widget:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.12);
}

.roi-widget h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 22px;
}

.roi-kw {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.2rem, 4vw, 3rem);
    letter-spacing: -1px;
    color: #ffffff;
    margin-bottom: 18px;
}

.roi-kw span {
    background: linear-gradient(100deg, #ffffff 0%, var(--green-bright) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.roi-slider {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.25);
    outline: none;
    margin-bottom: 26px;
    cursor: pointer;
}

.roi-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--green-mid);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.roi-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.roi-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--green-mid);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.roi-result {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
}

.roi-result span {
    font-family: var(--font-display);
    font-weight: 700;
}

.roi-kwh {
    margin-top: 8px;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.roi-kwh span {
    font-weight: 700;
    color: var(--green-bright);
}

.roi-disclaimer {
    max-width: 800px;
    margin: 44px auto 0;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
}

/* ==========================================================================
   12. BANDI / GRANTS
   ========================================================================== */
.grants {
    background: var(--bg-dark);
    color: var(--cream);
    padding: 100px 6vw;
}

.grants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    max-width: 1300px;
    margin: 0 auto;
}

.grant-card {
    position: relative;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
    transition: transform 0.4s var(--ease), border-color 0.4s ease;
}

.grant-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 130px;
    height: 130px;
    background: var(--green-bright);
    opacity: 0.08;
    border-radius: 50%;
    transition: transform 0.5s ease;
}

.grant-card:hover {
    transform: translateY(-8px);
    border-color: rgba(123, 232, 164, 0.35);
}

.grant-card:hover::after {
    transform: scale(1.5);
}

.grant-top {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.grant-badge {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 20px;
}

.grant-badge.active {
    background: rgba(123, 232, 164, 0.15);
    color: var(--green-bright);
}

.grant-badge.closed {
    background: rgba(224, 82, 74, 0.15);
    color: var(--red-closed);
}

.grant-badge.upcoming {
    background: rgba(46, 159, 224, 0.15);
    color: var(--blue-logo);
}

.grant-date {
    font-size: 0.8rem;
    color: rgba(247, 245, 236, 0.5);
    margin-left: auto;
}

.status-text {
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.status-text.publishing {
    color: var(--gold);
}

.status-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-block;
    animation: statusPulse 1.8s ease-in-out infinite;
}

.status-dot.active {
    background: var(--green-bright);
    box-shadow: 0 0 0 4px rgba(123, 232, 164, 0.25), 0 0 10px rgba(123, 232, 164, 0.7);
}

.status-dot.publishing {
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 200, 87, 0.25), 0 0 10px rgba(255, 200, 87, 0.7);
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.55; transform: scale(0.8); }
}

.grant-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1.35;
    position: relative;
    z-index: 1;
}

.grant-card p {
    color: rgba(247, 245, 236, 0.62);
    line-height: 1.7;
    font-size: 0.95rem;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.grant-link {
    color: var(--green-bright);
    font-weight: 700;
    font-family: var(--font-display);
    font-size: 0.9rem;
    transition: letter-spacing 0.3s ease;
    position: relative;
    z-index: 1;
}

.grant-link:hover {
    letter-spacing: 1px;
}

/* ==========================================================================
   13. CONTATTI
   ========================================================================== */
.contact {
    background: var(--cream);
    padding: 100px 6vw;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    max-width: 1300px;
    margin: 0 auto;
}

.contact-form-box {
    background: #ffffff;
    border-radius: 28px;
    padding: 48px;
    box-shadow: 0 30px 80px rgba(17, 20, 15, 0.06);
}

.contact-form-box .eyebrow {
    color: var(--accent);
}

.contact-form-box h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.9rem, 3.5vw, 2.4rem);
    letter-spacing: -1px;
    margin-bottom: 12px;
    line-height: 1.25;
}

.contact-form-box > p {
    color: var(--ink-soft);
    margin-bottom: 32px;
    line-height: 1.6;
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.form-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translate(-50%, 20px);
    background: var(--green-deep);
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 16px 28px;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;
    z-index: 9999;
    max-width: 90vw;
    text-align: center;
}

.form-toast.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.field {
    position: relative;
}

.field input,
.field textarea {
    width: 100%;
    padding: 18px 4px 8px;
    border: none;
    border-bottom: 2px solid #ddd9c8;
    background: transparent;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--ink);
    outline: none;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.field label {
    position: absolute;
    left: 4px;
    top: 18px;
    color: var(--ink-soft);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.25s ease;
}

.field input:focus,
.field textarea:focus {
    border-color: var(--accent);
}

.field input:focus ~ label,
.field input:not(:placeholder-shown) ~ label,
.field textarea:focus ~ label,
.field textarea:not(:placeholder-shown) ~ label {
    top: -8px;
    font-size: 0.72rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact-info-box {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card {
    background: var(--bg-dark);
    color: var(--cream);
    border-radius: 28px;
    padding: 42px;
}

.info-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 22px;
}

.info-card p {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 1rem;
    color: rgba(247, 245, 236, 0.85);
    line-height: 1.5;
}

.info-card svg {
    width: 22px;
    height: 22px;
    color: var(--green-bright);
    flex-shrink: 0;
}

.map-card {
    border-radius: 28px;
    overflow: hidden;
    min-height: 240px;
    flex-grow: 1;
    box-shadow: 0 20px 50px rgba(17, 20, 15, 0.08);
}

/* ==========================================================================
   14. FOOTER
   ========================================================================== */
.footer {
    background: var(--bg-darker);
    color: rgba(247, 245, 236, 0.55);
    padding: 56px 6vw;
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    text-align: center;
}

.footer .nav-logo {
    color: var(--cream);
}

.footer-inner p {
    font-size: 0.85rem;
    max-width: 640px;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.85rem;
}

.footer-links a {
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--green-bright);
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-green);
    color: #ffffff;
    border: none;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    z-index: 900;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    box-shadow: 0 14px 34px rgba(54, 181, 110, 0.45);
}

/* ==========================================================================
   15. RESPONSIVE
   ========================================================================== */

@media (min-width: 901px) and (max-width: 1280px) {
    .hero-logo img {
        height: clamp(90px, 9vw, 140px);
    }
    .hero-content::before {
        height: clamp(90px, 9vw, 140px);
    }
    .manifesto-video-frame {
        max-width: 440px;
    }
    .manifesto-grid {
        gap: 40px;
    }
}

@media (max-width: 1100px) {
    .focus {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 80px 6vw;
    }
    .focus.reverse .focus-media,
    .focus.reverse .focus-content {
        order: initial;
    }
    .focus-media {
        height: 360px;
    }
    .services-route {
        gap: 70px;
    }
    .route-line {
        display: none;
    }
    .service-row,
    .service-row.reverse {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .service-row .service-media,
    .service-row.reverse .service-media {
        order: 1;
    }
    .service-row .service-content,
    .service-row.reverse .service-content {
        order: 2;
        padding: 0;
        align-items: flex-start;
        text-align: left;
    }
    .service-media {
        height: 280px;
    }
    .route-dot {
        display: none;
    }
    .roi-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 360px;
        height: 100vh;
        background: var(--bg-dark);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 28px;
        padding: 100px 50px;
        transition: right 0.4s var(--ease);
        z-index: 1050;
    }
    .nav-cta {
        display: none;
    }
    .nav-links.open {
        right: 0;
    }
    .nav-links a {
        font-size: 1.4rem;
    }
    .nav-roi-link {
        display: list-item;
    }
    .nav-roi-link a {
        color: var(--green-bright);
    }
    .hamburger {
        display: flex;
    }
    .hero {
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
    }
    .hero-content {
        width: 92%;
        margin: 0 auto;
        text-align: left;
        align-items: flex-start;
        padding-top: 120px;
    }
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 14px;
    }
    .hero-visual {
        clip-path: none;
    }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(7, 12, 9, 0.35) 0%, rgba(7, 12, 9, 0.85) 70%, var(--bg-dark) 100%);
    }
    .hero-roi-cta {
        display: none;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-rows: auto;
    }
    .portfolio-item,
    .portfolio-item.big,
    .portfolio-item.progress {
        grid-column: span 1;
        grid-row: span 1;
        height: 320px;
    }
    .portfolio-item.progress {
        height: 420px;
    }
    .portfolio-overlay {
        opacity: 1;
        transform: translateY(0);
        background: linear-gradient(180deg, rgba(13, 24, 18, 0) 20%, rgba(13, 24, 18, 0.92) 100%);
    }
}

@media (max-width: 640px) {
    .hero-title {
        letter-spacing: -1px;
    }
    .timeline {
        padding-left: 46px;
    }
    .step-num {
        left: -46px;
        width: 28px;
        height: 28px;
    }
    .grants-grid,
    .services-route {
        gap: 20px;
    }
    .contact-form-box,
    .info-card {
        padding: 30px;
    }
}
