﻿/* =======================================================
   CAPODANNO — STILE COMPLETO (pulito + carta “naked”)
   ======================================================= */

/* ---------- VARIABILI & BASE ---------- */
:root {
    --container-w: 1240px;
    --acc-1: #7A5AF8; /* viola */
    --acc-2: #AF83DC; /* lilla */
    --hot: #FF4D8D;
    --bg: #0A0A1A;
    --txt: #E6E6FA;
    --txt-dim: #D8D8F0;
    --fs-h1: clamp(1.2rem,2.2vw,2.8rem);
    --fs-h2: clamp(1.25rem,2.1vw,1.9rem);
    --fs-h3: clamp(1.02rem,1.6vw,1.3rem);
    --ls-wide: .04em;
    --lh-title: 1.15;
    --lh-text: 1.62;
    /* sticky footer CTA */
    --sticky-h: 64px;
    --sticky-h-sm: 56px;
    /* Stripe wrapper (solo dimensioni container, non bordo) */
    --stripe-h: 56px;
    --stripe-fs: 16px;
    --stripe-pad-y: 12px;
    --stripe-pad-x: 14px;
}

html, body {
    background: var(--bg);
    color: var(--txt);
    overflow-x: clip;
    touch-action: pan-y;
    overscroll-behavior-x: none
}

@supports not (overflow-x:clip) {
    html, body {
        overflow-x: hidden
    }
}

img, video {
    max-width: 100%;
    height: auto;
    display: block
}

h1, h2, h3, .article-section h2, .article-section h3 {
    font-family: 'Orbitron',system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    text-transform: uppercase;
    letter-spacing: .04em
}

h2, h3 {
    color: var(--acc-2)
}

.section {
    max-width: var(--container-w);
    margin: 0 auto;
    padding: 32px 16px
}

/* =======================================================
   HERO
   ======================================================= */
.hero__media {
    position: relative;
    width: 100%;
    max-width: var(--container-w);
    margin: 0 auto;
    aspect-ratio: 16/9;
    max-height: 420px;
    overflow: hidden;
    margin-bottom: -50px
}

.hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 80%;
    object-fit: cover;
    object-position: center
}

.hero + .section {
    margin-top: clamp(12px,2vw,24px)
}

@media (max-width:768px) {
    .hero__media {
        max-height: 220px
    }

    .hero + .section {
        margin-top: 12px
    }
}

/* =======================================================
   TESTI / ARTICOLO
   ======================================================= */
.section h2, .gallery-section h2, .article-section h2 {
    font-size: var(--fs-h2);
    font-weight: 900;
    text-align: center;
    margin: 0 0 1.25rem;
    text-shadow: 0 0 10px rgba(122,90,248,.35)
}

.article-section .description {
    max-width: 900px;
    margin: 0 auto 2rem;
    color: var(--txt-dim);
    line-height: var(--lh-text);
    text-align: center
}

.article-section .included {
    max-width: 900px;
    margin: 0 auto 2rem
}

    .article-section .included h3 {
        font-size: clamp(1.1rem,1.8vw,1.4rem);
        font-weight: 900;
        margin: 0 0 .6rem;
        text-shadow: 0 0 10px rgba(122,90,248,.35)
    }

    .article-section .included ul {
        padding: 0;
        margin: 0;
        list-style: none
    }

    .article-section .included li {
        position: relative;
        padding-left: 28px;
        margin: .55rem 0;
        color: var(--txt-dim);
        font-weight: 700
    }

        .article-section .included li::before {
            content: "→";
            position: absolute;
            left: 0;
            top: 0;
            color: var(--acc-1)
        }

.article-section .price {
    text-align: center;
    margin: 1.6rem 0 .6rem;
    font-weight: 900;
    color: var(--acc-1)
}

    .article-section .price .old-price {
        color: #A0A4A8;
        text-decoration: line-through;
        margin-right: .5rem;
        font-weight: 700
    }

