/* ==========================================================================
   M&P Web Studio - foglio di stile condiviso
   Stile neubrutalista: bordi spessi, ombre dure, colori accesi.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design token ---------- */
:root {
  --ink: #000;
  --paper: #fff;
  --bg: #f0f0f0;
  --yellow: #f4e869;
  --pink: #ffb3c6;
  --green: #98f5e1;
  --blue: #90d5ff;
  --orange: #ffb067;
  --danger: #ffb3c6;

  --bd: 3px;
  --bd-lg: 4px;
  --sh-sm: 3px 3px 0 var(--ink);
  --sh: 6px 6px 0 var(--ink);
  --sh-lg: 10px 10px 0 var(--ink);

  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;
  --sp-5: 4rem;
  --sp-6: 6rem;

  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 72rem;
  --header-h: 4.5rem;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-top: calc(var(--header-h) + 4px); /* spazio per l'header fisso (altezza + bordo) */
}
main { flex: 1; overflow-x: clip; } /* le rotazioni delle card non devono creare scroll orizzontale */
@media (hover: hover) and (pointer: fine) { html { scroll-behavior: smooth; } }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { background: var(--yellow); }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 var(--sp-2); font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.1rem, 6.2vw, 4.4rem); text-transform: uppercase; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.9rem); text-transform: uppercase; }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }
p { margin: 0 0 var(--sp-2); }
ul, ol { margin: 0 0 var(--sp-2); padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 48rem); margin-inline: auto; }
.center { text-align: center; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.4rem); line-height: 1.45; max-width: 40rem; }
.mt-2 { margin-top: var(--sp-2); } .mt-3 { margin-top: var(--sp-3); } .mt-4 { margin-top: var(--sp-4); }

:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--yellow); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--yellow); border: var(--bd) solid var(--ink); padding: 0.6rem 1rem; font-weight: 700;
}
.skip-link:focus { top: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* segnaposto da completare: ben visibili finche' non vengono sostituiti */
.todo { background: var(--yellow); outline: 2px dashed var(--ink); padding: 0 0.25em; font-weight: 700; }

/* ---------- Pulsanti "cubo" (ruotano su se stessi all'hover/focus) ---------- */
.btn-cube {
  --h: 3.25rem;
  display: inline-block; vertical-align: middle; max-width: 100%;
  perspective: 800px; padding: 0; margin: 0;
  background: transparent; color: var(--ink);
  border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh);
  font: inherit; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn-cube:hover { background: transparent; box-shadow: 8px 8px 0 var(--ink); }
.btn-cube:active { transform: translate(4px, 4px); box-shadow: 2px 2px 0 var(--ink); }
.btn-cube.btn-sm { --h: 2.6rem; font-size: 0.88rem; box-shadow: var(--sh-sm); }
.btn-cube.btn-sm:hover { box-shadow: 5px 5px 0 var(--ink); }
.btn-cube.btn-sm:active { box-shadow: 1px 1px 0 var(--ink); transform: translate(2px, 2px); }
.btn-cube.btn-block { display: block; width: 100%; }
.btn-cube[disabled] { opacity: 0.6; cursor: wait; }
.cube { position: relative; display: block; height: var(--h); transform-style: preserve-3d; transition: transform 0.45s var(--ease); }
/* riserva la larghezza giusta (le facce sono in posizione assoluta) */
.cube::before { content: attr(data-w); display: block; visibility: hidden; height: var(--h); line-height: var(--h); padding: 0 1.4rem; white-space: nowrap; }
.face {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 1rem; white-space: nowrap;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: background-color 0.2s;
}
.face.front { background: var(--yellow); transform: translateZ(calc(var(--h) / 2)); }
.face.top { background: var(--pink); transform: rotateX(-90deg) translateZ(calc(var(--h) / 2)); }
.btn-alt .face.front { background: var(--paper); }
.btn-alt .face.top { background: var(--blue); }
.btn-cube:hover .cube, .btn-cube:focus-visible .cube { transform: rotateX(90deg); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-3); padding-right: 8px; padding-bottom: 8px; }
@media (max-width: 26em) { .btn-cube { font-size: 0.82rem; } .cube::before, .face { padding-left: 0.8rem; padding-right: 0.8rem; } }

/* ---------- Header e navigazione ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--paper); border-bottom: var(--bd-lg) solid var(--ink); box-shadow: 0 4px 0 var(--ink);
}
.nav-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); min-height: var(--header-h); }
.site-header { transition: box-shadow 0.25s var(--ease); }
.site-header.is-scrolled { box-shadow: 0 6px 0 var(--ink); }
/* barra di avanzamento di lettura sul bordo inferiore */
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 4px; background: var(--pink); transform: scaleX(var(--progress, 0)); transform-origin: left; pointer-events: none; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-weight: 700; font-size: 1.15rem; text-transform: uppercase; letter-spacing: -0.02em; text-decoration: none;
}
.brand:hover { background: none; }
.brand img { width: 2.5rem; height: 2.5rem; transition: transform 0.7s var(--ease); }
.brand:hover img, .brand:focus-visible img { transform: rotate(360deg); }
.nav-list { display: none; list-style: none; margin: 0; padding: 0; align-items: center; gap: 0.25rem; }
.nav-list > li { margin: 0; position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.35rem; font: inherit; font-weight: 700; text-transform: uppercase; font-size: 0.92rem;
  letter-spacing: 0.02em; text-decoration: none; background: none; border: 0; padding: 0.6rem 0.75rem; cursor: pointer; color: var(--ink);
}
.nav-link { position: relative; transition: transform 0.2s var(--ease), background-color 0.2s; }
.nav-link::after { content: ""; position: absolute; left: 0.75rem; right: 0.75rem; bottom: 0.2rem; height: 3px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease); }
.nav-link:hover, .nav-link[aria-expanded="true"] { background: var(--yellow); transform: translateY(-2px); }
.nav-link:hover::after, .nav-link[aria-expanded="true"]::after, .nav-link[aria-current="page"]::after, .nav-link[aria-current="true"]::after { transform: scaleX(1); }
.chev { width: 0.7em; height: 0.7em; transition: transform 0.2s var(--ease); }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.submenu {
  list-style: none; margin: 0; padding: 0; position: absolute; top: calc(100% + 0.6rem); left: 0; min-width: 17rem;
  background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}
