:root {
    /* Palette Oceano / Azzurro */
    --primary-gradient: linear-gradient(135deg, #4A90E2, #50E3C2);
    --bg-color: #F0F4F8; /* Azzurro chiarissimo, quasi ghiaccio */
    --text-color: #1A365D; /* Blu profondo scuro */
    --accent-blue: #3182CE; /* Blu intermedio */
    --accent-teal: #4FD1C5; /* Acqua marina */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Ambient Background Mesh - Toni Blu/Azzurro */
.ambient-bg {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 50% 50%, rgba(74,144,226,0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 20%, rgba(80,227,194,0.1) 0%, transparent 30%),
        radial-gradient(circle at 20% 80%, rgba(49,130,206,0.08) 0%, transparent 40%);
    z-index: -1;
    animation: breathe 18s ease-in-out infinite alternate;
}

@keyframes breathe {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--text-color);
}

header {
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-blue);
}

.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 4vw, 4.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.15;
}

.hero-image {
    width: 100%;
    max-width: 800px;
    height: 350px;
    object-fit: cover;
    border-radius: 20px;
    margin: 2rem auto;
    box-shadow: 0 15px 35px rgba(26, 54, 93, 0.1);
    opacity: 0.9;
}

.quote {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 2rem auto;
    opacity: 0.9;
    font-style: italic;
    font-family: 'Playfair Display', serif;
    color: var(--accent-blue);
}

.quote-author {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 3rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-style: normal;
}

.btn {
    display: inline-block;
    padding: 1.1rem 2.5rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(74, 144, 226, 0.4);
}

.glass-container {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 4rem;
    box-shadow: 0 10px 40px rgba(26, 54, 93, 0.05);
    max-width: 1000px;
    margin: 0 auto;
}

main {
    flex-grow: 1;
}

/* Sezioni Interne / Contenuto testuale */
.content-section {
    padding: 6rem 5%;
    max-width: 1000px;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.text-card {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 4rem 3rem;
    font-size: 1.15rem;
    overflow: hidden;
}

.text-card p {
    margin-bottom: 1.5rem;
}

.text-card strong {
    color: var(--accent-blue);
}

/* Services Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 40px rgba(26, 54, 93, 0.08);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    color: var(--accent-blue);
}

/* Griglia per gli Spunti/Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: transform 0.3s;
}
.blog-card:hover { transform: translateY(-5px); }

/* Form Contatti */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(49, 130, 206, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.contact-form input:focus, .contact-form textarea:focus {
    border-color: var(--accent-blue);
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.9s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 5rem;
    background: rgba(255,255,255,0.4);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
}

/* Interactive Compass */
.interactive-compass-wrapper {
    perspective: 1000px;
    display: inline-block;
    margin: 2rem auto;
}

.interactive-compass {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 15px 35px rgba(26, 54, 93, 0.15);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.5s;
    cursor: pointer;
    animation: float-compass 6s ease-in-out infinite;
}

@keyframes float-compass {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.interactive-compass:hover {
    transform: translateY(-5px) scale(1.05) rotate(5deg);
    box-shadow: 0 25px 45px rgba(74, 144, 226, 0.3);
    animation-play-state: paused;
}

/* Split Layout Style (Tacchetto) */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 80vh;
    align-items: center;
    overflow: hidden;
}

.split-text {
    padding: 10% 15%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.split-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.split-image-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.3);
}

.split-section.reverse {
    direction: rtl;
}
.split-section.reverse > * {
    direction: ltr;
}

@media (max-width: 900px) {
    .split-section {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .split-text {
        padding: 4rem 2rem;
    }
    .split-image {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .glass-container { padding: 2rem; }
    .content-section { padding: 4rem 1.5rem; }
}

/* Mobile Responsiveness */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
}
.mobile-menu-btn span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s;
}
@media (max-width: 768px) {
    header {
        padding: 1.5rem 5%;
        position: relative;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        z-index: 999;
    }
    .nav-links.nav-active {
        right: 0;
    }
    .nav-links a {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }
    .hero {
        padding-top: 6rem !important;
        min-height: auto;
    }
    .hero h1 {
        font-size: clamp(2.2rem, 8vw, 3rem) !important;
    }
    .glass-container {
        padding: 2rem 1.5rem;
    }
    .content-section {
        padding: 4rem 5%;
    }
    .text-card {
        padding: 2rem 1.5rem;
    }
    .hero-section {
        padding: 4rem 5% !important;
        gap: 2rem !important;
    }
}
