
:root {
    --bg:        #ffffff;
    --soft:      #FBF7EC;
    --bubble:    #FBF7EC;
    --text:      #141414;
    --muted:     #56534C;
    --line:      rgba(20,20,20,0.10);
    --line-soft: rgba(20,20,20,0.06);
    --gold:      #CEA86F;
    --gold-dark: #B88B50;
    --shadow-lg: 0 32px 70px -28px rgba(20,20,20,0.32),
                 0 10px 22px -8px rgba(20,20,20,0.18);
    --shadow-md: 0 16px 34px -14px rgba(20,20,20,0.26),
                 0 4px 10px -4px rgba(20,20,20,0.12);
    --radius:    18px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
    /* Prevent the off-canvas mobile menu (translated 110% right) from
       producing horizontal page overflow on small screens. */
    overflow-x: hidden;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: 'Lora', Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.2; margin: 0 0 .4em; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 820px; }

.skip-link {
    position: absolute; left: -9999px; top: auto;
    background: var(--text); color: #fff; padding: 10px 16px; border-radius: 999px;
}
.skip-link:focus { left: 16px; top: 16px; z-index: 200; }

/* ===== Header ===== */
.site-header {
    position: sticky; top: 0;
    /* z-index needs to be above .site-nav (60) and body::after backdrop
       (55) so the toggle/X button on the header is always tappable, even
       when the mobile menu is open. */
    z-index: 70;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(150%) blur(8px);
    -webkit-backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid var(--line-soft);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    padding-block: 14px;
}
.brand img { width: 56px; height: 56px; object-fit: contain; }
.site-nav { display: flex; gap: 4px; }
.nav-link {
    text-decoration: none;
    font-size: 13px; letter-spacing: 0.10em; text-transform: uppercase; font-weight: 500;
    padding: 9px 18px; border-radius: 999px;
    transition: background-color .15s, color .15s;
}
.nav-link:hover { background: var(--line-soft); }
.nav-link.active { background: var(--text); color: #fff; }

.menu-toggle {
    display: none;
    width: 42px; height: 42px;
    border: 0; background: transparent; cursor: pointer;
    padding: 8px;
    position: relative;
    /* Stays on top of the open nav panel so the X icon is visible and
       tappable (without this the panel covers the toggle button). */
    z-index: 70;
}
.menu-toggle span {
    display: block; height: 2px; background: var(--text);
    margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 767px) {
    .menu-toggle { display: block; }
    .site-nav {
        position: fixed;
        top: 0; right: 0;
        width: min(82vw, 320px);
        /* Explicit full-viewport height. 100dvh handles iOS Safari's
           collapsing toolbar; 100vh is the fallback. */
        height: 100vh;
        height: 100dvh;
        background: #fff;
        padding: 88px 24px 32px;
        flex-direction: column; align-items: stretch;
        gap: 4px;
        box-shadow: -20px 0 60px -30px rgba(0,0,0,.4);
        /* Hidden until .open; visibility hides from AT and prevents click-
           through; translate gives a slide-in effect when toggled open. */
        visibility: hidden;
        transform: translateX(100%);
        transition: transform .25s ease, visibility 0s linear .25s;
        z-index: 60;
    }
    .site-nav.open {
        visibility: visible;
        transform: translateX(0);
        transition: transform .25s ease, visibility 0s linear 0s;
    }
    .nav-link { font-size: 15px; padding: 14px 18px; text-align: left; border-radius: 10px; }
    .nav-link.active { background: var(--text); color: #fff; }
    body.nav-open { overflow: hidden; }
    body.nav-open::after {
        content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55;
    }
}

/* ===== Hero (home) ===== */
.hero { padding: 24px 24px 0; }
.hero-card {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1920 / 815;
    background: var(--soft);
    box-shadow: var(--shadow-md);
}
.hero-image {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
.hero-bubble {
    position: absolute;
    top: 18%; left: 6%;
    width: 38%; max-width: 480px; min-width: 240px;
    padding: 40px 44px;
    background: var(--bubble);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.hero-bubble::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
}
.hero-bubble h1 {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2.4rem);
    letter-spacing: -0.01em;
}

@media (max-width: 767px) {
    /* On mobile, stack image then bubble instead of overlapping — the
       photo would otherwise have to be cropped to fit a portrait card. */
    .hero { padding: 16px; }
    .hero-card {
        aspect-ratio: auto;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
    }
    .hero-image {
        position: static;
        width: 100%;
        height: auto;
        aspect-ratio: 1920 / 815;
        object-fit: cover;
        border-radius: 14px;
        box-shadow: var(--shadow-md);
    }
    .hero-bubble {
        position: static;
        width: auto;
        max-width: none;
        margin-top: 16px;
        padding: 24px 26px;
        border-radius: 14px;
    }
    .hero-bubble h1 { font-size: clamp(1.5rem, 6vw, 2.1rem); }
}

/* ===== Hero (slim, contact / cookie) ===== */
.hero-slim {
    position: relative;
    height: 220px;
    overflow: hidden;
    margin: 24px 24px 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}
.hero-slim img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center 30%;
}
.hero-slim-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.55) 100%);
}
.hero-slim-text {
    position: relative;
    height: 100%;
    display: flex; align-items: flex-end;
    padding-bottom: 22px;
}
.hero-slim-text h1 {
    color: #fff; margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

@media (max-width: 767px) {
    .hero-slim { height: 160px; margin: 16px 16px 0; }
}

/* ===== Contact ===== */
.contact-section { padding: 56px 0 24px; }
.contact-grid {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
}
@media (max-width: 880px) {
    .contact-grid { grid-template-columns: 1fr; gap: 36px; }
    .contact-section { padding: 32px 0 16px; }
}
.lead {
    font-size: 1.075rem;
    color: var(--muted);
    margin: 0 0 12px;
}
.req { color: #c4453d; }
.req-note { font-size: .85rem; color: var(--muted); margin: 6px 0 16px; }

.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: .9rem; margin-bottom: 6px; color: var(--text); }
.form-row input,
.form-row textarea {
    display: block; width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font: inherit;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(206,168,111,0.18);
}
.form-row textarea { resize: vertical; min-height: 140px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 6px; }

.btn-primary, .btn-ghost {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; padding: 12px 26px;
    border-radius: 999px;
    font: 500 13px/1 'Inter', system-ui, sans-serif;
    letter-spacing: 0.08em; text-transform: uppercase;
    cursor: pointer;
    transition: background-color .15s, color .15s, transform .1s, border-color .15s;
}
.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-primary:active, .btn-ghost:active { transform: translateY(1px); }
.btn-ghost {
    background: transparent; color: var(--text);
    border: 1px solid var(--line);
    padding: 11px 22px;
}
.btn-ghost:hover { border-color: var(--text); background: var(--soft); }

.contact-info-col .company-title {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 1.05rem; letter-spacing: 0.08em; text-transform: uppercase;
    font-weight: 600; margin: 0 0 18px;
}
.contact-list {
    list-style: none; padding: 0; margin: 0 0 24px;
}
.contact-list li {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid var(--line-soft);
    color: var(--text);
}
.contact-list li:last-child { border-bottom: 0; }
.contact-list li a { color: inherit; text-decoration: none; }
.contact-list li a:hover { color: var(--gold-dark); }
.contact-list svg { flex-shrink: 0; color: var(--gold-dark); margin-top: 2px; }

.map {
    width: 100%; aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--line);
    margin: 16px 0 24px;
    background: #f3efe5;
}
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