.submenu.is-open { opacity: 1; visibility: visible; transform: none; }
.submenu li { margin: 0; border-bottom: var(--bd) solid var(--ink); }
.submenu li:last-child { border-bottom: 0; }
.submenu.is-open li { animation: sub-in 0.3s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes sub-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.submenu a { display: block; padding: 0.75rem 1rem; text-decoration: none; font-weight: 700; transition: padding-left 0.2s var(--ease), background-color 0.2s; }
.submenu a:hover { background: var(--blue); padding-left: 1.5rem; }
.nav-cta { display: none; }
.nav-actions { display: flex; align-items: center; gap: var(--sp-2); }
.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; cursor: pointer;
  background: var(--paper); border: var(--bd) solid var(--ink); box-shadow: var(--sh-sm); color: var(--ink);
}
.menu-toggle:hover { background: var(--yellow); }
.menu-toggle svg { width: 1.5rem; height: 1.5rem; }
.menu-toggle .i-close { display: none; }
.menu-toggle[aria-expanded="true"] .i-open { display: none; }
.menu-toggle[aria-expanded="true"] .i-close { display: block; }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 90; background: var(--paper); overflow-y: auto;
  padding: var(--sp-3) 1rem var(--sp-5); border-top: var(--bd-lg) solid var(--ink);
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu ul { list-style: none; padding: 0; margin: 0 0 var(--sp-3); }
.mobile-menu li { margin: 0; }
.mobile-menu li a { display: block; padding: 0.8rem 0.25rem; font-weight: 700; font-size: 1.15rem; text-transform: uppercase; text-decoration: none; border-bottom: var(--bd) solid var(--ink); }
.mobile-menu .group-label { display: block; margin: var(--sp-2) 0 0; padding: 0.4rem 0.6rem; background: var(--yellow); border: var(--bd) solid var(--ink); font-weight: 700; text-transform: uppercase; font-size: 0.85rem; }
.mobile-menu .btn-cube { display: block; width: 100%; margin-top: var(--sp-2); }
.mobile-menu.is-open li { animation: sub-in 0.35s var(--ease) both; }
body.menu-open { overflow: hidden; }

@media (min-width: 62em) {
  .nav-list { display: flex; }
  .nav-cta { display: inline-flex; }
  .menu-toggle, .mobile-menu { display: none; }
}

/* ---------- Sezioni ---------- */
.section { padding: var(--sp-5) 0; border-bottom: var(--bd-lg) solid var(--ink); }
.section-tight { padding: var(--sp-4) 0; }
.bg-yellow { background: var(--yellow); } .bg-pink { background: var(--pink); } .bg-green { background: var(--green); }
.bg-blue { background: var(--blue); } .bg-orange { background: var(--orange); } .bg-paper { background: var(--paper); }
.eyebrow {
  display: inline-block; background: var(--ink); color: var(--paper); font-weight: 700; text-transform: uppercase;
  font-size: 0.8rem; letter-spacing: 0.08em; padding: 0.3rem 0.7rem; margin-bottom: var(--sp-2);
}
.section-head { max-width: 44rem; margin-bottom: var(--sp-4); }
.section-head.center { margin-inline: auto; }

/* ---------- Hero ---------- */
.hero {
  border-bottom: var(--bd-lg) solid var(--ink); background: var(--green); overflow: hidden;
  min-height: calc(100vh - var(--header-h)); min-height: calc(100svh - var(--header-h));
  display: flex; flex-direction: column; justify-content: center;
}
.hero-grid { display: grid; gap: var(--sp-4); align-items: center; padding: var(--sp-3) 0 var(--sp-1); }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.9rem); }
.hero .lead { margin-bottom: 0; }
.hero-note { font-weight: 700; margin: var(--sp-3) 0 0; font-size: 0.95rem; }
@media (min-width: 62em) and (max-height: 780px) { .hero-note { display: none; } .hero .btn-row { margin-top: var(--sp-2); } }
.scroll-cue { align-self: center; display: inline-flex; flex-direction: column; align-items: center; gap: 0.3rem; margin: 0 0 var(--sp-1); padding-bottom: 6px; font-weight: 700; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.08em; text-decoration: none; transition: opacity 0.3s; }
.scroll-cue:hover { background: none; }
.scroll-cue .lbl { background: var(--paper); border: var(--bd) solid var(--ink); padding: 0.2rem 0.6rem; box-shadow: var(--sh-sm); }
.scroll-cue .arrow { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; background: var(--yellow); border: var(--bd) solid var(--ink); border-radius: 50%; box-shadow: var(--sh-sm); animation: bounce 1.6s ease-in-out infinite; }
.scroll-cue .arrow svg { width: 1.2rem; height: 1.2rem; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.hero h1 .hl { background: var(--ink); color: var(--yellow); padding: 0 0.2em; display: inline-block; transform: rotate(-1.5deg); }
/* Le parole restano sempre visibili (nessun ritardo sull'LCP): si anima solo lo spostamento */
.hero .word { display: inline-block; animation: word-in 0.5s var(--ease) both; animation-delay: calc(var(--i) * 40ms); }
@keyframes word-in { from { transform: translateY(0.45em); } to { transform: none; } }
@keyframes word-in-b { from { transform: translateY(0.45em); } to { transform: none; } }
.mock-bar { background: var(--ink); color: var(--blue); display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.75rem; font-weight: 700; }
.mock-dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; border: 2px solid var(--paper); }
.mock-dot:nth-child(1) { background: #ff5f57; } .mock-dot:nth-child(2) { background: var(--yellow); } .mock-dot:nth-child(3) { background: #28c840; }
@media (min-width: 62em) { .hero-grid { grid-template-columns: 1.25fr 0.75fr; } }

/* ---------- Animazioni di apertura / chiusura / ritorno (hero e hero delle pagine) ----------
   main.js aggiunge .is-out quando si scende oltre la hero e .is-back quando si risale. */
[data-hero] .hero-copy, .page-hero > .wrap { animation: copy-first 0.7s var(--ease) both; }
.hero .hero-copy { animation: none; }
[data-hero].is-out .hero-copy, .page-hero.is-out > .wrap { animation: copy-out 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53) both; }
[data-hero].is-back .hero-copy, .page-hero.is-back > .wrap { animation: copy-back 0.75s var(--ease) both; }
[data-hero].is-out .word { animation: none; }
[data-hero].is-back .word { animation: word-in-b 0.55s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
[data-hero].is-out .hero-visual { animation: visual-out 0.7s cubic-bezier(0.55, 0.085, 0.68, 0.53) both; }
[data-hero].is-back .hero-visual { animation: rotate-in 0.9s var(--ease) both; }
[data-hero].is-out .scroll-cue { opacity: 0; }
[data-hero].is-out .mock, [data-hero].is-out .scroll-cue .arrow { animation-play-state: paused; }
@keyframes copy-first { from { transform: translateY(28px); } to { transform: none; } }
@keyframes copy-out { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translate3d(0, 90px, 0) scale(0.92); } }
@keyframes copy-back { 0% { opacity: 0; transform: translate3d(0, -50px, 0) scale(0.94); } 100% { opacity: 1; transform: none; } }
@keyframes rotate-in { from { opacity: 0; transform: rotate3d(0, 0, 1, -200deg) scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes visual-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: rotate3d(0, 0, 1, 200deg) scale(0.4); } }

/* hero delle pagine interne */
.page-hero { border-bottom: var(--bd-lg) solid var(--ink); padding: var(--sp-5) 0; }
.page-hero h1 { max-width: 18ch; }
.page-hero .lead { margin-bottom: 0; }
.crumbs { font-size: 0.9rem; margin-bottom: var(--sp-2); font-weight: 700; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.4rem; }

/* ---------- Card e griglie ---------- */
.grid { display: grid; gap: var(--sp-3); }
@media (min-width: 40em) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62em) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 40em) and (max-width: 61.99em) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh); padding: var(--sp-3);
  display: flex; flex-direction: column; transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
