/* Verzuolo · stile. Colori e font: PRD sezioni 4.2 e 4.3. Scala e spaziature: utopia.css */

:root {
  --c-bg: #F7F1E3;
  --c-text: #281C10;
  --c-accent-1: #F6A524;
  --c-accent-2: #236832;
  --c-surface: #FFFFFF;
  --c-whatsapp: #25D366;

  --font-title: new-spirit, serif;
  --font-body: forma-djr-text, sans-serif;

  --radius-card: 28px;
  --edge: 0 0 0 1px rgb(40 28 16 / 0.14);
  --tap: 2.75rem;

  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.5;
}

h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }

button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--c-text);
  outline-offset: 3px;
}

.page {
  max-width: 640px;
  margin-inline: auto;
  padding-inline: var(--space-s-m);
  padding-block: var(--space-m) var(--space-2xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}

.small { font-size: var(--step--1); }
.box__note { font-size: calc((var(--step--1) + var(--step-0)) / 2); }

.link { color: var(--c-accent-2); text-underline-offset: 0.2em; font-weight: 700; }

/* ---------- testatina e titoli ---------- */

.top { text-align: center; }
.top__text { font-size: var(--step--1); }

.h1 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: var(--step-5);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-top: var(--space-l);
  margin-bottom: var(--space-xl);
  text-wrap: balance;
}

.h2 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: var(--step-4);
  line-height: 1.1;
  margin-top: var(--space-s);
  text-wrap: balance;
}

.subtitle, .box__heading {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.2;
}
.subtitle { font-size: var(--step-1); margin-bottom: var(--space-xs); }
.box__heading { font-size: calc(var(--step-1) * 0.9); }

/* ---------- pulsanti tondi ---------- */