.client-docs {
    background: var(--soft);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    font-size: .92rem;
    color: var(--muted);
}
.client-docs p { margin: 0 0 8px; color: var(--text); font-weight: 500; }
.client-docs ul { margin: 0; padding-left: 20px; }
.client-docs li { margin-bottom: 4px; }

/* ===== Cookie page ===== */
.cookie-section { padding: 48px 0 24px; }
.cookie-h1 {
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    margin-bottom: 18px;
}
.cookie-prose p { color: var(--muted); margin: 0 0 14px; }
.cookie-table {
    width: 100%;
    border-collapse: separate; border-spacing: 0;
    margin-top: 28px;
    font-size: .95rem;
}
.cookie-table th, .cookie-table td {
    text-align: left; vertical-align: top;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line-soft);
}
.cookie-table thead th {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase; letter-spacing: 0.06em;
    font-size: .8rem; color: var(--muted); font-weight: 600;
    border-bottom: 1px solid var(--line);
}
.cookie-table tbody th {
    font-weight: 600;
    color: var(--text);
    width: 28%;
}
.cat-tag {
    display: inline-block;
    font-size: .72rem; text-transform: uppercase; letter-spacing: .08em;
    font-weight: 600;
    padding: 3px 10px; border-radius: 999px;
    background: var(--soft); color: var(--gold-dark);
}
.cat-tag.cat-optional, .cat-tag.cat-optionnel, .cat-tag.cat-opzionale, .cat-tag.cat-facoltativo {
    background: #f0eef0; color: var(--muted);
}
.back-link {
    display: inline-block; margin-top: 30px;
    color: var(--gold-dark); text-decoration: none; font-weight: 500;
}
.back-link:hover { text-decoration: underline; }

