/* ==========================================================================
   Arredamenti Bocchino — foglio di stile del sito nuovo
   Nessuna dipendenza esterna: nessun font remoto, nessun framework.
   Per cambiare la palette basta agire sulle variabili qui sotto.
   ========================================================================== */

:root {
    /* Colori */
    --bg:          #faf9f7;
    --surface:     #ffffff;
    --surface-alt: #f2efea;
    --ink:         #1a1917;
    --ink-soft:    #45413b;
    --muted:       #6f6a63;
    --line:        #e4ded6;
    --accent:      #8a6a4f;
    --accent-dark: #6b5139;
    --dark:        #23211e;
    --dark-soft:   #34302b;
    --on-dark:     #f2efea;

    /* Tipografia */
    --font-title: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --font-body:  system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Misure */
    --wrap: 1180px;
    --gap: clamp(1rem, 3vw, 2rem);
    --section-y: clamp(3.5rem, 9vw, 7rem);
    --radius: 4px;
    --shadow: 0 1px 2px rgba(26, 25, 23, .05), 0 8px 24px rgba(26, 25, 23, .06);
}

/* --------------------------------------------------------------- reset -- */

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: clamp(1rem, .97rem + .15vw, 1.0625rem);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
    font-family: var(--font-title);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.015em;
    margin: 0 0 .5em;
    text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 1.4rem + 3.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 1.25rem + 2.1vw, 2.7rem); }
h3 { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-dark); }
a:hover { color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

/* --------------------------------------------------------- utilities --- */

.wrap {
    width: min(100% - 2 * var(--gap), var(--wrap));
    margin-inline: auto;
}

.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface-alt); }
.section--dark { background: var(--dark); color: var(--on-dark); }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: #d8c3ad; }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section__head p { color: var(--muted); font-size: 1.075em; }
.section--dark .section__head p { color: #b8b1a7; }

.eyebrow {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: .9em;
}
.section--dark .eyebrow { color: #c9a882; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    background: var(--ink);
    color: #fff;
    padding: .8em 1.2em;
    text-decoration: none;
}
.skip-link:focus { left: 0; }

.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ buttons --- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: .55em;
    padding: .85em 1.5em;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .18s, color .18s, border-color .18s;
}

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); color: #fff; }

.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }

.section--dark .btn--ghost { border-color: #55504a; color: var(--on-dark); }
.section--dark .btn--ghost:hover { border-color: var(--on-dark); color: #fff; }

.btn__icon { width: 1.05em; height: 1.05em; flex: none; fill: currentColor; }

/* ------------------------------------------------------------- header --- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 249, 247, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header[data-scrolled="true"] {
    border-bottom-color: var(--line);
    box-shadow: 0 2px 16px rgba(26, 25, 23, .05);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 68px;
}

.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    text-decoration: none;
    color: var(--ink);
    margin-right: auto;
    padding-right: .5rem;
}
/* Il PNG è line-art chiara su trasparente, disegnato per fondo scuro:
   invert lo porta su scuro, brightness ne smorza il nero pieno. */
.brand__mark {
    height: 42px;
    width: auto;
    flex: none;
    filter: invert(1) brightness(.28);
}
@media (max-width: 400px) {
    /* Su schermi molto stretti l'header deve stare su una riga sola */
    .brand__mark { height: 34px; }
}
.brand__name {
    font-family: var(--font-title);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    line-height: 1.15;
    white-space: nowrap;
}

.nav ul {
    display: flex;
    align-items: center;
    gap: clamp(.9rem, 1.8vw, 1.9rem);
    list-style: none;
    margin: 0;
    padding: 0;
}
.nav a {
    color: var(--ink-soft);
    text-decoration: none;
    font-size: .925rem;
    font-weight: 500;
    padding: .4em 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="true"] { color: var(--ink); border-bottom-color: var(--accent); }

.header-tel { flex: none; }

.nav-toggle {
    display: none;
    flex: none;
    width: 44px; height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: transparent;
    cursor: pointer;
    color: var(--ink);
}
.nav-toggle svg { width: 20px; height: 20px; margin: auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 1040px) {
    .nav-toggle { display: flex; }
    .header-tel .btn__label { display: none; }
    .header-tel .btn { padding: .85em 1em; }

    .nav {
        position: absolute;
        inset: 100% 0 auto;
        background: var(--surface);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow);
        display: none;
    }
    .nav[data-open="true"] { display: block; }
    .nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: .5rem var(--gap) 1.25rem;
    }
    .nav a {
        display: block;
        padding: .85em 0;
        border-bottom: 1px solid var(--line);
        font-size: 1.05rem;
    }
    .nav li:last-child a { border-bottom: 0; }
    .nav a[aria-current="true"] { border-bottom-color: var(--line); color: var(--accent-dark); }
}

