/* Base per siti clienti. Regole: due font, due grandezze (--title, --text), un solo fondo (--bg).
   Un'immagine sola va a tutta larghezza; piu' immagini scorrono in orizzontale con lo scroll.
   Per un nuovo cliente cambia solo :root e i due @font-face. */
@font-face { font-family: "Titoli"; src: url(../fonts/titoli.woff2) format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Testo"; src: url(../fonts/testo.woff2) format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }

:root {
  --bg: #fffaf2;             /* bianco caldo, come il latte */
  --bg-rgb: 255, 250, 242;   /* lo stesso colore, per le sfumature sulle foto */
  --accent: #d43a28;         /* il rosso delle etichette */
  --accent-hi: #b52f20;
  --accent-rgb: 212, 58, 40;
  --on-accent: #fffaf2;      /* testo sui bottoni pieni */
  --text-c: #1f1610;         /* marrone espresso */
  --muted: #43342a;
  --line: rgba(var(--accent-rgb), .3);
  /* i colori delle etichette: salvia, giallo, arancio, rosso. Solo per i cerchi dietro i prodotti */
  --c-refined: #b9d3ae; --c-velvety: #f7cf4f; --c-fullbodied: #f39647; --c-intense: #ea5a45;
  --title: clamp(36px, 4.6vw, 72px);
  --text: 18px;
  --font-title: "Titoli", "Times New Roman", serif;
  --font-text: "Testo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --sec: clamp(72px, 9vw, 132px);
}

/* niente scrollbar visibili, nemmeno da telefono */
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; scroll-behavior: smooth; scroll-padding-top: 96px; }
*, *::before, *::after { box-sizing: border-box; scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
body { margin: 0; background: var(--bg); color: var(--text-c); font-family: var(--font-text); font-weight: 300; font-size: var(--text); line-height: 1.6; overflow-x: clip; -webkit-font-smoothing: antialiased; }
body.menu-open { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
figure { margin: 0; }
p { margin: 0 0 .8em; color: var(--muted); }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-title); font-size: var(--title); font-weight: 600; line-height: 1.08; color: var(--text-c); }
em { font-style: normal; color: var(--accent); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- blocco di testo ---------- */
.block { max-width: 860px; margin: 0 auto; padding: var(--sec) var(--gutter) calc(var(--sec) * .62); text-align: center; }
.block h1, .block h2 { margin-bottom: .34em; }
.block.solo { padding-bottom: var(--sec); }
/* solo un bottone sotto una galleria: niente vuoto */
.block:not(:has(h1, h2)) { padding-top: 36px; padding-bottom: 0; }
.block:not(:has(h1, h2)):last-child { padding-bottom: var(--sec); }
.btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px; border: 1px solid var(--accent); white-space: nowrap; transition: background-color .25s, color .25s; }
.btn-fill { background: var(--accent); color: var(--on-accent); font-weight: 400; }
.btn-fill:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-line:hover { background: var(--accent); color: var(--on-accent); }
.link { color: var(--accent); border-bottom: 1px solid var(--line); }
.link:hover { color: var(--accent-hi); border-color: var(--accent-hi); }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 28px; padding: 14px var(--gutter); transition: background-color .3s; }
.site-header.is-solid, body:not(.has-hero) .site-header { background: rgba(var(--bg-rgb), .94); }
.brand img { height: 46px; width: auto; }
.nav { display: flex; gap: 34px; margin-left: auto; }
.nav a { padding: 4px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.menu-toggle { display: none; width: 44px; height: 44px; position: relative; margin-left: auto; }
.menu-toggle i { position: absolute; left: 10px; right: 10px; height: 1px; background: var(--text-c); transition: transform .3s; }
.menu-toggle i:first-child { top: 18px; } .menu-toggle i:last-child { top: 26px; }
.menu-toggle[aria-expanded="true"] i:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:last-child { transform: translateY(-4px) rotate(-45deg); }
.menu { position: fixed; inset: 0; z-index: 45; background: var(--bg); display: grid; place-items: center; }
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.menu a { font-family: var(--font-title); font-size: var(--title); font-weight: 600; }
.menu a:hover { color: var(--accent); }

/* ---------- apertura e immagini a tutta sezione con il testo sopra ---------- */
.cover { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.cover > img, .cover > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--bg-rgb), .45), transparent 24%, transparent 36%, rgba(var(--bg-rgb), .8) 60%, rgba(var(--bg-rgb), .93) 84%, var(--bg)); }
.cover-copy { position: absolute; z-index: 1; left: 0; right: 0; bottom: clamp(40px, 9vh, 92px); padding: 0 var(--gutter); text-align: center; }
.cover-copy h1 { max-width: 15em; margin: 0 auto .3em; }
.cover-copy p { max-width: 640px; margin: 0 auto; color: var(--text-c); }
.cover-side .cover-copy { left: 44%; text-align: left; }
.cover-side .cover-copy h1, .cover-side .cover-copy p { margin-left: 0; }
.cover-soft > img, .cover-soft > video { opacity: .5; }

