/* Silent Hill — OPX-style void gallery + glass controls */
:root {
  --void: #020202;
  --black: #000;
  --hairline: #292a2c;
  --white: #fff;
  --ash: #9b9b9b;

  --glass-bg: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  --glass-bg-hover: linear-gradient(135deg, rgba(255,255,255,.26), rgba(255,255,255,.10));
  --glass-line: rgba(255,255,255,.28);
  --glass-blur: blur(22px) saturate(160%);

  --f-display: 'Inter Tight', 'Söhne', ui-sans-serif, system-ui, sans-serif;
  --f-ui: 'Inter', ui-sans-serif, system-ui, sans-serif;

  --pad: clamp(20px, 4.2vw, 80px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--void); color: var(--white); }
body {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.67;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  touch-action: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.muted { color: var(--ash); }

/* ---------- Stage ---------- */
#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; }
.shade {
  position: fixed; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(2,2,2,.55) 0%, rgba(2,2,2,0) 22%),
    linear-gradient(to top, rgba(2,2,2,.72) 0%, rgba(2,2,2,.25) 32%, rgba(2,2,2,0) 55%),
    linear-gradient(to left, rgba(2,2,2,.5) 0%, rgba(2,2,2,0) 14%),
    linear-gradient(to right, rgba(2,2,2,.5) 0%, rgba(2,2,2,0) 14%);
}

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  transition: background .5s var(--ease), border-color .5s var(--ease), transform .6s var(--ease);
}
.glass:hover { background: var(--glass-bg-hover); border-color: rgba(255,255,255,.5); }
.glass-panel {
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.04));
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,.22);
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-ui); font-weight: 500; font-size: 14px; line-height: 1;
  letter-spacing: .01em;
  padding: 13px 22px;
  border-radius: 45px;
  white-space: nowrap;
  color: inherit; text-decoration: none;
}
.pill.lg { padding: 18px 30px; font-size: 15px; }
.pill.solid { background: rgba(255,255,255,.88); color: var(--void); border-color: #fff; }
.pill.solid:hover { background: #fff; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.round {
  width: 60px; height: 60px; border-radius: 50%;
  display: inline-grid; place-items: center;
}
.round svg { transition: transform .6s var(--ease); }
.round:hover svg { transform: translateY(3px); }
.round.up svg { transform: rotate(180deg); }
.round.up:hover svg { transform: rotate(180deg) translateY(3px); }

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 1px solid #fff; outline-offset: 3px;
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 50;
  background: var(--void);
  padding: var(--pad);
  display: flex; flex-direction: column; justify-content: space-between;
}
.loader-top { display: flex; justify-content: space-between; font-size: 18px; }
.loader-foot { display: flex; flex-direction: column; }
.loader-num {
  font-size: clamp(96px, 22vw, 340px);
  line-height: .82; letter-spacing: -.055em; font-weight: 300;
  display: flex; align-items: flex-start;
  overflow: hidden; padding-top: .04em;
  font-variant-numeric: tabular-nums;
}
.loader-sign { font-size: .28em; letter-spacing: 0; margin: .12em 0 0 .08em; color: var(--ash); }
.loader-bar { position: relative; height: 1px; background: var(--hairline); margin-top: 28px; }
.loader-bar i { position: absolute; inset: 0; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 24px var(--pad);
}
.brand { font-size: 26px; line-height: 1; letter-spacing: -.02em; }
.nav-links {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 2px; padding: 4px; border-radius: 45px;
}
.nav-links:hover { transform: translateX(-50%); }
.nav-links button {
  font-family: var(--f-ui); font-weight: 500; font-size: 14px; line-height: 1;
  padding: 11px 18px; border-radius: 45px;
  transition: background .4s var(--ease);
}
.nav-links button:hover { background: rgba(255,255,255,.14); }

/* ---------- Scenes ---------- */
.scene {
  position: fixed; inset: 0; z-index: 16;   /* sopra la scheda: il titolo va sempre sopra */
  padding: 0 var(--pad) calc(var(--pad) * .9 + 64px);  /* spazio per la barra inferiore (frecce) */
  display: flex; flex-direction: column; justify-content: flex-end;
  pointer-events: none; visibility: hidden;
}
.scene.is-active { pointer-events: none; visibility: visible; }
/* solo i controlli della scena restano cliccabili (sopra la scheda) */
.scene button { pointer-events: auto; }

