:root {
    --brand-blue: #0088cc;
    --dark-blue: #0a192f;
    --white: #ffffff;
    --bg-light: #f4f7f6;
    --text-main: #333333;
    --text-light: #666666;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    background-color: var(--bg-light); 
    color: var(--text-main);
    scroll-behavior: smooth; 
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* --- HERO SECTION --- */
.hero {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 60px 0 150px 0;
    position: relative;
    overflow: hidden;
}

nav { margin-bottom: 80px; }
.logo { font-weight: 800; font-size: 1.5rem; letter-spacing: -1px; }
.logo span { color: var(--brand-blue); }

.hero-content { text-align: center; max-width: 800px; margin: 0 auto; }
.hero-content h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 25px; }
.hero-content h1 span { color: var(--brand-blue); }
.hero-content p { font-size: 1.2rem; opacity: 0.8; margin-bottom: 40px; }

.btn-primary {
    background-color: var(--brand-blue);
    color: white;
    padding: 18px 35px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-right: 15px;
    transition: 0.3s;
}

.btn-secondary {
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid var(--brand-blue);
    padding-bottom: 5px;
}

.btn-primary:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 10px 20px rgba(0,136,204,0.3); 
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    line-height: 0;
}
.hero-wave svg { display: block; width: calc(100% + 1.3px); height: 80px; }
.hero-wave .shape-fill { fill: var(--bg-light); }

/* --- STEPS SECTION (Le Caselle) --- */
.steps { padding: 100px 0; }

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    align-items: flex-start; /* Mantiene le animazioni indipendenti */
}

.step-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
    position: relative;
    cursor: pointer; 
    overflow: hidden; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    
    /* LOGICA DI UNIFORMITÀ: 
       Questa altezza minima garantisce che tutte e tre le caselle 
       partano esattamente dalla stessa dimensione visiva (pareggiando 
       il testo più lungo), risultando geometricamente perfette a riposo. 
    */
    min-height: 240px; 
}

.step-card:hover, .step-card:focus { 
    transform: translateY(-10px); 
    box-shadow: 0 30px 60px rgba(0,136,204,0.15); 
    outline: none; 
}

.step-card .number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--brand-blue);
    opacity: 0.1;
    position: absolute;
    top: 10px;
    right: 20px;
}

.step-card h3 { margin-bottom: 15px; font-size: 1.4rem; color: var(--dark-blue); }
.step-card p { color: var(--text-light); font-size: 1rem; }

/* --- MOTORE DELL'ANIMAZIONE A TENDINA --- */

.step-details {
    max-height: 0; 
    opacity: 0;    
    margin-top: 0;
    transition: all 0.6s ease; 
    font-size: 0.95rem;
    line-height: 1.6;
    border-top: 1px solid rgba(0,0,0,0); 
}

.step-details p {
    margin-bottom: 15px;
}

.step-details p:last-child {
    margin-bottom: 0;
}

.step-details strong {
    color: var(--brand-blue);
}

.step-card:hover .step-details, .step-card:focus .step-details {
    max-height: 500px; 
    opacity: 1;        
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.08); 
}

/* --- FOOTER --- */
footer { background: #0a1118; color: #888; padding: 60px 0; text-align: center; }
.disclaimer { font-size: 0.8rem; margin-top: 20px; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.6; color: #aaa; }

@media (max-width: 768px) {
    .hero-content h1 { font-size: 2.2rem; }
    .btn-primary { margin-bottom: 20px; display: block; margin-right: 0; }
    .step-card { 
        padding: 30px; 
        min-height: auto; /* Sui cellulari le caselle vanno una sotto l'altra, non serve forzare l'altezza fissa */
    } 
}