/* ==========================================================
   EVO-POWER - RESTYLE / AGGIUNTE
   File separato: non modifica utilities/style.css
   ========================================================== */

/* HERO NUOVO
   Per il test usa assets/intro.jpg.
   Quando arriva la foto definitiva basta cambiare qui l'URL. */
.restyle-hero {
    position: relative;
    min-height: clamp(420px, 58vw, 760px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background-image: url("../assets/intro.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: #fff;
}

.restyle-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.28) 42%, rgba(0, 0, 0, 0.04) 72%);
    pointer-events: none;
}

.restyle-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: clamp(48px, 7vw, 100px) 40px;
    box-sizing: border-box;
}

.restyle-hero-copy {
    max-width: 650px;
}

.restyle-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(42px, 5.4vw, 78px);
    line-height: 0.98;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.restyle-hero p {
    margin: 0 0 24px;
    font-size: clamp(24px, 2.4vw, 38px);
    line-height: 1.08;
    font-weight: 300;
}

.restyle-hero-cta {
    display: inline-block;
    padding: 12px 18px;
    background: #FF0B2E;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 18px;
    line-height: 1;
    font-style: italic;
    font-weight: 800;
}

/* CLAIM NERO SOTTO HERO */
.restyle-claim-dark {
    background: #000;
    color: #fff;
    padding: 30px 24px;
}

.restyle-claim-dark p {
    margin: 0;
    text-align: center;
    text-transform: uppercase;
    font-size: clamp(22px, 2.6vw, 38px);
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0.01em;
}

/* IMMAGINE FULL WIDTH SOTTO IL CLAIM
   File previsto: assets/delta-side.jpg */
.restyle-wide-image {
    width: 100%;
    overflow: hidden;
    background: #0b0b0b;
}

.restyle-wide-image img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    height: auto;
    object-fit: cover;
    object-position: center center;
}

/* MODULO RIUSABILE: TRE IMMAGINI FULL WIDTH + DIDASCALIE
   Può essere duplicato più volte nella pagina senza ID. */
.feature-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    background: #3a3a3a;
}

.feature-gallery-image {
    display: block;
    overflow: hidden;
    background: #111;
    cursor: zoom-in;
}

.feature-gallery-image img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    transition: transform 220ms ease, opacity 220ms ease;
}

.feature-gallery-image:hover img {
    transform: scale(1.025);
    opacity: 0.92;
}

.feature-gallery-card {
    min-width: 0;
    background: #3a3a3a;
}

.feature-gallery-caption {
    min-height: 96px;
    box-sizing: border-box;
    padding: 18px 20px 22px;
    background: #3a3a3a;
    color: #fff;
    text-align: left;
}

.feature-gallery-caption h3 {
    margin: 0 0 5px;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.feature-gallery-caption p {
    margin: 0;
    color: #bcbcbc;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 400;
}

/* Le immagini della gallery originale diventano cliccabili senza cambiarne il layout */
#details .tile a.js-lightbox {
    display: block;
    cursor: zoom-in;
}

/* ==========================================================
   GALLERY PARTICOLARI AUTO (#details)
   Prima riga con immagine full-width nel boxed,
   successive a due colonne con didascalie centrate.
   ========================================================== */
#details .container {
    padding-top: 28px;
    padding-bottom: 28px;
}

.details-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 26px;
    align-items: start;
}

.details-gallery-item {
    min-width: 0;
}

.details-gallery-item-wide {
    grid-column: 1 / -1;
}

.details-gallery-image {
    display: block;
    cursor: zoom-in;
    background: #050505;
}

.details-gallery-image img {
    display: block;
    width: 100%;
    height: auto;
}

.details-gallery-caption {
    padding: 12px 8px 4px;
    text-align: center;
}

.details-gallery-caption h3 {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.details-gallery-caption p {
    margin: 0;
    color: #bcbcbc;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 900px) {
    #details .container {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .details-gallery {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .details-gallery-item-wide {
        grid-column: auto;
    }

    .details-gallery-caption {
        padding: 10px 4px 2px;
    }
}

