/* --------------------------------------------------------------------------
   Font
   -------------------------------------------------------------------------- */

@font-face {
    font-family: 'Gotham Bold';
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    src: url('font/GothamBold.woff2') format('woff2'),
         url('font/GothamBold.otf') format('opentype');
}

/* --------------------------------------------------------------------------
   Variabili
   -------------------------------------------------------------------------- */

:root {
    --dark-grey: #242424;
    --red: #e20613;
    --light-grey: #f4f4f4;
    --white: #ffffff;

    /* Unità di scala: larghezza della colonna contenuti. Tutte le altre
       misure (font, spazi, raggi, bordi) sono frazioni di --k, così l'intera
       pagina si ingrandisce e si riduce in blocco.
       Il design nasce su una colonna da 548px: qui è ricalibrata a 384px, che
       è la dimensione a cui la pagina si stabilizza da 442px di viewport in su.
       Per ridimensionare tutto basta agire su questi due valori. */
    --k: min(87vw, 24rem);

    /* Ritmo verticale */
    --sect-y: calc(0.182 * var(--k));
    --gap-sm: calc(0.093 * var(--k));
    --gap-md: calc(0.104 * var(--k));
    --gap-lg: calc(0.186 * var(--k));

    /* Durata dello scorrimento del carosello */
    --marquee-duration: 85s;
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--white);
    color: var(--dark-grey);
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: max(0.9375rem, calc(0.053 * var(--k)));
    line-height: 1.38;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
}

h1, h2, h3 {
    font-weight: normal;
    line-height: 1.15;
}

/* --------------------------------------------------------------------------
   Impianto
   -------------------------------------------------------------------------- */

.section {
    padding-block: var(--sect-y);
}

.wrap {
    width: var(--k);
    margin-inline: auto;
    text-align: center;
}

.section--dark {
    background: var(--dark-grey);
    color: var(--white);
}

.section--light {
    background: var(--light-grey);
    color: var(--dark-grey);
}

/* --------------------------------------------------------------------------
   Bottone WhatsApp
   -------------------------------------------------------------------------- */

.cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(0.06 * var(--k));
    width: 100%;
    min-height: calc(0.208 * var(--k));
    padding: calc(0.03 * var(--k)) calc(0.06 * var(--k));
    border: calc(0.022 * var(--k)) solid var(--red);
    border-radius: 999px;
    background: var(--dark-grey);
    color: var(--white);
    font-family: 'Gotham Bold', system-ui, sans-serif;
    font-size: calc(0.069 * var(--k));
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}

.cta__icon {
    width: calc(0.106 * var(--k));
    height: auto;
    flex: none;
    fill: currentColor;
}

.cta__text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cta__text span {
    font-size: calc(0.03 * var(--k));
}

.cta:hover,
.cta:focus-visible {
    background: var(--white);
    color: var(--dark-grey);
}

:where(a):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
    padding-top: calc(0.126 * var(--k));
    padding-bottom: calc(0.184 * var(--k));
}

.hero__logo {
    width: calc(0.602 * var(--k));
    height: auto;
    margin-inline: auto;
}

.hero__img {
    /* nel design l'immagine è più larga della colonna: su mobile arriva a filo schermo */
    --hero-img: min(95vw, calc(1.113 * var(--k)));
    width: var(--hero-img);
    max-width: none;
    height: auto;
    margin-top: calc(0.115 * var(--k));
    margin-inline: calc((100% - var(--hero-img)) / 2);
}

.hero__title {
    color: var(--dark-grey);
    max-width: calc(2.456 * var(--k));
    margin-top: calc(0.104 * var(--k));
    margin-inline: auto;
    font-size: clamp(1.6rem, 7vw, 3.15rem);
    line-height: 1.14;
}

.hero .cta {
    margin-top: calc(0.097 * var(--k));
}

/* Da desktop l'hero occupa esattamente una schermata: il titolo si allarga fino
   alla misura del design (3 righe invece di 7) e l'immagine è l'unico elemento
   che cede altezza quando la finestra è bassa, così la CTA resta sempre visibile
   senza scorrere. Sotto i 768px non si applica nulla: il mobile resta invariato. */
@media (min-width: 768px) and (min-height: 640px) {
    .hero {
        display: flex;
        align-items: center;
        min-height: 100vh;
        min-height: 100svh;
        padding-block: 2rem;
    }

    .hero .wrap {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* su finestre basse spazi e logo si stringono, così l'immagine
           non è l'unica a cedere terreno */
        gap: clamp(calc(0.06 * var(--k)), 4svh, calc(0.104 * var(--k)));
        width: min(100% - 4rem, 60rem);
        max-height: calc(100vh - 4rem);
        max-height: calc(100svh - 4rem);
    }

    .hero__logo,
    .hero__img,
    .hero__title,
    .hero .cta {
        margin: 0;
    }

    .hero__logo {
        width: clamp(calc(0.45 * var(--k)), 22svh, calc(0.602 * var(--k)));
    }

    .hero__img {
        flex: 0 1 auto;
        min-height: 0;
        width: auto;
        max-width: min(100%, 27rem);
    }

    .hero .cta {
        width: var(--k);
    }
}

/* --------------------------------------------------------------------------
   Sezione chiara: claim, icona, paragrafi
   -------------------------------------------------------------------------- */

.intro__title {
    font-family: 'Gotham Bold', system-ui, sans-serif;
    font-size: calc(0.073 * var(--k));
    line-height: 1.175;
}

