/* Appesi — stile condiviso. Palette presa da AppesiStyle.swift. */

:root {
  --paper: #f5f0e3;
  --card: #fcfaf0;
  --ink: #3b3830;
  --muted: #7a7364;
  --terracotta: #a34f36;
  --terracotta-scuro: #8a4029;
  --filo: #7a6140;
  --bordo: rgba(59, 56, 48, 0.12);
  --ombra: rgba(59, 56, 48, 0.10);
  --salvia: #dce6d5;
  --misura: 1120px;
  --raggio: 18px;
  --sans: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --testo: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #221f1b;
    --card: #2b2723;
    --ink: #ece5d7;
    --muted: #a9a091;
    --terracotta: #d98a68;
    --terracotta-scuro: #e9a184;
    --filo: #8a7050;
    --bordo: rgba(236, 229, 215, 0.14);
    --ombra: rgba(0, 0, 0, 0.45);
    --salvia: #313a2e;
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--testo);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.contenitore { width: 100%; max-width: var(--misura); margin: 0 auto; padding: 0 20px; }
.stretto { max-width: 760px; }

h1, h2, h3 { font-family: var(--sans); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.3rem); }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1.1em; }
a { color: var(--terracotta); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terracotta-scuro); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; border-radius: 6px; }

/* ---------- testata ---------- */

.testata {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--bordo);
}
.testata .contenitore { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.marchio { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.marchio img { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 1px 4px var(--ombra); }
.marchio span { font-family: var(--sans); font-weight: 800; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.01em; }
.navigazione { display: flex; gap: 22px; font-size: .95rem; }
.navigazione a { color: var(--muted); text-decoration: none; font-weight: 500; white-space: nowrap; }
.navigazione a:hover { color: var(--terracotta); }
@media (max-width: 680px) { .navigazione { gap: 14px; font-size: .88rem; } }
@media (max-width: 560px) { .navigazione .solo-ampio { display: none; } }

/* ---------- apertura ---------- */

.apertura { padding: clamp(48px, 9vw, 88px) 0 clamp(36px, 6vw, 56px); text-align: center; }
.apertura .occhiello {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: .8rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--terracotta);
  background: var(--salvia); border-radius: 999px; padding: 6px 15px; margin-bottom: 20px;
}
.apertura .sottotitolo { font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: var(--muted); max-width: 30ch; margin: 0 auto 28px; }

.pulsanti { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 14px; }
.pulsante {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-family: var(--sans); font-weight: 700; font-size: 1rem; text-decoration: none;
  background: var(--terracotta); color: #fff; border: 2px solid var(--terracotta);
  transition: transform .15s ease, background .15s ease;
}
.pulsante:hover { background: var(--terracotta-scuro); border-color: var(--terracotta-scuro); color: #fff; transform: translateY(-1px); }
.pulsante.vuoto { background: transparent; color: var(--terracotta); }
.pulsante.vuoto:hover { background: color-mix(in srgb, var(--terracotta) 10%, transparent); color: var(--terracotta); }
.pulsante[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.nota-pulsanti { font-size: .88rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .pulsante:hover { transform: none; } }

/* ---------- galleria schermate ---------- */

.galleria { padding: 8px 0 clamp(40px, 7vw, 72px); }
.rotaia {
  display: flex; gap: 20px; overflow-x: auto; padding: 14px 20px 22px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--bordo) transparent;
}
.rotaia figure { flex: 0 0 auto; width: min(260px, 66vw); margin: 0; scroll-snap-align: center; }
.rotaia img {
  width: 100%; height: auto; aspect-ratio: 921 / 1510; object-fit: cover; object-position: center bottom;
  border-radius: 22px; box-shadow: 0 12px 28px var(--ombra);
}
.rotaia figcaption { margin-top: 12px; font-size: .9rem; color: var(--muted); text-align: center; }

/* ---------- sezioni ---------- */

.sezione { padding: clamp(44px, 7vw, 76px) 0; border-top: 1px solid var(--bordo); }
.sezione > .contenitore > h2 { text-align: center; }
.intro-sezione { text-align: center; color: var(--muted); max-width: 52ch; margin: 0 auto 40px; }

.griglia { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.scheda {
  background: var(--card); border: 1px solid var(--bordo); border-radius: var(--raggio);
  padding: 26px 24px; box-shadow: 0 2px 10px var(--ombra);
}
.scheda h3 { margin-bottom: .4em; }
.scheda p { margin: 0; color: var(--muted); font-size: .97rem; }
.scheda .segno { font-size: 1.5rem; line-height: 1; display: block; margin-bottom: 12px; }

/* ---------- riquadro in evidenza ---------- */

.evidenza {
  background: var(--salvia); border-radius: 26px; padding: clamp(28px, 5vw, 48px);
  text-align: center;
}
.evidenza h2 { margin-bottom: .45em; }
.evidenza p { color: var(--ink); opacity: .82; max-width: 56ch; margin-left: auto; margin-right: auto; }
.evidenza ul { list-style: none; padding: 0; margin: 26px auto 0; max-width: 620px; text-align: left; display: grid; gap: 12px; }
.evidenza li { position: relative; padding-left: 30px; color: var(--ink); opacity: .85; }
.evidenza li::before {
  content: ""; position: absolute; left: 6px; top: .62em; width: 9px; height: 9px;
  border-radius: 50%; background: var(--terracotta);
}

/* ---------- prezzo ---------- */

.prezzo { text-align: center; }

/* ---------- pagine di testo ---------- */

.documento { padding: clamp(36px, 6vw, 64px) 0 20px; }
.documento h1 { margin-bottom: .25em; }
.documento .aggiornato { color: var(--muted); font-size: .92rem; margin-bottom: 2.4em; }
.documento h2 { font-size: 1.35rem; margin-top: 2.2em; }
.documento h3 { margin-top: 1.7em; }
.documento ul, .documento ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.documento li { margin-bottom: .5em; }
.documento table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: .95rem; }
.documento th, .documento td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--bordo); vertical-align: top; }
.documento th { font-family: var(--sans); font-weight: 700; }
.documento td:first-child { white-space: nowrap; font-weight: 600; }
@media (max-width: 560px) {
  .documento table, .documento tbody, .documento tr, .documento td, .documento th { display: block; }
  .documento thead { display: none; }
  .documento tr { border-bottom: 1px solid var(--bordo); padding: 10px 0; }
  .documento td { border: 0; padding: 2px 0; }
  .documento td:first-child { white-space: normal; font-family: var(--sans); }
}

