/* La Mimosa Fiori — stile ricavato dal logo:
   fondo bordeaux scurissimo #240B0F, testo avorio, serif elegante (stile Didone),
   dettagli lineari sottili come il rametto di mimosa. */

:root {
  --bg: #17070a;
  --bg-deep: #110506;
  --bg-soft: #200d10;
  --cream: #f6efe6;
  --cream-dim: #d9cfc3;
  --rose: #c9a39a;
  --line: rgba(246, 239, 230, 0.22);
  --serif: "Cormorant Garamond", "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h3 { font-size: 1.5rem; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 1rem;
}

.wrap { width: min(1100px, 100% - 3rem); margin-inline: auto; }
.narrow { width: min(720px, 100% - 3rem); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(23, 7, 10, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  width: calc((100% - 3rem + min(1280px, 100% - 3rem)) / 2); /* intestazione a meta' strada tra larghezza massima 1280px e tutta la larghezza */
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.7rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.8rem; }
.brand img { height: 84px; width: auto; }
.brand small { font-size: 0.7em; letter-spacing: 0.3em; margin-left: 0.2em; color: var(--rose); }
.brand span {
  font-family: var(--serif); font-size: calc(1.35rem + 2pt); letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem 1.3rem; font-size: calc(0.8rem + 2pt); letter-spacing: 0.13em; text-transform: uppercase; }
.nav a { padding: 0.3rem 0; border-bottom: 1px solid transparent; transition: border-color .25s, color .25s; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--rose); color: var(--rose); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase;
  padding: 0.95rem 2.1rem;
  border: 1px solid var(--cream);
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--cream); color: var(--bg); }
.btn.solid { background: var(--cream); color: var(--bg); }
.btn.solid:hover { background: transparent; color: var(--cream); }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 5.5rem 0 5rem; position: relative; overflow: hidden; }
.hero .logo-big { width: min(250px, 60%); margin: 0 auto 2.5rem; }
.hero p.lead { max-width: 560px; margin: 1.6rem auto 0; color: var(--cream-dim); font-size: 1.1rem; }
.hero .btn-row { justify-content: center; }
.sprig {
  position: absolute; right: -40px; bottom: -30px; width: 260px; opacity: 0.12; pointer-events: none;
}
.sprig-left { left: -40px; right: auto; top: 20px; bottom: auto; transform: scaleX(-1); }

.divider {
  width: 64px; height: 1px; background: var(--rose); margin: 2rem auto; border: 0;
}

/* ---------- Sezioni ---------- */
section { padding: 5rem 0; }
.section-title { text-align: center; margin-bottom: 3rem; }

/* Card delle due strade (benvenuto) */
.paths { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; }
.paths .path-card { flex: 1 1 300px; max-width: calc(33.333% - 1.1rem); }
.path-card {
  position: relative; padding: 3.2rem 2.2rem 2.8rem;
  border: 1px solid var(--line); background: var(--bg-soft);
  text-align: center; transition: border-color .3s, transform .3s;
}
.path-card:hover { border-color: var(--rose); transform: translateY(-4px); }
.path-card h3 { margin-bottom: 1rem; }
.path-card p { color: var(--cream-dim); margin-bottom: 1.6rem; }
.path-card .more {
  font-size: 0.8rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--rose);
  border-bottom: 1px solid var(--rose); padding-bottom: 2px;
}

