
:root {
    --dark-navy: #0B132B;
    --dark-navy-light: #172651;
    --gold-champagne: #C5A880;
    --gold-light: #dfc8a7;
    --text-dark: #1A1F22;
    --text-light: #737A7C;
    --bg-offwhite: #F8F9FA;
    --white: #FFFFFF;
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Montserrat', sans-serif;
    --shadow-soft: 0 10px 30px rgba(11, 19, 43, 0.08);
    --shadow-hover: 0 20px 40px rgba(197, 168, 128, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth; /* Scorrimento fluido nativo */
    scroll-padding-top: 70px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-offwhite);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* --- HEADER & NAV (Effetto Vetro Tech) --- */
header {
    position: fixed; 
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(197, 168, 128, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px; /* Dimensione fissa piccola fin dall'inizio */
}

header.scrolled .header-container { height: 70px; }

.logo img {
    max-height: 70px; /* Adatta il logo all'altezza del menu */
    width: auto;
    display: block;
    transition: transform 0.4s ease;
}

.logo:hover img {
    transform: scale(1.05); /* Piccolo effetto ingrandimento al passaggio del mouse */
}

.logo .subtitle { font-size: 10px; text-transform: uppercase; letter-spacing: 4px; color: var(--text-light); margin-bottom: 2px; font-weight: 500; transition: color 0.4s ease; }
.logo:hover .subtitle { color: var(--gold-champagne); }
.logo .title { font-family: var(--font-serif); font-size: 30px; color: var(--dark-navy); font-weight: 600; letter-spacing: 2px; line-height: 1; }

nav ul { display: flex; list-style: none; gap: 35px; align-items: center; }
nav ul li a {
    font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px;
    font-weight: 600; color: var(--text-light); position: relative; padding-bottom: 5px;
    transition: color 0.3s ease;
}

nav ul li a:hover, nav ul li a.active { color: var(--dark-navy); }

nav ul li a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 0; background-color: var(--gold-champagne); transition: width 0.3s ease;
}
nav ul li a:hover::after, nav ul li a.active::after { width: 100%; }

/* --- HERO SECTION --- */
.hero {
    margin-top: 70px;
    height: calc(100vh - 70px);
    min-height: 600px;
    background: linear-gradient(to bottom, rgba(11, 19, 43, 0.8), rgba(11, 19, 43, 0.95)), url('../img/hero-bg.jpeg') center top / cover; 
    display: flex; align-items: center; justify-content: center; text-align: center; padding: 0 20px;
    position: relative;
}

.hero-content { max-width: 900px; margin-top: 50px; z-index: 2; }
.hero h2 { font-family: var(--font-serif); font-size: 42px; color: var(--white); font-style: italic; font-weight: 400; line-height: 1.4; margin-bottom: 30px; }
.hero-divider { width: 80px; height: 3px; background: linear-gradient(90deg, transparent, var(--gold-champagne), transparent); margin: 0 auto 30px auto; }
.hero p { color: var(--gold-light); font-size: 14px; letter-spacing: 3px; text-transform: uppercase; font-weight: 500;}

/* --- LAYOUT SEZIONI --- */
section { padding: 70px 20px; }
.section-light { background-color: var(--bg-offwhite); }
.section-white { background-color: var(--white); }
.section-dark { background-color: var(--dark-navy); color: var(--white); }

.container { max-width: 1200px; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-family: var(--font-serif); font-size: 46px; color: var(--dark-navy); margin-bottom: 15px; }
.section-dark .section-header h2 { color: var(--white); }
.section-header .divider { width: 60px; height: 3px; background-color: var(--gold-champagne); margin: 0 auto; border-radius: 2px;}
.section-header p { margin-top: 20px; color: var(--text-light); max-width: 600px; margin-inline: auto; }

/* --- PROFILO --- */
.dropcap::first-letter {
    font-family: var(--font-serif); font-size: 85px; color: var(--gold-champagne);
    float: left; line-height: 65px; padding-top: 8px; padding-right: 15px;
}
.text-content p { margin-bottom: 20px; font-size: 16px; color: var(--text-dark); }
.profile-img-wrapper { 
    position: relative; 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: var(--shadow-soft); 
    transform: translateZ(0); /* Crea un livello 3D separato per non bloccare lo scroll */
}
.profile-img-wrapper img { width: 100%; height: auto; display: block; }

/* --- AREE COMPETENZA (Modern Cards) --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-box {
    background: var(--white); padding: 40px 30px; border-radius: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(197, 168, 128, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-box::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px;
    background: var(--gold-champagne); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}

.service-box:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.service-box:hover::before { transform: scaleX(1); }

.service-icon { width: 40px; height: 40px; margin-bottom: 25px; color: var(--dark-navy); transition: color 0.3s; }
.service-box:hover .service-icon { color: var(--gold-champagne); }
.service-box h4 { font-family: var(--font-serif); font-size: 26px; color: var(--dark-navy); margin-bottom: 15px; }
.service-box p { font-size: 14px; color: var(--text-light); }

/* --- STAFF --- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.profile-card {
    background: var(--bg-offwhite); padding: 30px; border-radius: 16px;
    border-left: 3px solid var(--gold-champagne);
    transition: all 0.3s ease;
}
.profile-card:hover { background: var(--white); box-shadow: var(--shadow-soft); transform: translateX(5px); }
.profile-info h3 { font-family: var(--font-serif); font-size: 24px; color: var(--dark-navy); }
.profile-info h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--gold-champagne); margin-bottom: 15px; font-weight: 600;}
.profile-info p { font-size: 14px; color: var(--text-dark); margin-bottom: 8px;}

/* --- CONTATTI E FORM --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; background: var(--white); border-radius: 20px; box-shadow: var(--shadow-soft); overflow: hidden; }
.contact-info { background: var(--dark-navy); color: var(--white); padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.contact-info h3 { font-family: var(--font-serif); font-size: 32px; color: var(--gold-champagne); margin-bottom: 30px; }

.contact-list { list-style: none; }
.contact-list li { margin-bottom: 25px; font-size: 15px; display: flex; flex-direction: column; }
.contact-list li span { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; color: var(--gold-light); margin-bottom: 5px; }

.contact-form { padding: 60px; }
.form-group { margin-bottom: 20px; position: relative; }
.form-group label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--dark-navy); margin-bottom: 8px; font-weight: 600; }
.form-group input, .form-group textarea {
    width: 100%; 
    padding: 15px 0; 
    border: none; 
    border-bottom: 2px solid #EEE; 
    font-family: var(--font-sans);
    font-size: 15px; 
    background: transparent;
    transition: border-color 0.3s ease; /* Anima solo il colore, non le dimensioni */
}

