/* ==========================================================================
   THI LAND — stile comune del sito (thiland.ch)
   Colori e proporzioni dal Brand Book THI LAND (sezioni Palette, Tipografia,
   Pattern): teal 60% · neutri 25% · lime 10% · arancio 5%. Un solo font: Outfit.
   Ogni pagina carica questo file e /assets/sito.js; gli stili propri di una
   pagina stanno nel suo <style>, con classi che non toccano queste.
   ========================================================================== */
/* Outfit (SIL OFL), servito dal sito: font variabile 100–900, sottoinsiemi latino e latino esteso. */
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/font/outfit-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Outfit'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('/assets/font/outfit-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --petrolio: #191c1e;   /* Dark del brand book: solo per i testi */
  --profondo: #006a61;   /* Teal del brand book: sezioni e superfici colorate (al posto del nero) */
  --profondo-2: #005a52; /* Teal più scuro, per profondità nei gradienti */
  --alt-testa: 72px;     /* Altezza della barra in alto */
  --teal: #006a61;
  --teal-light: #008378;
  --teal-pale: #e0f5f2;  /* Teal Pale: sfondi di sezione, badge */
  --forest: #446900;
  --surface: #f7f9fb;
  --arancio: #ff5500;
  --arancio-hover: #e84d00;
  --arancio-ink: #c24000;
  --lime: #b2f746;
  --piastrella: #e0f5f2;
  --bianco: #ffffff;
  --ink: #191c1e;
  --ink-soft: #505c5a;
  --line: #dbe3e2;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --r-foto: 20px;
  --punti: radial-gradient(rgba(0, 106, 97, .16) 1.3px, transparent 1.5px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bianco);
  color: var(--ink);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--arancio); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { color: var(--petrolio); margin: 0; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(34px, 4.6vw, 60px); line-height: 1.02; }
h3 { font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
.salta { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--profondo); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 700; }
.salta:focus { top: 12px; }