/* ===== Footer ===== */
.site-footer {
    background: var(--soft);
    margin-top: 96px;
    padding: 50px 0 24px;
}
.site-footer .socials {
    display: flex; gap: 14px; justify-content: center; margin-bottom: 28px;
}
.site-footer .socials a {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: grid; place-items: center;
    border: 1px solid var(--gold);
    color: var(--gold-dark);
    background: #fff;
    text-decoration: none;
    transition: background-color .15s, color .15s, transform .15s;
}
.site-footer .socials a:hover { background: var(--gold); color: #fff; transform: translateY(-1px); }
.site-footer hr {
    border: 0; border-top: 1px solid var(--line);
    max-width: 720px; margin: 0 auto 36px;
}
.footer-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 36px;
    align-items: start;
    padding-bottom: 32px; border-bottom: 1px solid var(--line);
}
@media (max-width: 767px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px; text-align: center;
    }
}
.footer-label { color: var(--muted); margin: 0 0 10px; font-size: .9rem; }
.newsletter-form {
    display: flex; gap: 8px; max-width: 320px;
}
@media (max-width: 767px) { .newsletter-form { margin: 0 auto; } }
.newsletter-form input {
    flex: 1; min-width: 0;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font: inherit;
}
.newsletter-form input:focus {
    outline: none; border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(206,168,111,0.18);
}
.newsletter-form .btn-primary { padding-inline: 18px; }
.footer-center { text-align: center; }
.footer-center img { margin: 0 auto 10px; width: 90px; height: 90px; object-fit: contain; }
.footer-address { margin: 0; color: var(--text); font-size: .95rem; }
.footer-contact { text-align: right; }
@media (max-width: 767px) { .footer-contact { text-align: center; } }
.footer-contact a {
    display: block;
    color: var(--text); text-decoration: none;
    padding: 4px 0;
    font-size: 1rem;
}
.footer-contact a:hover { color: var(--gold-dark); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 12px;
    padding-top: 22px;
    font-size: .82rem; color: var(--muted);
}
.footer-bottom-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cookie-link { color: inherit; text-decoration: none; }
.cookie-link:hover { color: var(--text); text-decoration: underline; }
.lang-switch { display: flex; gap: 4px; align-items: center; }
.lang-link { color: var(--muted); text-decoration: none; padding: 2px 6px; border-radius: 4px; }
.lang-link:hover { color: var(--text); }
.lang-link.active { color: var(--text); font-weight: 600; }

@media (max-width: 767px) {
    .footer-bottom { justify-content: center; }
}

/* ===== Cookie banner ===== */
.cookie-banner {
    position: fixed;
    left: 16px; right: 16px; bottom: 16px;
    z-index: 80;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 24px 60px -22px rgba(20,20,20,0.38),
                0 6px 16px -6px rgba(20,20,20,0.16);
    padding: 20px 22px;
    max-width: 720px;
    margin: 0 auto;
    transform: translateY(140%);
    opacity: 0;
    transition: transform .35s ease, opacity .25s ease;
}
.cookie-banner[data-state="visible"] {
    transform: translateY(0);
    opacity: 1;
}
.cookie-banner-inner {
    display: flex; gap: 22px; align-items: center; justify-content: space-between;
    flex-wrap: wrap;
}
.cookie-banner-text { flex: 1 1 320px; min-width: 0; }
.cookie-banner-title {
    font-family: 'Inter', sans-serif;
    font-size: .78rem; letter-spacing: 0.12em; text-transform: uppercase;
    font-weight: 600; color: var(--gold-dark);
    margin: 0 0 6px;
}
.cookie-banner-text p {
    margin: 0;
    font-size: .92rem; color: var(--muted); line-height: 1.5;
}
.cookie-banner-learn {
    color: var(--text); text-decoration: underline;
    text-decoration-color: var(--line); text-underline-offset: 3px;
}
.cookie-banner-learn:hover { text-decoration-color: var(--text); }
.cookie-banner-actions {
    display: flex; gap: 10px; flex-shrink: 0;
}
@media (max-width: 560px) {
    .cookie-banner { left: 12px; right: 12px; bottom: 12px; padding: 16px 18px; }
    .cookie-banner-actions { width: 100%; justify-content: stretch; }
    .cookie-banner-actions .btn-primary,
    .cookie-banner-actions .btn-ghost { flex: 1; padding-inline: 14px; font-size: 12px; }
}

/* Slight visual nicety: small "form sent" toast injected by JS. */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--text); color: #fff;
    padding: 12px 22px; border-radius: 999px;
    font-size: .9rem;
    opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 200;
    max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