/* --------------------------------------------------------------- hero --- */

.hero {
    position: relative;
    padding-block: clamp(3.5rem, 10vw, 7.5rem) clamp(3rem, 8vw, 6rem);
    background:
        radial-gradient(60rem 30rem at 15% -10%, #fff 0%, transparent 60%),
        linear-gradient(170deg, var(--surface-alt) 0%, var(--bg) 55%);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

/* Il titolo riempie tutta la larghezza della sezione.
   text-wrap: balance è disattivato qui apposta: pareggiando le due righe
   lascerebbe ~115px di vuoto a destra e l'hero sembrerebbe più stretto
   delle sezioni sotto, pur avendo la stessa scatola. */
.hero h1 {
    margin-bottom: .35em;
    /* "wrap" è il valore di default; "normal" NON è valido per text-wrap
       e verrebbe scartato, lasciando attivo il balance ereditato. */
    text-wrap: wrap;
}

.hero__lead {
    font-size: clamp(1.075rem, 1rem + .5vw, 1.3rem);
    color: var(--ink-soft);
    /* 54rem tiene la riga sotto i ~95 caratteri senza lasciare
       un vuoto evidente rispetto alle sezioni successive */
    /* max-width: 54rem; */
    margin-bottom: 2rem;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.75rem; }

/* Griglia e non flex: con quattro voci il wrap libero lasciava un orfano
   (3+1) fra 768 e 1023 px. Il padding azzerato serve a togliere il rientro
   di default della <ul>, che spostava le voci 40px a destra del titolo. */
.hero__facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem clamp(1.5rem, 4vw, 3.5rem);
    padding: 1.75rem 0 0;
    border-top: 1px solid var(--line);
    list-style: none;
    margin: 0;
}
@media (min-width: 480px) {
    .hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .hero__facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.hero__facts li { padding-block: .5rem; }
.hero__facts strong {
    display: block;
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.1;
}
.hero__facts span { font-size: .875rem; color: var(--muted); }

/* Filigrana decorativa: nascosta agli screen reader */
.hero__mark {
    position: absolute;
    right: -6rem; bottom: -8rem;
    width: 30rem;
    opacity: .045;
    pointer-events: none;
    user-select: none;
}
@media (max-width: 780px) { .hero__mark { display: none; } }

/* ------------------------------------------------------------ avvisi ---- */

.avviso {
    background: var(--accent);
    color: #fff;
    text-align: center;
    padding: .9em var(--gap);
    font-weight: 600;
    letter-spacing: .01em;
}
.avviso p { margin: 0; }
.avviso--natale { background: #7a3b3b; }

/* ------------------------------------------------------------- prosa ---- */

.prosa { display: grid; gap: clamp(2rem, 5vw, 4rem); }
@media (min-width: 800px) { .prosa { grid-template-columns: 1fr 1fr; } }
.prosa p { color: var(--ink-soft); }

/* --------------------------------------------------------- categorie --- */

.cat-grid {
    display: grid;
    gap: clamp(.75rem, 2vw, 1.5rem);
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}

.cat-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--dark);
    text-decoration: none;
    color: #fff;
}
.cat-card img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .6, .2, 1), opacity .3s;
    opacity: .88;
}
.cat-card:hover img, .cat-card:focus-visible img { transform: scale(1.045); opacity: 1; }
.cat-card__label {
    position: absolute;
    inset: auto 0 0;
    padding: 2.5rem 1rem .9rem;
    background: linear-gradient(to top, rgba(20, 19, 17, .8) 25%, transparent);
    font-family: var(--font-title);
    font-size: 1.15rem;
    font-weight: 600;
}

/* ------------------------------------------------------------ marchi --- */

/* Riquadri con bordo proprio invece di una griglia con sfondo a vista:
   così l'ultima riga incompleta non lascia celle colorate vuote. */
.marchi {
    display: grid;
    gap: .5rem;
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.marchi li {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 5.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem .85rem;
    text-align: center;
    font-family: var(--font-title);
    font-size: 1.075rem;
    letter-spacing: .01em;
    color: var(--ink-soft);
}

/* ----------------------------------------------------------- servizi --- */

.servizi {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.servizio {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 3vw, 2rem);
}
.servizio h3 { margin-bottom: .45em; }
.servizio p { color: var(--muted); font-size: .96em; }
.servizio__num {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--accent);
    margin-bottom: 1.1em;
}

