html {
    scroll-behavior: smooth;
}

:root {
    /* Palette sintetica */
    --color-bg: #f7f3ee;        /* avorio caldo */
    --color-bg-alt: #ffffff;    /* bianco */
    --color-bg-soft: #f1e6d7;   /* beige leggero per studio */
    --color-primary: #1f3047;   /* blu profondo */
    --color-text: #171717;      /* quasi nero */
    --color-muted: #6b6b6b;     /* grigio testo */
    --color-accent: #d0a354;    /* oro molto soft (solo CTA e dettagli) */
    --color-accent-soft: #f6ebd6;
    --color-contact-bg: #1f3047; /* stesso blu per contatti */

    --max-width: 1280px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Lato", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
}

/* link telefono */
a.tel-link {
    color: inherit;
    text-decoration: none;
}
a.tel-link:hover {
    text-decoration: underline;
}

/* nascondi badge reCAPTCHA (testo legale inserito nell'HTML) */
.grecaptcha-badge {
    visibility: hidden;
}

/* Titoli principali in Playfair */
.section-title,
.value-title {
    font-family: "Playfair Display", serif;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0;
}

/* ==========================
   HEADER
   ========================== */

.site-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    background: rgba(247,243,238,0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 24px;
    width: 100%;
}

/* importantissimo: i figli del flex header possono restringersi */
.site-header-inner > * {
    min-width: 0;
}

/* Logo */

.logo--with-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

/* Logo cliccabile */
a.logo {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a.logo:hover {
    opacity: 0.85;
}

/* Assicura che il logo non abbia underline */
a.logo::after {
    display: none;
}

.logo-bar {
    width: 2px;
    height: 42px;
    margin-top: 6px;
    background: var(--color-primary);
}

.logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo-name {
    font-family: "Playfair Display", serif;
    font-weight: 600;
    font-size: 1.6rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.logo-sub {
    font-family: "Playfair Display", serif;
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-muted);
}

/* Menu desktop */

.main-nav {
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    min-width: 0;
    flex-shrink: 1;
}

.main-nav a {
    color: var(--color-primary);
    position: relative;
    white-space: nowrap;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: var(--color-accent);
    transition: width 0.9s ease;
}


@media (max-width:899px) {
    .main-nav a:hover::after {
        width: 155px;
    }
}

@media (min-width:900px) {
    .main-nav a:hover::after {
        width: 100%;
    }
}

/* Hamburger (desktop: nascosto) */

.nav-toggle {
    display: none;
    position: relative;
    width: 32px;
    height: 24px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.nav-toggle-bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
    transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease, bottom 0.2s ease;
}

.nav-toggle-bar:nth-child(1) { top: 4px; }
.nav-toggle-bar:nth-child(2) { top: 11px; }
.nav-toggle-bar:nth-child(3) { bottom: 4px; }

body.nav-open .nav-toggle-bar:nth-child(1) {
    top: 11px;
    transform: rotate(45deg);
}
body.nav-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}
body.nav-open .nav-toggle-bar:nth-child(3) {
    bottom: 11px;
    transform: rotate(-45deg);
}


/* ==========================
   HERO
   ========================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}

/* sostituisci l'immagine con quella reale */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../assets/img/hero-studio-placeholder.jpg");
    background-size: cover;
    background-position: center;
    filter: brightness(0.35);
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 15%, rgba(255,255,255,0.08), transparent 60%);
}

.hero-center {
    position: relative;
    text-align: center;
    max-width: 1060px;
}

.hero-name {
    font-family: "Playfair Display", serif;
    font-weight: 500;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
}

.hero-initial {
    font-size: 1.6em; /* E e B più grandi */
}

.hero-subline {
    font-family: "Playfair Display", serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 7rem;
}

/* tagline + payoff in Playfair */
.hero-tagline,
.hero-payoff {
    font-family: "Playfair Display", serif;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.5;
}
.hero-tagline {
    margin-bottom: 6px;
}
.hero-payoff {
    margin-bottom: 4rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    border-radius: 0;
    border: 1px solid transparent;
    background-color: var(--color-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.btn-primary:hover {
    background-color: #b78a3f;
}


/* ==========================
   SEZIONI GENERICHE
   ========================== */

.section {
    padding: 200px 0;
}

section#contatti.section {
    padding: 120px 0;
}

.section--alt {
    background-color: var(--color-bg-alt);
}

.section--studio {
    padding: 0;
}

.section-header {
    margin-bottom: 60px;
}

.section-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 8px;
}

.section-title {
    font-weight: 600;
    font-size: 2.4rem;
    margin: 0 0 6px;
    color: var(--color-primary);
}