/* LIGHTBOX */
.restyle-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.92);
}

.restyle-lightbox.is-open {
    display: flex;
}

.restyle-lightbox img {
    display: block;
    max-width: min(92vw, 1600px);
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.restyle-lightbox-close,
.restyle-lightbox-prev,
.restyle-lightbox-next {
    position: absolute;
    border: 0;
    background: rgba(0, 0, 0, 0.42);
    color: #fff;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.restyle-lightbox-close {
    top: 18px;
    right: 22px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 34px;
    line-height: 48px;
}

.restyle-lightbox-prev,
.restyle-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 70px;
    font-size: 42px;
}

.restyle-lightbox-prev { left: 14px; }
.restyle-lightbox-next { right: 14px; }

body.restyle-lightbox-open {
    overflow: hidden;
}

/* MOBILE */
@media (max-width: 900px) {
    .restyle-hero {
        min-height: 590px;
        align-items: flex-end;
        background-position: 62% center;
    }

    .restyle-hero-overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.36) 48%, rgba(0, 0, 0, 0.08) 78%);
    }

    .restyle-hero-inner {
        padding: 42px 22px;
    }

    .restyle-hero-copy {
        max-width: 100%;
    }

    .restyle-hero h1 {
        font-size: clamp(40px, 12vw, 58px);
    }

    .restyle-hero p {
        font-size: clamp(22px, 6.5vw, 31px);
    }

    .restyle-hero-cta {
        font-size: 16px;
    }

    .restyle-wide-image img {
        aspect-ratio: 4 / 3;
        object-position: center center;
    }

    .feature-gallery {
        grid-template-columns: 1fr;
    }

    .feature-gallery-image img {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .feature-gallery-caption {
        min-height: 0;
        padding: 16px 20px 22px;
    }

    .feature-gallery-caption h3 {
        font-size: 14px;
    }

    .feature-gallery-caption p {
        font-size: 13px;
    }

    .restyle-lightbox {
        padding: 12px;
    }

    .restyle-lightbox img {
        max-width: 96vw;
        max-height: 82vh;
    }

    .restyle-lightbox-prev,
    .restyle-lightbox-next {
        width: 42px;
        height: 58px;
        font-size: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feature-gallery-image img {
        transition: none;
    }
}

/* ==========================================================
   BLOCCO "LE ORIGINI"
   Clone visuale della sezione originale #copies, con LEGGI TUTTO.
   ========================================================== */
.copies-clone {
    padding: 50px 0;
    background: #fff;
    color: #000;
}

.copies-clone .container {
    text-align: center;
}

.copies-clone h2 {
    display: block;
    margin: 0 20px 22px;
    text-align: center;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
}

.copies-clone p {
    display: block;
    margin: 10px 0;
    text-align: center;
    font-size: 28px;
    line-height: 1.45;
    font-weight: lighter;
}

.story-more[hidden] {
    display: none;
}

.story-toggle {
    display: inline-block;
    margin-top: 20px;
    padding: 11px 18px;
    border: 0;
    background: #FF0B2E;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.copies-clone .copies-clone-flag {
    display: block;
    margin: 100px auto 50px;
}

@media (max-width: 900px) {
    .copies-clone {
        padding: 20px;
    }

    .copies-clone h2 {
        margin: 0 0 18px;
        font-size: 28px;
        line-height: 1.25;
    }

    .copies-clone p {
        font-size: 18px;
        line-height: 1.5;
    }

    .story-toggle {
        margin-top: 14px;
    }

    .copies-clone .copies-clone-flag {
        margin: 55px auto 25px;
        max-width: 84px;
        height: auto;
    }
}


/* ==========================================================
   PARTNER DEL PROGETTO
   8 loghi quadrati: 4x2 desktop, 2x4 mobile.
   Nessun titolo visibile; fascia bianca pulita.
   ========================================================== */

.partners-title {
    margin: 0;
    padding: 60px 20px 24px;
    text-align: center;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 700;
    color: #000;
}

@media (max-width: 900px) {
    .partners-title {
        padding: 40px 20px 18px;
        font-size: 26px;
    }
}

.partners-grid-wrap {
    width: 100%;
    background: #fff;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
}

.partner-item {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: clamp(18px, 2.4vw, 38px);
    background: #fff;
    overflow: hidden;
}

.partner-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 900px) {
    .partners-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .partner-item {
        padding: 18px;
    }
}

