/* ==========================================================================
   Acchiappaproblemi: prototipo del sito
   Mobile first. Tutte le classi iniziano con "ap-" per non scontrarsi con
   gli stili di Freedom Builder quando il sito verrà portato lì.
   ========================================================================== */

/* Colori del "mondo" registrati come proprietà, così il cambio di tema è
   una transizione fluida e non uno scatto. */
@property --w-bg { syntax: '<color>'; inherits: true; initial-value: #F1F6EC; }
@property --w-bg2 { syntax: '<color>'; inherits: true; initial-value: #E1EED5; }
@property --w-accent { syntax: '<color>'; inherits: true; initial-value: #6DB33F; }
@property --w-deep { syntax: '<color>'; inherits: true; initial-value: #3D7A1C; }
@property --w-soft { syntax: '<color>'; inherits: true; initial-value: #CFE7BD; }

.ap {
  /* marchio: fisso */
  --ink: #1C2416;
  --ink-2: #3B4535;
  --muted: #5D6756;
  --line: #DDE4D5;
  --paper: #FFFFFF;
  --mist: #F3F6EF;
  --green: #6DB33F;
  --green-hi: #7CC24C;
  --green-deep: #3D7A1C;
  --sky-top: #BFE2F7;
  --sky-bottom: #EEF8FD;

  /* mondo: cambia con la categoria */
  --w-bg: #F1F6EC;
  --w-bg2: #E1EED5;
  --w-accent: #6DB33F;
  --w-deep: #3D7A1C;
  --w-soft: #CFE7BD;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --header-h: 64px;
  --tabs-h: 64px;
  --gutter: 16px;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --text: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-soft: 0 1px 2px rgb(28 36 22 / .06), 0 10px 28px -14px rgb(28 36 22 / .22);
  --shadow-world: 0 1px 2px rgb(28 36 22 / .05), 0 16px 34px -18px color-mix(in srgb, var(--w-deep) 60%, transparent);

  transition: --w-bg .7s var(--ease), --w-bg2 .7s var(--ease), --w-accent .7s var(--ease), --w-deep .7s var(--ease), --w-soft .7s var(--ease);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

html.ap-lock, html.ap-lock body { overflow: hidden; }
body { margin: 0; background: #FFFFFF; }

.ap *, .ap *::before, .ap *::after { box-sizing: border-box; }
.ap [hidden] { display: none !important; }
/* :where() tiene bassa la priorità di queste regole di base, così non
   sovrascrivono le classi dei componenti */
.ap :where(img, svg) { display: block; max-width: 100%; }
.ap :where(h1, h2, h3, p, ul, ol, dl, figure) { margin: 0; }
.ap :where(ul, ol) { padding: 0; list-style: none; }
.ap :where(a) { color: inherit; }
.ap :where(button, input, textarea, select) { font: inherit; color: inherit; }
.ap :where(button) { cursor: pointer; }
.ap :focus-visible { outline: 3px solid var(--w-deep); outline-offset: 3px; border-radius: 6px; }

.ap-wrap { width: min(100% - var(--gutter) * 2, 1160px); margin-inline: auto; }
.ap-skip { position: absolute; left: 12px; top: -60px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.ap-skip:focus { top: 12px; }
.ap-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Titoli ---------- */
.ap-h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 8.6vw, 3.4rem);
  line-height: .95;
  text-transform: uppercase;
  letter-spacing: .005em;
  text-wrap: balance;
}
.ap-lead { color: var(--ink-2); font-size: 1.0625rem; max-width: 34em; text-wrap: pretty; }
.ap-head { display: grid; gap: 12px; justify-items: center; text-align: center; margin-bottom: 28px; }

/* Pennellata come nella locandina: fascia scura con un'ombra di colore sfalsata */
.ap-band {
  --band: var(--green-deep);
  --band-2: var(--green);
  position: relative;
  display: inline-block;
  max-width: 100%;
  padding: .16em .32em .12em;
  line-height: .98;
  color: #FFFFFF;
  isolation: isolate;
}
.ap-band::before, .ap-band::after {
  content: '';
  position: absolute;
  inset: -.04em -.06em;
  z-index: -1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80' preserveAspectRatio='none'%3E%3Cpath d='M6 9C70 3 150 1 226 4c64 2 124-2 168 4l-4 14 7 12-6 14 5 14-7 12c-60 5-140 3-219 4-62 1-120 3-160-3l4-12-10-12 8-12-9-12 6-10Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80' preserveAspectRatio='none'%3E%3Cpath d='M6 9C70 3 150 1 226 4c64 2 124-2 168 4l-4 14 7 12-6 14 5 14-7 12c-60 5-140 3-219 4-62 1-120 3-160-3l4-12-10-12 8-12-9-12 6-10Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.ap-band::before { background: var(--band-2); transform: translate(.09em, .1em) rotate(-1deg); }
.ap-band::after { background: var(--band); transform: rotate(-1.4deg); }
.ap-band--world { --band: var(--w-deep); --band-2: var(--w-accent); }

/* ---------- Pulsanti ---------- */
.ap-btn {
  --btn-bg: var(--green);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 0 rgb(28 36 22 / .25), 0 12px 24px -14px rgb(28 36 22 / .45);
  transition: transform .2s var(--ease), background-color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.ap-btn:hover { background: var(--green-hi); }
.ap-btn:active { transform: translateY(1px) scale(.985); box-shadow: 0 1px 0 rgb(28 36 22 / .25); }
.ap-btn--dark { --btn-bg: var(--ink); --btn-fg: #FFFFFF; }
.ap-btn--dark:hover { background: #2A3522; }
.ap-btn--ghost { --btn-bg: transparent; box-shadow: inset 0 0 0 2px var(--ink); }
.ap-btn--ghost:hover { background: rgb(28 36 22 / .06); }
.ap-btn--wide { width: 100%; }
.ap-btn svg { width: 22px; height: 22px; flex: none; }

.ap-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 2px; border: 0; background: none;
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px;
  text-decoration-color: var(--green);
}
.ap-link svg { width: 20px; height: 20px; }

/* ---------- Intestazione ---------- */
.ap-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgb(255 255 255 / .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid rgb(28 36 22 / .07);
}
.ap-header__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ap-logo { display: block; flex: 0 1 auto; min-width: 0; text-decoration: none; }
.ap-logo img { height: 38px; width: auto; }
.ap-header__actions { display: flex; align-items: center; gap: 10px; flex: none; }
.ap-header__cta { display: none; }
.ap-wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 46px; height: 46px; border-radius: 999px;
  background: var(--mist); color: var(--green-deep);
  text-decoration: none; font-weight: 600;
  box-shadow: inset 0 0 0 1.5px rgb(61 122 28 / .25);
  transition: background-color .2s;
}
.ap-wa:hover { background: #E6EFDC; }
.ap-wa svg { width: 24px; height: 24px; }
.ap-wa__label { display: none; }

/* ---------- Schede dei mondi (barra sotto l'intestazione) ---------- */
.ap-tabs {
  position: sticky; top: var(--header-h); z-index: 45;
  height: var(--tabs-h);
  background: color-mix(in srgb, var(--w-bg) 88%, white);
  border-bottom: 1px solid color-mix(in srgb, var(--w-deep) 14%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ap-tabs__in { height: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ap-tab {
  --t-deep: var(--ink);
  --t-soft: var(--mist);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; min-width: 46px; padding: 0 11px;
  border: 0; border-radius: 999px;
  background: var(--t-soft); color: var(--t-deep);
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: background-color .3s var(--ease), color .3s var(--ease), transform .2s;
}
.ap-tab svg { width: 22px; height: 22px; flex: none; }
.ap-tab__label { display: none; white-space: nowrap; }
.ap-tab[aria-current="page"] { background: var(--t-deep); color: #FFFFFF; }
.ap-tab:active { transform: scale(.95); }

/* ==========================================================================
   HOME
   ========================================================================== */
.ap-hero { padding: 30px 0 0; background: var(--paper); }
.ap-hero__grid { display: grid; gap: 26px; }
.ap-hero__text { display: grid; justify-items: center; text-align: center; gap: 16px; }
.ap-hero__title {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.9rem, 14.2vw, 5.6rem);
  line-height: .9;
  letter-spacing: .004em;
  display: grid; justify-items: center; gap: .1em;
}
.ap-hero__title .ap-band { margin-top: .04em; margin-bottom: .08em; }
.ap-hero__sub { color: var(--ink-2); max-width: 30em; text-wrap: pretty; }
.ap-hero__sub strong { color: var(--ink); font-weight: 600; }
.ap-hero__ctas { display: grid; justify-items: center; gap: 6px; width: 100%; }
.ap-hero__ctas .ap-btn { width: min(100%, 360px); }

/* Il cielo con i problemi che volano e il retino */
.ap-stage { display: grid; gap: 0; }
.ap-stage__head { text-align: center; padding: 0 0 14px; display: grid; gap: 4px; justify-items: center; }
.ap-stage__title { font-family: var(--display); font-weight: 800; font-size: 1.9rem; line-height: 1; text-transform: uppercase; }
.ap-stage__hint { color: var(--muted); font-size: 1rem; }

.ap-sky {
  position: relative;
  height: 500px;
  margin-inline: calc(var(--gutter) * -1);
  overflow: hidden;
  background:
    radial-gradient(120px 46px at 18% 20%, rgb(255 255 255 / .9), transparent 70%),
    radial-gradient(150px 52px at 86% 34%, rgb(255 255 255 / .85), transparent 70%),
    radial-gradient(110px 40px at 30% 62%, rgb(255 255 255 / .7), transparent 70%),
    linear-gradient(180deg, var(--sky-top), var(--sky-bottom) 72%, #F5FBEF);
  touch-action: manipulation;
}
.ap-hill { position: absolute; left: 0; right: 0; bottom: -1px; height: 70px; width: 100%; pointer-events: none; z-index: 1; }
.ap-bubbles { position: absolute; inset: 0; z-index: 3; }

.ap-bubble {
  --b-accent: var(--green);
  --b-deep: var(--green-deep);
  position: absolute;
  top: var(--y);
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 64%;
  min-height: 46px;
  padding: 6px 16px 6px 6px;
  border: 0; border-radius: 999px;
  background: #FFFFFF;
  color: var(--ink);
  font-weight: 600; font-size: .9375rem; line-height: 1.15; text-align: left;
  box-shadow: 0 1px 1px rgb(28 36 22 / .06), 0 10px 22px -12px color-mix(in srgb, var(--b-deep) 70%, transparent);
  animation: ap-bob var(--t, 4s) ease-in-out var(--d, 0s) infinite alternate;
  transition: box-shadow .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
}
.ap-sky[data-layout="wide"] .ap-bubble { max-width: 30%; }
.ap-bubble[data-side="l"] { left: var(--x, 4%); }
.ap-bubble[data-side="r"] { right: var(--x, 4%); }
.ap-bubble__ic {
  flex: none; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--b-deep); color: #FFFFFF;
}
.ap-bubble__ic svg { width: 19px; height: 19px; }
.ap-bubble:hover { box-shadow: 0 1px 1px rgb(28 36 22 / .06), 0 16px 26px -12px color-mix(in srgb, var(--b-deep) 80%, transparent); }
.ap-sky.is-catching .ap-bubble:not(.is-caught) { opacity: .45; transition: opacity .3s; pointer-events: none; }
.ap-bubble.is-caught { animation: none; z-index: 5; }

@keyframes ap-bob {
  from { transform: translateY(-5px) rotate(-1deg); }
  to { transform: translateY(6px) rotate(1deg); }
}

.ap-net {
  position: absolute;
  left: 50%; bottom: -90px;
  width: 156px;
  z-index: 2;
  transform: translateX(-50%) rotate(-7deg);
  transform-origin: 50% 100%;
  animation: ap-sway 5s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes ap-sway {
  from { transform: translateX(-50%) rotate(-8deg); }
  to { transform: translateX(-50%) rotate(-3deg); }
}
.ap-sky.is-catching .ap-net { z-index: 4; }
.ap-net__caught { opacity: 0; transform-box: fill-box; transform-origin: center; }

.ap-stamp {
  position: absolute; left: 50%; top: 42%; z-index: 6;
  transform: translate(-50%, -50%) rotate(-7deg);
  font-family: var(--display); font-weight: 800; font-size: 2.1rem; line-height: 1;
  text-transform: uppercase; white-space: nowrap;
  opacity: 0; pointer-events: none;
}

/* Ricerca */
.ap-search { display: grid; gap: 10px; padding: 18px 0 0; }
.ap-search__label { font-weight: 600; text-align: center; }
.ap-search__box { position: relative; }
.ap-search__box svg { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.ap-search__input {
  width: 100%; height: 56px;
  padding: 0 16px 0 48px;
  border: 2px solid var(--line); border-radius: 999px;
  background: #FFFFFF;
  font-size: 1.0625rem;
  transition: border-color .2s, box-shadow .2s;
}
.ap-search__input::placeholder { color: #848C7C; }
.ap-search__input:focus { outline: none; border-color: var(--green-deep); box-shadow: 0 0 0 4px rgb(109 179 63 / .22); }
.ap-results { display: grid; gap: 8px; }
.ap-result {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 14px 10px 10px;
  border: 0; border-radius: var(--r-md);
  background: var(--r-bg, var(--mist)); text-align: left;
  transition: transform .15s;
}
.ap-result:active { transform: scale(.99); }
.ap-result__ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--r-deep); color: #FFFFFF; }
.ap-result__ic svg { width: 20px; height: 20px; }
.ap-result__txt { display: grid; line-height: 1.25; min-width: 0; }
.ap-result__name { font-weight: 600; }
.ap-result__world { font-size: .9rem; color: var(--r-deep); font-weight: 600; }
.ap-noresult { padding: 14px 16px; border-radius: var(--r-md); background: var(--mist); display: grid; gap: 10px; justify-items: center; text-align: center; }

/* Sezioni */
.ap-section { padding: 64px 0; }
.ap-section--mist { background: var(--mist); }

/* Tessere dei sei mondi */
.ap-worlds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ap-tile {
  --t-bg: var(--mist); --t-deep: var(--ink); --t-accent: var(--green); --t-soft: var(--line);
  position: relative; overflow: hidden;
  display: grid; align-content: start; gap: 10px;
  min-height: 168px;
  padding: 16px 14px 14px;
  border: 0; border-radius: var(--r-lg);
  background: var(--t-bg); color: var(--t-deep);
  text-align: left;
  transition: transform .25s var(--ease), box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
  container-type: inline-size;
}
.ap-tile::after {
  content: ''; position: absolute; right: -26px; bottom: -26px;
  width: 92px; height: 92px; border-radius: 999px;
  background: var(--t-soft); opacity: .8;
  transition: transform .4s var(--ease);
}
.ap-tile:hover::after { transform: scale(1.25); }
.ap-tile:active { transform: scale(.98); }
.ap-tile__ic { position: relative; z-index: 1; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--t-deep); color: #FFFFFF; }
.ap-tile__ic svg { width: 26px; height: 26px; }
/* il nome si adatta alla larghezza della tessera: "MANUTENZIONE" entra anche a 320 px */
.ap-tile__name { position: relative; z-index: 1; font-family: var(--display); font-weight: 800; font-size: 1.2rem; font-size: clamp(1.1rem, 13.5cqi, 1.9rem); line-height: .95; text-transform: uppercase; }
.ap-tile__desc { position: relative; z-index: 1; font-size: .95rem; line-height: 1.35; color: var(--ink-2); }
.ap-tile__count { position: relative; z-index: 1; margin-top: auto; font-size: .875rem; font-weight: 600; }

/* Come funziona */
.ap-steps { display: grid; gap: 14px; counter-reset: step; }
.ap-step {
  display: grid; grid-template-columns: 52px 1fr; gap: 4px 14px; align-items: start;
  padding: 18px 18px 18px 14px;
  border-radius: var(--r-lg);
  background: #FFFFFF;
  box-shadow: var(--shadow-soft);
}
.ap-step__num {
  grid-row: span 2;
  display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--green); color: var(--ink);
  font-family: var(--display); font-weight: 800; font-size: 1.9rem;
}
.ap-step h3 { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.05; padding-top: 3px; }
.ap-step p { color: var(--ink-2); font-size: 1rem; }

/* Casa al mare */
.ap-sea {
  position: relative; overflow: hidden;
  padding: 56px 0 60px;
  background: linear-gradient(180deg, #D6EEFB, #EAF6FD);
}
.ap-sea::after {
  content: ''; position: absolute; left: -5%; right: -5%; bottom: -40px; height: 90px;
  background: #F2E6CC; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.ap-sea__in { position: relative; z-index: 1; display: grid; gap: 16px; justify-items: center; text-align: center; }
.ap-sea p { max-width: 32em; color: var(--ink-2); }
.ap-sea__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ap-pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 16px 6px 8px;
  border: 0; border-radius: 999px;
  background: #FFFFFF; color: var(--ink);
  font-weight: 600; font-size: .95rem;
  box-shadow: var(--shadow-soft);
}
.ap-pill__ic { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--p-deep, var(--green-deep)); color: #FFFFFF; }
.ap-pill__ic svg { width: 17px; height: 17px; }

/* Perché funziona */
.ap-promises { display: grid; gap: 0; max-width: 760px; margin-inline: auto; }
.ap-promise { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.ap-promise:last-child { border-bottom: 1px solid var(--line); }
.ap-promise__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--mist); color: var(--green-deep); }
.ap-promise__ic svg { width: 24px; height: 24px; }
.ap-promise h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.3; }
.ap-promise p { color: var(--ink-2); font-size: 1rem; }

/* Zona */
.ap-zone { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; margin: 0 auto; }
.ap-zone li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  background: #FFFFFF; box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 500; font-size: .98rem;
}
.ap-zone svg { width: 18px; height: 18px; color: var(--green-deep); }
.ap-zone__note { text-align: center; color: var(--muted); margin-top: 18px; font-size: 1rem; }

/* Domande frequenti */
.ap-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.ap-faq details { border-radius: var(--r-md); background: var(--mist); }
.ap-faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; font-weight: 600; font-size: 1.05rem;
}
.ap-faq summary::-webkit-details-marker { display: none; }
.ap-faq summary::after { content: '+'; flex: none; font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1; color: var(--green-deep); transition: transform .25s var(--ease); }
.ap-faq details[open] summary::after { transform: rotate(45deg); }
.ap-faq details p { padding: 0 18px 18px; color: var(--ink-2); }

/* Fascia finale */
.ap-final { padding: 64px 0 72px; background: var(--green); text-align: center; }
.ap-final__in { display: grid; gap: 18px; justify-items: center; }
.ap-final .ap-h2 { color: var(--ink); }
.ap-final .ap-band { --band: var(--ink); --band-2: #FFFFFF; }
.ap-final p { max-width: 30em; font-weight: 500; }
.ap-final__ctas { display: grid; gap: 10px; width: min(100%, 360px); }

/* Piè di pagina */
.ap-footer { background: var(--ink); color: #E7ECE2; padding: 48px 0 calc(110px + env(safe-area-inset-bottom)); }
.ap-footer__in { display: grid; gap: 22px; justify-items: center; text-align: center; }
.ap-footer img { height: 40px; width: auto; }
.ap-footer p { max-width: 36em; font-size: .95rem; color: #C9D2C0; }
.ap-footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: .95rem; }
.ap-footer__links a { color: #E7ECE2; }
.ap-footer small { color: #98A38F; font-size: .85rem; }

/* ==========================================================================
   MONDO (pagina di una categoria)
   ========================================================================== */
.ap-world { background: var(--w-bg); }
.ap-whero { position: relative; overflow: hidden; padding: 34px 0 44px; background: linear-gradient(180deg, var(--w-bg2), var(--w-bg)); }
.ap-particles {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  /* più leggeri dietro ai testi, pieni ai bordi */
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 58%, rgb(0 0 0 / .18) 35%, #000 92%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 58%, rgb(0 0 0 / .18) 35%, #000 92%);
}
.ap.is-instant, .ap.is-instant * { transition: none !important; }
.ap-whero__in { position: relative; z-index: 1; display: grid; justify-items: center; text-align: center; gap: 16px; }
.ap-art {
  position: relative;
  width: 132px; height: 132px; border-radius: 999px;
  display: grid; place-items: center;
  background: #FFFFFF;
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--w-soft) 55%, transparent), var(--shadow-world);
}
.ap-art svg { width: 82px; height: 82px; overflow: visible; }
.ap-whero__title {
  font-family: var(--display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.7rem, 12.6vw, 5.4rem); line-height: .92; letter-spacing: .004em;
  text-wrap: balance;
}
.ap-whero__slogan { font-family: var(--display); font-weight: 700; font-size: 1.55rem; line-height: 1.08; color: var(--w-deep); max-width: 20em; text-wrap: balance; }
.ap-whero__intro { color: var(--ink-2); max-width: 32em; text-wrap: pretty; }
.ap-whero__picked {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 8px 14px 8px 18px;
  border: 0; border-radius: 999px;
  background: #FFFFFF; color: var(--ink);
  box-shadow: 0 0 0 2px var(--w-accent), var(--shadow-world);
  font-size: 1rem; text-align: left;
  animation: ap-pop .5s var(--ease) .35s both;
}
.ap-whero__picked strong { color: var(--w-deep); }
.ap-whero__picked svg { width: 18px; height: 18px; flex: none; color: var(--w-deep); }
@keyframes ap-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } }
.ap-whero__cta { width: 100%; display: grid; justify-items: center; }
.ap-whero .ap-btn { width: min(100%, 360px); }

/* Animazioni delle illustrazioni dei mondi */
.ap-art .m { transform-box: fill-box; }
.ap-art--spray .m-body { transform-origin: 50% 100%; animation: ap-squeeze 2.6s ease-in-out infinite; }
.ap-art--spray .m-mist { animation: ap-mist 2.6s ease-out infinite; }
@keyframes ap-squeeze { 0%, 60%, 100% { transform: none; } 70% { transform: scale(.97, 1.02) rotate(-2deg); } }
@keyframes ap-mist { 0%, 62% { opacity: 0; transform: translate(-2px, 1px) scale(.6); } 72% { opacity: 1; } 100% { opacity: 0; transform: translate(3px, -1px) scale(1.4); } }
.ap-art--germoglio .m-left { transform-origin: 100% 100%; animation: ap-leaf 3.2s ease-in-out infinite alternate; }
.ap-art--germoglio .m-right { transform-origin: 0% 100%; animation: ap-leaf 3.2s ease-in-out -1.6s infinite alternate-reverse; }
@keyframes ap-leaf { from { transform: rotate(-6deg); } to { transform: rotate(7deg); } }
.ap-art--chiave .m-tool { transform-origin: 71% 29%; animation: ap-turn 2.4s var(--ease) infinite; }
@keyframes ap-turn { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-24deg); } 55% { transform: rotate(-20deg); } }
.ap-art--scatola .m-box { transform-origin: 50% 100%; animation: ap-hop 2s var(--ease) infinite; }
@keyframes ap-hop { 0%, 50%, 100% { transform: none; } 20% { transform: translateY(-3px) rotate(-3deg); } 35% { transform: translateY(0) scale(1.03, .97); } }
.ap-art--scopa .m-broom { transform-origin: 85% 10%; animation: ap-sweep 1.8s ease-in-out infinite alternate; }
@keyframes ap-sweep { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
.ap-art--martello .m-hammer { transform-origin: 8% 92%; animation: ap-tap 1.6s cubic-bezier(.5, 0, .3, 1) infinite; }
@keyframes ap-tap { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(-22deg); } 50% { transform: rotate(4deg); } 60% { transform: rotate(0); } }

/* Servizi */
.ap-services { padding: 44px 0 56px; }
.ap-acc { display: grid; gap: 12px; }
.ap-svc { border-radius: var(--r-lg); background: #FFFFFF; box-shadow: var(--shadow-world); scroll-margin-top: calc(var(--header-h) + var(--tabs-h) + 14px); }
.ap-svc summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 1fr 36px; align-items: center; gap: 4px 12px;
  padding: 18px 16px 18px 20px;
}
.ap-svc summary::-webkit-details-marker { display: none; }
.ap-svc__name { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.05; color: var(--ink); }
.ap-svc__short { grid-column: 1; font-size: .98rem; color: var(--ink-2); line-height: 1.4; }
.ap-svc__chev {
  grid-column: 2; grid-row: 1 / span 2;
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px;
  background: var(--w-bg); color: var(--w-deep);
  transition: transform .3s var(--ease), background-color .3s;
}
.ap-svc__chev svg { width: 18px; height: 18px; }
.ap-svc[open] .ap-svc__chev { transform: rotate(180deg); background: var(--w-deep); color: #FFFFFF; }
.ap-svc[open] { box-shadow: 0 0 0 2px var(--w-accent), var(--shadow-world); }
.ap-svc.is-flash { animation: ap-flash 1.6s var(--ease); }
@keyframes ap-flash { 0%, 40% { box-shadow: 0 0 0 5px var(--w-accent), var(--shadow-world); } 100% { box-shadow: 0 0 0 2px var(--w-accent), var(--shadow-world); } }
.ap-svc__body { display: grid; gap: 18px; padding: 2px 20px 22px; }
.ap-svc__body h3 { font-size: .98rem; font-weight: 700; margin-bottom: 8px; color: var(--w-deep); }
.ap-list { display: grid; gap: 8px; }
.ap-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 1rem; line-height: 1.4; }
.ap-list svg { width: 22px; height: 22px; margin-top: -1px; }
.ap-list--yes svg { color: var(--w-deep); }
.ap-list--no { color: var(--muted); }
.ap-list--no svg { color: #9AA392; }
.ap-list--ask svg { color: var(--w-deep); }
.ap-svc__body .ap-btn { width: 100%; }
.ap-services__other { margin-top: 22px; text-align: center; color: var(--ink-2); display: grid; gap: 4px; justify-items: center; }

/* Spesso insieme */
.ap-pairs { padding: 0 0 56px; }
.ap-pairs__list { display: grid; gap: 12px; }
.ap-pair {
  --p-bg: var(--mist); --p-deep: var(--ink);
  display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center;
  width: 100%; padding: 16px; border: 0; border-radius: var(--r-lg);
  background: var(--p-bg); text-align: left;
  transition: transform .2s var(--ease);
}
.ap-pair:active { transform: scale(.99); }
.ap-pair__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--p-deep); color: #FFFFFF; }
.ap-pair__ic svg { width: 26px; height: 26px; }
.ap-pair__txt { display: grid; gap: 2px; }
.ap-pair__name { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 1.35rem; line-height: 1; color: var(--p-deep); }
.ap-pair__desc { font-size: .98rem; color: var(--ink-2); line-height: 1.4; }

.ap-wsteps { padding: 52px 0; background: #FFFFFF; }
.ap-others { padding: 52px 0 64px; }

/* ==========================================================================
   Barra in basso (mobile)
   ========================================================================== */
.ap-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgb(255 255 255 / 0), rgb(255 255 255 / .94) 28%);
  display: flex; justify-content: center; gap: 10px;
  transform: translateY(110%);
  transition: transform .35s var(--ease);
  pointer-events: none;
}
.ap-dock.is-on { transform: none; pointer-events: auto; }
.ap-dock .ap-btn { flex: 1 1 auto; max-width: 340px; }
.ap-dock .ap-wa { width: 54px; height: 54px; flex: none; background: #FFFFFF; box-shadow: inset 0 0 0 2px var(--green-deep); }

/* ==========================================================================
   Richiesta di preventivo
   ========================================================================== */
.ap-sheet { position: fixed; inset: 0; z-index: 100; display: grid; align-items: end; }
.ap-sheet__backdrop { position: absolute; inset: 0; background: rgb(20 26 16 / .5); animation: ap-fade .3s ease both; }
.ap-sheet__panel {
  position: relative;
  display: grid; grid-template-rows: auto 1fr auto;
  width: 100%; height: 100dvh; max-height: 100dvh;
  background: var(--w-bg);
  transition: --w-bg .5s var(--ease), --w-bg2 .5s var(--ease), --w-accent .5s var(--ease), --w-deep .5s var(--ease), --w-soft .5s var(--ease);
  animation: ap-up .42s var(--ease) both;
}
@keyframes ap-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ap-fade { from { opacity: 0; } }
.ap-sheet__head { display: grid; gap: 8px; padding: calc(14px + env(safe-area-inset-top)) var(--gutter) 14px; background: var(--w-bg2); text-align: center; }
.ap-sheet__top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; }
.ap-sheet__step { font-size: .92rem; font-weight: 600; color: var(--w-deep); }
.ap-sheet__close { grid-column: 3; width: 44px; height: 44px; border: 0; border-radius: 999px; background: #FFFFFF; display: grid; place-items: center; color: var(--ink); }
.ap-sheet__close svg { width: 22px; height: 22px; }
.ap-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ap-progress span { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--w-deep) 18%, transparent); transition: background-color .3s; }
.ap-progress span.is-on { background: var(--w-deep); }
.ap-sheet__title { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 2rem; line-height: 1; text-wrap: balance; }
.ap-sheet__body { overflow-y: auto; overscroll-behavior: contain; padding: 20px var(--gutter) 28px; -webkit-overflow-scrolling: touch; }
.ap-sheet__inner { display: grid; gap: 24px; max-width: 560px; margin: 0 auto; }
.ap-sheet__foot {
  display: flex; gap: 10px; justify-content: center;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: #FFFFFF; border-top: 1px solid color-mix(in srgb, var(--w-deep) 14%, transparent);
}
.ap-sheet__foot .ap-btn { flex: 1 1 0; max-width: 300px; min-width: 0; }
.ap-sheet__foot .ap-btn--ghost { flex: 0 0 auto; padding: 0 20px; }

.ap-field { display: grid; gap: 10px; }
.ap-label { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.ap-label small { font-weight: 500; color: var(--muted); font-size: .92rem; }
.ap-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ap-chip {
  min-height: 44px; padding: 8px 16px;
  border: 0; border-radius: 999px;
  background: #FFFFFF; color: var(--ink);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--w-deep) 22%, transparent);
  font-weight: 500; font-size: 1rem; line-height: 1.2; text-align: center;
  transition: background-color .2s, color .2s, box-shadow .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.ap-chip:active { transform: scale(.96); }
.ap-chip[aria-pressed="true"] { background: var(--w-deep); color: #FFFFFF; box-shadow: none; }

.ap-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ap-pick__opt {
  --o-deep: var(--ink);
  display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 10px;
  border: 0; border-radius: var(--r-md);
  background: #FFFFFF; color: var(--ink); text-align: left;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--o-deep) 20%, transparent);
  font-weight: 600; font-size: .98rem; line-height: 1.15;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.ap-pick__opt span:first-child { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--o-deep) 12%, white); color: var(--o-deep); }
.ap-pick__opt svg { width: 21px; height: 21px; }
.ap-pick__opt[aria-pressed="true"] { background: var(--o-deep); color: #FFFFFF; box-shadow: none; }
.ap-pick__opt:last-child { grid-column: 1 / -1; justify-content: center; }
.ap-pick__opt[aria-pressed="true"] span:first-child { background: rgb(255 255 255 / .18); color: #FFFFFF; }

.ap-input, .ap-textarea {
  width: 100%; min-height: 54px; padding: 12px 16px;
  border: 0; border-radius: var(--r-md);
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--w-deep) 24%, transparent);
  font-size: 1.0625rem;
  transition: box-shadow .2s;
}
.ap-textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.ap-input:focus, .ap-textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--w-deep), 0 0 0 4px color-mix(in srgb, var(--w-accent) 30%, transparent); }
.ap-input[aria-invalid="true"], .ap-textarea[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #B3261E; }
.ap-err { color: #B3261E; font-size: .95rem; font-weight: 600; }
.ap-hint { color: var(--muted); font-size: .95rem; }

.ap-upload {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 64px; padding: 12px 16px;
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--w-soft) 45%, white);
  outline: 2px dashed color-mix(in srgb, var(--w-deep) 35%, transparent); outline-offset: -2px;
  color: var(--w-deep); font-weight: 700; cursor: pointer;
}
.ap-upload svg { width: 26px; height: 26px; }
.ap-upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ap-upload:focus-within { outline-style: solid; }
.ap-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ap-thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #FFFFFF; }
.ap-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ap-thumb button { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 999px; background: rgb(20 26 16 / .7); color: #FFFFFF; display: grid; place-items: center; }
.ap-thumb button svg { width: 16px; height: 16px; }

.ap-check { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: .98rem; line-height: 1.45; cursor: pointer; }
.ap-check input { width: 24px; height: 24px; margin: 0; accent-color: var(--w-deep); }

.ap-chosen { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: #FFFFFF; box-shadow: var(--shadow-world); }
.ap-chosen__ic { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--w-deep); color: #FFFFFF; }
.ap-chosen__ic svg { width: 24px; height: 24px; }
.ap-chosen__txt { display: grid; line-height: 1.25; min-width: 0; }
.ap-chosen__txt span { font-size: .9rem; color: var(--w-deep); font-weight: 600; }

/* Conferma */
.ap-done { display: grid; gap: 18px; justify-items: center; text-align: center; padding-top: 10px; }
.ap-done__mark { width: 140px; height: 140px; }
.ap-done__mark .ring { stroke-dasharray: 360; stroke-dashoffset: 360; animation: ap-draw .9s var(--ease) .1s forwards; }
.ap-done__mark .tick { stroke-dasharray: 60; stroke-dashoffset: 60; animation: ap-draw .5s var(--ease) .75s forwards; }
@keyframes ap-draw { to { stroke-dashoffset: 0; } }
.ap-done h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 2.3rem; line-height: .95; }
.ap-done p { color: var(--ink-2); max-width: 26em; }
.ap-summary { width: 100%; display: grid; gap: 0; text-align: left; border-radius: var(--r-md); background: #FFFFFF; padding: 4px 16px; }
.ap-summary div { display: grid; grid-template-columns: 110px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.ap-summary div:last-child { border-bottom: 0; }
.ap-summary dt { color: var(--muted); }
.ap-summary dd { margin: 0; font-weight: 600; }
.ap-demo-note { font-size: .9rem; color: var(--muted); }

/* Passaggio da un mondo all'altro */
.ap-morph {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--m-bg, #F1F6EC);
  pointer-events: none;
}
.ap-morph svg { width: 96px; height: 96px; color: var(--m-deep, #3D7A1C); }

/* ==========================================================================
   Schermi più grandi
   ========================================================================== */
@media (min-width: 600px) {
  .ap { --gutter: 28px; }
  .ap-tab__label { display: inline; }
  .ap-tab { padding: 0 16px 0 12px; }
  .ap-tabs__in { gap: 8px; }
  .ap-worlds { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .ap-tile { min-height: 190px; padding: 20px 18px 18px; }
  .ap-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap-step { grid-template-columns: 1fr; padding: 22px; gap: 10px; }
  .ap-step__num { grid-row: auto; }
  .ap-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ap-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ap-sky { margin-inline: 0; border-radius: var(--r-xl); height: 520px; }
  .ap-net { width: 180px; bottom: -80px; }
  .ap-sky[data-layout="narrow"] .ap-net { bottom: -110px; }
  .ap-pairs__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ap-svc__body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
  .ap-svc__body .ap-svc__ask, .ap-svc__body .ap-btn { grid-column: 1 / -1; }
  .ap-svc__body .ap-btn { width: auto; justify-self: start; }
  .ap-sheet { align-items: center; justify-items: center; padding: 24px; }
  .ap-sheet__panel { max-width: 640px; height: min(860px, 100%); border-radius: var(--r-xl); overflow: hidden; box-shadow: 0 30px 80px -30px rgb(0 0 0 / .5); }
  .ap-sheet__head { padding-top: 16px; }
}

@media (min-width: 900px) {
  .ap { --header-h: 76px; }
  .ap-logo img { height: 46px; }
  .ap-header__cta { display: inline-flex; min-height: 48px; font-size: 1.15rem; padding: 0 22px; }
  .ap-wa { width: auto; padding: 0 16px 0 12px; height: 48px; }
  .ap-wa__label { display: inline; }
  .ap-dock { display: none; }
  .ap-hero { padding: 48px 0 24px; }
  .ap-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: center; gap: 48px; }
  .ap-hero__text { justify-items: start; text-align: left; }
  .ap-hero__title { justify-items: start; font-size: clamp(3.8rem, 6vw, 5.6rem); }
  .ap-hero__ctas { justify-items: start; }
  .ap-stage__head { text-align: left; justify-items: start; }
  .ap-search__label { text-align: left; }
  .ap-section { padding: 96px 0; }
  .ap-head { margin-bottom: 40px; }
  .ap-whero { padding: 56px 0 72px; }
  .ap-whero__in { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; column-gap: 40px; align-items: center; }
  .ap-art { grid-row: span 4; width: 200px; height: 200px; }
  .ap-whero__cta { justify-items: start; }
  .ap-art svg { width: 120px; height: 120px; }
  .ap-services { padding: 72px 0; }
  .ap-acc { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .ap-svc__body { grid-template-columns: 1fr; }
  .ap-footer { padding-bottom: 48px; }
  .ap-final__ctas { grid-template-columns: 1fr 1fr; width: min(100%, 560px); }
}

@media (min-width: 1200px) {
  .ap-worlds { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ap-tile { min-height: 230px; }
}

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