.intro__video {
    position: relative;
    width: 100%;
    height: auto;
    margin: calc(0.1 * var(--k)) auto calc(0.097 * var(--k));
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.intro__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
  }

.intro__text + .intro__text {
    margin-top: calc(0.119 * var(--k));
}

.intro__text strong {
    font-family: 'Gotham Bold', system-ui, sans-serif;
    font-weight: normal;
}

/* --------------------------------------------------------------------------
   Carosello
   -------------------------------------------------------------------------- */

.showcase {
    width: 100vw;
    margin-inline: calc(50% - 50vw);
    margin-top: var(--gap-lg);
    display: flex;
    flex-direction: column;
    gap: calc(0.091 * var(--k));
}

.marquee {
    overflow: hidden;
}

.marquee__track {
    display: flex;
    width: max-content;
    gap: calc(0.135 * var(--k));
    animation: marquee-left var(--marquee-duration) linear infinite;
}

.marquee--reverse .marquee__track {
    animation-name: marquee-right;
}

.marquee__track img {
    width: calc(0.876 * var(--k));
    aspect-ratio: 1;
    object-fit: cover;
    flex: none;
}

.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track {
    animation-play-state: paused;
}

@keyframes marquee-left {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-50% - 0.0675 * var(--k))); }
}

@keyframes marquee-right {
    from { transform: translateX(calc(-50% - 0.0675 * var(--k))); }
    to   { transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   Come funziona
   -------------------------------------------------------------------------- */

.steps {
    padding-top: calc(0.203 * var(--k));
}

.section-title {
    font-family: 'Gotham Bold', system-ui, sans-serif;
    font-size: calc(0.0985 * var(--k));
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.step__n {
    color: var(--red);
}

.steps__list {
    display: flex;
    flex-direction: column;
    gap: var(--gap-sm);
    margin-top: calc(0.115 * var(--k));
    list-style: none;
}

.step {
    padding: calc(0.033 * var(--k));
    border-radius: calc(0.124 * var(--k));
    background: var(--dark-grey);
}

.step__head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(0.162 * var(--k));
    padding: calc(0.02 * var(--k)) calc(0.03 * var(--k)) calc(0.02 * var(--k)) calc(0.115 * var(--k));
    border-radius: 999px;
    background: var(--light-grey);
}

.step__n {
    position: absolute;
    left: calc(0.015 * var(--k));
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Gotham Bold', system-ui, sans-serif;
    font-size: calc(0.157 * var(--k));
    line-height: 1;
}

.step__title {
    font-family: 'Gotham Bold', system-ui, sans-serif;
    font-size: max(0.75rem, calc(0.0365 * var(--k)));
    line-height: 1.2;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.step__text {
    padding: calc(0.066 * var(--k)) calc(0.022 * var(--k)) calc(0.062 * var(--k));
    font-size: max(0.875rem, calc(0.049 * var(--k)));
    line-height: 1.28;
    color: var(--white)
}

.steps .cta {
    margin-top: var(--gap-sm);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq__list {
    display: flex;
    flex-direction: column;
    gap: calc(0.037 * var(--k));
    margin-top: calc(0.115 * var(--k));
    /* le risposte sono lunghe: allineate a sinistra restano leggibili */
    text-align: left;
}

.faq__item {
    padding: calc(0.045 * var(--k)) calc(0.048 * var(--k));
    border-radius: calc(0.09 * var(--k));
    background: var(--white);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(0.04 * var(--k));
    list-style: none;
    cursor: pointer;
    font-family: 'Gotham Bold', system-ui, sans-serif;
    font-size: max(0.9375rem, calc(0.049 * var(--k)));
    line-height: 1.3;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: calc(0.09 * var(--k));
    height: calc(0.09 * var(--k));
    border-radius: 50%;
    background: var(--dark-grey);
    color: var(--white);
    font-family: 'Gotham Bold', system-ui, sans-serif;
    font-size: calc(0.055 * var(--k));
    line-height: 1;
    transition: transform 0.25s ease;
}

.faq__item[open] .faq__icon {
    transform: rotate(45deg);
}

.faq__answer {
    margin-top: calc(0.04 * var(--k));
    padding-top: calc(0.04 * var(--k));
    border-top: 1px solid rgba(36, 36, 36, 0.12);
    color: var(--grey);
    font-size: max(0.875rem, calc(0.045 * var(--k)));
    line-height: 1.45;
}

.faq .cta {
    margin-top: var(--gap-sm);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
    padding-block: calc(0.108 * var(--k));
    background: var(--light-grey);
    color: var(--dark-grey);
}

.footer__logo {
    width: calc(0.299 * var(--k));
    height: auto;
    margin-inline: auto;
}

.footer__info {
    margin-top: var(--gap-md);
    font-size: max(0.8125rem, calc(0.047 * var(--k)));
    line-height: 1.35;
    font-style: normal;
}

.footer__social {
    display: flex;
    justify-content: center;
    gap: calc(0.045 * var(--k));
    margin-top: var(--gap-md);
}

.footer__social a {
    display: grid;
    place-items: center;
    width: calc(0.14 * var(--k));
    height: calc(0.14 * var(--k));
    border-radius: 50%;
    color: var(--red);
    transition: opacity 0.25s ease;
}

.footer__social svg {
    width: calc(0.068 * var(--k));
    height: auto;
}

.footer__social a:hover,
.footer__social a:focus-visible {
    opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Preferenze di sistema
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .marquee {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .marquee__track {
        animation: none;
    }

    .marquee__track img {
        scroll-snap-align: center;
    }

    .cta,
    .faq__icon {
        transition: none;
    }
}