.kicker { font-family: var(--f-ui); font-size: 14px; letter-spacing: .02em; color: rgba(255,255,255,.78); margin-bottom: 18px; }
.display {
  font-size: clamp(64px, 12.4vw, 220px);
  line-height: .9; letter-spacing: -.05em; font-weight: 400;
  margin-left: -.05em;
}
.h-xl { font-size: clamp(48px, 7vw, 111px); line-height: 1; letter-spacing: -.04em; font-weight: 400; }
.h-lg { font-size: clamp(32px, 3.4vw, 50px); line-height: 1.1; letter-spacing: -.03em; font-weight: 400; }

/* split text: il mask della parola deve contenere l'inchiostro del glifo (ascendenti,
   discendenti e crenatura negativa), altrimenti taglia il lato destro/basso. Il padding
   allarga il box di clip; il margine negativo lo compensa (layout invariato). */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: .18em .16em; margin: -.18em -.16em; }
.split .c { display: inline-block; will-change: transform; }

.scene-hero .actions { display: flex; align-items: center; gap: 14px; margin-top: 34px; }
/* azioni di scena (contesti con card): CTA + frecce su/giù, sotto il titolo a sinistra */
.scene-actions { display: flex; align-items: center; gap: 14px; margin-top: 30px; }
.scene-actions .round { width: 56px; height: 56px; }
.scene-actions [hidden] { display: none; }

/* still scene */
.scene-still { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 40px; }
.still-copy { max-width: 640px; }
.still-copy .lede { font-family: var(--f-ui); font-size: 17px; line-height: 1.67; color: rgba(255,255,255,.82); max-width: 460px; margin-top: 20px; }
.info {
  width: min(520px, 100%);
  border-radius: 28px; padding: 26px 26px 22px;
  flex-shrink: 0;
}
.dock {
  position: fixed; z-index: 15;
  right: var(--pad); bottom: calc(var(--pad) * .9 + 48px);  /* sopra la bottom bar */
  opacity: 0; pointer-events: none;
}
.dock.is-shown { pointer-events: auto; }
.scene-still .still-copy { max-width: min(640px, calc(100vw - 520px - var(--pad) * 2 - 40px)); }
.specs { display: grid; grid-template-columns: repeat(4, 1fr); }
.spec { padding: 4px 16px 0; border-left: 1px solid rgba(255,255,255,.2); }
.spec:first-child { border-left: 0; padding-left: 0; }
.spec b { display: block; font-weight: 400; font-size: 38px; line-height: 1.05; letter-spacing: -.03em; }
.spec b small { font-size: 16px; letter-spacing: 0; margin-left: 2px; color: rgba(255,255,255,.7); }
.spec span { display: block; font-family: var(--f-ui); font-size: 13px; line-height: 1.4; color: rgba(255,255,255,.66); margin-top: 8px; }
.info-actions { display: flex; align-items: center; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); }
.info-actions .spacer { flex: 1; }
.info-actions .round { width: 48px; height: 48px; }