.round-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--c-surface);
  color: var(--c-text);
  text-decoration: none;
  box-shadow: 0 2px 8px rgb(40 28 16 / 0.18);
}
.round-btn .icon { width: 1.5rem; height: 1.5rem; }
.round-btn--small { width: 2.5rem; height: 2.5rem; box-shadow: var(--edge); background: var(--c-bg); }
.round-btn--small .icon { width: 1.25rem; height: 1.25rem; }
.round-btn--green { background: var(--c-accent-2); color: #fff; box-shadow: none; }
.round-btn--whatsapp { background: var(--c-whatsapp); color: #fff; box-shadow: none; }
.round-btn--whatsapp .icon { width: 1.75rem; height: 1.75rem; }
.round-btn:disabled, .round-btn.is-disabled { opacity: 0.45; cursor: not-allowed; }

/* ---------- carosello ---------- */

.carousel { position: relative; }

.carousel__viewport {
  overflow: hidden; /* serve solo a tenere fuori le foto vicine durante lo scorrimento */
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}

.carousel__viewport:not(.is-moving) .carousel__slide[aria-hidden="true"] { visibility: hidden; } /* niente bordi delle foto vicine a riposo */

.carousel__track {
  display: flex;
  transform: translateX(-100%);
  will-change: transform;
}

.carousel__slide { flex: 0 0 100%; }

/* Galleria: cornice 4:3 ad altezza fissa; la stondatura sta sulla foto, non sulla cornice.
   Il 4:3 si ottiene col padding (altezza = 75% della larghezza) e la foto sta in posizione
   assoluta: così l'altezza della cornice non dipende mai dalla foto. Con aspect-ratio e
   max-height in percentuale WebKit (Safari, tutti i browser iOS) stirava le slide fino
   all'altezza delle foto verticali. */
.gallery .carousel__track { align-items: flex-start; }
.gallery .carousel__slide {
  position: relative;
  height: 0;
  padding-bottom: 75%;
}

.gallery .carousel__slide img {
  position: absolute;
  inset: 0;
  margin: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--radius-card);
  -webkit-user-drag: none;
}

.carousel__prev, .carousel__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.carousel__prev { left: var(--space-s); }
.carousel__next { right: var(--space-s); }

/* Box AI: la foto riempie il riquadro, che ha il suo formato e il raggio */
.carousel--box .carousel__viewport { border-radius: var(--radius-card); background: var(--c-bg); }
.carousel--box .carousel__track { height: 100%; }
.carousel--box .carousel__slide { display: block; }
.carousel--box .carousel__slide img { width: 100%; height: 100%; max-width: none; max-height: none; border-radius: 0; object-fit: cover; -webkit-user-drag: none; } /* le foto del box hanno già il formato esatto */

.caption { text-align: center; font-size: var(--step--1); margin-top: var(--space-xs); }

/* ---------- pillole ---------- */

.pills { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }

.pill {
  display: inline-block;
  padding: var(--space-3xs) var(--space-xs);
  border-radius: 999px;
  background: var(--c-surface);
  box-shadow: var(--edge);
  font-size: var(--step--1);
  line-height: 1.6;
}

/* ---------- descrizione, prezzo ---------- */

.description { display: flex; flex-direction: column; gap: var(--space-xs); }
.description .subtitle { margin-bottom: 0; }

/* Riga finale della descrizione (sezione 5.6): due colonne al 50% */
.flower { display: flex; align-items: center; gap: var(--space-s); }
.flower > * { flex: 1 1 0; min-width: 0; }
.flower__art img { width: 100%; height: auto; }

.bullets { padding-left: 1.25em; list-style: disc; }
.bullets li + li { margin-top: var(--space-3xs); }
.bullets li::marker { color: var(--c-text); }

.price { display: flex; flex-direction: column; gap: var(--space-3xs); }
.price__main { font-family: var(--font-title); font-weight: 700; font-size: var(--step-3); line-height: 1.15; }

/* ---------- box prompt ---------- */

.box {
  background: var(--c-surface);
  border-radius: var(--radius-card);
  padding: var(--space-s-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  box-shadow: 0 2px 16px rgb(40 28 16 / 0.06);
}

.field { position: relative; }

.field__input {
  display: block;
  width: 100%;
  resize: none;
  border: 0;
  border-radius: 20px;
  background: var(--c-bg);
  color: var(--c-text);
  font: inherit;
  font-size: var(--step-0);
  line-height: 1.4;
  padding: var(--space-s) var(--space-s) var(--space-l);
}
.field__input::placeholder { color: #5B4A38; opacity: 1; }

.field__count {
  position: absolute;
  right: var(--space-s);
  bottom: var(--space-xs);
  font-size: var(--step--2);
}


.nav { display: flex; align-items: center; gap: var(--space-2xs); }
.nav__room { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.send-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  flex: none;
  margin-left: auto;
  min-height: var(--tap);
  padding: 0 var(--space-s);
  border: 0;
  border-radius: 999px;
  background: var(--c-accent-1);
  color: var(--c-text);
  font-weight: 700;
  line-height: 1;
}
.send-btn .icon { width: 1.25rem; height: 1.25rem; }
.send-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.messages:empty { display: none; }

.plan { width: 100%; }
.plan-svg { width: 100%; height: auto; }

.plan-svg .st1 { fill: var(--c-text); }
.plan-room { cursor: pointer; outline: none; fill: var(--c-bg); }
.plan-room.is-selected { fill: var(--c-accent-1); }
.plan-room:focus-visible { stroke: var(--c-text); stroke-width: 6; }
.plan-note { margin-top: var(--space-2xs); text-align: center; }
.plan-dot { fill: var(--c-text); stroke: var(--c-surface); stroke-width: 3; }

/* ---------- download e WhatsApp ---------- */

.action { display: flex; flex-direction: column; gap: var(--space-xs); }
.action__row { display: flex; align-items: center; gap: var(--space-s); justify-content: space-between; }
.action__text { flex: 1; }
.hint:empty { display: none; }

/* ---------- riquadro QR (desktop) ---------- */

.qr {
  border: 0;
  border-radius: var(--radius-card);
  padding: 0;
  background: var(--c-surface);
  color: var(--c-text);
  max-width: min(92vw, 22rem);
  box-shadow: 0 12px 48px rgb(40 28 16 / 0.3);
}
.qr::backdrop { background: rgb(40 28 16 / 0.55); }
.qr__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-l) var(--space-m) var(--space-m);
}
.qr__close { position: absolute; top: var(--space-xs); right: var(--space-xs); }
.qr__img { width: min(100%, 15rem); height: auto; border-radius: 12px; }
.qr__number { font-size: var(--step-1); font-weight: 700; }

/* ---------- piè di pagina ---------- */

.foot { text-align: center; margin-top: var(--space-m); }

/* ---------- movimento ridotto ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Fase 2: risultato, confronto, storico ---------- */

.carousel--box .stage { position: absolute; inset: 0; border-radius: var(--radius-card); overflow: hidden; }
.stage[hidden], .thumbs[hidden] { display: none; }

.compare { position: absolute; inset: 0; --pos: 50%; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.compare__after { clip-path: inset(0 0 0 var(--pos)); }
.is-simulated { filter: sepia(0.8) hue-rotate(-20deg) saturate(1.6); }
.compare__line {
  position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px;
  background: var(--c-surface); pointer-events: none;
}
.compare__knob {
  position: absolute; top: 50%; left: 50%; width: 2.5rem; height: 2.5rem; margin: -1.25rem 0 0 -1.25rem;
  border-radius: 50%; background: var(--c-surface); box-shadow: 0 1px 6px rgb(40 28 16 / 0.3);
}
.compare__knob::before, .compare__knob::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -5px;
  border: 5px solid transparent;
}
.compare__knob::before { left: 6px; border-right-color: var(--c-text); }
.compare__knob::after { right: 6px; border-left-color: var(--c-text); }
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  touch-action: pan-y;
}
.compare:has(.compare__range:focus-visible) .compare__knob { outline: 3px solid var(--c-text); outline-offset: 2px; }
.compare__badge, .thumb__badge {
  position: absolute; right: var(--space-xs); bottom: var(--space-xs); padding: 0.15em 0.6em;
  border-radius: 999px; background: var(--c-surface); color: var(--c-text);
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.04em; pointer-events: none;
}
.thumb__badge { right: 3px; bottom: 3px; font-size: 0.5rem; padding: 0.1em 0.4em; }