.section-title-small {
    font-size: 1.4rem;
    margin-top: 100px;
}

.section-subtitle {
    font-size: 0.96rem;
    color: var(--color-muted);
    max-width: 43rem;
    margin-bottom: 50px;
}

.section-subtitle-italic {
    font-size: 0.92rem;
    color: var(--color-muted);
    font-style: italic;
    margin: 0 0 16px;
}

.section-body p {
    margin: 0 0 14px;
    font-size: 0.98rem;
    line-height: 1.7;
}

/* ==========================
   AREE DI SPECIALIZZAZIONE
   ========================== */

@media (min-width: 900px) {
    .split-50 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 26px;
    }
}

@media (max-width: 899px) {
    .split-50 {
        display: grid;
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

.card {
    background: var(--color-bg-soft);
    border-radius: 0;
    border: 1px solid rgba(0,0,0,0.04);
}

.card--tinted {
    background: var(--color-accent-soft);
}

/* versione con immagine in alto */
.card--with-image {
    display: flex;
    flex-direction: column;
}

.card-media {
    margin: 0;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 80px 60px;
}

@media (max-width:600px) {
    .card-content {
        padding: 80px 20px;
    }
}

.card-title {
    font-family: "Playfair Display", serif;
    font-size: 1.3rem;
    margin: 0 0 8px;
    color: var(--color-primary);
}

.card-content p {
    font-size: 0.96rem;
    line-height: 1.7;
    margin: 0 0 10px;
}

.card-footer-link {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

section#aree.section.section--alt div.container div.split-50 article.card.card--with-image.reveal.in-view div.card-content a.btn-primary {
    margin-top: 40px;
}

/* ==========================
   STUDIO 50/50 FULL HEIGHT
   ========================== */

.studio-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 80vh;
}

.studio-image {
    position: relative;
    overflow: hidden;
}

.studio-image-bg {
    position: absolute;
    inset: 0;
    background-image: url("../assets/img/Eliana_Bernardini.jpg");
    background-size: cover;
    background-position: top;
    filter: brightness(0.85);
}

.studio-text-wrapper {
    background: var(--color-bg-soft);
    display: flex;
    align-items: center;
}

@media (min-width:900px) {
    .studio-text {
        padding: 120px 0;
        max-width: 600px;
    }
}

@media (max-width:899px) {
    .studio-text {
        padding: 120px 0;
    }

    .studio-text-wrapper {
        padding: 0 20px;
    }
}

/* ==========================
   PUNTI DI FORZA
   ========================== */

.values-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.value-item {
    text-align: left;
}

.value-icon {
    width: 50px;
    height: 32px;
    border-radius: 0;
    border: 1px solid var(--color-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    margin-bottom: 10px;
    color: #fff;
    background: var(--color-primary);
}

.value-title {
    font-size: 1.4rem;
    color: var(--color-primary);
    font-weight: bold;
    margin-bottom: 15px;
}

.value-text {
    font-size: 0.85rem;
    color: var(--color-muted);
}

/* ==========================
   CONTATTI
   ========================== */

.section--contacts {
    background: var(--color-contact-bg);
    color: #f6f3ee;
}

/* header sopra la griglia */
.contact-header {
    margin-bottom: 32px;
}

.section-kicker-light {
    color: #d6d8df;
}

.section-title-light {
    color: #ffffff;
}

.section-subtitle-light {
    font-size: 0.96rem;
    color: #d6d8df;
    max-width: 34rem;
    padding-right: 25px;
}

@media (max-width:767px) {
    .section-subtitle-light {
        max-width: 100%;
        padding-right: 0;
    }
}

/* griglia 40/60: info + form */
.contacts-grid {
    display: grid;
    grid-template-columns: 3fr 3fr;
    gap: 40px;
    align-items: flex-start;
}

.contact-block {
    font-size: 0.90rem;
    margin-bottom: 30px;
}

.contact-info a {
    color: #f6cf8a;
}

@media (min-width: 900px) {
    div.contact-info.reveal.in-view {
        margin-top: 25px;
        margin-left: 30px;
    }

    .contact-note {
        font-size: 0.86rem;
        color: #d6d8df;
        margin-top: 10px;
    }
}

@media (max-width: 899px) {
    div.contact-info.reveal.in-view {
        margin-top: 60px;
        margin-bottom: 60px;
    }

    .contact-note {
        font-size: 0.86rem;
        color: #d6d8df;
        margin-top: 60px;
    }
}

p.contact-block strong {
    margin-bottom: 13px;
    display: inline-block;
    font-size: 18px;
    text-transform: uppercase;
    font-family: "Playfair Display", serif;
}

/* Form */

.contact-form {
    border-radius: 0;
    padding: 22px 0;
}

.form-row {
    margin-bottom: 14px;
}

label {
    display: block;
    font-size: 0.7em;
    margin-bottom: 6px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #d6d8df;
    font-family: "Lato";
    font-weight: revert-layer;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px 11px;
    border-radius: 0;
    border: 1px solid rgba(255,255,255,0.24);
    background: rgba(8,14,25,0.6);
    font-family: inherit;
    font-size: 0.92rem;
    color: #f6f3ee;
}

input::placeholder,
textarea::placeholder {
    color: #9ca4b6;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-primary--light {
    background-color: var(--color-accent);
    border-color: transparent;
}

.btn-primary--light:hover {
    background-color: #b78a3f;
}

.privacy-note {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #d6d8df;
}

/* FOOTER */

.site-footer {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 18px 20px 26px;
    font-size: 0.8rem;
    color: var(--color-muted);
}

/* REVEAL ON SCROLL */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    overflow: hidden;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================
   RESPONSIVE
   ========================== */

@media (min-width: 900px) {
    .mobile {
        display: none;
    }
}

/* padding laterale 20px da 1320px in giù per le sezioni richieste */
@media (max-width: 1320px) {
    .site-header-inner,
    #aree .container,
    #valori .container,
    #contatti .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* breakpoint principale mobile/tablet: da 899px in giù */
@media (max-width: 899px) {

    .desk {
        display: none;
    }

    /* header fisso in alto - IMPORTANTE: evita overflow */
    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 50;
        overflow: visible;
    }

    .site-header-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* spazio per non coprire l'hero */
    main {
        padding-top: 70px;
    }

    /* hamburger visibile */
    .nav-toggle {
        display: block;
        z-index: 60;
        flex-shrink: 0;
    }

    /* LOGO: evita che si sovrapponga all'hamburger */
    .logo--with-bar {
        flex-shrink: 1;
        min-width: 0;
        max-width: calc(100% - 60px);
    }

    .logo-name {
        font-size: 1.3rem;
    }

    .logo-sub {
        font-size: 0.85rem;
    }

    /* menu mobile a tendina */
    .main-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        background: rgba(247,243,238,0.98);
        backdrop-filter: blur(8px);
        padding: 16px 20px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.08);
        gap: 12px;
        display: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        z-index: 40;
    }

    /* Link del menu mobile */
    .main-nav a {
        padding: 18px 0;
        display: block;
        font-size: 0.9rem;
        /*border-bottom: 1px solid rgba(0,0,0,0.05);*/
    }

    .main-nav a:last-child {
        border-bottom: none;
    }

    /* Quando menu è aperto */
    body.nav-open {
        overflow-x: hidden;
    }

    body.nav-open .main-nav {
        display: flex;
    }

    /* Overlay opzionale quando menu è aperto */
    body.nav-open::after {
        content: "";
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 30;
        animation: fadeIn 0.2s ease;
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .site-header-inner {
        align-items: center;
    }

    .hero {
        min-height: calc(100vh - 70px);
    }

    .split-50,
    .values-grid,
    .studio-inner,
    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .studio-text {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .studio-image {
        min-height: 600px;
    }

    .hero-name {
        font-size: 2.1rem;
    }

    .section-title {
        font-size: 1.7rem;
    }
}

/* Schermi molto piccoli */
@media (max-width: 380px) {
    .logo-name {
        font-size: 1.1rem;
    }
    
    .logo-sub {
        font-size: 0.75rem;
    }
    
    .logo-bar {
        height: 36px;
    }
}

/* ulteriori ritocchi hero su varie larghezze */

@media (min-width: 1000px) {
    .hero-name {
        font-size: 5.3rem;
    }

    .hero-subline {
        font-size: 3.2rem;
    }
}

@media (min-width: 830px) and (max-width:999px) {
    .hero-name {
        font-size: 4.3rem;
    }

    .hero-subline {
        font-size: 2.8rem;
    }
}

@media (min-width: 769px) and (max-width:829px) {
    .hero-name {
        font-size: 3.3rem;
    }

    .hero-subline {
        font-size: 2.6rem;
    }
}

@media (max-width: 767px) {
    .hero-subline {
        font-size: 1.4rem;
    }

    .hero-tagline,
    .hero-payoff {
        padding-left: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 480px) {
    .values-grid {
        grid-template-columns: 1fr;
    }

    .hero-name {
        font-size: 1.9rem;
    }
}

@media (max-width: 387px) {
    .hero-name {
        font-size: 1.8rem !important;
    }
}