.form-group textarea {
    resize: vertical; /* Permette di allargare la casella solo verso il basso per non rompere il layout */
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-bottom-color: var(--gold-champagne); }

.submit-btn {
    background-color: var(--gold-champagne); color: var(--dark-navy); border: none; padding: 15px 35px;
    font-family: var(--font-sans); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px;
    cursor: pointer; transition: all 0.3s; border-radius: 4px; display: inline-block;
}
.submit-btn:hover { background-color: var(--dark-navy); color: var(--white); box-shadow: 0 10px 20px rgba(11, 19, 43, 0.2); transform: translateY(-2px); }

/* --- MAPPA --- */
.map-container { 
    width: 100%; 
    height: 400px; 
    line-height: 0; 
    margin-top: 80px; /* Distanzia la mappa dal box contatti sopra */
    position: relative;
    z-index: 2;
}
.map-container iframe { filter: grayscale(90%) contrast(1.2); transition: filter 0.5s ease; width: 100%; height: 100%; border: none;}
.map-container iframe:hover { filter: grayscale(0%) contrast(1); }

/* --- CALL TO ACTION (Pulsanti Premium) --- */
.cta-btn {
    background-color: var(--gold-champagne); color: var(--dark-navy) !important;
    padding: 10px 24px; border-radius: 4px; border: 1px solid var(--gold-champagne);
}
.cta-btn:hover { background-color: var(--dark-navy); color: var(--white) !important; border-color: var(--dark-navy); }
nav ul li a.cta-btn::after { display: none; }

/* --- PULSANTE TELEFONO FLUTTUANTE --- */
.floating-phone {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background-color: var(--gold-champagne); color: var(--white); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 10px 25px rgba(197, 168, 128, 0.4); z-index: 1000; transition: all 0.3s ease;
}
.floating-phone:hover { transform: translateY(-5px) scale(1.05); background-color: var(--dark-navy); box-shadow: var(--shadow-soft); }

/* --- FOOTER --- */
footer { background-color: var(--dark-navy); color: var(--white); text-align: center; padding: 50px 20px; }
footer .footer-logo { font-family: var(--font-serif); font-size: 26px; letter-spacing: 3px; color: var(--gold-champagne); margin-bottom: 15px; }
footer p { font-size: 13px; color: #A0A5AA; letter-spacing: 1px; }
footer a { color: var(--gold-champagne); transition: color 0.3s; }
footer a:hover { color: var(--white); }

/* --- ANIMAZIONI SCROLL REVEAL (JS) --- */
.reveal { 
    opacity: 0; 
    transform: translateY(30px); /* Movimento accorciato da 40 a 30 per maggiore fluidità */
    will-change: transform, opacity; /* Forza l'uso della GPU */
    -webkit-backface-visibility: hidden; /* Elimina i microscatti su Safari/iOS */
    backface-visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); 
}
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* --- RESPONSIVE (Smartphone) --- */
.menu-toggle { display: none; flex-direction: column; justify-content: space-between; width: 30px; height: 20px; cursor: pointer; z-index: 1001; }
.menu-toggle span { display: block; height: 2px; width: 100%; background-color: var(--dark-navy); transition: all 0.3s ease; }

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 1300px) {
    .grid-2, .contact-wrapper { grid-template-columns: 1fr; }
    .header-container { height: 70px; padding: 0 20px; }
    .menu-toggle { display: flex; }
    
    nav {
        position: absolute; top: 100%; left: 0; width: 100%; background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px); border-bottom: 1px solid rgba(197, 168, 128, 0.2); box-shadow: var(--shadow-soft);
        transform: translateY(-10px); opacity: 0; transition: all 0.4s ease; z-index: 999; pointer-events: none; visibility: hidden;
    }
    nav.menu-open { transform: translateY(0); opacity: 1; pointer-events: auto; visibility: visible; }
    nav ul { flex-direction: column; align-items: center; padding: 30px 0; gap: 20px; }
    
    .menu-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .hero h2 { font-size: 32px; }
    .contact-form { padding: 40px 20px; }
    section { padding: 80px 20px; }

    .section-header h2 { font-size: 32px; }

    /* Riduzione logo su mobile per non farlo toccare o uscire dai bordi */
    .logo img {
        max-height: 54px;
    }
}