/* ---------- Modals ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(2,2,2,.45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.modal-panel {
  position: relative; width: min(640px, 100%); max-height: calc(100dvh - 40px); overflow: auto;
  touch-action: pan-y; overscroll-behavior: contain;
  border-radius: 32px; padding: clamp(24px, 4vw, 44px);
}
.modal-panel .kicker { margin-bottom: 8px; }
.close { position: absolute; top: 18px; right: 18px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.fields label { display: flex; flex-direction: column; gap: 6px; font-family: var(--f-ui); font-size: 13px; color: rgba(255,255,255,.7); }
.fields .wide { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; font-family: var(--f-ui); font-size: 13px; color: rgba(255,255,255,.7); }

/* ---------- Glass select ---------- */
.select { position: relative; }
.select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font: 400 16px/1.4 var(--f-ui); color: #fff; text-align: left;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px; padding: 13px 16px;
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.select-btn:hover { background: rgba(255,255,255,.11); }
.select-btn svg { transition: transform .5s var(--ease); opacity: .8; }
.select.is-open .select-btn { border-color: rgba(255,255,255,.6); }
.select.is-open .select-btn svg { transform: rotate(180deg); }
.select-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 8px);
  list-style: none; padding: 6px; max-height: 248px; overflow: auto;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(60,46,36,.72), rgba(24,20,18,.78));
  -webkit-backdrop-filter: blur(30px) saturate(150%); backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,.22);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.3) transparent;
}
.select-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-radius: 12px; cursor: pointer;
  font: 400 15px/1.3 var(--f-ui); color: rgba(255,255,255,.86);
  transition: background .25s var(--ease), color .25s var(--ease);
}
.select-list li.is-active { background: rgba(255,255,255,.12); color: #fff; }
.select-list li[aria-selected="true"] { color: #fff; }
.select-list li[aria-selected="true"]::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.fields input, .fields select, .fields textarea {
  font: 400 16px/1.4 var(--f-ui); color: #fff;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px; padding: 13px 16px; resize: vertical;
  color-scheme: dark;
}
.fields select option { background: #111; }
.fields input:focus, .fields select:focus, .fields textarea:focus { border-color: rgba(255,255,255,.6); outline: none; }
#book .modal-panel { width: min(760px, 100%); }

/* ---------- Calendar ---------- */
.date-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.date-chip {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  padding: 13px 16px; border-radius: 16px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2);
  transition: border-color .4s var(--ease), background .4s var(--ease);
}
.date-chip span { font-family: var(--f-ui); font-size: 13px; color: rgba(255,255,255,.7); line-height: 1.2; }
.date-chip b { font: 400 16px/1.4 var(--f-ui); color: #fff; }
.date-chip b.empty { color: rgba(255,255,255,.45); }
.date-chip.is-active { border-color: rgba(255,255,255,.7); background: rgba(255,255,255,.12); }

.cal {
  margin-top: 12px; padding: 18px 20px 14px; border-radius: 24px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.14);
  font-family: var(--f-ui);
}
.cal-head { display: flex; align-items: center; gap: 12px; }
.cal-nav { width: 38px; height: 38px; flex-shrink: 0; }
.cal-nav:disabled { opacity: .3; cursor: default; }
.cal-titles { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; text-align: center; }
.cal-titles div { font-family: var(--f-display); font-size: 20px; letter-spacing: -.02em; line-height: 1; }
.cal-months { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.cal-wd { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: rgba(255,255,255,.5); text-align: center; padding: 6px 0 8px; }
.cell { position: relative; }
.cell.in-range, .cell.in-preview { background: rgba(255,255,255,.1); }
.cell.in-preview { background: rgba(255,255,255,.06); }
.cell.range-start { background: linear-gradient(to right, transparent 50%, rgba(255,255,255,.1) 50%); }
.cell.range-end { background: linear-gradient(to left, transparent 50%, rgba(255,255,255,.1) 50%); }
.cell.range-start.range-end { background: none; }
.day {
  position: relative; display: grid; place-items: center;
  width: 100%; aspect-ratio: 1; max-height: 40px; margin: 0 auto;
  border-radius: 50%; font-size: 14px; line-height: 1; color: #fff;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.day:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.day:disabled { color: rgba(255,255,255,.22); cursor: default; }
.day.today::after { content: ''; position: absolute; bottom: 5px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.cell.range-start .day, .cell.range-end .day { background: #fff; color: var(--void); }
.cal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.12); font-size: 13px; color: rgba(255,255,255,.7); }
.cal-clear { font-family: var(--f-ui); font-size: 13px; color: rgba(255,255,255,.7); text-decoration: underline; text-underline-offset: 3px; }
.cal-clear:hover { color: #fff; }

.plan-panel { width: min(1100px, 100%); }
.plan-body { margin-top: 26px; }
.plan-body svg { display: block; width: 100%; height: auto; overflow: visible; }
.plan-body { overflow-x: auto; touch-action: pan-x pan-y; }
@media (max-width: 860px) { .plan-body svg { min-width: 720px; } }
.plan-empty {
  aspect-ratio: 16 / 9; border: 1px dashed rgba(255,255,255,.3); border-radius: 16px;
  display: grid; place-items: center; font-family: var(--f-ui); font-size: 14px; color: rgba(255,255,255,.6);
}
.sent { font-family: var(--f-ui); font-size: 14px; color: rgba(255,255,255,.75); margin-top: 14px; }

/* ---------- Intro state ---------- */
.is-loading .nav, .is-loading .bottom-bar { opacity: 0; }

/* ============================================================
   RESPONSIVE — phone, tablet, landscape phone, notches
   ============================================================ */

/* ---------- Tablet (portrait iPad and small laptops) ---------- */
@media (max-width: 1180px) and (min-width: 861px) {
  .info { width: min(440px, 46vw); padding: 22px 22px 18px; }
  .spec b { font-size: 30px; }
  .spec { padding: 3px 12px 0; }
  .scene-still .still-copy { max-width: calc(100vw - 46vw - var(--pad) * 2 - 32px); }
  #book .modal-panel { width: min(680px, 100%); }
}

/* iPad portrait: stack the copy above the panel, like the phone layout */
@media (max-width: 1024px) and (min-width: 861px) and (orientation: portrait) {
  .scene-still { flex-direction: column; align-items: stretch; gap: 20px; }
  .scene-still .still-copy { max-width: none; }
  .info { width: 100%; }
  .dock { left: var(--pad); right: var(--pad); }
  .scene-still { padding-bottom: 210px; }
}

/* ---------- Phone ---------- */
@media (max-width: 860px) {
  .nav { padding: calc(12px + var(--safe-t)) calc(16px + var(--safe-r)) 12px calc(16px + var(--safe-l)); }
  .nav-links { display: none; }
  .brand { font-size: 20px; }

  .scene {
    padding: 0 calc(16px + var(--safe-r)) calc(16px + var(--safe-b) + 64px) calc(16px + var(--safe-l));
  }
  .scene-still { flex-direction: column; align-items: stretch; justify-content: flex-end; gap: 16px; }
  .scene-still .still-copy { max-width: none; }
  .scene-hero .display { font-size: clamp(52px, 17vw, 96px); }
  .h-xl { font-size: clamp(38px, 11vw, 60px); }
  .still-copy .lede { display: none; }
  .scene-actions { margin-top: 16px; gap: 10px; }
  .scene-actions .round { width: 48px; height: 48px; }
  .kicker { margin-bottom: 12px; font-size: 13px; }

  .info { width: auto; padding: 16px 16px 14px; border-radius: 22px; }
  .dock { left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); bottom: calc(74px + var(--safe-b)); }
  /* il testo di scena sta sopra la scheda (altezza misurata a runtime) */
  .scene-still { padding-bottom: calc(var(--dock-h, 0px) + 94px + var(--safe-b)); }
  /* bottom bar a tutta larghezza con margini */
  .bottom-bar { left: calc(12px + var(--safe-l)); right: calc(12px + var(--safe-r)); transform: none; bottom: calc(12px + var(--safe-b)); justify-content: space-between; }
  .bar-summary { max-width: 54vw; }
  .spec { padding: 2px 8px 0; }
  .spec:first-child { padding-left: 0; }
  .spec b { font-size: 23px; }
  .spec b small { font-size: 11px; }
  .spec span { font-size: 10.5px; margin-top: 5px; }
  .info-actions { margin-top: 14px; padding-top: 12px; gap: 8px; }
  .info-actions .round { width: 44px; height: 44px; }

  .pill { padding: 12px 18px; }
  .pill.lg { padding: 15px 22px; font-size: 14px; }
  .round { width: 52px; height: 52px; }

  .modal { padding: 12px; }
  .modal-panel { border-radius: 26px; padding: 22px 18px; max-height: calc(100dvh - 24px); }
  .fields { grid-template-columns: 1fr; gap: 12px; margin: 22px 0; }
  .close { top: 12px; right: 12px; width: 40px; height: 40px; }

  .cal { padding: 12px 10px 10px; }
  .cal-titles, .cal-months { grid-template-columns: 1fr; gap: 0; }
  .cal-titles div:nth-child(2), .cal-months .cal-grid:nth-child(2) { display: none; }
  .day { max-height: 44px; font-size: 15px; }       /* comfortable tap target */
  .cal-wd { font-size: 10px; padding: 4px 0 6px; }
  .date-sum { gap: 10px; }
  .date-chip { padding: 11px 13px; }
  .date-chip b { font-size: 15px; }
  .select-list { max-height: 44vh; }

  .plan-body { margin-top: 18px; }
}

/* very narrow phones */
@media (max-width: 380px) {
  .info-actions .pill { padding: 11px 14px; font-size: 13px; }
  .spec b { font-size: 20px; }
  .spec span { font-size: 10px; }
}

/* ---------- Phone in landscape: short screens ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .scene-hero .display { font-size: clamp(40px, 9vh, 64px); }
  .h-xl { font-size: clamp(28px, 7vh, 44px); }
  .scene-hero .actions { margin-top: 16px; }
  .scene-still {
    flex-direction: row; align-items: flex-end; justify-content: flex-start;  /* .scene's flex-end would push the copy right */
    padding-bottom: calc(12px + var(--safe-b));
  }
  .scene-still .still-copy { max-width: min(52vw, 420px); }   /* the desktop clamp collapses here */
  .still-copy .lede { display: none; }
  .dock { left: auto; right: calc(16px + var(--safe-r)); bottom: calc(60px + var(--safe-b)); width: min(460px, 56vw); }
  .info { padding: 12px 14px 10px; }
  .spec b { font-size: 20px; }
  .info-actions { margin-top: 10px; padding-top: 10px; }
  .modal-panel { max-height: calc(100dvh - 16px); padding: 18px; }
  .cal { display: none; }                       /* calendar needs height — chips stay usable */
}

/* coarse pointers: no hover-only affordances */
@media (hover: none) {
  .glass:hover { background: var(--glass-bg); border-color: var(--glass-line); }
  .glass:active { background: var(--glass-bg-hover); }
}

/* ---------- Thank-you page ---------- */
.thanks-page { overflow: auto; touch-action: auto; height: auto; min-height: 100%; }
html:has(.thanks-page) { overflow: auto; height: auto; }
.bg-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thanks-shade { background: linear-gradient(to top, rgba(2,2,2,.82) 0%, rgba(2,2,2,.5) 45%, rgba(2,2,2,.35) 100%); }
.thanks-page .nav a { text-decoration: none; color: #fff; }
.thanks {
  position: relative; z-index: 10; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 48px;
  padding: 130px var(--pad) calc(var(--pad) * .9);
}
.thanks-copy { max-width: 1100px; }
.thanks .display { font-size: clamp(56px, 9vw, 160px); }
.thanks-lede { font-family: var(--f-ui); font-size: 17px; line-height: 1.67; color: rgba(255,255,255,.84); max-width: 620px; margin-top: 26px; }
.thanks-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 520px)); gap: 20px; }
.card { border-radius: 28px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; }
.card .kicker { margin-bottom: 10px; }
.h-card { font-size: clamp(26px, 2.4vw, 35px); line-height: 1.15; letter-spacing: -.03em; font-weight: 400; }
.card p:not(.kicker) { font-family: var(--f-ui); font-size: 15px; line-height: 1.67; color: rgba(255,255,255,.76); margin: 12px 0 26px; }
.card .pill { margin-top: auto; text-decoration: none; color: #fff; }
.card .pill.solid { color: var(--void); }
.card .pill svg { transition: transform .5s var(--ease); }
.card .pill:hover svg { transform: translate(2px, -2px); }
.page-veil { position: fixed; inset: 0; z-index: 60; background: var(--void); pointer-events: none; }
@media (max-width: 860px) {
  .thanks {
    padding: calc(90px + var(--safe-t)) calc(16px + var(--safe-r)) calc(24px + var(--safe-b)) calc(16px + var(--safe-l));
    gap: 26px;
  }
  .thanks .display { font-size: clamp(44px, 13vw, 72px); }
  .thanks-lede { font-size: 15px; margin-top: 18px; }
  .h-card { font-size: 24px; }
  .thanks-cards { grid-template-columns: 1fr; }
  .card { padding: 22px; border-radius: 24px; }
  .card .pill { white-space: normal; }
}

/* ============================================================
   ZoneCreative starter — estensioni (build.mjs)
   ============================================================ */
.dock[hidden], .modal[hidden] { display: none !important; }

.lang-switch { font-family: var(--f-ui); font-size: 12px; letter-spacing: .12em; opacity: .8; }
.lang-switch a { color: inherit; text-decoration: none; }
.lang-switch a.is-active { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }

.fields label.consent {
  display: flex; flex-direction: row; align-items: flex-start; gap: 10px;
  font-family: var(--f-ui); font-size: 13px; line-height: 1.5; opacity: .85;
}
.fields label.consent input { width: auto; margin-top: 2px; }

.form-status {
  font-family: var(--f-ui); font-size: 13px; line-height: 1.5;
  color: #ffd7d7; margin-top: 14px;
}

/* senza loader la pagina può scorrere solo per le scene */
body:not(.is-loading) .scene { opacity: 0; }
body:not(.is-loading) .scene.is-active { opacity: 1; }

/* ---------- Analytics: barra consenso ---------- */
.consent-bar {
  position: fixed; z-index: 40; left: 50%; bottom: 20px; transform: translateX(-50%);
  width: min(680px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-between;
  padding: 16px 18px; border-radius: 22px;
  background: linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.05));
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid rgba(255,255,255,.22);
}
.consent-bar p { font-family: var(--f-ui); font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.85); margin: 0; max-width: 420px; }
.consent-actions { display: flex; gap: 10px; }