.article-section .deposit {
    text-align: center;
    color: var(--txt-dim);
    margin-bottom: 1.6rem
}

/* =======================================================
   BOTTONI
   ======================================================= */
.btn-primary {
    display: inline-block;
    border-radius: 12px;
    padding: 12px 26px;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: .03em;
    background: linear-gradient(90deg,var(--acc-1),var(--acc-2));
    color: #fff;
    border: 0;
    transition: transform .2s ease,box-shadow .25s ease,background .25s ease;
    text-decoration: none
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(175,131,220,.45)
    }

/* =======================================================
   TABS/ACCORDION
   ======================================================= */
.key-buttons {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
    margin-bottom: 10px
}

.key-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 800;
    background: rgba(16,16,38,.75);
    border: 1px solid #AF83DC66;
    color: var(--txt);
    transition: transform .15s ease,box-shadow .25s ease,border-color .25s ease,background .25s ease
}

    .key-btn:is(:hover,:focus-visible) {
        outline: none;
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(175,131,220,.25);
        border-color: var(--acc-2)
    }

    .key-btn.is-active {
        background: linear-gradient(90deg,var(--acc-1),var(--acc-2));
        color: #0A0A1A;
        border-color: transparent
    }

.key-panel {
    background: linear-gradient(180deg,rgba(16,16,38,.92),rgba(10,10,30,.92));
    border: 1px solid #AF83DC33;
    border-radius: 16px;
    padding: 16px;
    color: var(--txt);
    overflow: hidden;
    max-height: 0;
    transition: max-height .3s ease,padding .3s ease,border-width .3s ease
}

    .key-panel[hidden] {
        display: block;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0
    }

    .key-panel:not([hidden]) {
        max-height: 600px
    }

/* =======================================================
   GALLERIA POSTER
   ======================================================= */
.gallery-section {
    max-width: var(--container-w);
    margin: 4rem auto;
    padding: 0 12px
}

.poster {
    position: relative;
    overflow: hidden;
    background: #0A0A1A var(--poster) 0 0/auto 100% repeat-x;
    animation: rdv-poster-scroll 15s linear infinite;
    border-radius: 18px;
    box-shadow: 0 0 18px rgba(175,131,220,.28);
    margin: 22px 0;
    aspect-ratio: 32/9;
    max-height: clamp(180px,24vw,360px)
}

.poster--reverse {
    animation-direction: reverse
}

.poster__img {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none
}

@keyframes rdv-poster-scroll {
    from {
        background-position: 0 0
    }

    to {
        background-position: -100% 0
    }
}

/* =======================================================
   FORM CONTATTI
   ======================================================= */
.form-section {
    max-width: var(--container-w);
    margin: 52px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch
}

.form-image img {
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 0 15px rgba(175,131,220,.3);
    filter: brightness(1.05)
}

.form-card {
    background: linear-gradient(180deg,rgba(16,16,38,.92),rgba(10,10,30,.92));
    border: 1px solid #AF83DC33;
    border-radius: 16px;
    padding: 22px;
    color: #E6E6FA;
    box-shadow: 0 10px 24px rgba(175,131,220,.18),inset 0 1px 0 rgba(255,255,255,.05)
}

    .form-card h2 {
        text-align: center;
        font-weight: 900;
        text-transform: uppercase;
        font-size: 1.2rem;
        margin: 0 0 10px;
        text-shadow: 0 0 10px rgba(122,90,248,.35)
    }

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 12px
}

    .form-grid label {
        font-weight: 700;
        font-size: .9rem
    }

    .form-grid input, .form-grid textarea {
        background: rgba(15,15,30,.7);
        border: 1px solid #AF83DC77;
        color: #E6E6FA;
        border-radius: 10px;
        padding: 10px 12px;
        font-size: .95rem
    }

        .form-grid input:focus, .form-grid textarea:focus {
            outline: none;
            border-color: var(--acc-2);
            box-shadow: 0 0 10px rgba(175,131,220,.4)
        }

    .form-grid textarea {
        min-height: 110px;
        resize: vertical
    }