/* ---------- una sola immagine: tutta la larghezza ---------- */
.full img, .full video { width: 100%; height: auto; max-height: 100vh; max-height: 100svh; object-fit: cover; }
.full.on-black img { mix-blend-mode: lighten; } /* il nero della foto diventa il fondo del sito */

/* ---------- piu' immagini: la pagina si ferma e loro scorrono in orizzontale ---------- */
.strip { --n: 2; position: relative; height: calc(100svh + (var(--n) - 1) * 75vh); }
.strip-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.strip-track { display: flex; width: calc(var(--n) * 100%); height: 100%; will-change: transform; }
.slide { position: relative; display: block; flex: 0 0 calc(100% / var(--n)); height: 100%; overflow: hidden; }
.slide > img, .slide > video { width: 100%; height: 100%; object-fit: cover; }
.slide.is-render > img { position: absolute; inset: 11% 0 6%; height: 83%; object-fit: contain; }
.slide-copy { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 90px var(--gutter) clamp(28px, 6vh, 56px); background: linear-gradient(180deg, transparent, rgba(var(--bg-rgb), .86) 72%); }
.slide-copy p { max-width: 720px; margin: 0; color: var(--text-c); }
.slide.is-render .slide-copy { background: none; }
.slide-copy .link { display: inline-block; margin-top: 8px; }
.strip-bar { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 14px; height: 1px; background: rgba(245, 245, 245, .24); }
.strip-bar i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.strip.is-static { height: auto; }
.strip.is-static .strip-pin { position: static; height: auto; }
.strip.is-static .strip-track { display: block; width: 100%; }
.strip.is-static .slide { height: 100svh; }
.strip.is-static .strip-bar { display: none; }

/* ---------- mosaico: al passaggio del mouse la foto diventa la seconda e compare la frase ---------- */
.mosaic { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 23vw; grid-auto-flow: dense; gap: 6px; padding: 0 6px; }
.mosaic .w2 { grid-column: span 2; } .mosaic .h2 { grid-row: span 2; }
.tile { position: relative; display: block; min-height: 0; overflow: hidden; }
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .6s ease, transform 1.2s cubic-bezier(.2, .7, .1, 1); }
.tile img + img { opacity: 0; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 16px 14px; background: linear-gradient(180deg, transparent, rgba(var(--bg-rgb), .9)); color: var(--text-c); opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .4s ease; }
.tile.is-on img, .tile.is-on video { transform: scale(1.05); }
.tile.is-on img + img, .tile.is-on .tile-cap { opacity: 1; }
.tile.is-on .tile-cap { transform: none; }
@media (hover: hover) {
  .tile:hover img, .tile:hover video, .tile:focus-visible img { transform: scale(1.05); }
  .tile:hover img + img, .tile:focus-visible img + img, .tile:hover .tile-cap, .tile:focus-visible .tile-cap { opacity: 1; }
  .tile:hover .tile-cap, .tile:focus-visible .tile-cap { transform: none; }
}

/* mosaico a tre colonne, per modelli e pagine secondarie */
.mosaic.m3 { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 31vw; }

