/* =========================================================================
   RIZIERI — Foglio di stile principale
   Stile: "Nature Distilled" (caldo, editoriale, artigianale)
   Palette terrosa (crema / terracotta / oro) + tipografia serif elegante.
   Pubblico anche over 60 → testo grande, alto contrasto, tutto leggibile.
   ========================================================================= */

/* ---- 1. Design tokens ------------------------------------------------- */
:root {
  /* Colori — superfici */
  --cream:      #FAF6F1;   /* sfondo principale */
  --cream-2:    #F3EAE0;   /* sezioni alternate (sabbia calda) */
  --paper:      #FFFFFF;   /* card / superfici in rilievo */

  /* Colori — testo */
  --ink:        #2A211C;   /* testo principale (bruno quasi nero) */
  --ink-soft:   #4A3F38;   /* testo secondario */
  --stone:      #877A6E;   /* testo attenuato / didascalie */

  /* Colori — marca e accenti */
  --terracotta:      #B4552E;  /* CTA / accento primario */
  --terracotta-dark: #97431F;  /* hover */
  --gold:            #C79A3B;  /* marca (logo) / filetti decorativi */
  --gold-deep:       #A67C22;
  --sage:            #6E7358;  /* accento secondario (verde oliva) */
  --sage-dark:       #565B44;

  /* Linee e ombre */
  --line:       #E7DBCD;
  --shadow-sm:  0 1px 2px rgba(42,33,28,.06), 0 2px 6px rgba(42,33,28,.05);
  --shadow-md:  0 6px 18px rgba(42,33,28,.08), 0 2px 6px rgba(42,33,28,.05);
  --shadow-lg:  0 22px 48px rgba(42,33,28,.14), 0 6px 16px rgba(42,33,28,.08);

  /* Raggi */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Spaziatura (scala calma, marketing) */
  --s-1: 6px;  --s-2: 10px; --s-3: 16px; --s-4: 24px;
  --s-5: 36px; --s-6: 56px; --s-7: 88px; --s-8: 128px;

  /* Larghezza contenuto */
  --maxw: 1200px;
  --maxw-narrow: 760px;

  /* Font */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- 2. Reset & base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 18px;            /* base generosa per leggibilità */
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--terracotta); text-decoration: none; }
a:hover { color: var(--terracotta-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 600; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
p  { margin: 0 0 1em; color: var(--ink-soft); }

/* ---- 3. Layout helpers ---------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(20px, 5vw, 48px); }
.section { padding-block: clamp(56px, 9vw, 128px); }
.section--tint { background: var(--cream-2); }
.section--dark { background: #241C17; color: #F3E7DB; }
.section--dark h2, .section--dark h3 { color: #FBF3EA; }
.section--dark p { color: #D8C8BA; }
.narrow { max-width: var(--maxw-narrow); margin-inline: auto; }
.center { text-align: center; }

/* Occhiello + titolo sezione */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-family: var(--font-sans);
  font-weight: 700; font-size: .8rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: var(--s-3);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--gold); border-radius: 2px; }
.section-head { max-width: 640px; margin-bottom: var(--s-6); }
.section-head.center { margin-inline: auto; }
.section-head p { font-size: 1.12rem; color: var(--stone); margin-bottom: 0; }

/* ---- 4. Bottoni ------------------------------------------------------ */
.btn {
  --btn-bg: var(--terracotta); --btn-fg: #fff; --btn-bd: var(--terracotta);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-family: var(--font-sans); font-weight: 700; font-size: 1rem;
  line-height: 1; padding: 16px 28px; min-height: 52px;
  border: 1.5px solid var(--btn-bd); border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg); cursor: pointer;
  transition: transform .18s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); background: var(--terracotta-dark); color:#fff; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: var(--line); box-shadow: none; }
.btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--stone); }
.btn--gold { --btn-bg: var(--gold-deep); --btn-bd: var(--gold-deep); }
.btn--gold:hover { background: #8f6a1c; }
.btn--lg { font-size: 1.1rem; padding: 20px 36px; min-height: 60px; }
.btn--on-dark.btn--ghost { --btn-fg: #F3E7DB; --btn-bd: rgba(243,231,219,.35); }
.btn--on-dark.btn--ghost:hover { background: rgba(255,255,255,.08); color:#fff; }
.btn svg { width: 1.15em; height: 1.15em; }

/* ---- 5. Header / navigazione ---------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,246,241,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, box-shadow .3s ease, background .3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: 76px; }
.brand { display: flex; align-items: center; gap: .7em; text-decoration: none; }
.brand img { height: 46px; width: auto; }
.brand .brand-sub { font-family: var(--font-sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--stone); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 10px 14px; border-radius: var(--r-pill);
  color: var(--ink-soft); font-weight: 600; font-size: .98rem;
  transition: background .18s ease, color .18s ease;
}
.nav-links a:hover { background: var(--cream-2); color: var(--ink); }
.nav-links a.active { color: var(--terracotta); }
.nav-cta { display: flex; align-items: center; gap: var(--s-2); }
.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: 1.5px solid var(--line);
  border-radius: var(--r-md); background: var(--paper); cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 22px; height: 2px; background: var(--ink);
  border-radius: 2px; transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle span::before { transform: translateY(-7px); }
.nav-toggle span::after  { transform: translateY(5px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1px); }

/* ---- 6. Hero --------------------------------------------------------- */
.hero { position: relative; padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(48px, 8vw, 112px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .6em;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 8px 16px 8px 12px; font-weight: 700; font-size: .9rem; color: var(--ink-soft);
  box-shadow: var(--shadow-sm); margin-bottom: var(--s-4);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); }
.hero h1 { margin-bottom: var(--s-4); }
.hero h1 em { font-style: italic; color: var(--terracotta); }
.hero-lead { font-size: clamp(1.05rem, 2vw, 1.28rem); color: var(--ink-soft); max-width: 44ch; margin-bottom: var(--s-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.hero-stats { display: flex; gap: var(--s-5); margin-top: var(--s-6); flex-wrap: wrap; }
.hero-stats .stat strong { display: block; font-family: var(--font-serif); font-size: 2rem; color: var(--ink); line-height: 1; }
.hero-stats .stat span { font-size: .92rem; color: var(--stone); }

.hero-visual { position: relative; }
.hero-figure {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  box-shadow: var(--shadow-lg); aspect-ratio: 4/5; border: 1px solid var(--line);
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-float {
  position: absolute; bottom: 22px; left: -18px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 14px 18px; display: flex; align-items: center; gap: 12px;
  max-width: 260px;
}
.hero-float .ic { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--cream-2); display: grid; place-items: center; color: var(--terracotta); }
.hero-float strong { display: block; font-family: var(--font-serif); font-size: 1rem; color: var(--ink); }
.hero-float span { font-size: .82rem; color: var(--stone); }

/* ---- 7. Trust strip -------------------------------------------------- */
.trust { border-block: 1px solid var(--line); background: var(--paper); }
.trust-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-4); }
.trust-item { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-weight: 600; }
.trust-item svg { width: 26px; height: 26px; color: var(--gold-deep); flex: none; }

/* ---- 8. Categorie (bento) ------------------------------------------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 1fr; gap: var(--s-3);
}
.cat-card {
  position: relative; grid-column: span 2; min-height: 260px;
  border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line);
  background: var(--paper); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none; color: var(--ink); isolation: isolate;
  transition: transform .22s ease, box-shadow .25s ease;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); color: var(--ink); }
.cat-card.is-wide { grid-column: span 3; }
.cat-card.is-tall { grid-row: span 2; min-height: 420px; }
.cat-media { position: absolute; inset: 0; z-index: -1; }
.cat-media img { width: 100%; height: 100%; object-fit: cover; }
.cat-card::after { /* velo per leggibilità testo */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(30,22,17,0) 32%, rgba(30,22,17,.72) 100%);
}
.cat-body { padding: var(--s-4); color: #fff; }
.cat-body h3 { color: #fff; margin-bottom: .15em; }
.cat-body p { color: rgba(255,255,255,.85); margin: 0; font-size: .96rem; }
.cat-tag {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  background: rgba(255,255,255,.92); color: var(--ink); border-radius: var(--r-pill);
  padding: 5px 12px; font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.cat-arrow {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.92);
  display: grid; place-items: center; color: var(--ink);
  transition: background .2s ease, transform .2s ease;
}
.cat-card:hover .cat-arrow { background: var(--terracotta); color: #fff; transform: rotate(-45deg); }

/* ---- 9. Configuratore highlight ------------------------------------- */
.config-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.config-visual {
  position: relative; border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid rgba(255,255,255,.12); box-shadow: var(--shadow-lg); aspect-ratio: 16/12;
}
.config-visual img { width: 100%; height: 100%; object-fit: cover; }
.config-badge {
  position: absolute; top: 16px; left: 16px;
  display: inline-flex; align-items: center; gap: .5em;
  background: rgba(20,15,12,.72); color: #fff; backdrop-filter: blur(6px);
  border-radius: var(--r-pill); padding: 8px 16px; font-weight: 700; font-size: .85rem;
}
.config-badge .live { width: 8px; height: 8px; border-radius: 50%; background: #7CCB7C; box-shadow: 0 0 0 0 rgba(124,203,124,.6); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(124,203,124,.55)} 70%{box-shadow:0 0 0 10px rgba(124,203,124,0)} 100%{box-shadow:0 0 0 0 rgba(124,203,124,0)} }
@media (prefers-reduced-motion: reduce){ .config-badge .live{ animation:none } }
.config-steps { list-style: none; margin: var(--s-5) 0; padding: 0; display: grid; gap: var(--s-3); }
.config-steps li { display: flex; gap: 14px; align-items: flex-start; }
.config-steps .n {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(199,154,59,.18); color: var(--gold); font-family: var(--font-serif);
  font-weight: 600; display: grid; place-items: center;
}
.config-steps strong { color: #FBF3EA; display:block; }
.config-steps span { color: #C9B7A8; font-size: .96rem; }

/* ---- 10. Servizi ----------------------------------------------------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.svc {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--s-5) var(--s-4); box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.svc:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.svc .ic {
  width: 54px; height: 54px; border-radius: var(--r-md); margin-bottom: var(--s-3);
  background: var(--cream-2); display: grid; place-items: center; color: var(--terracotta);
}
.svc .ic svg { width: 28px; height: 28px; }
.svc h3 { font-size: 1.22rem; margin-bottom: .3em; }
.svc p { font-size: .98rem; margin: 0; color: var(--stone); }

/* ---- 11. Storia / timeline ------------------------------------------ */
.story-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content:""; position:absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 var(--s-5) 64px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline .year {
  position: absolute; left: 0; top: -2px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--terracotta); color:#fff; font-family: var(--font-serif); font-weight: 600;
  font-size: .82rem; display: grid; place-items: center; box-shadow: var(--shadow-sm); z-index: 1;
}
.timeline h3 { font-size: 1.24rem; margin-bottom: .2em; }
.timeline p { margin: 0; color: var(--stone); font-size: .98rem; }
.story-figure { border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); aspect-ratio: 3/4; }
.story-figure img { width:100%; height:100%; object-fit: cover; }

/* ---- 12. Contatti ---------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
.info-list { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: grid; gap: var(--s-4); }
.info-list li { display: flex; gap: 16px; align-items: flex-start; }
.info-list .ic { flex: none; width: 46px; height: 46px; border-radius: var(--r-md); background: var(--cream-2); display: grid; place-items: center; color: var(--terracotta); }
.info-list .ic svg { width: 24px; height: 24px; }
.info-list .lbl { font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--stone); font-weight: 700; }
.info-list .val { font-size: 1.08rem; color: var(--ink); font-weight: 600; }
.info-list a.val:hover { color: var(--terracotta); }
.hours { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-4); box-shadow: var(--shadow-sm); }
.hours h3 { font-size: 1.15rem; margin-bottom: var(--s-3); }
.hours table { width: 100%; border-collapse: collapse; }
.hours td { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .98rem; }
.hours tr:last-child td { border-bottom: 0; }
.hours td:last-child { text-align: right; color: var(--ink-soft); font-weight: 600; }
.hours .closed { color: var(--stone); font-weight: 400; }
.map-wrap { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-height: 300px; height: 100%; }
.map-wrap iframe { width: 100%; height: 100%; min-height: 300px; border: 0; display: block; }
.contact-cta { margin-top: var(--s-4); background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); }

/* ---- 13. Footer ------------------------------------------------------ */
.site-footer { background: #241C17; color: #D8C8BA; padding-block: clamp(48px, 7vw, 88px) var(--s-5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); }
.footer-brand img { height: 52px; margin-bottom: var(--s-3); }
.footer-brand p { color: #B9A99A; max-width: 34ch; }
.footer-col h4 { font-family: var(--font-sans); font-weight: 700; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: #C79A3B; margin-bottom: var(--s-3); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: #D8C8BA; font-weight: 600; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; font-size: .88rem; color: #9C8B7C; }
.footer-bottom a { color: #9C8B7C; }
.footer-bottom a:hover { color: #fff; }

/* ---- 14. Placeholder immagini (finché non ci sono le foto reali) ----- */
/* Un'immagine con onerror mostra questo blocco elegante al posto della foto. */
.ph {
  width: 100%; height: 100%;
  background:
    radial-gradient(120% 100% at 20% 10%, rgba(199,154,59,.16), transparent 60%),
    linear-gradient(135deg, #E9DBCB 0%, #DCC7B0 45%, #C9AE92 100%);
  display: grid; place-items: center; text-align: center; color: #6b5843;
  position: relative; overflow: hidden;
}
.ph::after { content:""; position:absolute; inset:0; background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px); background-size: 7px 7px; opacity:.4; }
.ph-inner { position: relative; padding: 16px; }
.ph-inner svg { width: 46px; height: 46px; opacity: .55; margin-bottom: 8px; }
.ph-inner b { display:block; font-family: var(--font-serif); font-size: 1.05rem; color:#5a4632; }
.ph-inner small { font-size: .78rem; color: #7a6650; }

/* Stack: la foto reale (se c'è) copre il placeholder; se manca (onerror),
   resta il placeholder elegante sottostante. */
.hero-figure > *, .cat-media > *, .story-figure > *,
.config-visual > *, .embed-preview > * {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-figure > img, .cat-media > img, .story-figure > img,
.config-visual > img, .embed-preview > img { object-fit: cover; }

/* ---- 15. Animazioni di comparsa ------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"]{ transition-delay:.08s } .reveal[data-d="2"]{ transition-delay:.16s }
.reveal[data-d="3"]{ transition-delay:.24s } .reveal[data-d="4"]{ transition-delay:.32s }
@media (prefers-reduced-motion: reduce){ .reveal{ opacity:1; transform:none; transition:none } }

/* ---- 16. Pagina configuratore: extra --------------------------------- */
.subhero { background: var(--cream-2); border-bottom: 1px solid var(--line); }
.subhero-grid { display:grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px,5vw,64px); align-items:center; padding-block: clamp(40px,6vw,80px); }
.chip-row { display:flex; flex-wrap:wrap; gap:10px; margin-top: var(--s-4); }
.chip { background: var(--paper); border:1px solid var(--line); border-radius: var(--r-pill); padding:8px 15px; font-weight:600; font-size:.9rem; color: var(--ink-soft); display:inline-flex; align-items:center; gap:.5em; }
.chip svg{ width:18px;height:18px;color:var(--sage); }

.how-grid { display:grid; grid-template-columns: repeat(3,1fr); gap: var(--s-4); }
.how-card { background: var(--paper); border:1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5); box-shadow: var(--shadow-sm); position:relative; }
.how-card .step-n { font-family: var(--font-serif); font-size: 2.6rem; color: var(--gold); line-height:1; margin-bottom: var(--s-2); opacity:.85; }
.how-card h3 { font-size: 1.2rem; }
.how-card p { margin:0; color: var(--stone); font-size:.98rem; }

.embed-frame { border-radius: var(--r-xl); overflow:hidden; border:1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--paper); }
.embed-frame .bar { display:flex; align-items:center; gap:8px; padding:12px 16px; border-bottom:1px solid var(--line); background: var(--cream-2); }
.embed-frame .bar .d { width:11px;height:11px;border-radius:50%; }
.embed-frame .bar .d.r{background:#E0857A}.embed-frame .bar .d.y{background:#E8C06A}.embed-frame .bar .d.g{background:#8FC98F}
.embed-frame .bar .u { margin-left:10px; font-size:.82rem; color: var(--stone); font-weight:600; }
.embed-preview { position:relative; aspect-ratio: 16/10; }
.embed-preview img { width:100%; height:100%; object-fit: cover; }
.embed-overlay { position:absolute; inset:0; display:grid; place-items:center; background: linear-gradient(180deg, rgba(20,15,12,.15), rgba(20,15,12,.55)); }
.embed-overlay .box { text-align:center; color:#fff; padding: var(--s-4); }
.embed-overlay .box p { color: rgba(255,255,255,.9); margin-bottom: var(--s-4); }

.faq { display:grid; gap: var(--s-3); max-width: 820px; margin-inline:auto; }
.faq details { background: var(--paper); border:1px solid var(--line); border-radius: var(--r-md); padding: 4px 20px; box-shadow: var(--shadow-sm); }
.faq summary { cursor:pointer; font-family: var(--font-serif); font-size: 1.12rem; color: var(--ink); padding: 16px 0; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:16px; }
.faq summary::-webkit-details-marker { display:none; }
.faq summary::after { content:"+"; font-family: var(--font-sans); font-size:1.6rem; color: var(--terracotta); transition: transform .2s ease; line-height:1; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--ink-soft); }

/* ---- 18. Pagine reparto: breadcrumb, intro, gallery ------------------ */
.breadcrumb { display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:.9rem; color:var(--stone); margin-bottom: var(--s-4); }
.breadcrumb a { color: var(--stone); font-weight:600; }
.breadcrumb a:hover { color: var(--terracotta); }
.breadcrumb .sep { opacity:.6; }
.breadcrumb .cur { color: var(--ink); font-weight:700; }

.page-hero { background: var(--cream-2); border-bottom:1px solid var(--line); }
.page-hero .inner { display:grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px,5vw,64px); align-items:center; padding-block: clamp(40px,6vw,80px); }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin-bottom: var(--s-3); }
.page-hero .lead { font-size: clamp(1.05rem,2vw,1.24rem); color: var(--ink-soft); max-width: 46ch; }
.page-hero-figure { border-radius: var(--r-xl); overflow:hidden; box-shadow: var(--shadow-lg); border:1px solid var(--line); aspect-ratio: 4/3; position:relative; }
.page-hero-figure > * { position:absolute; inset:0; width:100%; height:100%; }
.page-hero-figure > img { object-fit:cover; }

/* elenco caratteristiche con spunta */
.feature-list { list-style:none; margin: var(--s-4) 0 0; padding:0; display:grid; gap:12px; }
.feature-list li { display:flex; gap:12px; align-items:flex-start; color:var(--ink-soft); }
.feature-list .tick { flex:none; width:26px; height:26px; border-radius:50%; background: rgba(110,115,88,.16); color:var(--sage-dark); display:grid; place-items:center; margin-top:1px; }
.feature-list .tick svg { width:15px; height:15px; }

/* colonne di testo + evidenze */
.rich { max-width: var(--maxw-narrow); }
.rich h2 { margin-top: var(--s-5); }
.highlight-cards { display:grid; grid-template-columns: repeat(3,1fr); gap: var(--s-4); }
.hl { background:var(--paper); border:1px solid var(--line); border-radius:var(--r-lg); padding:var(--s-5) var(--s-4); box-shadow:var(--shadow-sm); }
.hl .ic { width:50px; height:50px; border-radius:var(--r-md); background:var(--cream-2); display:grid; place-items:center; color:var(--terracotta); margin-bottom:var(--s-3); }
.hl .ic svg { width:26px; height:26px; }
.hl h3 { font-size:1.18rem; margin-bottom:.25em; }
.hl p { margin:0; color:var(--stone); font-size:.97rem; }

/* Galleria foto */
.gallery { display:grid; grid-template-columns: repeat(3,1fr); grid-auto-rows: 220px; gap: var(--s-3); }
.gallery-item { position:relative; border-radius:var(--r-lg); overflow:hidden; border:1px solid var(--line); box-shadow:var(--shadow-sm); background:var(--paper); }
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-item > * { position:absolute; inset:0; width:100%; height:100%; }
.gallery-item > img { object-fit:cover; transition: transform .4s ease; }
.gallery-item:hover > img { transform: scale(1.05); }
.gallery-note { text-align:center; color:var(--stone); font-size:.92rem; margin-top: var(--s-4); }

/* Navigazione tra reparti (in fondo alle pagine) */
.reparti-nav { display:grid; grid-template-columns: repeat(5,1fr); gap: var(--s-3); }
.reparti-nav a { display:flex; flex-direction:column; gap:8px; padding: var(--s-4); border:1px solid var(--line); border-radius:var(--r-lg); background:var(--paper); color:var(--ink); font-weight:700; box-shadow:var(--shadow-sm); transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease; }
.reparti-nav a:hover { transform:translateY(-3px); box-shadow:var(--shadow-md); color:var(--ink); border-color:var(--stone); }
.reparti-nav a.is-current { border-color: var(--terracotta); background: var(--cream-2); }
.reparti-nav .ic { width:40px;height:40px;border-radius:var(--r-sm);background:var(--cream-2);display:grid;place-items:center;color:var(--terracotta); }
.reparti-nav .ic svg{width:22px;height:22px}
.reparti-nav a.is-current .ic{background:var(--paper)}
.reparti-nav small{color:var(--stone);font-weight:600;font-size:.82rem}

/* ---- 17. Responsive -------------------------------------------------- */
@media (max-width: 980px) {
  .hero-grid, .config-split, .story-grid, .contact-grid, .subhero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; }
  .hero-figure { aspect-ratio: 16/12; }
  .config-visual { aspect-ratio: 16/11; }
  .story-figure { aspect-ratio: 16/11; max-width: 520px; }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .cat-card, .cat-card.is-wide, .cat-card.is-tall { grid-column: span 3; grid-row: auto; min-height: 240px; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav-links {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: var(--s-3);
    gap: 2px; box-shadow: var(--shadow-lg); transform: translateY(-140%); transition: transform .3s ease;
    max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 14px 16px; font-size: 1.05rem; border-radius: var(--r-md); }
  .nav-toggle { display: flex; }
  .nav .nav-cta .btn:not(.nav-cta-keep) { display: none; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card, .cat-card.is-wide, .cat-card.is-tall { grid-column: auto; min-height: 220px; }
  .trust-row { justify-content: flex-start; gap: var(--s-3) var(--s-5); }
}
@media (max-width: 480px) {
  .svc-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: var(--s-4); }
  .hero-float { left: 0; right: 0; margin-inline: auto; }
}

/* ---- 19. Responsive per pagine reparto ------------------------------ */
@media (max-width: 980px) {
  .page-hero .inner { grid-template-columns: 1fr; }
  .page-hero-figure { order:-1; max-width:520px; aspect-ratio:16/10; }
  .highlight-cards { grid-template-columns: 1fr; }
  .reparti-nav { grid-template-columns: repeat(2,1fr); }
  .gallery { grid-template-columns: repeat(2,1fr); grid-auto-rows: 200px; }
  .gallery-item.wide { grid-column: span 2; }
}
@media (max-width: 560px) {
  .reparti-nav { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .gallery-item.wide, .gallery-item.tall { grid-column: auto; grid-row: auto; }
}
