/* Il percorso guidato di DeepCMS: una domanda per schermata, caratteri grandi, fotografie grandi,
   movimenti morbidi (Francesco, 05/11/2026). */
:root {
  --fondo: #fbfbfd; --carta: #fff; --inchiostro: #1d1d1f; --secondo: #6e6e73; --linea: #d2d2d7;
  --tenue: #f0f0f3; --scelta: #1d1d1f; --errore: #c4152a; --ombra: 0 1px 2px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.08);
  --morbido: cubic-bezier(.22,.61,.36,1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--inchiostro); font: 400 17px/1.5 'Inter Tight', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.testa { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; padding: 18px clamp(16px, 4vw, 48px); background: rgba(251,251,253,.82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.marchio { font-weight: 600; letter-spacing: -.01em; text-decoration: none; font-size: 17px; }
.naviga { display: flex; align-items: center; gap: 14px; margin: 0 auto; }
.naviga button { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--inchiostro); cursor: pointer; transition: background .25s var(--morbido), opacity .25s var(--morbido); }
.naviga button:hover:not(:disabled) { background: var(--tenue); }
.naviga button:disabled { opacity: .22; cursor: default; }
.naviga svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.punti { display: flex; align-items: center; gap: 7px; }
.punti i { width: 6px; height: 6px; border-radius: 3px; background: var(--linea); transition: width .45s var(--morbido), background .45s var(--morbido); }
.punti i.fatto { background: var(--secondo); }
.punti i.qui { width: 20px; background: var(--inchiostro); }
.entra { font-size: 14px; color: var(--secondo); text-decoration: none; white-space: nowrap; }
.entra:hover { color: var(--inchiostro); }

#percorso { padding: clamp(32px, 7vh, 88px) clamp(16px, 4vw, 48px) 120px; }
.passo { max-width: 880px; margin: 0 auto; animation: entra .7s var(--morbido) both; }
.passo--largo { max-width: 1240px; }
.passo.esce { animation: esce .35s var(--morbido) both; }
@keyframes entra { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes esce { to { opacity: 0; transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .passo, .passo.esce { animation: none; } .punti i { transition: none; } }

.contatore { margin: 0 0 14px; font-size: 14px; font-weight: 500; color: var(--secondo); letter-spacing: .01em; }
h1 { margin: 0; font-size: clamp(34px, 5.6vw, 64px); line-height: 1.06; font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
.sotto { margin: 18px 0 0; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; color: var(--secondo); max-width: 640px; text-wrap: pretty; }

.tessere { display: grid; gap: 10px; margin-top: clamp(32px, 5vh, 52px); }
.tessere--settori { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.tessera { position: relative; display: flex; align-items: center; min-height: 64px; padding: 16px 48px 16px 20px; border: 0; border-radius: 16px; background: var(--carta); box-shadow: inset 0 0 0 1px var(--linea); text-align: left; font-size: 16px; font-weight: 500; line-height: 1.25; cursor: pointer; transition: box-shadow .25s var(--morbido), background .25s var(--morbido), color .25s var(--morbido), transform .25s var(--morbido); }
.tessera:hover { box-shadow: inset 0 0 0 1px var(--inchiostro); }
.tessera:active { transform: scale(.985); }
.tessera[aria-pressed="true"] { background: var(--scelta); color: #fff; box-shadow: none; }
.tessera::after { content: ''; position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--linea); transition: all .25s var(--morbido); }
.tessera[aria-pressed="true"]::after { box-shadow: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat; }
.tessera:disabled { opacity: .4; cursor: default; box-shadow: inset 0 0 0 1px var(--linea); }

.tessere--foto { grid-template-columns: repeat(4, 1fr); gap: 14px; }
.foto { position: relative; aspect-ratio: 4 / 5; border: 0; padding: 0; border-radius: 20px; overflow: hidden; cursor: pointer; background: var(--tenue); isolation: isolate; transition: transform .35s var(--morbido), box-shadow .35s var(--morbido); }
.foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--morbido); }
.foto::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(0,0,0,.62), rgba(0,0,0,0) 55%); }
.foto span { position: absolute; left: 18px; bottom: 16px; z-index: 2; color: #fff; font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
.foto:hover img { transform: scale(1.04); }
.foto[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--fondo), 0 0 0 5px var(--inchiostro); }
.foto::after { content: ''; position: absolute; z-index: 2; right: 14px; top: 14px; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.9); backdrop-filter: blur(6px); transition: all .25s var(--morbido); }
.foto[aria-pressed="true"]::after { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1d1f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; }
.foto:disabled { opacity: .45; cursor: default; }

.campi { display: flex; flex-direction: column; gap: 28px; margin-top: clamp(28px, 5vh, 48px); }
.grande { width: 100%; border: 0; border-bottom: 1.5px solid var(--linea); background: transparent; padding: 10px 0 14px; font-size: clamp(26px, 3.6vw, 40px); font-weight: 500; letter-spacing: -.025em; outline: 0; border-radius: 0; transition: border-color .25s var(--morbido); }
.grande:focus { border-bottom-color: var(--inchiostro); }
.grande::placeholder { color: #b8b8be; }
.campo { display: flex; flex-direction: column; gap: 8px; font-size: 15px; font-weight: 500; }
.campo__etichetta span { color: var(--secondo); font-weight: 400; margin-left: 6px; }
.campo input { border: 0; border-radius: 12px; background: var(--carta); box-shadow: inset 0 0 0 1px var(--linea); padding: 14px 16px; font-size: 17px; outline: 0; }
.campo input:focus { box-shadow: inset 0 0 0 1.5px var(--inchiostro); }

.bisogni { border: 0; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.bisogni legend { padding: 0; margin-bottom: 14px; font-size: 15px; font-weight: 500; }
.bisogno { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 18px; background: var(--carta); box-shadow: inset 0 0 0 1px var(--linea); cursor: pointer; transition: box-shadow .25s var(--morbido); }
.bisogno:hover { box-shadow: inset 0 0 0 1px var(--inchiostro); }
.bisogno:has(input:checked) { box-shadow: inset 0 0 0 2px var(--inchiostro); }
.bisogno:has(input:focus-visible) { outline: 2px solid var(--inchiostro); outline-offset: 3px; }
.bisogno input { position: absolute; opacity: 0; pointer-events: none; }
.bisogno__nome { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.bisogno__testo { font-size: 15px; color: var(--secondo); line-height: 1.4; flex: 1; }
.nota { grid-column: 1 / -1; margin: 4px 0 0; font-size: 14px; color: var(--secondo); }

.spunta { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.45; color: var(--secondo); cursor: pointer; }
.spunta input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--inchiostro); flex: none; }
.captcha { min-height: 65px; }
.avviso { margin: 28px 0 0; padding: 16px 20px; border-radius: 14px; background: var(--carta); box-shadow: inset 0 0 0 1px var(--linea); font-size: 16px; line-height: 1.45; max-width: 680px; }
.errore { margin: 0; color: var(--errore); font-size: 15px; font-weight: 500; }

.azioni { display: flex; align-items: center; gap: 12px; margin-top: clamp(36px, 6vh, 56px); }
.primario { margin-left: auto; height: 52px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--inchiostro); color: #fff; font-size: 17px; font-weight: 500; cursor: pointer; transition: opacity .25s var(--morbido), transform .2s var(--morbido); }
.primario:hover { opacity: .86; }
.primario:active { transform: scale(.98); }
.primario:disabled { opacity: .25; cursor: default; transform: none; }
.indietro { display: none; height: 52px; padding: 0 6px; border: 0; background: none; color: var(--secondo); font-size: 17px; cursor: pointer; }
.indietro:hover { color: var(--inchiostro); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--inchiostro); outline-offset: 3px; }

.griglia { display: flex; align-items: flex-start; gap: clamp(16px, 2vw, 28px); margin-top: clamp(36px, 6vh, 56px); overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 32px; margin-inline: -4px; scrollbar-width: thin; }
.proposta { flex: 1 0 260px; max-width: 340px; display: flex; flex-direction: column; gap: 14px; border: 0; padding: 0; background: none; text-align: left; cursor: pointer; scroll-snap-align: start; animation: entra .8s var(--morbido) both; }
.proposta__nome { font-size: 19px; font-weight: 600; letter-spacing: -.015em; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.proposta__nome small { font-size: 14px; font-weight: 400; color: var(--secondo); }
.proposta__pagina { position: relative; width: 100%; height: 560px; border-radius: 14px; overflow: hidden; background: var(--carta); box-shadow: var(--ombra); transition: transform .5s var(--morbido), box-shadow .5s var(--morbido); }
.proposta:hover .proposta__pagina { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(0,0,0,.04), 0 24px 60px rgba(0,0,0,.14); }
.proposta__pagina iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform-origin: 0 0; pointer-events: none; }
.proposta__apri { font-size: 15px; color: var(--secondo); }
.proposta:hover .proposta__apri { color: var(--inchiostro); }

.visore { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; background: var(--fondo); animation: entra .45s var(--morbido) both; }
.visore__barra { display: flex; align-items: center; gap: 16px; padding: 12px clamp(12px, 3vw, 32px); border-bottom: 1px solid var(--tenue); }
.visore__chiudi { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--tenue); cursor: pointer; display: grid; place-items: center; flex: none; }
.visore__chiudi svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.visore__titolo { margin: 0; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schermi { display: flex; padding: 3px; border-radius: 999px; background: var(--tenue); margin: 0 auto; }
.schermi button { height: 34px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-size: 14px; font-weight: 500; color: var(--secondo); cursor: pointer; transition: all .25s var(--morbido); }
.schermi button[aria-pressed="true"] { background: var(--carta); color: var(--inchiostro); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.visore .primario { margin-left: 0; height: 42px; padding: 0 20px; font-size: 15px; }
.visore__palco { flex: 1; min-height: 0; display: flex; justify-content: center; padding: clamp(0px, 2vw, 24px); }
.visore__palco iframe { width: 100%; height: 100%; border: 0; border-radius: 14px; background: #fff; box-shadow: var(--ombra); transition: width .5s var(--morbido); }
.visore__palco.telefono iframe { width: 390px; max-width: 100%; border-radius: 28px; }

.attesa { position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 22px; background: rgba(251,251,253,.94); backdrop-filter: blur(12px); animation: entra .4s var(--morbido) both; }
.attesa p { margin: 0; font-size: 21px; font-weight: 500; letter-spacing: -.015em; }
.attesa__punto { width: 14px; height: 14px; border-radius: 50%; background: var(--inchiostro); animation: respira 1.4s var(--morbido) infinite; }
@keyframes respira { 0%, 100% { transform: scale(.7); opacity: .35; } 50% { transform: scale(1.15); opacity: 1; } }

@media (max-width: 900px) {
  .tessere--foto { grid-template-columns: repeat(2, 1fr); }
  .bisogni { grid-template-columns: 1fr; }
  .proposta { flex-basis: 72vw; }
  .visore__barra { flex-wrap: wrap; }
  .visore .primario { order: 3; width: 100%; }
  .schermi { margin-right: 0; }
}
@media (max-width: 560px) {
  .entra { display: none; }
  .tessere--settori { grid-template-columns: 1fr 1fr; }
  .tessera { min-height: 56px; padding: 12px 40px 12px 14px; font-size: 15px; }
  .tessera::after { right: 12px; }
  .foto span { font-size: 17px; left: 14px; bottom: 12px; }
  .azioni { position: sticky; bottom: 0; margin-left: -16px; margin-right: -16px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--fondo) 70%, rgba(251,251,253,0)); }
  .visore__titolo { flex: 1; }
  .schermi { display: none; }
  .visore__palco { padding: 0; }
  .visore__palco iframe, .visore__palco.telefono iframe { border-radius: 0; box-shadow: none; }
}