/* ------------------------------------------------------------ novità --- */

.novita {
    display: grid;
    gap: clamp(1rem, 2.5vw, 1.75rem);
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    list-style: none;
    margin: 0 0 2.5rem;
    padding: 0;
}
.novita article {
    background: var(--dark-soft);
    border-radius: var(--radius);
    overflow: hidden;
    height: 100%;
}
.novita img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.novita .testo { padding: 1.25rem 1.35rem 1.5rem; }
.novita h3 { margin-bottom: .35em; }
.novita p { color: #b8b1a7; font-size: .94em; }

/* -------------------------------------------------------- dove siamo --- */

.dove { display: grid; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (min-width: 860px) { .dove { grid-template-columns: 1.15fr .85fr; } }

.dove__foto {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    margin-bottom: 1.75rem;
}
.dove__azioni { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }

.orari {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.4rem, 3vw, 2rem);
}
.orari table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.orari th {
    text-align: left;
    font-weight: 600;
    padding: .6em 0;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.orari td {
    text-align: right;
    padding: .6em 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.orari tr:last-child th, .orari tr:last-child td { border-bottom: 0; }
.orari .chiuso { color: #9a938a; }

/* ---------------------------------------------------------- contatti --- */

.contatti {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.contatto__label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #b8b1a7;
    margin-bottom: .6em;
}
/* :not() esclude l'etichetta, che è anch'essa uno <span> figlio diretto */
.contatto a, .contatto > span:not(.contatto__label) {
    font-family: var(--font-title);
    font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem);
    color: #fff;
    text-decoration: none;
    line-height: 1.3;
}
.contatto a:hover { color: #d8c3ad; text-decoration: underline; text-underline-offset: .18em; }

/* ------------------------------------------------------------ footer --- */

.site-footer {
    background: #171614;
    color: #8d867d;
    padding-block: 2.5rem;
    font-size: .875rem;
}
.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1.75rem;
    justify-content: space-between;
    align-items: center;
}
/* Qui il marchio è nel suo ambiente naturale: fondo scuro, nessun filtro,
   dimensione sufficiente perché le righe si leggano. */
.site-footer__logo {
    width: 88px;
    height: auto;
    margin-bottom: 1.75rem;
    opacity: .85;
}
.site-footer a { color: #b8b1a7; }
.site-footer p { margin: 0; }

/* ============================================== pagine interne ========= */

/* Testata compatta per news e privacy */
.page-hero {
    padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3.25rem);
    background: linear-gradient(170deg, var(--surface-alt) 0%, var(--bg) 70%);
    border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3.1rem); margin-bottom: .3em; }
.page-hero p {
    color: var(--ink-soft);
    font-size: clamp(1.02rem, .98rem + .35vw, 1.2rem);
    max-width: 42rem;
}

.torna {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    margin-bottom: 1.5rem;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--muted);
}
.torna:hover { color: var(--ink); }

/* ------------------------------------------------------- news: lista -- */

.articoli {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
}
.articolo {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.articolo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.articolo__testo { padding: clamp(1.15rem, 2.5vw, 1.6rem); }
.articolo h2 { font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); margin-bottom: .35em; }
.articolo p { color: var(--muted); font-size: .96em; }
.articolo ul {
    margin: .9em 0 0;
    padding-left: 1.1em;
    color: var(--muted);
    font-size: .96em;
}

/* ---------------------------------------------------- testo legale --- */

.legale { max-width: 46rem; }
.legale h2 {
    font-size: clamp(1.3rem, 1.15rem + .6vw, 1.65rem);
    margin-top: 2.25em;
    padding-top: 1.25em;
    border-top: 1px solid var(--line);
}
.legale h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.legale h3 { font-size: 1.1rem; margin-top: 1.6em; }
.legale p, .legale li { color: var(--ink-soft); }
.legale ul { padding-left: 1.2em; }
.legale li { margin-bottom: .4em; }
.legale dl { margin: 0 0 1em; }
.legale dt { font-weight: 600; margin-top: .8em; }
.legale dd { margin: 0; color: var(--ink-soft); }

.nota {
    background: var(--surface-alt);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.1rem 1.35rem;
    margin: 2rem 0;
    font-size: .95em;
}
.nota p { color: var(--ink-soft); }
.nota strong { color: var(--ink); }

.aggiornamento {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    font-size: .9rem;
    color: var(--muted);
}

/* ------------------------------------------------------------ motion --- */

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ------------------------------------------------------------- stampa -- */

@media print {
    .site-header, .nav, .hero__mark, .cat-grid, .novita { display: none; }
    body { background: #fff; color: #000; }
}