.veil {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-s); padding: var(--space-m); text-align: center; font-weight: 700;
  background: rgb(247 241 227 / 0.8);
}
.veil p { margin: 0; }
.veil__pulse {
  width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--c-accent-1);
  animation: veil-pulse 1.4s ease-in-out infinite;
}
@keyframes veil-pulse { 0%, 100% { transform: scale(0.7); opacity: 0.6; } 50% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .veil__pulse { animation: none; } }

.thumbs { display: flex; flex-wrap: wrap; gap: var(--space-2xs); }
.thumb {
  position: relative; width: 3.5rem; height: 3.5rem; padding: 0; overflow: hidden;
  border: 2px solid transparent; border-radius: 14px; background: var(--c-bg); cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb[aria-pressed="true"] { border-color: var(--c-text); }

.message { margin: 0; }
.message + .message { margin-top: var(--space-2xs); }
/* Avviso permanente sulle idee (sezione 5.9): grassetto con sottolineatura gialla spessa, valida anche su più righe */
.message--keep { line-height: 1.6; }
.message--keep strong {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--c-accent-1);
  text-decoration-thickness: 0.3em;
  text-underline-offset: 0.12em;
  text-decoration-skip-ink: none;
}
.field__input:disabled { opacity: 0.6; cursor: not-allowed; }

/* Turnstile (sezione 7.4): invisibile; se serve una verifica interattiva compare qui, in basso */
.turnstile-host {
  position: fixed;
  inset: auto 0 var(--space-s, 1rem) 0;
  display: flex;
  justify-content: center;
  z-index: 50;
  pointer-events: none;
}
.turnstile-host > * { pointer-events: auto; }