.form-actions {
    text-align: center;
    margin-top: 6px
}

/* =======================================================
   STICKY CTA
   ======================================================= */
body {
    padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom))
}

@media (max-width:768px) {
    body {
        padding-bottom: calc(var(--sticky-h-sm) + env(safe-area-inset-bottom))
    }
}

.sticky-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    min-height: var(--sticky-h);
    background: linear-gradient(90deg,rgba(10,10,26,.94),rgba(20,10,40,.94));
    border-top: 1px solid #AF83DC44;
    backdrop-filter: saturate(1.15) blur(6px);
    -webkit-backdrop-filter: saturate(1.15) blur(6px);
    box-shadow: 0 -8px 18px rgba(0,0,0,.35);
    line-height: 1.15
}

@media (max-width:768px) {
    .sticky-cta {
        min-height: var(--sticky-h-sm)
    }
}

.sticky-cta__left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden
}

.sticky-cta__price {
    font-weight: 900;
    color: var(--acc-2);
    white-space: nowrap;
    font-size: clamp(16px,1.2vw,18px)
}

.sticky-cta__sep {
    opacity: .7
}

.sticky-cta__countdown {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    opacity: .95;
    font-size: clamp(12px,2.6vw,14px)
}

.sticky-cta__btn.btn-primary {
    padding: 10px 16px;
    border-radius: 10px;
    font-size: clamp(12px,2.6vw,14px);
    box-shadow: none
}

    .sticky-cta__btn.btn-primary:hover {
        transform: none
    }

@media (min-width:1280px) {
    .sticky-cta {
        padding-left: calc((100vw - var(--container-w))/2 + 12px);
        padding-right: calc((100vw - var(--container-w))/2 + 12px)
    }
}

/* =======================================================
   MODAL (ridimensionata per mobile + scroll interno)
   ======================================================= */
.rdv-modal {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: none
}

    .rdv-modal[aria-hidden="false"] {
        display: grid;
        place-items: center
    }

.rdv-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(5,5,15,.55);
    backdrop-filter: blur(6px) saturate(1.2);
    -webkit-backdrop-filter: blur(6px) saturate(1.2);
    opacity: 0;
    transition: opacity .25s ease
}

.rdv-modal[aria-hidden="false"] .rdv-modal__overlay {
    opacity: 1
}

/* Card: più piccola su mobile, con max-height e overflow */
.rdv-modal__card {
    position: relative;
    width: min(92vw,720px);
    margin: 12px;
    outline: none;
    border-radius: 22px;
    background: linear-gradient(180deg,rgba(18,18,34,.9),rgba(10,10,26,.92));
    border: 1px solid rgba(175,131,220,.35);
    box-shadow: 0 30px 80px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.04) inset;
    color: #E6E6FA;
    transform: translateY(12px) scale(.98);
    opacity: 0;
    transition: transform .28s cubic-bezier(.22,.9,.3,1),opacity .28s ease;
    /* *** queste due fanno la magia su mobile *** */
    max-height: 92vh;
    overflow: auto;
}

.rdv-modal[aria-hidden="false"] .rdv-modal__card {
    transform: translateY(0) scale(1);
    opacity: 1
}

/* Header più compatto + titolo fluido */
.rdv-modal__header {
    padding: 22px 22px 8px;
    border-bottom: 1px solid rgba(175,131,220,.22);
    text-align: center
}

    .rdv-modal__header h3 {
        margin: .2rem 0;
        font-size: clamp(1.05rem,5.5vw,1.6rem);
        letter-spacing: .04em
    }

.rdv-modal__subtitle {
    opacity: .85;
    margin: .25rem 0 0
}

.rdv-modal__note {
    font-size: .85rem;
    color: #888;
    margin-top: .25rem;
    font-style: italic;
    text-align: center
}