/* ---------- colonne con una parola grande e una riga di testo ---------- */
.facts { --c: 3; display: grid; grid-template-columns: repeat(var(--c), 1fr); gap: 40px clamp(24px, 4vw, 64px); max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) var(--sec); }
.facts > div { padding-top: 18px; border-top: 1px solid var(--accent); }
.facts h3 { margin-bottom: .22em; }

/* ---------- scelte e prezzo ---------- */
.choice-form { max-width: 680px; margin: 0 auto; padding: var(--sec) var(--gutter); }
.choice-step { border: 0; padding: 0; margin: 28px 0 0; }
.choice-step legend { padding: 0; margin-bottom: 10px; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 46px; padding: 0 16px; border: 1px solid var(--line); cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip:has(input:checked) { border-color: var(--accent); color: var(--accent-hi); }
.chip:has(input:focus-visible) { outline: 1px solid var(--accent); outline-offset: 2px; }
.total { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.price { margin: 0; font-family: var(--font-title); font-size: var(--title); font-weight: 600; line-height: 1.1; color: var(--text-c); }

/* ---------- liste e form ---------- */
.rows { max-width: 680px; margin: 0 auto; text-align: left; }
.rows li { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:last-child { border-bottom: 1px solid var(--line); }
.rows b { font-weight: 400; color: var(--accent); white-space: nowrap; }
.form { display: grid; gap: 16px; max-width: 680px; margin: 0 auto; padding: 0 var(--gutter) var(--sec); }
.form label span { display: block; margin-bottom: 6px; color: var(--accent); }
.form input, .form textarea { width: 100%; background: none; border: 1px solid var(--line); padding: 12px 14px; border-radius: 0; }
.form input:focus, .form textarea:focus { outline: 1px solid var(--accent); }
.form-note { min-height: 1.6em; margin: 0; }

/* video intero con audio, in una finestra */
.video-dialog { width: min(92vw, 1180px); padding: 0; background: var(--bg); border: 1px solid var(--line); }
.video-dialog::backdrop { background: var(--bg); }
.video-dialog video { width: 100%; }
.video-dialog button { position: absolute; right: 10px; top: 10px; z-index: 1; padding: 6px 12px; background: var(--bg); }

/* whatsapp sempre a portata */
.wa { position: fixed; right: 18px; bottom: 26px; z-index: 40; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.wa:hover { background: var(--accent-hi); }
.wa svg { width: 26px; height: 26px; }

/* ---------- footer ---------- */
.site-footer { padding: var(--sec) 0 28px; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.footer-brand img { height: 68px; width: auto; }
.site-footer h2 { font-family: var(--font-text); font-size: var(--text); font-weight: 400; line-height: 1.6; color: var(--accent); margin-bottom: 8px; }
.site-footer nav a { display: block; padding: 2px 0; color: var(--muted); }
.site-footer nav a:hover { color: var(--accent); }
.footer-legal { display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; max-width: 1320px; margin: 40px auto 0; padding: 0 var(--gutter); }
.footer-legal p { margin: 0; }
.footer-legal a:hover { color: var(--accent); }

/* ---------- telefono: stesse sezioni e stesse immagini ---------- */
@media (max-width: 980px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .brand img { height: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
  .facts { grid-template-columns: repeat(min(var(--c), 2), 1fr); }
}
@media (max-width: 620px) {
  :root { --text: 17px; }
  .btn { padding: 0 22px; }
  .mosaic, .mosaic.m3 { grid-template-columns: 1fr 1fr; grid-auto-rows: 46vw; }
  .mosaic.m3 .tile:last-child:nth-child(odd) { grid-column: span 2; }
  .facts { grid-template-columns: 1fr; gap: 28px; }
  .slide.is-render > img { inset: 12% 0 auto; height: 64%; }
  .tile-cap { padding: 40px 10px 10px; }
  .cover-side .cover-copy { left: 0; }
  .cover .btns { flex-direction: column; align-items: center; }
  .cover .btn { min-width: 230px; }
  .wa { right: 12px; bottom: 24px; width: 48px; height: 48px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