/* ── Barra in alto ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  margin-bottom: calc(-1 * var(--alt-testa));   /* la prima sezione scorre sotto la barra */
  background: rgba(255,255,255,0);
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s, box-shadow .4s var(--ease), -webkit-backdrop-filter .4s, backdrop-filter .4s;
}
main { padding-top: var(--alt-testa); }
body[data-testa="scura"] main { padding-top: 0; }
/* Scorrendo (o col menu aperto) la barra diventa bianca e visibile */
.topbar.scrolled, .topbar.aperta {
  background: rgba(255,255,255,.94);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom-color: var(--line); box-shadow: 0 12px 32px -24px rgba(0,52,48,.45);
}
.topbar .logo img { transition: filter .4s var(--ease); }
.topbar .menu-btn { transition: background-color .4s, color .4s; }
/* Sopra una foto o un colore scuro: logo e menu bianchi */
body[data-testa="scura"] .topbar:not(.scrolled):not(.aperta) .logo img { filter: brightness(0) invert(1); }
body[data-testa="scura"] .topbar:not(.scrolled):not(.aperta) .menu a { color: #fff; text-shadow: 0 1px 12px rgba(0,40,36,.35); }
body[data-testa="scura"] .topbar:not(.scrolled):not(.aperta) .menu a:hover,
body[data-testa="scura"] .topbar:not(.scrolled):not(.aperta) .menu a[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; }
body[data-testa="scura"] .topbar:not(.scrolled):not(.aperta) .menu-btn { background: rgba(255,255,255,.16); color: #fff; }
.topbar-in { display: flex; align-items: center; gap: 24px; height: 72px; position: relative; }
.logo { flex: none; }
.logo svg, .logo img { width: 92px; height: auto; display: block; }
.menu { display: flex; gap: 2px; margin-left: auto; }
.menu a {
  color: var(--petrolio); text-decoration: none; font-weight: 600; font-size: 16px;
  padding: 10px 12px; border-radius: 100px; white-space: nowrap;
}
.menu a { position: relative; transition: background-color .25s, color .25s; }
.menu a:hover { background: var(--teal-pale); color: var(--teal); }
.menu a[aria-current="page"] { background: var(--teal-pale); color: var(--teal); }
.menu-btn { display: none; }

/* ── Bottoni ── */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  border-radius: 100px; border: 0; line-height: 1; text-align: center;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), color .3s var(--ease), background-color .3s var(--ease);
}
/* Riempimento che sale dal basso al passaggio del mouse */
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(101%); transition: transform .45s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .1s; }
/* Freccia che compare scorrendo da sinistra */
.btn .va { display: inline-block; width: 0; opacity: 0; transform: translateX(-8px); transition: width .35s var(--ease), opacity .3s, transform .35s var(--ease); overflow: hidden; }
.btn:hover .va, .btn:focus-visible .va { width: 18px; opacity: 1; transform: none; }
.btn .va svg, .btn .ico { width: 18px; height: 18px; flex: none; }
.btn-arancio { background: var(--arancio); color: #fff; padding: 18px 28px; font-size: 18px; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px -6px rgba(255,85,0,.55); }
.btn-arancio::before { background: linear-gradient(180deg, #ff6a1f, var(--arancio-hover)); }
.btn-arancio:hover { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 16px 30px -10px rgba(255,85,0,.6); }
.btn-linea { background: transparent; color: var(--profondo); padding: 17px 26px; font-size: 18px; box-shadow: inset 0 0 0 2px var(--profondo); }
.btn-linea::before { background: var(--profondo); }
.btn-linea:hover, .btn-linea:focus-visible { color: #fff; }
.btn-chiaro { background: #fff; color: var(--petrolio); padding: 18px 28px; font-size: 18px; }
.btn-chiaro::before { background: var(--lime); }
.btn-chiaro:hover { box-shadow: 0 16px 30px -12px rgba(0,0,0,.35); }
.btn-vetro { background: rgba(255,255,255,.14); color: #fff; padding: 17px 26px; font-size: 18px; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.btn-vetro::before { background: #fff; }
.btn-vetro:hover, .btn-vetro:focus-visible { color: var(--petrolio); }
.btn-sm { padding: 13px 20px; font-size: 16px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn[disabled]::before { display: none; }
.azioni { display: flex; flex-wrap: wrap; gap: 12px; }

/* ── Apertura delle pagine interne ── */
.testa { padding: clamp(40px, 6vw, 88px) 0 clamp(32px, 4vw, 56px); }
.testa h1 { font-size: clamp(44px, 7vw, 88px); line-height: 1; letter-spacing: -0.03em; font-weight: 800; max-width: 14ch; }
.testa h1 em, h2 em { font-style: normal; color: var(--teal); }
.occhiello { display: block; margin-bottom: 16px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.sez-petrolio .occhiello { color: var(--lime); }
.chiudi .occhiello { color: var(--lime); }
.testa .intro { margin-top: 24px; font-size: clamp(19px, 1.7vw, 22px); color: var(--ink-soft); max-width: 52ch; }
.testa .azioni { margin-top: 28px; }

/* ── Sezioni ── */
.sez { padding: clamp(64px, 8vw, 120px) 0; }
.sez-blu { background-color: var(--teal-pale); background-image: var(--punti); background-size: 22px 22px; }
.sez-petrolio { background: linear-gradient(160deg, var(--profondo) 0%, var(--profondo-2) 100%); color: #e8f6f3; position: relative; }
.sez-petrolio::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.09) 1.3px, transparent 1.5px); background-size: 22px 22px; pointer-events: none; }
.sez-petrolio > .wrap { position: relative; }
.sez-petrolio h2, .sez-petrolio h3 { color: #fff; }
.sez-petrolio a { color: #fff; }
.sez-testa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 64px; align-items: end; margin-bottom: 44px; }
.sez-testa p { color: var(--ink-soft); max-width: 50ch; }
.sez-petrolio .sez-testa p { color: #c9dcd8; }
.testo { max-width: 62ch; color: var(--ink-soft); }
.testo p + p { margin-top: 14px; }
.foto { width: 100%; object-fit: cover; border-radius: var(--r-foto); }

/* ── Tabelle (prezzi, orari) ── */
.tabella { width: 100%; border-collapse: collapse; font-size: 19px; }
.tabella th, .tabella td { text-align: left; padding: 15px 0; border-bottom: 1px solid rgba(0,106,97,.2); vertical-align: top; }
.tabella th { font-weight: 500; color: var(--ink); padding-right: 16px; }
.tabella td { text-align: right; font-weight: 800; color: var(--petrolio); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabella .nota { display: block; font-size: 15px; color: var(--ink-soft); font-weight: 400; margin-top: 2px; }
.nota-piccola { margin-top: 18px; font-size: 15px; color: var(--ink-soft); max-width: 60ch; }

/* ── Regole (elenco su tre colonne) ── */
.regole { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 48px; }
.regole li { font-size: 17px; line-height: 1.55; max-width: 40ch; }
.regole b { display: block; font-size: 19px; font-weight: 700; margin-bottom: 6px; color: var(--petrolio); }
.sez-petrolio .regole b { color: var(--lime); }

/* ── Domande ── */
.domande { max-width: 820px; }
.domanda { border-bottom: 1px solid var(--line); }
.domanda summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px;
  padding: 22px 0; font-size: 20px; font-weight: 700; color: var(--petrolio); letter-spacing: -0.01em;
}
.domanda summary::-webkit-details-marker { display: none; }
.domanda summary::after { content: '+'; font-size: 26px; line-height: 1; color: var(--teal); flex: none; transition: transform .2s var(--ease); }
.domanda[open] summary::after { transform: rotate(45deg); }
.domanda .risposta { padding: 0 0 24px; color: var(--ink-soft); max-width: 66ch; }
.domanda .risposta p + p { margin-top: 10px; }

/* ── Avviso (box) ── */
.box { padding: 20px 22px; border-radius: 18px; background: var(--bianco); font-size: 17px; }
.box-arancio { background: #fff4ec; border-left: 4px solid var(--arancio); border-radius: 6px 18px 18px 6px; }
.box b { color: var(--petrolio); }

/* ── Chiusura di pagina (invito all'azione) ── */
.chiudi { background-color: var(--teal); background-image: radial-gradient(rgba(255,255,255,.12) 1.3px, transparent 1.5px); background-size: 22px 22px; color: #e3f4f1; padding: clamp(64px, 8vw, 112px) 0; }
.chiudi h2 { color: #fff; max-width: 16ch; }
.chiudi p { margin-top: 18px; max-width: 48ch; color: #d4ece8; font-size: 19px; }
.chiudi .azioni { margin-top: 30px; }

/* ── Piede ── */
.piede { border-top: 1px solid var(--line); padding: 48px 0 56px; font-size: 15px; color: var(--ink-soft); }
.piede-in { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px 48px; align-items: start; }
.piede .logo img { width: 80px; height: auto; display: block; }
.piede nav { display: flex; flex-wrap: wrap; gap: 8px 22px; padding-top: 6px; }
.piede a { color: var(--ink-soft); }
.piede address { font-style: normal; line-height: 1.6; text-align: right; }
.piede .claim { grid-column: 1 / -1; margin-top: 8px; font-size: clamp(26px, 3vw, 36px); font-weight: 800; letter-spacing: -0.02em; color: var(--teal); }
.piede .copy { grid-column: 1 / -1; font-size: 14px; color: #6d7a77; }

/* ── Telefono ── */
@media (max-width: 1240px) {
  .topbar-in { gap: 10px; }
  .topbar-in > .btn-sm { margin-left: auto; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none;
    border-radius: 50%; border: 0; background: var(--teal-pale); color: var(--petrolio); cursor: pointer;
  }
  .menu-btn svg { width: 22px; height: 22px; }
  .menu {
    display: none; position: absolute; left: calc(-1 * var(--gutter)); right: calc(-1 * var(--gutter)); top: 100%;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--gutter) 20px;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px rgba(0, 40, 36, .12);
  }
  .menu.aperto { display: flex; }
  .menu a { font-size: 19px; padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .menu a:last-child { border-bottom: 0; }
  .menu a[aria-current="page"] { background: none; }
}
@media (max-width: 980px) {
  .sez-testa { grid-template-columns: minmax(0, 1fr); }
  .regole { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .piede-in { grid-template-columns: minmax(0, 1fr); }
  .piede address { text-align: left; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .topbar-in { height: 64px; }
  .logo svg, .logo img { width: 78px; }
  .topbar-in > .btn-sm { padding: 12px 16px; font-size: 15px; }
  .regole { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .azioni { width: 100%; }
  .azioni .btn { width: 100%; }
  .tabella { font-size: 17px; }
  .domanda summary { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* ── Icone (Hugeicons Stroke Rounded, come nel Brand Book) ── */
.ico { width: 24px; height: 24px; flex: none; }
.chip { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 16px; background: var(--teal-pale); color: var(--teal); flex: none; }
.chip .ico { width: 26px; height: 26px; }
.sez-petrolio .chip, .scuro .chip { background: rgba(178, 247, 70, .12); color: var(--lime); }

/* ── Schede con icona (regole, come funziona…) ── */
.schede { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scheda-ico { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 26px 28px; border-radius: 22px; background: #fff; border: 1px solid var(--line); transition: transform .45s var(--ease), box-shadow .45s var(--ease), border-color .3s; }
.scheda-ico:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(0, 66, 60, .35); border-color: transparent; }
.scheda-ico h3 { font-size: 20px; line-height: 1.25; }
.scheda-ico p { color: var(--ink-soft); font-size: 17px; line-height: 1.55; }
.scheda-ico .num { position: absolute; top: 22px; right: 24px; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: #9aa7a5; }
.scheda-ico.larga { grid-column: span 2; }
.sez-petrolio .scheda-ico { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.14); }
.sez-petrolio .scheda-ico:hover { background: rgba(255,255,255,.11); box-shadow: 0 22px 40px -24px rgba(0,30,27,.6); border-color: rgba(178,247,70,.25); }
.sez-petrolio .scheda-ico h3 { color: #fff; }
.sez-petrolio .scheda-ico p { color: #cfeae5; }
.sez-petrolio .scheda-ico .num { color: rgba(255,255,255,.45); }
.sez-blu .scheda-ico { border-color: transparent; }
@media (max-width: 980px) { .schede { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .schede { grid-template-columns: minmax(0, 1fr); } .scheda-ico.larga { grid-column: auto; } }

/* ── Passi numerati (come si prenota, come funziona) ── */
.passi { list-style: none; margin: 0; padding: 0; counter-reset: passo; display: grid; }
.passi > li { counter-increment: passo; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 24px; padding: 28px 0; border-top: 1px solid var(--line); }
.passi > li:last-child { border-bottom: 1px solid var(--line); }
.passi > li::before { content: counter(passo, decimal-leading-zero); grid-row: 1 / span 3; width: 52px; height: 52px; border-radius: 16px; background: var(--profondo); color: var(--lime); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.passi h3 { font-size: 21px; }
.passi p { color: var(--ink-soft); max-width: 62ch; }
.passi p + p { margin-top: 8px; }

/* ── Comparsa allo scorrimento ── */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--rv-d, 0s); }
.rv.visto { opacity: 1; transform: none; }
.rv-img { clip-path: inset(10% 6% 10% 6% round 28px); transform: scale(1.06); transition: clip-path 1.1s var(--ease), transform 1.4s var(--ease); }
.rv-img.visto { clip-path: inset(0 0 0 0 round 0); transform: none; }

/* ── Orari di oggi, sempre visibili ── */
.oggi-pop { position: fixed; left: 16px; bottom: 16px; z-index: 80; max-width: min(380px, calc(100vw - 32px)); font-size: 15px; }
.oggi-pop[hidden] { display: none; }
.oggi-pill { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border: 0; border-radius: 100px; background: rgba(0,52,48,.92); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 14px 34px -14px rgba(0,0,0,.55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: transform .3s var(--ease); text-align: left; }
.oggi-pill:hover { transform: translateY(-2px); }
.oggi-pill .punto-st { width: 10px; height: 10px; border-radius: 50%; background: #9aa7a5; flex: none; }
.oggi-pop.aperto .punto-st { background: var(--lime); box-shadow: 0 0 0 0 rgba(178,247,70,.6); animation: pulsa 2.2s infinite; }
.oggi-pop.chiuso .punto-st { background: var(--arancio); }
.oggi-pill .freccia-su { width: 16px; height: 16px; transition: transform .3s var(--ease); opacity: .7; }
.oggi-pop.esteso .freccia-su { transform: rotate(180deg); }
@keyframes pulsa { 70% { box-shadow: 0 0 0 9px rgba(178,247,70,0); } 100% { box-shadow: 0 0 0 0 rgba(178,247,70,0); } }
.oggi-dett { display: none; margin-bottom: 10px; padding: 20px 22px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 24px 50px -20px rgba(0,40,36,.45); border: 1px solid var(--line); }
.oggi-pop.esteso .oggi-dett { display: block; animation: sale .35s var(--ease); }
@keyframes sale { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.oggi-dett h3 { font-size: 18px; margin-bottom: 10px; }
.oggi-dett ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.oggi-dett li { display: flex; justify-content: space-between; gap: 16px; }
.oggi-dett li b { font-variant-numeric: tabular-nums; color: var(--petrolio); white-space: nowrap; }
.oggi-dett .chiusura { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #fff4ec; color: var(--arancio-ink); font-weight: 600; }
.oggi-dett a { display: inline-block; margin-top: 14px; font-weight: 700; }
@media (max-width: 600px) { .oggi-pop { left: 12px; bottom: 12px; } .oggi-pill { padding: 11px 16px 11px 12px; font-size: 14px; } }

/* ── Striscia promozioni ── */
.promo-barra { background: var(--profondo); color: #fff; font-size: 15px; font-weight: 600; }
.promo-barra a { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px var(--gutter); color: #fff; text-decoration: none; text-align: center; }
.promo-barra b { color: var(--lime); }
.promo-barra .va-t { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 760px) { .promo-barra .lungo { display: none; } .promo-barra { font-size: 14px; } }

@media (prefers-reduced-motion: reduce) {
  .rv, .rv-img { opacity: 1; transform: none; clip-path: none; }
}

/* ── Bolle di colore sfocate dietro alle sezioni bianche ──
   Uno strato fisso sotto a tutto: si vede solo dove la sezione non ha
   un colore suo. Le bolle si spostano piano; con «riduci movimento» stanno ferme. */
.bolle { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bolle i {
  position: absolute; display: block; border-radius: 50%; width: var(--w); aspect-ratio: 1;
  background: var(--c); opacity: var(--o); filter: blur(var(--b, 90px)); will-change: transform;
  animation: bolla var(--d, 34s) ease-in-out infinite alternate;
}
.bolle i:nth-child(1) { --c: #a3e4d7; --w: 46vw; --o: .55; left: -14vw; top: -10vh; --d: 38s; --x: 10vw; --y: 18vh; }
.bolle i:nth-child(2) { --c: var(--lime); --w: 34vw; --o: .42; right: -10vw; top: 6vh; --d: 31s; --x: -12vw; --y: 22vh; }
.bolle i:nth-child(3) { --c: var(--arancio); --w: 26vw; --o: .16; left: 30vw; top: 46vh; --d: 42s; --x: 16vw; --y: -14vh; }
.bolle i:nth-child(4) { --c: var(--teal-light); --w: 30vw; --o: .2; right: 4vw; bottom: -14vh; --d: 36s; --x: -18vw; --y: -10vh; }
.bolle i:nth-child(5) { --c: #c8f0e8; --w: 40vw; --o: .6; left: -6vw; bottom: -22vh; --d: 44s; --x: 14vw; --y: -16vh; }
@keyframes bolla {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(calc(var(--x) * .6), calc(var(--y) * -.4), 0) scale(1.12); }
  100% { transform: translate3d(var(--x), var(--y), 0) scale(.94); }
}
@media (max-width: 760px) {
  .bolle i { --b: 60px; }
  .bolle i:nth-child(1) { --w: 80vw; } .bolle i:nth-child(2) { --w: 64vw; } .bolle i:nth-child(3) { --w: 50vw; }
  .bolle i:nth-child(4) { --w: 60vw; } .bolle i:nth-child(5) { --w: 76vw; }
}
@media (prefers-reduced-motion: reduce) { .bolle i { animation: none; } }

/* ── Buono regalo disegnato (bottega, pagina del buono, biglietti) ── */
.carta { position: relative; aspect-ratio: 1.6; border-radius: 26px; padding: clamp(20px, 3vw, 32px); color: #fff; background: var(--teal); background-image: radial-gradient(rgba(255,255,255,.14) 1.3px, transparent 1.5px); background-size: 20px 20px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; box-shadow: 0 40px 70px -40px rgba(0,66,60,.8); transform: perspective(900px) rotateY(-8deg) rotateX(4deg); transition: transform .8s var(--ease), background-color .5s; }
.carta:hover { transform: perspective(900px) rotateY(0) rotateX(0); }
.carta::after { content: ''; position: absolute; width: 60%; aspect-ratio: 1; border-radius: 50%; right: -18%; bottom: -40%; background: var(--lime); opacity: .9; }
.carta .riga1 { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; font-weight: 800; letter-spacing: .14em; font-size: 14px; }
.carta .riga1 img { width: 84px; filter: brightness(0) invert(1); }
.carta .valore { position: relative; z-index: 1; font-size: clamp(54px, 7vw, 88px); font-weight: 900; letter-spacing: -0.045em; line-height: .9; }
.carta .valore small { font-size: .3em; letter-spacing: 0; margin-right: 6px; font-weight: 800; }
.carta .riga3 { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: end; gap: 12px; font-size: 15px; }
.carta .riga3 .per { font-weight: 700; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carta .codice { font-family: ui-monospace, Menlo, monospace; letter-spacing: .12em; font-size: 13px; color: var(--petrolio); font-weight: 700; }
.carta.bf { background-color: var(--arancio); }
/* Buono regalo: quattro tessere da 10, 25, 50 e 100 che aprono il buono già compilato */
.tessere { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.2vw, 14px); width: 74%; max-width: 380px; }
.tessera { position: relative; aspect-ratio: 1.6; border-radius: 14px; padding: 10px 12px; color: #fff; background: var(--teal); background-image: radial-gradient(rgba(255,255,255,.16) 1.2px, transparent 1.4px); background-size: 14px 14px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; text-decoration: none; box-shadow: 0 18px 30px -18px rgba(0,66,60,.8); transform: rotate(var(--r, 0deg)); transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.tessera::after { content: ''; position: absolute; width: 58%; aspect-ratio: 1; border-radius: 50%; right: -18%; bottom: -42%; background: var(--lime); opacity: .9; }
.tessera:nth-child(1) { --r: -4deg; } .tessera:nth-child(2) { --r: 3deg; background-color: var(--profondo); }
.tessera:nth-child(3) { --r: 2deg; background-color: var(--arancio); } .tessera:nth-child(4) { --r: -3deg; background-color: var(--lime); color: var(--profondo); }
.tessera:nth-child(3)::after { background: #ffd23f; } .tessera:nth-child(4)::after { background: var(--teal); opacity: .35; }
.tessera .t-su { position: relative; z-index: 1; font-size: 8px; font-weight: 800; letter-spacing: .12em; white-space: nowrap; }
.tessera b { position: relative; z-index: 1; font-size: clamp(20px, 1.8vw, 26px); font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.tessera b small { font-size: .38em; letter-spacing: 0; margin-right: 4px; font-weight: 800; }
.tessera:hover, .tessera:focus-visible { transform: rotate(0) translateY(-4px) scale(1.06); box-shadow: 0 26px 36px -20px rgba(0,66,60,.9); }
.tessera:focus-visible { outline: 3px solid var(--arancio); outline-offset: 3px; }
.carta.mini { padding: 14px 16px; border-radius: 16px; box-shadow: 0 24px 40px -24px rgba(0,66,60,.75); }
.carta.mini .riga1 { font-size: 10px; } .carta.mini .riga1 img { width: 46px; }
.carta.mini .valore { font-size: 34px; } .carta.mini .riga3 { font-size: 11px; } .carta.mini .codice { font-size: 10px; }

/* ── THI in 3D, sempre in basso a destra (assets/thi-mascotte.js) ── */
.thi-m { --thi-l: 176px; }
.thi-bottone { position: fixed; right: calc(10px + env(safe-area-inset-right, 0px)); bottom: calc(6px + env(safe-area-inset-bottom, 0px)); z-index: 90; width: var(--thi-l); height: var(--thi-l); padding: 0; border: 0; background: none; cursor: pointer; opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); -webkit-tap-highlight-color: transparent; }
.thi-m.pronto .thi-bottone { opacity: 1; transform: none; }
.thi-m.in-attesa .thi-bottone, .thi-m.in-attesa .thi-fumetto { opacity: 0; pointer-events: none; }
.thi-bottone:focus-visible { outline: 3px solid var(--arancio); outline-offset: -8px; border-radius: 30px; }
.thi-tela { position: absolute; inset: 0; }
.thi-fumetto { position: fixed; right: calc(var(--thi-l) - 4px + env(safe-area-inset-right, 0px)); bottom: calc(var(--thi-l) * .62 + env(safe-area-inset-bottom, 0px)); z-index: 91; max-width: 220px; background: var(--profondo); color: #fff; font-weight: 600; font-size: 15px; line-height: 1.35; padding: 10px 14px; border-radius: 18px 18px 4px 18px; box-shadow: 0 16px 30px -18px rgba(0,60,54,.7); transition: opacity .35s, transform .35s var(--ease); pointer-events: none; }
.thi-fumetto.via { opacity: 0; transform: translateY(6px); }
.thi-chat { position: fixed; right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(var(--thi-l) + 4px + env(safe-area-inset-bottom, 0px)); z-index: 92; width: min(370px, calc(100vw - 32px)); height: min(500px, calc(100vh - var(--thi-l) - 40px)); background: #fff; color: var(--petrolio); border-radius: 24px; box-shadow: 0 40px 80px -36px rgba(0,50,45,.55), 0 0 0 1px rgba(0,106,97,.12); display: flex; flex-direction: column; overflow: hidden; transform-origin: 88% 100%; transition: opacity .3s, transform .35s var(--ease), visibility .35s; }
.thi-chat[hidden] { display: flex !important; opacity: 0; transform: scale(.92) translateY(10px); pointer-events: none; visibility: hidden; }
.thi-chat-testa { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--profondo); color: #fff; }
.thi-chat-testa b { font-size: 17px; }
.thi-chat-testa small { display: block; font-size: 13px; color: #cfeae5; }
.thi-punto { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); flex: none; }
.thi-chiudi { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.thi-messaggi { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.thi-msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.thi-msg.thi-dice { align-self: flex-start; background: var(--teal-pale, #e3f4f1); border-bottom-left-radius: 4px; }
.thi-msg.thi-dice a { display: inline-block; margin-top: 6px; color: var(--profondo); font-weight: 700; }
.thi-msg.thi-io { align-self: flex-end; background: var(--profondo); color: #fff; border-bottom-right-radius: 4px; }
.thi-msg.thi-punti { letter-spacing: .2em; color: #5d7471; }
.thi-rapide { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.thi-rapide button { font: 600 14px 'Outfit', system-ui, sans-serif; border: 1.5px solid #cfe1dd; background: #fff; color: var(--petrolio); border-radius: 100px; padding: 6px 12px; cursor: pointer; }
.thi-rapide button:hover { border-color: var(--profondo); }
.thi-scrivi { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #e3ecea; }
.thi-scrivi input { flex: 1; min-width: 0; font: 16px 'Outfit', system-ui, sans-serif; color: var(--petrolio); border: 1.5px solid #cfe1dd; border-radius: 100px; padding: 10px 14px; }
.thi-scrivi button { font: 700 15px 'Outfit', system-ui, sans-serif; background: var(--lime); color: var(--petrolio); border: 0; border-radius: 100px; padding: 0 16px; cursor: pointer; }
.thi-nota { margin: 0; padding: 0 16px 10px; font-size: 12px; color: #5d7471; }
@media (max-width: 600px) {
  .thi-m { --thi-l: 104px; }
  .thi-bottone { right: calc(2px + env(safe-area-inset-right, 0px)); bottom: calc(2px + env(safe-area-inset-bottom, 0px)); }
  .thi-fumetto { max-width: 170px; font-size: 14px; }
  .thi-chat { right: calc(8px + env(safe-area-inset-right, 0px)); left: calc(8px + env(safe-area-inset-left, 0px)); width: auto; }
}
@media (prefers-reduced-motion: reduce) { .thi-bottone, .thi-chat, .thi-fumetto { transition: none; } }

/* ── Banner del consenso, uguale su tutte le pagine (sito.js) ── */
.consenso { position: fixed; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 200; max-width: 680px; margin: 0 auto; background: var(--profondo); color: #e8f6f3; border-radius: 20px; padding: 18px 22px; box-shadow: 0 18px 40px rgba(0,40,36,.28); display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s var(--ease); }
.consenso.visible { opacity: 1; transform: none; }
.consenso p { flex: 1 1 320px; margin: 0; font-size: 15px; line-height: 1.5; }
.consenso a { color: #fff; }
.consenso-azioni { display: flex; gap: 10px; flex-wrap: wrap; }
.consenso button { min-height: 44px; padding: 10px 20px; border-radius: 100px; border: 0; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.consenso .si { background: #fff; color: var(--profondo); }
.consenso .no { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.consenso button:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; }
@media (max-width: 600px) { .consenso { left: 10px; right: 10px; bottom: 10px; padding: 16px; } .consenso button { flex: 1 1 auto; } }
@media (prefers-reduced-motion: reduce) { .consenso { transition: none; } }
