/* ------------ BASE (MOBILE FIRST) ------------ */

html, body {
    margin: 0;
    padding: 0;
    background: #E2182C; /* mobile: full red outside card */
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    text-align: center;
    color: #000;
    -webkit-text-size-adjust: 100%;
}

/* mobile layout: card filling viewport, scroll if needed */
body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    touch-action: manipulation;
    overflow-x: hidden;
}

.card {
    background: #E2182C;
    width: 100%;
    max-width: 420px;
    min-height: 100vh;
    overflow: hidden;
}

/* iOS full height fix */
@supports (height: 100dvh) {
    body {
        min-height: 100dvh;
    }
    .card {
        min-height: 100dvh;
    }
}

/* ------------ HERO ------------ */

.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top; /* niente righina sotto l’immagine */
}

.fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55vw;
    pointer-events: none;
    background: linear-gradient(
            to bottom,
            rgba(162, 0, 13, 0) 0%,
            rgba(162, 0, 13, 0.45) 35%,
            #E2182C 100%
    );
}

/* ------------ CONTENT ------------ */

.content {
    padding: 24px 0 60px 0;
}

h1 {
    margin: 32px 0 12px 0;
    font-size: 22px;
    font-weight: 700;
}

/* ------------ ICONS ------------ */

.icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.icon {
    width: 28px;
    height: 28px;
    display: block;
}

a, img {
    -webkit-tap-highlight-color: transparent;
}

/* --- Top fade only for mobile --- */
@media (max-width: 767px) {
    .hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 30vw; /* fade morbido e non troppo alto */
        pointer-events: none;
        background: linear-gradient(
                to bottom,
                #E2182C 0%,
                rgba(226, 24, 44, 0.7) 25%,
                rgba(226, 24, 44, 0) 100%
        );
    }
}

/* ------------ DESKTOP OVERRIDES ------------ */
/* niente scroll, card centrata, bordi + ombra */

@media (min-width: 768px) {
    html, body {
        height: 100%;
        background: #000;       /* desktop: nero fuori card */
        overflow: hidden;       /* no scroll desktop */
    }

    body {
        align-items: center;
    }

    .card {
        min-height: auto;
        max-height: 90vh;       /* margine respirabile */
        border-radius: 32px;
        box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
    }

    .content {
        padding: 24px 0 40px 0;
    }

    /* desktop fade leggermente diverso, come prima */
    .fade {
        height: 50%; /* metà dell'hero */
        background: linear-gradient(
                to bottom,
                rgba(162, 0, 13, 0) 0%,
                rgba(162, 0, 13, 0.45) 35%,
                #E2182C 100%
        );
    }
}