/* Form due colonne (auto 1 col su mobile) */
.rdv-modal__form {
    padding: 18px 22px max(18px,calc(18px + env(safe-area-inset-bottom)));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.rdv-field--full {
    grid-column: 1/-1
}

.rdv-field input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.06);
    color: #fff;
    outline: none;
    font-size: 1rem
}

    .rdv-field input::placeholder {
        color: #cfcfe6;
        opacity: .7
    }

    .rdv-field input:focus {
        border-color: var(--acc-2);
        box-shadow: 0 0 0 3px rgba(175,131,220,.25)
    }

.rdv-summary {
    grid-column: 1/-1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(175,131,220,.08);
    border: 1px solid rgba(175,131,220,.28);
    font-weight: 800
}

.rdv-pay-btn {
    grid-column: 1/-1;
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 900;
    letter-spacing: .02em
}

.rdv-modal__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: transform .15s ease,background .2s ease
}

    .rdv-modal__close:hover {
        transform: scale(1.05);
        background: rgba(255,255,255,.12)
    }

body.modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-comp,0px)
}

/* ---- MOBILE TUNING: modale più piccola ---- */
@media (max-width:520px) {
    .rdv-modal__card {
        width: min(94vw,560px);
        border-radius: 18px;
    }

    .rdv-modal__header {
        padding: 16px 16px 6px
    }

        .rdv-modal__header h3 {
            font-size: clamp(1rem,5.2vw,1.35rem)
        }

    .rdv-modal__subtitle {
        font-size: .95rem
    }

    .rdv-modal__note {
        font-size: .8rem
    }

    .rdv-modal__form {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 14px 16px max(14px,calc(14px + env(safe-area-inset-bottom)));
    }

    .rdv-field input {
        padding: 10px 12px;
        font-size: .98rem;
        border-radius: 10px
    }

    /* abbasso un filo Stripe */
    :root {
        --stripe-h: 48px;
        --stripe-fs: 15px;
    }
}

/* =======================================================
   STRIPE — INPUT CARTA “NAKED”
   ======================================================= */
.rdv-stripe-input {
    height: var(--stripe-h);
    font-size: var(--stripe-fs);
    line-height: 1.2
}

.rdv-stripe-input--naked {
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: 0 !important
}

    .rdv-stripe-input--naked .StripeElement {
        width: 100%;
        background: transparent !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important
    }

.rdv-stripe-error {
    display: block;
    margin-top: 6px;
    color: #E63973;
    font-size: .92rem;
    font-weight: 700;
    min-height: 1.1em
}

/* =======================================================
   RESPONSIVE EXTRA
   ======================================================= */
@media (max-width:1100px) {
    .form-section {
        grid-template-columns: 1fr;
        gap: 20px
    }
}

@media (max-width:900px) {
    .key-buttons {
        grid-template-columns: repeat(2,1fr)
    }
}

@media (max-width:560px) {
    .key-buttons {
        grid-template-columns: 1fr
    }
}

/* =======================================================
   EFFETTO TESTO (facoltativo)
   ======================================================= */
@keyframes neonPulse {
    0%,100% {
        text-shadow: 0 0 2px rgba(175,131,220,.6),0 0 10px rgba(175,131,220,.35)
    }

    50% {
        text-shadow: 0 0 8px rgba(175,131,220,.9),0 0 22px rgba(175,131,220,.55)
    }
}

/* =======================================================
   INPUT NUMERO — rimuovi spinner + appearance coerente
   ======================================================= */
#capQty::-webkit-outer-spin-button,
#capQty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0
}

#capQty {
    -moz-appearance: textfield;
    appearance: textfield
}


/* ===== Nome e Cognome affiancati SEMPRE ===== */
.rdv-row--two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px; /* stesso spacing del form */
    /* NOVITÀ: il blocco nome+cognome occupa tutta la larghezza della griglia della modale */
    grid-column: 1 / -1;
}

/* Su schermi molto piccoli, li riduco un po’ ma restano affiancati */
@media (max-width:400px) {
    .rdv-row--two {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}
