/* =========================================================================
   Studio Marchetti — style.css
   Palette: inchiostro/petrolio + ottone, carta avorio.
   Display: Fraunces · Testo: Inter · Dati/etichette: IBM Plex Mono
   ========================================================================= */

:root {
    --paper:     #F7F4EE;
    --surface:   #FFFFFF;
    --ink:       #1B2A38;
    --navy:      #17384B;
    --navy-2:    #0F2A3A;
    --brass:     #E06A10;   /* arancione del brand (accento) */
    --brass-d:   #B0530B;   /* arancione scuro: testo/hover su fondo chiaro */
    --brass-lt:  #F2A55A;   /* arancione chiaro: accento su fondo scuro */
    --muted:     #5A6A74;
    --line:      #E4DED2;
    --line-cool: #E6EAE9;

    --wrap: 1120px;

    --f-display: "Fraunces", Georgia, serif;
    --f-body:    "Inter", system-ui, -apple-system, sans-serif;
    --f-mono:    "IBM Plex Mono", ui-monospace, monospace;

    --radius: 4px;
    --shadow: 0 1px 2px rgba(15,42,58,.06), 0 8px 28px rgba(15,42,58,.06);
}

.hidden{display: none !important;}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--f-body);
    font-size: 17px;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-decoration-color: rgba(181,122,42,.45); text-underline-offset: 3px; }
a:hover { color: var(--brass-d); }
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; line-height: 1.12; color: var(--ink); margin: 0 0 .5em; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

/* ---- Doppio filetto: elemento firma (carta intestata) ------------------ */
.rule { border: 0; height: 4px; width: 56px; margin: 0 0 22px;
        background:
            linear-gradient(var(--navy), var(--navy)) top/100% 3px no-repeat,
            linear-gradient(var(--brass), var(--brass)) bottom/100% 1px no-repeat; }
.rule.center { margin-inline: auto; }

/* Occhiello / eyebrow in mono */
.eyebrow {
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--brass-d);
    margin: 0 0 14px;
}

/* ---- Pulsanti ---------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .5em;
    font-family: var(--f-body); font-weight: 500; font-size: .98rem;
    padding: 13px 26px; border-radius: var(--radius);
    border: 1.5px solid transparent; cursor: pointer;
    text-decoration: none; transition: background .18s, color .18s, border-color .18s, transform .06s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); color: #fff; }
.btn-accent { background: var(--brass); color: #2A1403; }
.btn-accent:hover { background: #C85F0C; color: #2A1403; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-sm { padding: 9px 18px; font-size: .9rem; }

/* =========================================================================
   Header + navigazione
   ========================================================================= */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(247,244,238,.92);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; }