a.card, .card.is-link { text-decoration: none; }
.card.is-link:hover, a.card:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--ink); background: var(--paper); }
.card h3 { margin-bottom: 0.6rem; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .push { margin-top: auto; padding-top: var(--sp-2); }
.card .links { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: auto; padding-top: var(--sp-3); padding-right: 6px; padding-bottom: 6px; }
.card-yellow { background: var(--yellow); } .card-green { background: var(--green); } .card-blue { background: var(--blue); } .card-pink { background: var(--pink); } .card-orange { background: var(--orange); }
.icon-box { width: 3.5rem; height: 3.5rem; background: var(--paper); border: var(--bd) solid var(--ink); box-shadow: var(--sh-sm); display: grid; place-items: center; margin-bottom: var(--sp-2); }
.icon-box svg { width: 1.9rem; height: 1.9rem; }
.num { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; background: var(--ink); color: var(--yellow); font-weight: 700; font-size: 1.2rem; margin-bottom: var(--sp-2); }
.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-left: 1.9rem; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 0.3em; width: 1.1rem; height: 1.1rem; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='4' stroke-linecap='square'%3E%3Cpath d='M5 12.5l5 5L19 7'/%3E%3C/svg%3E") center/80% no-repeat; border: 2px solid var(--ink); }
.note { background: var(--paper); border: var(--bd) dashed var(--ink); padding: var(--sp-2) var(--sp-3); font-weight: 700; }
.two-col { display: grid; gap: var(--sp-4); align-items: start; }
@media (min-width: 62em) { .two-col { grid-template-columns: 1fr 1fr; } .two-col.wide-left { grid-template-columns: 1.3fr 0.7fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: var(--sp-2); max-width: 52rem; }
.faq details { background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh-sm); }
.faq summary { cursor: pointer; font-weight: 700; padding: 1rem 3rem 1rem 1.2rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 1.1rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; line-height: 1; transition: transform 0.2s var(--ease); }
.faq details[open] summary { background: var(--yellow); border-bottom: var(--bd) solid var(--ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq .answer { padding: 1rem 1.2rem; }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Prezzi ---------- */
.price-card .price { font-size: 2rem; font-weight: 700; margin: 0.25rem 0 var(--sp-2); }
.price-card .tag { align-self: flex-start; background: var(--ink); color: var(--paper); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; padding: 0.2rem 0.6rem; margin-bottom: 0.75rem; letter-spacing: 0.06em; }

/* ---------- Gestionali: piani, etichette, tabelle, schemi (aggiunte, non cambiano le pagine esistenti) ---------- */
.price-card .price small { font-size: 1rem; font-weight: 700; }
.price-card .price-alt { font-weight: 700; margin: -0.6rem 0 var(--sp-2); }
.badge { display: inline-block; vertical-align: middle; margin-left: 0.4rem; padding: 0.1rem 0.5rem; background: var(--paper); border: 2px solid var(--ink); color: var(--ink); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.5; }
.badge-paid { background: var(--orange); }
.badge-soon { background: var(--blue); }
.badge-plan { background: var(--green); }
.table-wrap { overflow-x: auto; background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh); }
.compare { width: 100%; min-width: 34rem; border-collapse: collapse; }
.compare th, .compare td { padding: 0.7rem 0.9rem; text-align: left; border-bottom: var(--bd) solid var(--ink); vertical-align: top; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--ink); color: var(--yellow); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.compare tbody th { font-weight: 700; }
.compare td.c { text-align: center; font-weight: 700; }
.figure { margin: 0; background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh); }
.figure svg { width: 100%; height: auto; }
.figure figcaption { padding: 0.6rem 1rem; background: var(--yellow); border-top: var(--bd) solid var(--ink); font-size: 0.92rem; font-weight: 700; }
.addon { background: var(--paper); border: var(--bd) dashed var(--ink); padding: var(--sp-2) var(--sp-3); }
.addon p:last-child { margin-bottom: 0; }
/* con cinque voci nel menu, tra 992 e 1120 px la barra va compattata per non andare a capo */
@media (min-width: 62em) and (max-width: 70em) {
  .nav-bar { gap: 0.5rem; }
  .nav-list { gap: 0; }
  .nav-link { padding: 0.6rem 0.45rem; font-size: 0.84rem; white-space: nowrap; }
  .nav-link::after { left: 0.45rem; right: 0.45rem; }
  .brand { font-size: 1rem; white-space: nowrap; }
  .brand img { width: 2.2rem; height: 2.2rem; }
  .nav-actions .btn-sm { font-size: 0.78rem; }
  .nav-actions .btn-sm .cube::before { padding: 0 1rem; }
}
/* ---------- Gestionali: hero con schermate reali ---------- */
.hero-split { display: grid; gap: var(--sp-4); align-items: center; }
@media (min-width: 62em) { .hero-split { grid-template-columns: 0.95fr 1.05fr; } }
.page-hero .hero-split h1 { max-width: 20ch; font-size: clamp(1.9rem, 3.7vw, 3.1rem); }
.hero-split .lead { font-size: clamp(1rem, 1.5vw, 1.15rem); max-width: 36rem; }
.hero-split .eyebrow { margin-bottom: var(--sp-2); }
.shots { background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh-lg); min-width: 0; }
.shots-bar { background: var(--ink); color: var(--blue); display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem; font-size: 0.75rem; font-weight: 700; }
.shots-bar .shots-note { margin-left: auto; }
.shots-view { overflow: hidden; background: var(--bg); }
.shots-track { display: grid; }
.shots-slide { grid-area: 1 / 1; margin: 0; min-width: 0; opacity: 0; visibility: hidden; transform: translateX(5%) scale(1.04); transition: opacity 0.9s ease, transform 1.2s var(--ease), visibility 0s linear 1.2s; }
.shots-slide.is-current { opacity: 1; visibility: visible; transform: none; transition: opacity 0.9s ease 0.15s, transform 1.2s var(--ease), visibility 0s; }
.shots-slide.is-out { transform: translateX(-5%) scale(0.98); }
/* ---------- Gestionali: PC finto con le schermate + telefono con la pagina di prenotazione ---------- */
.pc-wrap { position: relative; min-width: 0; padding-bottom: 0.5rem; }
.pc { display: flex; flex-direction: column; align-items: center; }
.pc-screen { position: relative; width: 100%; background: #111; border: var(--bd-lg) solid var(--ink); border-radius: 14px 14px 6px 6px; padding: 9px 9px 0; box-shadow: var(--sh-lg); }
.pc-screen .shots-view { border-radius: 4px; border: 2px solid #000; }
.pc-chin { width: 100%; margin-top: -2px; background: #e9e9e9; border: var(--bd-lg) solid var(--ink); border-top: 0; border-radius: 0 0 8px 8px; padding: 0.35rem 0; text-align: center; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; box-shadow: var(--sh); position: relative; z-index: 1; }
.pc-neck { width: 13%; height: 2.2rem; margin-top: -1px; background: linear-gradient(90deg, #aaa, #e6e6e6 40%, #aaa); border: var(--bd) solid var(--ink); border-top: 0; clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%); }
.pc-base { width: 32%; height: 0.7rem; background: linear-gradient(#e6e6e6, #aaa); border: var(--bd) solid var(--ink); border-radius: 0 0 12px 12px; box-shadow: 4px 4px 0 var(--ink); }
.pc-screen .shots-title { position: absolute; left: 1.1rem; bottom: 0.9rem; margin: 0; padding: 0.25rem 0.7rem; background: var(--yellow); border: 2px solid var(--ink); font-size: 0.8rem; line-height: 1.3; }
.pc-phone { position: absolute; right: -1%; bottom: 0.2rem; z-index: 2; width: 21%; min-width: 5.6rem; margin: 0; padding: 0.35rem; background: #111; border: var(--bd) solid var(--ink); border-radius: 1.5rem; box-shadow: var(--sh); }
.pc-phone::before { content: ""; position: absolute; top: 0.55rem; left: 50%; width: 28%; height: 0.32rem; transform: translateX(-50%); background: #111; border-radius: 1rem; z-index: 1; }
.pc-phone img { width: 100%; height: auto; aspect-ratio: 9 / 19; object-fit: cover; object-position: top; border-radius: 1.1rem; display: block; }
@media (max-width: 47.99em) { .pc-phone { width: 26%; right: 0; bottom: -0.4rem; } .pc-screen .shots-title { font-size: 0.7rem; left: 0.8rem; bottom: 0.6rem; } .pc-neck { height: 1.4rem; } }

/* sottolineatura a pennarello nei titoli */
.ul-hl { background: var(--yellow); padding: 0 0.14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.shots-slide img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: top left; display: block; }
.shots-cap { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; padding: 0.6rem 0.8rem; border-top: var(--bd) solid var(--ink); background: var(--yellow); }
.shots-title { margin: 0; font-size: 0.95rem; line-height: 1.3; }
.shots-ctl { display: flex; gap: 0.4rem; }
.mini-btn { display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0; cursor: pointer; background: var(--paper); color: var(--ink); border: var(--bd) solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.mini-btn:hover { background: var(--pink); }
.mini-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.mini-btn svg { width: 1.1rem; height: 1.1rem; }
.shots-dots, .fdots { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem; padding: 0.6rem; border-top: var(--bd) solid var(--ink); background: var(--paper); }
.dot { width: 0.9rem; height: 0.9rem; padding: 0; cursor: pointer; background: var(--paper); border: 2px solid var(--ink); border-radius: 50%; transition: width 0.25s var(--ease), background-color 0.2s; }
.dot[aria-current="true"] { width: 2rem; border-radius: 1rem; background: var(--ink); }
.dot:hover { background: var(--pink); }
.dot[aria-current="true"]:hover { background: var(--ink); }

/* ---------- Gestionali: bottoni tondi 3D (frecce dello slider) ---------- */
.btn-round { --h: 3rem; width: var(--h); height: var(--h); border-radius: 50%; overflow: hidden; }
.btn-round .cube { width: 100%; }
.btn-round .cube::before { display: none; }
.btn-round .face { padding: 0; }
.btn-round svg { width: 1.4rem; height: 1.4rem; }
.btn-round.btn-sm { --h: 2.6rem; }
.btn-round[aria-current="true"] .face.front { background: var(--green); }

/* ---------- Gestionali: slider radiale delle funzioni ---------- */
.fslider { position: relative; }
.fstage { display: grid; justify-items: center; align-items: start; padding: 1.25rem 0 2rem; overflow-x: clip; outline-offset: 6px; }
.fcard {
  --o: 0; --a: 0; grid-area: 1 / 1; width: min(46rem, 84%); background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh); display: flex; flex-direction: column;
  transform-origin: 50% 130%; z-index: calc(10 - var(--a));
  transform: translateX(calc(var(--o) * 57%)) translateY(calc(var(--a) * var(--a) * 0.9rem)) rotate(calc(var(--o) * 6deg)) scale(calc(1 - var(--a) * 0.12));
  transition: transform 0.65s var(--ease), opacity 0.4s var(--ease), box-shadow 0.3s;
}
.fcard.card-yellow { background: var(--yellow); } .fcard.card-green { background: var(--green); } .fcard.card-blue { background: var(--blue); } .fcard.card-pink { background: var(--pink); } .fcard.card-orange { background: var(--orange); }
.fcard[data-far] { opacity: 0; pointer-events: none; }
.fcard:not(.is-active) { cursor: pointer; box-shadow: var(--sh-sm); }
.fcard:not(.is-active) .fcard-body > :not(.fcard-n):not(h3) { opacity: 0.9; }
.fcard-media { margin: 0; border-bottom: var(--bd-lg) solid var(--ink); background: var(--bg); overflow: hidden; }
.fcard-media img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: top left; display: block; }
.fcard-body { padding: var(--sp-3); display: flex; flex-direction: column; gap: 0.4rem; }
.fcard-body h3 { margin: 0; }
.fcard-n { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.fcard-sum { margin: 0; }
.fcard-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.45s var(--ease); }
.fcard-more > div { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0.45s; }
.fcard.is-open .fcard-more { grid-template-rows: 1fr; }
.fcard.is-open .fcard-more > div { visibility: visible; }
.fcard-more ul { margin: 0.6rem 0 0; }
.fcard-act { margin-top: 0.8rem; padding: 0 8px 8px 0; }
.fcard-act .btn-cube { max-width: 100%; }
.fmock { margin: 0; aspect-ratio: 8 / 5; display: grid; place-items: center; padding: 1rem; background: var(--bg); border-bottom: var(--bd-lg) solid var(--ink); overflow: hidden; }
.fmock .bubbles { display: grid; gap: 0.6rem; width: min(24rem, 100%); }
.bubble { max-width: 85%; padding: 0.5rem 0.8rem; border: var(--bd) solid var(--ink); background: var(--paper); font-size: 0.9rem; font-weight: 700; line-height: 1.35; }
.bubble.me { justify-self: end; background: var(--green); }
.bubble.alt { background: var(--yellow); }
.bubble small { display: block; font-weight: 400; opacity: 0.8; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip { padding: 0.15rem 0.7rem; border: 2px solid var(--ink); background: var(--paper); font-weight: 700; font-size: 0.85rem; border-radius: 1rem; }
.mail-mock { width: min(24rem, 100%); background: var(--paper); border: var(--bd) solid var(--ink); box-shadow: var(--sh-sm); }
.mail-mock .mh { background: var(--ink); color: var(--yellow); padding: 0.35rem 0.7rem; font-size: 0.78rem; font-weight: 700; }
.mail-mock .mb { padding: 0.8rem; font-size: 0.92rem; }
.mail-mock .code { display: inline-block; margin-top: 0.3rem; padding: 0.15rem 0.6rem; background: var(--yellow); border: 2px dashed var(--ink); font-weight: 700; letter-spacing: 0.08em; }
.fctl { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); flex-wrap: wrap; }
.fcount { font-weight: 700; min-width: 5.5rem; text-align: center; }
.fdots { border: 0; background: none; padding: 0.2rem; max-width: 40rem; }
.phone-frame { margin: 0 auto; width: min(15rem, 100%); background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh); padding: 0.5rem 0.5rem 0.9rem; }
.phone-frame img { width: 100%; height: auto; display: block; border: 2px solid var(--ink); }
.phone-frame figcaption { margin-top: 0.5rem; font-size: 0.82rem; font-weight: 700; text-align: center; }
/* ---------- Gestionali: bottone cubo "Gestionali" con tendina nella barra ---------- */
.nav-drop { position: relative; }
.nav-drop .submenu { left: auto; right: 0; }
.nav-drop .face.front .chev { margin-left: 0.4rem; width: 0.75em; height: 0.75em; }
.nav-drop [aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-drop [aria-current="true"] .face.front { background: var(--green); }

/* ---------- Gestionali: interruttore mensile / annuale ---------- */
.period { display: flex; justify-content: center; margin: var(--sp-3) 0 var(--sp-3); }
.period-sw { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3); padding: 0 8px 8px 0; }
.period-sw .face.front { background: var(--paper); }
.period-sw .face.top { background: var(--pink); }
.period-sw .btn-cube[aria-pressed="true"] .face.front { background: var(--yellow); }
.period-sw .badge { margin-left: 0.5rem; }
html:not(.js) .period, html:not(.js) .price-alt { display: none; }
.plans [data-m], .plans [data-y] { display: block; }
.js .plans[data-period="m"] [data-y], .js .plans[data-period="y"] [data-m] { display: none; }
.plans .price small { font-size: 1rem; font-weight: 700; }
.plans .price .was { display: block; width: fit-content; font-size: 1.35rem; line-height: 1.2; color: #a80000; text-decoration: line-through; text-decoration-thickness: 0.14em; }
.plans .price .now { display: inline-block; font-size: 2.8rem; line-height: 1.1; margin: 0.15rem 0.2rem 0 0.2rem; transform: rotate(-4deg); transform-origin: left bottom; }
.js .plans [data-m], .js .plans [data-y] { animation: price-in 0.55s var(--ease) both; }
@keyframes price-in { from { opacity: 0; transform: rotate3d(1, 0, 0, -75deg) translateY(0.5em); } to { opacity: 1; transform: none; } }
.plans .price [data-y] { transform-origin: left bottom; }

/* hero dei prodotti: piu compatta sul telefono */
@media (max-width: 61.99em) { .hero-product { padding: var(--sp-4) 0 var(--sp-5); } }

/* ---------- Gestionali: su telefono ---------- */
@media (max-width: 47.99em) {
  [aria-labelledby="piani"] .reveal, [aria-labelledby="piani"] .reveal.anim-in, [aria-labelledby="piani"] .reveal.anim-out { opacity: 1 !important; animation: none !important; transform: none !important; }
  .js .plans [data-m], .js .plans [data-y] { animation: none; }
  .period-sw .btn-cube:hover .cube, .period-sw .btn-cube:focus-visible .cube { transform: none; }
  .fstage { padding: 0.5rem 0 1rem; touch-action: pan-y; }
  .fcard { width: 86%; transform-origin: 50% 50%; transform: translateX(calc(var(--o) * 106%)) scale(calc(1 - var(--a) * 0.05)); }
  .fcard:not(.is-active) { opacity: 0.6; }
  .fcard-body { padding: 1rem; }
  .fcard-body h3 { font-size: 1.25rem; }
  .fdots { display: none; }
  .fctl { gap: var(--sp-3); }
  .fctl .btn-round { --h: 3.2rem; }
  .fcount { font-size: 1.05rem; }
  .period-sw button { padding: 0.65rem 0.8rem; font-size: 0.82rem; }
}
/* ---------- Gestionali: riquadri dei vantaggi, riquadro prenotazione, slider orizzontale, piani ---------- */
.nw { white-space: nowrap; }
.benefit-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.benefit-head h2 { margin: 0; max-width: 22ch; font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
.tiles { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: 0; padding: 0 6px 6px 0; }
.tiles li { margin: 0; }
.tile { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; min-width: 5.6rem; padding: 0.7rem 0.8rem; text-decoration: none; background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh-sm); font-size: 0.85rem; font-weight: 700; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.2s; }
.tile svg { width: 1.7rem; height: 1.7rem; }
.tile:hover { background: var(--yellow); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.benefits .card h3 { text-transform: uppercase; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.benefits .card p { font-weight: 700; }
.fdots { margin-inline: auto; }
.mini-phone { height: 14rem; aspect-ratio: 9 / 19; background: #111; border: var(--bd) solid var(--ink); border-radius: 1.2rem; padding: 0.3rem; box-shadow: var(--sh-sm); }
.mini-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 0.9rem; display: block; }
.fmock:has(.mini-phone) { padding: 0.8rem; container-type: size; }
.fmock .mini-phone { height: calc(100cqh - 0.2rem); max-width: 100%; }
@media (max-width: 47.99em) { .tiles { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } .tile { flex-direction: row; justify-content: flex-start; gap: 0.6rem; } }

.price-card { --plan-big: clamp(2rem, 3.2vw, 2.6rem); }
.price-card .plan-name { font-size: var(--plan-big); text-transform: uppercase; margin: 0 0 0.2rem; }
.price-card .plan-tag { margin-bottom: var(--sp-2); }
.price-card .price { font-size: var(--plan-big); }
.plans .price .now { font-size: var(--plan-big); }
[aria-labelledby="piani"] .reveal.anim-out { opacity: 1 !important; animation: none !important; transform: none !important; }
.plan-site { margin: 0; padding-top: 0.6rem; border-top: var(--bd) dashed var(--ink); font-weight: 700; }

/* ---------- Gestionali: hero su telefono (testo centrato, PC e telefono in primo piano, bottoni a tutta larghezza) ---------- */
@media (max-width: 47.99em) {
  .page-hero.hero-product { padding: var(--sp-2) 0 var(--sp-3); background-image: radial-gradient(rgba(0, 0, 0, 0.13) 1.5px, transparent 1.6px); background-size: 18px 18px; }
  .hero-product .crumbs { display: none; }
  .hero-product .hero-split { display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center; }
  .hero-product .hero-text { display: contents; }
  .hero-product .hero-split .eyebrow { order: 1; max-width: 100%; margin-bottom: 0.75rem; font-size: 0.72rem; line-height: 1.4; transform: rotate(-1.5deg); }
  .page-hero.hero-product .hero-split h1 { order: 2; max-width: 100%; margin: 0 0 2rem; font-size: clamp(1.6rem, 7.5vw, 2.6rem); line-height: 1.12; text-wrap: balance; }
  .hero-product .pc-wrap { order: 3; width: 100%; max-width: 28rem; padding-bottom: 0.4rem; }
  .hero-product .btn-row { order: 4; align-self: stretch; gap: var(--sp-2); margin-top: var(--sp-3); }
  .hero-product .btn-row .btn-cube { display: block; flex: 1 1 9.5rem; font-size: 0.8rem; }
  .hero-product .btn-row .cube::before, .hero-product .btn-row .face { padding-left: 0.4rem; padding-right: 0.4rem; }
  .hero-product .hero-split .lead { order: 5; margin: var(--sp-2) 0 0; font-size: 1rem; line-height: 1.55; }
  .pc { position: relative; }
  .pc-screen { position: static; padding: 6px 6px 0; border-radius: 12px 12px 4px 4px; }
  .pc-screen .shots-title { position: absolute; top: -0.95rem; bottom: auto; left: 50%; z-index: 3; transform: translateX(-50%) rotate(-2deg); max-width: 96%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: var(--sh-sm); font-size: 0.76rem; }
  .pc-chin { padding: 0.25rem 0; font-size: 0.66rem; }
  .pc-neck { height: 1.3rem; }
  .pc-phone { width: 29%; right: -0.2rem; bottom: -0.5rem; transform: rotate(5deg); }
}
/* ---------- Home: il sito che si costruisce (interattivo) ---------- */
.builder { --b-accent: var(--orange); display: flex; flex-direction: column; gap: 0.75rem; width: 100%; min-width: 0; animation: b-in 0.8s var(--ease) 0.1s both; }
@keyframes b-in { from { transform: translateY(2.5rem) rotate(3deg); } to { transform: none; } }
.builder:not(.is-live) .b-types, .builder:not(.is-live) .b-tools, .builder:not(.is-live) .b-hint, .builder:not(.is-live) .b-phone, .builder:not(.is-live) .b-cursor, .builder:not(.is-live) .b-toast { display: none; }
.b-types, .b-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.6rem; }
.b-chip, .b-act { font: inherit; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 0.4rem 0.8rem; color: var(--ink); background: var(--paper); border: var(--bd) solid var(--ink); box-shadow: var(--sh-sm); cursor: pointer; transition: transform 0.15s var(--ease), box-shadow 0.15s var(--ease), background-color 0.2s; }
.b-chip:hover, .b-act:hover { background: var(--yellow); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.b-chip:active, .b-act:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.b-chip[aria-pressed="true"] { background: var(--ink); color: var(--yellow); }
.b-colors { display: flex; gap: 0.55rem; }
.b-color { width: 1.7rem; height: 1.7rem; padding: 0; border: var(--bd) solid var(--ink); border-radius: 50%; cursor: pointer; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.b-color:hover { transform: scale(1.15); }
.b-color[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); }
.c-orange { background: var(--orange); } .c-pink { background: var(--pink); } .c-green { background: var(--green); } .c-blue { background: var(--blue); } .c-yellow { background: var(--yellow); }
.b-hint { margin: 0; text-align: center; font-size: 0.82rem; font-weight: 700; }
.b-stage { --rx: 0deg; --ry: 0deg; position: relative; perspective: 1100px; padding-bottom: 1.1rem; }
.b-win { width: 86%; background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh-lg); container-type: inline-size; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.25s var(--ease); }
.b-win.flash { animation: b-flash 0.45s var(--ease); }
@keyframes b-flash { 40% { box-shadow: 14px 14px 0 var(--b-accent); } }
.b-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.7rem; background: var(--ink); color: var(--paper); font-size: 0.72rem; font-weight: 700; }
.b-url { min-width: 0; margin-left: 0.3rem; padding: 0 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--paper); color: var(--ink); border-radius: 1rem; }
.b-state { margin-left: auto; white-space: nowrap; color: var(--yellow); }
.b-progress { height: 8px; background: var(--paper); border-bottom: 2px solid var(--ink); }
.b-progress i { display: block; width: 100%; height: 100%; background: var(--b-accent); transition: width 0.35s var(--ease); }
.b-code { padding: 0.35rem 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: var(--ink); color: var(--green); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.72rem; }
.b-code span::before { content: "> "; color: var(--yellow); }
.b-site { display: flex; flex-direction: column; gap: 0.7em; aspect-ratio: 16 / 11; padding: 0.8em; overflow: hidden; background: var(--bg); font-size: 0.7rem; font-size: 2.7cqw; line-height: 1.2; }
.b-site i { display: block; font-style: normal; }
.s-nav { display: flex; align-items: center; gap: 0.6em; padding: 0.45em 0.7em; background: var(--paper); border: 0.22em solid var(--ink); }
.s-logo { flex: none; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--b-accent); border: 0.2em solid var(--ink); }
.s-brand { font-size: 1.1em; white-space: nowrap; }
.s-links { display: flex; gap: 0.55em; margin-left: auto; }
.s-links i { width: 2.4em; height: 0.45em; background: var(--ink); }
.s-hero { display: flex; flex: 1; gap: 0.8em; min-height: 0; padding: 0.9em; background: var(--paper); border: 0.22em solid var(--ink); }
.s-copy { display: flex; flex: 1.45; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.55em; min-width: 0; }
.s-title { min-height: 2.1em; font-size: 1.78em; line-height: 1.04; text-transform: uppercase; }
.s-sub { min-height: 1.2em; }
.s-title.typing::after, .s-sub.typing::after { content: ""; display: inline-block; width: 0.12em; height: 0.95em; margin-left: 0.08em; vertical-align: -0.1em; background: var(--ink); animation: b-caret 0.6s steps(1) infinite; }
@keyframes b-caret { 50% { opacity: 0; } }
.s-btn { padding: 0.45em 1.1em; font-weight: 700; text-transform: uppercase; background: var(--b-accent); border: 0.22em solid var(--ink); box-shadow: 0.3em 0.3em 0 var(--ink); }
.s-img { display: grid; flex: 1; place-items: center; min-width: 0; min-height: 0; overflow: hidden; background: var(--b-accent); border: 0.22em solid var(--ink); }
.s-img svg { width: 68%; max-height: 85%; }
.s-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7em; }
.s-card { padding: 0.45em; text-align: center; background: var(--paper); border: 0.22em solid var(--ink); }
.b-site .s-card i { height: 1.5em; margin-bottom: 0.35em; background: var(--b-accent); border: 0.15em solid var(--ink); }
.s-foot { display: flex; gap: 0.7em; padding: 0.6em 0.8em; background: var(--ink); }
.b-site .s-foot i { width: 5em; height: 0.4em; background: var(--paper); }
/* costruzione: ogni blocco "scatta" al suo posto */
.is-live .b-site [data-step] { opacity: 0; transform: translateY(0.9em) scale(0.85) rotate(-3deg); }
.is-live .b-site [data-step].on { opacity: 1; transform: none; transition: opacity 0.25s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.35s; }
.is-live .b-site [data-step].on:hover { outline: 0.25em dashed var(--ink); outline-offset: 0.1em; cursor: pointer; }
.is-live .b-site [data-step].on.pop { animation: b-pop 0.45s var(--ease); }
@keyframes b-pop { 35% { transform: scale(0.93); } 70% { transform: scale(1.04); } }
.is-live .s-cards.on .s-card { animation: b-card 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.is-live .s-cards.on .s-card:nth-child(2) { animation-delay: 90ms; }
.is-live .s-cards.on .s-card:nth-child(3) { animation-delay: 180ms; }
@keyframes b-card { from { transform: translateY(1.2em) rotate(6deg); opacity: 0; } }
/* varianti: si cambiano toccando i blocchi */
.b-site .s-nav[data-v="1"] { background: var(--ink); color: var(--paper); }
.b-site .s-nav[data-v="1"] .s-links i { background: var(--b-accent); }
.b-site .s-nav[data-v="2"] { flex-direction: column; gap: 0.3em; }
.b-site .s-nav[data-v="2"] .s-links { margin: 0; }
.b-win .s-hero[data-v="1"] { flex-direction: row-reverse; }
.b-site .s-hero[data-v="2"] { background: var(--b-accent); }
.b-site .s-hero[data-v="2"] .s-img, .b-site .s-hero[data-v="2"] .s-btn { background: var(--paper); }
.b-site .s-btn[data-v="1"] { border-radius: 2em; }
.b-site .s-btn[data-v="2"] { background: var(--ink); color: var(--paper); box-shadow: 0.3em 0.3em 0 var(--b-accent); }
.b-win .s-img[data-v="1"] { flex: 0 0 38%; align-self: center; aspect-ratio: 1; border-radius: 50%; }
.b-site .s-img[data-v="2"] { background: var(--ink); }
.b-site .s-img[data-v="2"] svg { filter: invert(1); }
.b-win .s-cards[data-v="1"] { grid-template-columns: 1fr; gap: 0.3em; }
.b-win .s-cards[data-v="1"] .s-card { display: flex; align-items: center; gap: 0.6em; padding: 0.15em 0.45em; }
.b-win .s-cards[data-v="1"] .s-card i { width: 0.9em; height: 0.9em; margin: 0; border-radius: 50%; }
.b-site .s-cards[data-v="2"] .s-card { background: var(--b-accent); }
.b-site .s-cards[data-v="2"] .s-card i { background: var(--paper); }
.b-site .s-foot[data-v="1"] { background: var(--b-accent); border: 0.22em solid var(--ink); }
.b-site .s-foot[data-v="1"] i { background: var(--ink); }
.b-site .s-foot[data-v="2"] { justify-content: center; }
.b-site .s-foot[data-v="2"] i { width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--b-accent); }
/* telefono finto: la versione mobile dello stesso sito */
.b-phone { position: absolute; right: 0; bottom: 0; z-index: 2; width: 24%; aspect-ratio: 9 / 18; padding: 0.3rem; background: #111; border: var(--bd) solid var(--ink); border-radius: 1.3rem; box-shadow: var(--sh); container-type: inline-size; transform: rotate(3deg); }
.b-phone .b-site { height: 100%; aspect-ratio: auto; gap: 0.6em; padding: 1.2em 0.55em 0.55em; border-radius: 1rem; font-size: 0.42rem; font-size: 6.4cqw; }
.b-phone .s-nav { min-width: 0; }
.b-phone .s-brand { overflow: hidden; text-overflow: ellipsis; font-size: 1em; }
.b-phone .s-links i { width: 1.3em; }
.b-phone .s-links i:nth-child(n+2) { display: none; }
.b-phone .s-hero { flex-direction: column-reverse; gap: 0.6em; padding: 0.6em; }
.b-phone .s-copy { flex: none; align-items: center; text-align: center; }
.b-phone .s-title { font-size: 1.45em; }
.b-phone .s-sub { display: none; }
.b-phone .s-img[data-v="1"] { aspect-ratio: 1; width: 70%; align-self: center; border-radius: 50%; }
.b-phone .s-cards { grid-template-columns: 1fr; gap: 0.35em; }
.b-phone .s-card { display: flex; align-items: center; gap: 0.5em; padding: 0.25em 0.4em; }
.b-phone .b-site .s-card i { width: 1em; height: 1em; margin: 0; }
.b-phone .b-site .s-foot i { width: 2.2em; }
.b-cursor { position: absolute; top: 0; left: 0; z-index: 4; width: 1.7rem; height: 1.7rem; opacity: 0; pointer-events: none; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s; }
.b-cursor.on { opacity: 1; }
.b-cursor::after { content: ""; position: absolute; top: -0.5rem; left: -0.5rem; width: 1.4rem; height: 1.4rem; border: 3px solid var(--ink); border-radius: 50%; opacity: 0; }
.b-cursor.click::after { animation: b-ripple 0.45s var(--ease); }
@keyframes b-ripple { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.b-toast { position: absolute; top: 42%; left: 45%; z-index: 3; padding: 0.55rem 1.1rem; font-weight: 700; text-transform: uppercase; white-space: nowrap; background: var(--yellow); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh); opacity: 0; pointer-events: none; transform: translate(-50%, -50%) scale(0.4) rotate(-14deg); transition: opacity 0.2s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.b-toast.on { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-5deg); }
@media (min-width: 48em) and (max-width: 61.99em) { .builder { max-width: 36rem; margin-inline: auto; } }
@media (min-width: 62em) { .hero .hero-grid { grid-template-columns: 1.08fr 0.92fr; } .b-win .b-site { aspect-ratio: 16 / 10.4; } }
@media (min-width: 62em) { .hero .btn-row { gap: var(--sp-2); } .hero .btn-row .btn-cube { font-size: 0.84rem; } .hero .btn-row .cube::before, .hero .btn-row .face { padding-left: 0.9rem; padding-right: 0.9rem; } }
@media (min-width: 62em) and (max-height: 940px) { .builder { gap: 0.5rem; } .b-win .b-site { aspect-ratio: 16 / 9.4; } }
@media (min-width: 62em) and (max-height: 780px) { .hero h1 { font-size: clamp(2rem, 3.5vw, 2.9rem); } .hero .lead { font-size: 1.05rem; } .hero .btn-row { margin-top: var(--sp-2); } }
@media (min-width: 62em) and (max-height: 780px) { .builder .b-hint { display: none; } .b-win .b-site { aspect-ratio: 16 / 8.8; font-size: 2.45cqw; } }
@media (max-width: 47.99em) {
  .hero { min-height: 0; padding: var(--sp-2) 0 var(--sp-3); background-image: radial-gradient(rgba(0, 0, 0, 0.13) 1.5px, transparent 1.6px); background-size: 18px 18px; }
  .hero .hero-grid { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; text-align: center; }
  .hero .hero-copy { display: contents; }
  .hero .eyebrow { order: 1; max-width: 100%; margin-bottom: 0.75rem; font-size: 0.72rem; line-height: 1.4; transform: rotate(-1.5deg); }
  .hero h1 { order: 2; margin: 0 0 0.9rem; font-size: clamp(1.6rem, 7.5vw, 2.6rem); line-height: 1.12; text-wrap: balance; }
  .hero h1 .hl { display: inline; padding: 0 0.14em; background: var(--yellow); color: var(--ink); transform: none; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
  .hero .builder { order: 3; max-width: 28rem; gap: 0.55rem; text-align: left; }
  .hero .scroll-cue { display: none; }
  .hero .btn-row { order: 4; flex-direction: column; align-self: stretch; gap: var(--sp-2); margin-top: var(--sp-3); }
  .hero .btn-row .btn-cube { display: block; width: 100%; font-size: 0.82rem; }
  .hero .lead { order: 5; margin: var(--sp-2) 0 0; font-size: 1rem; line-height: 1.55; }
  .hero .hero-note { order: 6; }
  .b-chip, .b-act { padding: 0.4rem 0.6rem; font-size: 0.72rem; }
  .b-code, .b-hint { display: none; }
  .b-win { width: 88%; box-shadow: var(--sh); }
  .b-win .b-site { aspect-ratio: 16 / 13; font-size: 3cqw; }
  .b-phone { width: 27%; }
  .b-tools { gap: 0.5rem; }
  .b-colors { gap: 0.45rem; }
  .b-color { width: 1.5rem; height: 1.5rem; }
  .b-color[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
}
@media (min-width: 48em) { .footer-grid.footer-grid-4 { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- Fascia CTA ---------- */
.cta-band { background: var(--pink); border-bottom: var(--bd-lg) solid var(--ink); padding: var(--sp-5) 0; }
.cta-band .inner { background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh-lg); padding: var(--sp-4) var(--sp-3); display: grid; gap: var(--sp-2); }
.cta-band h2 { margin-bottom: 0; }
.cta-band p { margin-bottom: 0; max-width: 40rem; }
@media (min-width: 48em) { .cta-band .inner { padding: var(--sp-4); grid-template-columns: 1fr auto; align-items: center; gap: var(--sp-4); } }

/* ---------- Form ---------- */
.form-card { background: var(--paper); border: var(--bd-lg) solid var(--ink); box-shadow: var(--sh-lg); padding: var(--sp-3); }
@media (min-width: 48em) { .form-card { padding: var(--sp-4); } }
.field { display: grid; gap: 0.4rem; margin-bottom: var(--sp-3); }
.field label, .field .label { font-weight: 700; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.03em; }
.field .opt { font-weight: 400; text-transform: none; letter-spacing: 0; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: inherit; font-weight: 700; padding: 0.75rem 0.9rem; color: var(--ink); background: var(--bg);
  border: var(--bd-lg) solid var(--ink); border-radius: 0; min-height: 3rem;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { background: var(--paper); outline: 4px solid var(--ink); outline-offset: 2px; box-shadow: 4px 4px 0 var(--yellow); }
.field input::placeholder, .field textarea::placeholder { color: #595959; font-weight: 400; }
.field.has-error input, .field.has-error select, .field.has-error textarea { background: var(--danger); }
.field-error { display: none; font-weight: 700; font-size: 0.9rem; background: var(--danger); border: 2px solid var(--ink); padding: 0.3rem 0.6rem; }
.field.has-error .field-error { display: block; }
.consent { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; margin-bottom: var(--sp-3); }
.consent input { width: 1.6rem; height: 1.6rem; margin: 0.1rem 0 0; accent-color: var(--ink); }
.consent label { font-size: 0.95rem; }
.consent .field-error { grid-column: 1 / -1; }
.consent.has-error .field-error { display: block; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: var(--sp-2) 0 0; }
.form-status:empty { display: none; }
.form-status .msg { border: var(--bd) solid var(--ink); padding: var(--sp-2); font-weight: 700; box-shadow: var(--sh-sm); }
.form-status .msg.ok { background: var(--green); }
.form-status .msg.ko { background: var(--danger); }
.form-alt { font-size: 0.95rem; margin: var(--sp-2) 0 0; }
.steps-mini { counter-reset: s; list-style: none; padding: 0; display: grid; gap: var(--sp-2); }
.steps-mini li { counter-increment: s; position: relative; padding-left: 3rem; margin: 0; }
.steps-mini li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem; display: grid; place-items: center; background: var(--ink); color: var(--yellow); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); border-top: 8px solid var(--yellow); padding: var(--sp-5) 0 var(--sp-3); }
.footer-grid { display: grid; gap: var(--sp-4); margin-bottom: var(--sp-4); }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer h2, .site-footer h3 { font-size: 1rem; text-transform: uppercase; color: var(--yellow); margin-bottom: var(--sp-2); letter-spacing: 0.04em; }
.site-footer p, .site-footer li { font-size: 0.97rem; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { background: var(--yellow); color: var(--ink); }
.footer-legal { border-top: 2px solid rgba(255, 255, 255, 0.25); padding-top: var(--sp-2); font-size: 0.88rem; }
.footer-legal p { margin: 0 0 0.3rem; }
.site-footer .todo { color: var(--ink); }

/* ---------- Pagine di testo (privacy) ---------- */
.prose { padding: var(--sp-5) 0; }
.prose h2 { font-size: 1.5rem; margin-top: var(--sp-4); text-transform: none; }
.prose h3 { margin-top: var(--sp-3); }

/* ---------- Animazioni allo scroll: entrano e escono ogni volta (stile Animate.css rotateIn / rotateOut) ----------
   main.js assegna data-a (dl, dr, ul, ur, fade) e alterna .anim-in / .anim-out. */
.reveal { opacity: 0; }
html:not(.js) .reveal { opacity: 1; }
.reveal.anim-in { opacity: 1; animation-duration: 0.85s; animation-timing-function: cubic-bezier(0.25, 1, 0.5, 1); animation-fill-mode: backwards; animation-delay: calc(var(--d, 0) * 90ms); }
.reveal.anim-out { opacity: 0; animation-duration: 0.55s; animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); }
.reveal[data-a="dl"].anim-in { animation-name: rotateInDownLeft; transform-origin: left bottom; }
.reveal[data-a="dr"].anim-in { animation-name: rotateInDownRight; transform-origin: right bottom; }
.reveal[data-a="ul"].anim-in { animation-name: rotateInUpLeft; transform-origin: left bottom; }
.reveal[data-a="ur"].anim-in { animation-name: rotateInUpRight; transform-origin: right bottom; }
.reveal[data-a="dl"].anim-out { animation-name: rotateOutDownLeft; transform-origin: left bottom; }
.reveal[data-a="dr"].anim-out { animation-name: rotateOutDownRight; transform-origin: right bottom; }
.reveal[data-a="ul"].anim-out { animation-name: rotateOutUpLeft; transform-origin: left bottom; }
.reveal[data-a="ur"].anim-out { animation-name: rotateOutUpRight; transform-origin: right bottom; }
.reveal[data-a="fade"].anim-in { animation-name: fadeSlideIn; }
.reveal[data-a="fade"].anim-out { animation-name: fadeSlideOut; }
@keyframes rotateInDownLeft { from { transform: rotate3d(0, 0, 1, -45deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rotateInDownRight { from { transform: rotate3d(0, 0, 1, 45deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rotateInUpLeft { from { transform: rotate3d(0, 0, 1, 45deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rotateInUpRight { from { transform: rotate3d(0, 0, 1, -90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rotateOutDownLeft { from { transform: none; opacity: 1; } to { transform: rotate3d(0, 0, 1, 45deg); opacity: 0; } }
@keyframes rotateOutDownRight { from { transform: none; opacity: 1; } to { transform: rotate3d(0, 0, 1, -45deg); opacity: 0; } }
@keyframes rotateOutUpLeft { from { transform: none; opacity: 1; } to { transform: rotate3d(0, 0, 1, -45deg); opacity: 0; } }
@keyframes rotateOutUpRight { from { transform: none; opacity: 1; } to { transform: rotate3d(0, 0, 1, 90deg); opacity: 0; } }
@keyframes fadeSlideIn { from { opacity: 0; transform: translate3d(0, 36px, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeSlideOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translate3d(0, -28px, 0); } }

/* ---------- Movimento ridotto ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  .reveal, .mock-blk { opacity: 1 !important; transform: none !important; animation: none !important; }
  [data-hero] .hero-copy, [data-hero] .hero-visual, [data-hero] .word, .page-hero > .wrap { animation: none !important; opacity: 1 !important; transform: none !important; }
  [data-hero].is-out .scroll-cue { opacity: 1; }
  .btn-cube:hover .cube, .btn-cube:focus-visible .cube { transform: none; }
  .btn-cube:hover .face.front, .btn-cube:focus-visible .face.front { background: var(--pink); }
  .btn-cube.btn-alt:hover .face.front, .btn-cube.btn-alt:focus-visible .face.front { background: var(--blue); }
  .brand:hover img { transform: none; }
}