/* ---------- Indicatore media (dots) ---------- */
.media-dots { display: flex; align-items: center; gap: 6px; }
.media-dots[hidden] { display: none; }
.media-dots button {
  width: 22px; height: 14px; padding: 0; border-radius: 6px;
  position: relative; opacity: .55;
  transition: opacity .4s var(--ease);
}
.media-dots button::after {
  content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.5);
}
.media-dots button:hover { opacity: .85; }
.media-dots button.is-active { opacity: 1; }
.media-dots button.is-active::after { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); }
/* ---------- Bottom bar (3 chips): frecce · dots/sommario · lingua+fullscreen ---------- */
.bottom-bar {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: 14px;
  display: flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 24px);
  font-family: var(--f-ui); font-size: 12px; line-height: 1; color: rgba(255,255,255,.9);
}
.bar-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 45px;
}
.bar-left { gap: 2px; }
.bar-left:empty { display: none; }
.bar-center { justify-content: center; min-width: 0; }
.bar-right { position: relative; gap: 4px; }
.bar-icon {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; padding: 0; color: inherit; opacity: .82;
  transition: opacity .4s var(--ease);
}
.bar-icon:hover { opacity: 1; }
.bar-icon svg { transition: transform .5s var(--ease); }
.bar-icon[data-ctx="-1"]:hover svg { transform: translateY(-3px); }
.bar-icon[data-ctx="1"]:hover svg { transform: translateY(3px); }
.bar-lang { font-family: var(--f-ui); font-size: 12px; line-height: 1; letter-spacing: .08em; color: inherit; opacity: .85; padding: 6px 8px; }
.bar-lang:hover { opacity: 1; }
.bar-summary { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
/* centro: dots da aperta, sommario da fullscreen */
.bottom-bar:not(.is-fullscreen) .bar-summary { display: none; }
.bottom-bar.is-fullscreen .media-dots { display: none; }

/* menu lingue (popover sopra il chip) */
.lang-menu {
  position: absolute; right: 0; bottom: calc(100% + 10px);
  display: flex; flex-direction: column; min-width: 68px;
  padding: 6px; border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.22);
}
.lang-menu[hidden] { display: none; }
.lang-menu a { padding: 9px 14px; border-radius: 10px; color: inherit; text-decoration: none; font-family: var(--f-ui); font-size: 12px; letter-spacing: .08em; }
.lang-menu a:hover, .lang-menu a.is-active { background: rgba(255,255,255,.16); }