/* Colonne testo */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.4rem; }
.cols article { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.cols h3 { margin-bottom: 0.6rem; }
.cols p { color: var(--cream-dim); font-size: 0.98rem; }

.band { background: var(--bg-deep); border-block: 1px solid var(--line); }
.band.light { background: var(--cream); color: var(--bg); border: 0; }
.band.light .eyebrow { color: #8a5a55; }
.band.light p { color: #4a3538; }
.band.light .cols article { border-color: rgba(23, 7, 10, 0.25); }
.band.light .cols p { color: #4a3538; }
.band.light .btn { border-color: var(--bg); }
.band.light .btn:hover { background: var(--bg); color: var(--cream); }

.steps { counter-reset: s; list-style: none; max-width: 720px; margin-inline: auto; }
.steps li { counter-increment: s; position: relative; padding: 0 0 2rem 4rem; }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: -0.3rem;
  font-family: var(--serif); font-size: 2rem; color: var(--rose);
}
.steps h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.steps p { color: var(--cream-dim); }

/* Segnaposto foto */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.ph {
  aspect-ratio: 4 / 5; border: 1px dashed var(--line); display: grid; place-items: center;
  color: var(--cream-dim); font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase;
  text-align: center; padding: 1rem; background: rgba(246, 239, 230, 0.03);
}
.band.light .ph { border-color: rgba(23, 7, 10, 0.3); color: #6a5558; background: rgba(23, 7, 10, 0.03); }

.quote {
  font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 3.4vw, 2.1rem);
  text-align: center; max-width: 760px; margin: 0 auto; line-height: 1.4;
}

/* Contatto */
.contact { text-align: center; }
.contact .big-phone {
  display: inline-block; font-family: var(--serif); font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin: 0.4rem 0 0.8rem; border-bottom: 1px solid var(--rose);
}
.contact address { font-style: normal; color: var(--cream-dim); }
.note { color: var(--cream-dim); font-size: 0.95rem; }

/* Pagina contatti */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.info-grid h2 { margin-bottom: 1.2rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.info-block { font-style: normal; color: var(--cream-dim); font-size: 1.1rem; }
.info-block strong { color: var(--cream); font-weight: 400; }
.info-list { list-style: none; }
.info-list li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
.info-list span { color: var(--rose); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; align-self: center; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 0.75rem 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 300; }
.hours th { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.hours td { text-align: right; color: var(--cream-dim); }
.map { border: 1px solid var(--line); }
.map iframe { display: block; width: 100%; height: 420px; border: 0; filter: grayscale(0.4) brightness(0.9); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); text-align: center; padding: 2.4rem 0 3rem;
  font-size: 0.85rem; color: var(--cream-dim);
}
.site-footer .brand-line {
  font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream); margin-bottom: 0.4rem;
}

/* Pagina funebre: piu' sobria, niente accenti vivaci */
body.sober .eyebrow { color: var(--cream-dim); }
body.sober .hero { padding-top: 4.5rem; }
body.sober .btn.solid { background: var(--cream); }

@media (max-width: 800px) {
  .cols, .info-grid { grid-template-columns: 1fr; }
  .info-grid { gap: 3rem; }
  .paths .path-card { max-width: none; flex-basis: 100%; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 0.1rem 0.9rem; font-size: calc(0.68rem + 2pt); letter-spacing: 0.1em; justify-content: center; }
  .site-header { position: static; }
  .site-header .wrap { justify-content: center; }
  .brand span { font-size: calc(1.05rem + 2pt); }
  .brand img { height: 60px; }
  section { padding: 3.6rem 0; }
  .hero { padding: 3.5rem 0; }
}

/* ---------- Animazioni e transizioni tra pagine ---------- */
:root { --ease: cubic-bezier(0.22, 0.61, 0.36, 1); }
html { scroll-padding-top: 90px; }
body { overflow-x: clip; } /* evita la barra orizzontale mentre gli elementi scorrono */

/* Elementi che scorrono da sinistra o da destra (direzione impostata da script.js) */
html.js .reveal {
  opacity: 0;
  transform: translate3d(var(--dx, 60px), 0, 0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: transform, opacity;
}
html.js .reveal.in { opacity: 1; transform: none; }

/* Comparsa (foto e pagine "appear"): dissolvenza con lieve ingrandimento, senza scorrimento */
html.js .reveal.fade { transform: scale(0.97); transition-duration: 1.1s; }
html.js .reveal.fade.in { transform: none; }
/* Il logo di "Chi siamo" compare piu' lentamente degli altri elementi */
html.js .logo-big.reveal.fade { transition-duration: 2.6s; }

/* Passaggio fluido da una pagina all'altra (Chrome, Edge, Safari recenti) */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-group(site-header) { animation-duration: 0s; }
::view-transition-old(root) { animation: vt-out 0.25s ease both; }
::view-transition-new(root) { animation: vt-in 0.5s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translate3d(28px, 0, 0); } }

/* Browser senza view transitions: breve dissolvenza all'apertura della pagina */
@supports not (view-transition-name: none) {
  main { animation: page-in 0.5s var(--ease) both; }
  @keyframes page-in { from { opacity: 0; } }
}

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

/* Pulsanti WhatsApp per argomento (pagina Contatti) */
.wa-title { margin-top: 2rem; font-size: 1.3rem; }
.wa-topics { margin-top: 1rem; gap: 0.7rem; }
.wa-topics .btn { padding: 0.7rem 1.2rem; font-size: 0.75rem; }

/* ---------- Pop-up avvisi (gestiti da avvisi-config.js) ---------- */
body.avviso-aperto { overflow: hidden; }
.avviso-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1.2rem;
  background: rgba(10, 3, 5, 0.72); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.35s ease;
}
.avviso-overlay.visibile { opacity: 1; }
.avviso-box {
  position: relative; width: min(520px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--bg-soft); border: 1px solid var(--rose); padding: 2.6rem 2.2rem 2.2rem;
  text-align: center; transform: scale(0.96); transition: transform 0.35s var(--ease);
}
.avviso-overlay.visibile .avviso-box { transform: none; }
.avviso-item + .avviso-item { margin-top: 1.8rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.avviso-titolo { font-size: 1.9rem; margin-bottom: 0.8rem; }
.avviso-box p { color: var(--cream-dim); margin-bottom: 0.5rem; }
.avviso-chiudi { margin-top: 1.6rem; cursor: pointer; }
.avviso-x {
  position: absolute; top: 0.5rem; right: 0.8rem; background: none; border: 0; cursor: pointer;
  color: var(--cream); font-size: 1.9rem; line-height: 1; padding: 0.3rem 0.6rem;
}
.avviso-x:hover { color: var(--rose); }

/* ---------- Foto delle gallerie (generate dall'Editor del sito) ---------- */
.gallery .foto { margin: 0; display: flex; flex-direction: column; }
.gallery .foto-link { display: block; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; }
.gallery .foto img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  transition: transform .6s var(--ease, ease);
}
.gallery .foto-link:hover img { transform: scale(1.03); }
.gallery figcaption { padding: 0.8rem 0.2rem 0; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 0.8rem; }
.foto-nome { font-family: var(--serif); font-size: 1.25rem; line-height: 1.3; }
.foto-prezzo { color: var(--rose); font-size: 0.9rem; letter-spacing: 0.08em; white-space: nowrap; }
.foto-desc { flex-basis: 100%; color: var(--cream-dim); font-size: 0.9rem; line-height: 1.5; }
.band.light .gallery .foto-link { border-color: rgba(23, 7, 10, 0.2); }
.band.light .foto-prezzo { color: #8a5a55; }
.band.light .foto-desc { color: #4a3538; }
.gallery-after { margin-top: 3rem; }
.gallery-empty { text-align: center; }

/* Foto ingrandita (si apre cliccando una foto) */
.lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1.5rem;
  background: rgba(10, 3, 5, 0.92); opacity: 0; transition: opacity .3s ease; cursor: zoom-out;
}
.lightbox.visibile { opacity: 1; }
.lightbox img { max-width: 100%; max-height: 82vh; width: auto; height: auto; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lightbox p { margin-top: 1rem; text-align: center; color: var(--cream); font-family: var(--serif); font-size: 1.3rem; }
.lightbox-x {
  position: absolute; top: 0.6rem; right: 1rem; background: none; border: 0; color: var(--cream);
  font-size: 2.2rem; line-height: 1; cursor: pointer; padding: 0.3rem 0.6rem;
}

/* Pie' di pagina: contatti e dati legali */
.site-footer p { margin-top: 0.3rem; }
.site-footer a { border-bottom: 1px solid transparent; transition: border-color .25s, color .25s; }
.site-footer a:hover { color: var(--rose); border-color: var(--rose); }
.footer-links { color: var(--cream); }
.footer-legal { font-size: 0.78rem; letter-spacing: 0.06em; opacity: 0.85; }

/* Contatti: link social nella lista */
.social-links a { border-bottom: 1px solid var(--line); }

/* Mappa caricata solo dopo il consenso */
.map-placeholder { padding: 3rem 1.5rem; text-align: center; color: var(--cream-dim); }
.map-placeholder p { max-width: 520px; margin: 0 auto; font-size: 0.95rem; }
.map-placeholder .btn-row { justify-content: center; }
.map-placeholder button { cursor: pointer; font-weight: 300; }

/* Testi lunghi (Privacy) */
.prose h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); margin: 2.4rem 0 0.8rem; }
.prose h2:first-of-type { margin-top: 0; }
.prose p { color: var(--cream-dim); margin-bottom: 0.9rem; }
.prose a { border-bottom: 1px solid var(--rose); }

@media (max-width: 800px) {
  .foto-nome { font-size: 1.1rem; }
  .gallery figcaption { padding-top: 0.6rem; }
}