.riquadro {
  background: var(--card); border: 1px solid var(--bordo); border-left: 4px solid var(--terracotta);
  border-radius: 12px; padding: 18px 20px; margin: 0 0 1.8em;
}
.riquadro p:last-child { margin-bottom: 0; }

details { border-bottom: 1px solid var(--bordo); padding: 6px 0; }
details summary {
  cursor: pointer; padding: 14px 0; font-family: var(--sans); font-weight: 700;
  font-size: 1.03rem; list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--terracotta); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: "–"; }
details .risposta { padding-bottom: 12px; color: var(--muted); }
details .risposta p:last-child { margin-bottom: 0; }

/* ---------- filo decorativo ---------- */

.filo { display: block; width: 100%; height: 26px; color: var(--filo); opacity: .5; }

/* ---------- chiusura ---------- */

.chiusura { border-top: 1px solid var(--bordo); padding: 40px 0 48px; color: var(--muted); font-size: .92rem; }
.chiusura .righe { display: flex; flex-wrap: wrap; gap: 14px 26px; justify-content: space-between; align-items: center; }
.chiusura nav { display: flex; flex-wrap: wrap; gap: 18px; }
.chiusura a { color: var(--muted); text-decoration: none; }
.chiusura a:hover { color: var(--terracotta); text-decoration: underline; }
.chiusura .firma { font-size: .88rem; }