/* ---------- Overlay contesti (long-press): tutto schermo, lista a sinistra ---------- */
.ctx-overlay {
  position: fixed; inset: 0; z-index: 35;
  display: flex; align-items: center;
  background: rgba(2,2,2,.55);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.ctx-overlay[hidden] { display: none; }
.ctx-list { display: flex; flex-direction: column; gap: 16px; padding: 0 var(--pad); }
.ctx-item { display: flex; align-items: center; gap: 20px; font-family: var(--f-display); font-size: clamp(26px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.02em; color: rgba(255,255,255,.5); }
.ctx-item i { display: block; width: 28px; height: 2px; background: rgba(255,255,255,.4); transition: width .4s var(--ease), background .3s; }
.ctx-item span { transition: color .3s var(--ease); }
.ctx-item.is-active { color: #fff; font-weight: 500; }
.ctx-item.is-active i { width: 84px; background: #fff; }

/* ---------- Nav a due bottoni (CTA + torna) ---------- */
.nav-ctas { display: flex; align-items: center; gap: 10px; }
.nav.nav-double { justify-content: flex-start; }
.nav.nav-double .nav-links { position: static; transform: none; margin-left: 18px; }
.nav.nav-double .nav-ctas { position: absolute; inset: 0; pointer-events: none; }
.nav.nav-double .nav-ctas > * { pointer-events: auto; }
.nav.nav-double .nav-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.nav.nav-double .nav-right { position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%); }

/* ---------- Card per-media (dock) ---------- */
.card-copy { margin-bottom: 4px; }
.card-kicker { font-family: var(--f-ui); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.66); margin-bottom: 8px; }
.card-title { font-size: clamp(22px, 1.9vw, 30px); line-height: 1.12; letter-spacing: -.02em; font-weight: 400; margin-bottom: 8px; }
.card-subtitle { font-family: var(--f-ui); font-size: 15px; line-height: 1.5; color: rgba(255,255,255,.8); margin-bottom: 6px; }
.card-html { font-family: var(--f-ui); font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.72); margin: 10px 0 2px; }
.card-html p { margin: 0 0 8px; }
.card-html p:last-child { margin-bottom: 0; }
.card-html a { color: #fff; }
.card-copy[hidden], .specs[hidden], .card-cta[hidden] { display: none; }

/* frecce dei media nella card (solo destra/sinistra) */
.dock-inner { display: block; }
.media-nav { display: flex; align-items: center; gap: 8px; }
.media-nav:empty { display: none; }
.info-actions .round.nav-dir { width: 44px; height: 44px; }
.nav-dir svg { transition: transform .5s var(--ease); }
.media-nav .nav-dir[data-media-nav="-1"]:hover svg { transform: translateX(-3px); }
.media-nav .nav-dir[data-media-nav="1"]:hover svg { transform: translateX(3px); }

/* ---------- Feedback di navigazione (passo 4) ---------- */
.nav-progress {
  position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
  transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff);
  border-radius: 2px; opacity: 0; pointer-events: none;
}
.nav-progress[hidden] { display: none; }
.bar-icon.is-active, .bar-icon.is-pending { opacity: 1; }
.bar-icon.is-active svg { transform: scale(1.12); }
.bar-icon:active svg { transform: scale(.9); }
.media-dots button:active::after { background: #fff; }
.media-dots button.is-pending::after { background: rgba(255,255,255,.9); box-shadow: 0 0 6px rgba(255,255,255,.55); }
.media-dots button.is-active::after { background: #fff; box-shadow: 0 0 8px rgba(255,255,255,.6); }

.nav-edge { position: fixed; inset: 0; z-index: 25; pointer-events: none; opacity: 0; }
.nav-edge.from-b { box-shadow: inset 0 -90px 100px -60px rgba(255,255,255,.55); }
.nav-edge.from-t { box-shadow: inset 0 90px 100px -60px rgba(255,255,255,.55); }
.nav-edge.from-l { box-shadow: inset 90px 0 100px -60px rgba(255,255,255,.55); }
.nav-edge.from-r { box-shadow: inset -90px 0 100px -60px rgba(255,255,255,.55); }

.nav-toast {
  position: fixed; z-index: 31; left: 50%; bottom: 58px; transform: translate(-50%, 8px);
  font-family: var(--f-ui); font-size: 12px; line-height: 1; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.92); padding: 7px 14px; border-radius: 40px;
  background: rgba(2,2,2,.5);
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255,255,255,.18);
  opacity: 0; pointer-events: none; transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.nav-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* anteprima gestuale: il canvas trasla con l'intero frame (nessuno smear WebGL) */
#stage { transform-origin: center center; }
body.is-previewing { cursor: grabbing; }