/* Partner: la fascia resta full-width bianca, ma la matrice usa il container storico del sito (max-width 1440px). */
.partners-grid-wrap > .container {
    width: 100%;
}


/* ==========================================================
   IMMAGINI: LAZY LOAD + FADE-IN
   Tutte le <img> statiche partono trasparenti e sfumano
   quando il file è realmente caricato.
   ========================================================== */
.img-fade {
    opacity: 0;
    transition: opacity 850ms ease;
}

.img-fade.is-loaded {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .img-fade {
        transition: none;
    }
}


/* ==========================================================
   BOTTONI ROSSI
   Animazione
   ========================================================== */

.restyle-hero-cta,
.story-toggle {
    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        box-shadow 180ms ease;
}

.restyle-hero-cta:hover,
.story-toggle:hover {
    background-color: #ffffff;
    color: #ff0b2e;
    transform: translateY(-2px);
    box-shadow: 0 0 14px rgba(255, 11, 46, 0.45);
}

.restyle-hero-cta:active,
.story-toggle:active {
    transform: translateY(1px) scale(0.99);
    box-shadow: 0 0 8px rgba(255, 11, 46, 0.35);
}


/* ==========================================================
   PUNTOMEDIAWEB
   Manual
   ========================================================== */

#social {
  & a {
    font-weight: 500;
  }
}


#piva {
    text-transform: none !important;
  }


/* ==========================================================
   BLOCCO TESTUALE PROGETTO
   Ex sezione PRE-ORDER: solo contenuto testuale.
   ========================================================== */

#project-copy.project-copy-block .project-tagline {
    margin: 40px 0 8px;
    color: #ff0b2e;
    text-align: center;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

@media (max-width: 900px) {
    #project-copy.project-copy-block .project-tagline {
        margin-top: 30px;
        font-size: 18px;
    }
}

/* ==========================================================
   PUNTOMEDIAWEB
   PRE-ORDER
   ========================================================== */

#copies.preorder-block {
    scroll-margin-top: 20px;
}

#copies.preorder-block h2 {
    display: table;
    max-width: calc(100% - 40px);
    margin: 0 auto 52px;
    padding: 12px 18px;
    background: #ff0b2e;
    color: #ffffff;
    text-align: center;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
}

#copies.preorder-block .preorder-tagline {
    margin: 40px 0 8px;
    color: #ff0b2e;
    text-align: center;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
}

#copies.preorder-block .preorder-mail {
    margin-top: 15px;
    text-decoration: none;
}

@media (max-width: 900px) {
    #copies.preorder-block h2 {
        max-width: calc(100% - 20px);
        margin: 0 auto 32px;
        padding: 11px 14px;
        font-size: 24px;
        line-height: 1.2;
    }

    #copies.preorder-block .preorder-tagline {
        margin-top: 30px;
        font-size: 18px;
    }
}


/* PRE-ORDER TITLE: fade-in lento ogni volta che rientra nel viewport */
#copies.preorder-block .preorder-title-fade {
    opacity: 0;
}

#copies.preorder-block .preorder-title-fade.is-visible {
    animation: preorderTitleFadeIn 2s ease forwards;
}

@keyframes preorderTitleFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    #copies.preorder-block .preorder-title-fade {
        opacity: 1;
    }

    #copies.preorder-block .preorder-title-fade.is-visible {
        animation: none;
    }
}
