/* =========================================
   1. GLOBALE & FONTS
   ========================================= */
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('../fonts/Inter-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

body { -webkit-font-smoothing: antialiased; }

/* =========================================
   2. HOME PAGE (index.html)
   ========================================= */

/* Card Standard */
.card {
    background-color: rgba(20, 20, 20, 0.70);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.5rem;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease-out;
}

.card:not(.card_contact):hover {
    background-color: rgba(30, 30, 30, 0.9);
    border-color: rgba(206, 73, 238, 0.5);
    transform: translateY(-2px);
}

.card_contact:hover {
    background-color: rgba(255, 255, 255, 0.90);
    border-color: rgba(206, 73, 238, 0.8);
    transform: translateY(-2px);
    color: black;
}

/* Modal Animations */
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.modal-animate { animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }

/* Modal Typography */
.modal-title { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; color: white; }
.modal-subtitle { font-size: 1rem; color: #aaa; margin-bottom: 1.5rem; line-height: 1.5; }
.modal-body h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.5rem; margin-bottom: 0.5rem; color: #CE49EE; }
.modal-body p { color: #ccc; line-height: 1.6; margin-bottom: 1rem; font-size: 0.95rem; }
.modal-body ul { list-style: disc; padding-left: 1.2rem; color: #ccc; margin-bottom: 1rem; }
.btn-cta { display: inline-block; background: #CE49EE; color: black; font-weight: 700; padding: 10px 20px; border-radius: 8px; margin-top: 1rem; text-decoration: none; }
.btn-cta:hover { background: white; }

/* =========================================
   3. CONFIGURATORE (start.html)
   ========================================= */

/* Option Card (Differente dalla card home per lo stato Selected) */
.option-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.option-card:hover {
    border-color: #CE49EE;
    background: rgba(206, 73, 238, 0.1);
    transform: translateY(-2px);
}

.option-card.selected {
    border-color: #CE49EE;
    background: #CE49EE;
    color: black;
    box-shadow: 0 0 20px rgba(206, 73, 238, 0.4);
}

/* SVG Styling */
.option-card svg { stroke: white; transition: all 0.3s ease; }
.option-card.selected svg { stroke: black; }
.option-card.selected h3, .option-card.selected p { color: black !important; }

/* Check Icon */
.check-icon {
    position: absolute; top: 10px; right: 10px;
    background: black; color: #CE49EE;
    border-radius: 50%; width: 24px; height: 24px;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: scale(0.5); transition: all 0.3s ease;
}
.option-card.selected .check-icon { opacity: 1; transform: scale(1); }

/* Animation per cambio step */
.step-enter { animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Inputs */
.webbink-input {
    width: 100%; background: transparent;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding: 15px 0; color: white; font-size: 1.2rem;
    outline: none; transition: border-color 0.3s;
}
.webbink-input:focus { border-color: #CE49EE; }
.webbink-input::placeholder { color: rgba(255,255,255,0.3); }


/* ============================================================
   MOBILE AFFORDANCE: "Tech Corner" (Angolo Interattivo)
   Visibile SOLO su dispositivi touch/mobile
   ============================================================ */

@media (hover: none) {
    /* Crea l'angolo colorato in basso a destra */
    .card[onclick]::after {
        content: "";
        position: absolute;
        bottom: 0;
        right: 0;
        width: 0;
        height: 0;

        /* Triangolo nell'angolo */
        border-style: solid;
        border-width: 0 0 30px 30px; /* Dimensione dell'angolo */
        border-color: transparent transparent rgba(206, 73, 238, 0.6) transparent; /* Colore Accent (Viola) */

        /* Assicuriamo che stia sopra lo sfondo ma sotto il testo se necessario */
        z-index: 10;
        pointer-events: none;

        /* Un tocco di classe: arrotondiamo leggermente l'angolo esterno se la card ha border-radius */
        border-bottom-right-radius: 1.5rem; /* Deve combaciare con il border-radius della tua .card */
    }

    /* Feedback visivo quando l'utente tocca (Active State) */
    .card[onclick]:active::after {
        border-width: 0 0 40px 40px; /* L'angolo cresce quando premi */
        border-color: transparent transparent #CE49EE transparent; /* Diventa viola pieno */
        transition: all 0.1s ease-out;
    }
}


/* === SCROLLBAR PERSONALIZZATA === */

/* Per Chrome, Safari, Edge */
::-webkit-scrollbar {
    width: 10px; /* Larghezza della barra */
}

/* Il "binario" (lo sfondo della barra) */
::-webkit-scrollbar-track {
    background: #050505; /* Lo stesso colore del tuo sfondo sito, così sparisce */
}

/* La "maniglia" (il pezzo che si muove) */
::-webkit-scrollbar-thumb {
    background-color: #333333; /* Grigio scuro elegante */
    border-radius: 5px;       /* Arrotondata */
    border: 2px solid #050505; /* Bordo dello stesso colore dello sfondo per creare effetto "galleggiante" */
}

/* Quando passi il mouse sopra la maniglia */
::-webkit-scrollbar-thumb:hover {
    background-color: #555555; /* Diventa leggermente più chiara per feedback */
}

/* Per Firefox (ha regole diverse) */
html {
    scrollbar-width: thin;
    scrollbar-color: #333333 #050505;
}