.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--navy); }
.brand-logo { height: 50px; width: auto; display: block; }
.brand-seal { color: var(--brass); display: flex; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 1.28rem; color: var(--ink); }
.brand-sub  { font-family: var(--f-mono); font-size: .64rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
    display: inline-block; padding: 9px 13px; border-radius: var(--radius);
    font-size: .95rem; font-weight: 500; color: var(--ink); text-decoration: none;
    transition: color .15s, background .15s;
}
.main-nav a:hover { color: var(--brass-d); background: rgba(181,122,42,.08); }
.main-nav a.is-active { color: var(--navy); box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.main-nav a.nav-cta {
    background: var(--brass); color: #2A1403; margin-left: 8px; padding-inline: 18px;
}
.main-nav a.nav-cta:hover { background: #C85F0C; color: #2A1403; box-shadow: none; }
.main-nav a.nav-cta.is-active { box-shadow: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px;
              justify-content: center; align-items: center; background: none; border: 0; cursor: pointer; }
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform .2s, opacity .2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero { position: relative; overflow: hidden; background: var(--navy-2); color: #EAF0F2; }
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(1200px 500px at 82% -10%, rgba(181,122,42,.22), transparent 60%),
        repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 34px);
    pointer-events: none;
}
.hero-inner { position: relative; padding: 84px 0 92px; max-width: 720px; }
.hero .eyebrow { color: var(--brass-lt); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.2vw, 3.7rem); font-weight: 500; letter-spacing: -.01em; }
.hero h1 em { font-style: italic; color: var(--brass-lt); }
.hero p.lead { font-size: 1.18rem; color: #C3D2D9; max-width: 56ch; margin: 18px 0 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero .rule { background:
        linear-gradient(#fff, #fff) top/100% 3px no-repeat,
        linear-gradient(var(--brass), var(--brass)) bottom/100% 1px no-repeat; }

/* Striscia contatti sotto l'hero */
.hero-strip { background: var(--navy); color: #cfe0e6; border-top: 1px solid rgba(255,255,255,.08); }
.hero-strip .wrap { display: flex; flex-wrap: wrap; gap: 8px 40px; padding: 16px 20px; font-family: var(--f-mono); font-size: .82rem; }
.hero-strip strong { color: #fff; font-weight: 500; }
.hero-strip a { color: #cfe0e6; }
.hero-strip a:hover { color: #fff; }

/* =========================================================================
   Sezioni generiche
   ========================================================================= */
.section { padding: 76px 0; }
.section-tint { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 46px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 6px 0 0; }

/* Intestazione pagina interna */
.page-head { background: var(--navy-2); color: #EAF0F2; padding: 62px 0 58px; position: relative; overflow: hidden; }
.page-head::before { content:""; position:absolute; inset:0;
    background: radial-gradient(900px 380px at 88% -20%, rgba(181,122,42,.18), transparent 60%); }
.page-head .wrap { position: relative; }
.page-head .eyebrow { color: var(--brass-lt); }
.page-head h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 500; margin: 0; }
.page-head p { color: #C3D2D9; max-width: 62ch; margin: 14px 0 0; font-size: 1.08rem; }
.page-head .rule { background:
        linear-gradient(#fff, #fff) top/100% 3px no-repeat,
        linear-gradient(var(--brass), var(--brass)) bottom/100% 1px no-repeat; }

/* =========================================================================
   Card / griglie
   ========================================================================= */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--surface); border: 1px solid var(--line-cool);
    border-radius: var(--radius); padding: 30px 28px; box-shadow: var(--shadow);
}
.card .card-ic { color: var(--brass); margin-bottom: 16px; }
.card h3 { font-size: 1.24rem; margin-bottom: 8px; }
.card p { color: var(--muted); margin: 0; font-size: .98rem; }

/* Blocco servizio (elenco raggruppato) */
.svc { background: var(--surface); border: 1px solid var(--line-cool); border-radius: var(--radius);
       padding: 30px 30px 26px; box-shadow: var(--shadow); }
.svc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.svc-head .svc-ic { color: var(--brass); flex: none; }
.svc-head h3 { margin: 0; font-size: 1.22rem; }
.svc ul { list-style: none; margin: 16px 0 0; padding: 0; }
.svc li { position: relative; padding: 8px 0 8px 26px; border-top: 1px solid var(--line-cool); color: #35424c; font-size: .97rem; }
.svc li:first-child { border-top: 0; }
.svc li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 8px; height: 8px;
                  border: 1.5px solid var(--brass); border-radius: 50%; }

/* Riquadro evidenza (area riservata) */
.callout { background: var(--navy-2); color: #E7EEF1; border-radius: var(--radius); padding: 40px 42px; }
.callout .eyebrow { color: var(--brass-lt); }
.callout h2 { color: #fff; font-size: 1.7rem; }
.callout p { color: #C3D2D9; }
.callout ul { columns: 2; gap: 34px; margin: 18px 0 26px; padding: 0; list-style: none; }
.callout li { padding: 6px 0 6px 22px; position: relative; font-size: .96rem; break-inside: avoid; }
.callout li::before { content: "›"; position: absolute; left: 2px; color: var(--brass); font-weight: 700; }

/* =========================================================================
   Form
   ========================================================================= */
.form-card { background: var(--surface); border: 1px solid var(--line-cool);
             border-radius: var(--radius); padding: 38px 40px; box-shadow: var(--shadow); }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--f-mono); font-size: .74rem; letter-spacing: .08em;
               text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.field label .req { color: var(--brass-d); }
.field input, .field textarea, .field select {
    width: 100%; font-family: var(--f-body); font-size: 1rem; color: var(--ink);
    padding: 12px 14px; background: #FCFBF9; border: 1.5px solid var(--line);
    border-radius: var(--radius); transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none; border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(23,56,75,.12); background: #fff;
}
.field textarea { min-height: 130px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-note { font-size: .86rem; color: var(--muted); margin: 4px 0 22px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius); padding: 14px 18px; margin-bottom: 26px; font-size: .96rem; }
.alert-ok  { background: #E9F3EC; border: 1px solid #BEDDC7; color: #1F5133; }
.alert-err { background: #FBECEA; border: 1px solid #E7C3BD; color: #7A2B20; }

/* =========================================================================
   Contatti / info
   ========================================================================= */
.info-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: start; }
.info-block { background: var(--surface); border: 1px solid var(--line-cool);
              border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow); }
.info-block + .info-block { margin-top: 22px; }
.info-block h3 { font-size: 1.12rem; display: flex; align-items: center; gap: 10px; }
.info-block h3 svg { color: var(--brass); }
.info-block p, .info-block address { font-style: normal; color: #35424c; margin: 6px 0 0; }
.info-data { font-family: var(--f-mono); font-size: .86rem; color: var(--muted); }

.map-frame { border: 1px solid var(--line-cool); border-radius: var(--radius); overflow: hidden;
             box-shadow: var(--shadow); line-height: 0; }
.map-frame iframe { width: 100%; height: 340px; border: 0; }

.hours-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.hours-table th, .hours-table td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line-cool);
                                   font-size: .96rem; }
.hours-table th { font-weight: 500; color: var(--ink); }
.hours-table td { color: var(--muted); font-family: var(--f-mono); font-size: .86rem; }
.hours-table tr.closed td { color: #B04A3A; }

/* CTA finale */
.cta-band { background: var(--navy); color: #fff; text-align: center; padding: 64px 0; }
.cta-band h2 { color: #fff; font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.cta-band p { color: #C3D2D9; max-width: 52ch; margin: 0 auto 28px; }

/* Prose (pagine testuali: modulistica, privacy, area riservata) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 40px; }
.prose p, .prose li { color: #35424c; }
.prose ul { padding-left: 22px; }

/* Elenco documenti (modulistica) */
.doc-list { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.doc-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px;
               background: var(--surface); border: 1px solid var(--line-cool); border-radius: var(--radius);
               padding: 16px 20px; box-shadow: var(--shadow); }
.doc-list .doc-name { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.doc-list .doc-name svg { color: var(--brass); flex: none; }

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer { background: var(--navy-2); color: #B9C8D0; margin-top: 0;
               border-top: 3px solid var(--brass); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 34px; padding: 56px 0 40px; }
.footer-brand { font-family: var(--f-display); font-size: 1.4rem; color: #fff; font-weight: 600; }
.footer-sub { color: #93A6B0; font-family: var(--f-mono); font-size: .74rem; text-transform: uppercase;
              letter-spacing: .06em; margin: 4px 0 16px; }
.footer-line { margin: 0 0 12px; color: #C6D3DA; }
.footer-data { font-family: var(--f-mono); font-size: .78rem; color: #8FA3AD; margin: 0; }
.footer-title { font-family: var(--f-body); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
                color: var(--brass-lt); margin: 0 0 14px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 9px; font-size: .95rem; }
.footer-list a { color: #C6D3DA; text-decoration: none; }
.footer-list a:hover { color: #fff; }
.footer-orari { color: #8FA3AD; font-family: var(--f-mono); font-size: .8rem; }
.footer-note { font-size: .9rem; color: #93A6B0; margin: 0 0 16px; }
.footer-cdl { display: inline-block; background: #fff; padding: 10px 12px; border-radius: var(--radius);
              margin: 0 0 18px; line-height: 0; }
.footer-cdl img { height: 54px; width: auto; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
                 padding: 20px 20px 30px; border-top: 1px solid rgba(255,255,255,.09);
                 font-size: .82rem; color: #8298A2; }
.footer-bottom a { color: #8298A2; }
.footer-bottom a:hover { color: #fff; }

/* Utilità */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 10px 16px; z-index: 100; border-radius: 4px; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .callout ul { columns: 1; }
}
@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        background: var(--paper); border-bottom: 1px solid var(--line);
        max-height: 0; overflow: hidden; transition: max-height .28s ease;
    }
    .main-nav.is-open { max-height: 460px; }
    .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px; }
    .main-nav a { padding: 13px 8px; border-radius: 4px; }
    .main-nav a.is-active { box-shadow: inset 3px 0 0 var(--brass); }
    .main-nav a.nav-cta { margin: 8px 0 0; text-align: center; }
    .grid-3, .grid-2, .form-row { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }
    .form-card, .callout { padding: 26px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
