/* Attrattore: lo sherpa dell'intelligenza artificiale */
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --viola: #4C1569;
  --viola-notte: #34104A;
  --giallo: #F8B614;
  --lavanda: #F3EDF8;
  --inchiostro: #1E1426;
  --bianco: #FFFFFF;
  --testo-tenue: #5A4B66;
  --misura: 40rem;
  --largo: 72rem;
  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem; --s6: 6.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: "Bricolage", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--inchiostro);
  background: var(--bianco);
  font-variation-settings: "opsz" 14;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--viola); text-underline-offset: .18em; }
a:hover { color: var(--viola-notte); }
:focus-visible { outline: 3px solid var(--giallo); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 { line-height: 1.08; margin: 0 0 var(--s2); letter-spacing: -.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); font-weight: 760; font-variation-settings: "opsz" 96; max-width: 14ch; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 720; font-variation-settings: "opsz" 72; }
h3 { font-size: 1.35rem; font-weight: 680; }
p { margin: 0 0 var(--s2); max-width: var(--misura); }

.contenitore { width: min(100% - 2rem, var(--largo)); margin-inline: auto; }
.salta { position: absolute; left: -999px; }
.salta:focus { left: 1rem; top: 1rem; background: var(--bianco); padding: var(--s1) var(--s2); z-index: 10; }

/* Testata */
.testata { padding: var(--s3) 0; }
.testata .contenitore { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.testata img { width: 200px; }
.menu { display: flex; gap: var(--s3); flex-wrap: wrap; font-size: 1rem; }
.menu a { color: var(--inchiostro); text-decoration: none; }
.menu a:hover { color: var(--viola); text-decoration: underline; }

/* Apertura: la mappa */
.apertura { position: relative; overflow: hidden; background: var(--lavanda); padding: var(--s5) 0 var(--s6); }
.apertura .mappa {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.35) 35%, #000 60%);
  mask-image: linear-gradient(to right, transparent 0, rgba(0,0,0,.35) 35%, #000 60%);
}
.apertura .contenitore { position: relative; }
.apertura p { font-size: 1.3rem; color: var(--testo-tenue); max-width: 34rem; }
.mappa .cl { fill: none; stroke: var(--viola); stroke-opacity: .16; stroke-width: 1.2; }
.mappa .cl-major { stroke-opacity: .32; stroke-width: 1.6; }
.mappa .sentiero { fill: none; stroke: var(--giallo); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 14; }
.mappa .tappa { fill: var(--viola); stroke: var(--giallo); stroke-width: 4; }
.mappa .tappa-n { fill: var(--viola-notte); font: 700 22px "Bricolage", sans-serif; text-anchor: middle; }
.mappa .vetta { fill: var(--viola-notte); }
@media (prefers-reduced-motion: no-preference) {
  .mappa .sentiero { animation: sale 2.4s ease-out .3s both; }
  @keyframes sale { from { stroke-dashoffset: 400; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }
}
.pulsante {
  display: inline-block; background: var(--viola); color: var(--bianco); text-decoration: none;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 650; border: 0; font: inherit; font-weight: 650; cursor: pointer;
}
.pulsante:hover { background: var(--viola-notte); color: var(--bianco); }
.pulsante-giallo { background: var(--giallo); color: var(--viola-notte); }
.pulsante-giallo:hover { background: #e3a500; color: var(--viola-notte); }

/* Sezioni */
section { padding: var(--s6) 0; }
section + section { border-top: 1px solid #E6DCEE; }

/* Come lavoriamo: due tappe in sequenza */
.tappe { list-style: none; padding: 0; margin: var(--s4) 0 var(--s3); display: grid; gap: var(--s4); }
@media (min-width: 52rem) { .tappe { grid-template-columns: 1fr 1fr; } }
.tappe li { position: relative; padding-left: 4.2rem; }
.tappe li::before {
  counter-increment: tappa; content: counter(tappa);
  position: absolute; left: 0; top: -.15rem; width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--viola); color: var(--giallo); font-weight: 760; font-size: 1.35rem;
  display: grid; place-items: center; box-shadow: 0 0 0 4px var(--giallo);
}
.tappe { counter-reset: tappa; }
.nota-pmi { font-size: 1.25rem; font-weight: 600; color: var(--viola); }

/* Casi: carosello di bisogni con il sentiero sotto */
.carosello { --w: min(46rem, 86vw); margin-top: var(--s4); }
.schede {
  list-style: none; margin: 0; padding: var(--s2) calc((100% - var(--w)) / 2);
  display: flex; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; position: relative; overscroll-behavior-x: contain;
}
.schede::-webkit-scrollbar { display: none; }
.schede:focus-visible { outline-offset: -3px; }
.scheda {
  flex: 0 0 var(--w); scroll-snap-align: center; display: grid; overflow: hidden;
  background: var(--lavanda); border-radius: 18px;
  transform: scale(calc(1 - var(--d, 0) * .1)) rotate(calc(var(--dir, 1) * var(--d, 0) * 1.2deg));
  opacity: calc(1 - var(--d, 0) * .55); transform-origin: 50% 100%;
}
.scheda-img { overflow: hidden; }
.scheda-img img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9;
  transform: scale(1.18) translateX(calc(var(--dir, 1) * var(--d, 0) * -6%));
}
.scheda-testo { padding: var(--s3); }
.scheda-testo p { font-size: 1.05rem; }
.scheda h3 { color: var(--viola-notte); }
.esempio { color: var(--testo-tenue); margin-bottom: 0; }
.esempio strong { color: var(--viola); }
@media (min-width: 52rem) {
  .scheda { grid-template-columns: 2fr 3fr; }
  .scheda-img img { aspect-ratio: auto; min-height: 100%; }
  .scheda-testo { padding: var(--s4) var(--s4) var(--s4) var(--s3); }
}
.carosello { position: relative; }
.comandi { width: min(100% - 2rem, 40rem); margin: var(--s3) auto 0; }
.freccia-grande {
  position: absolute; z-index: 2; top: calc(var(--s2) + var(--w) * 9 / 32); transform: translate(-50%, -50%);
  width: 4rem; height: 4rem; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--giallo); color: var(--viola-notte);
  box-shadow: 0 0 0 6px var(--bianco);
}
.freccia-grande:hover { background: var(--viola); color: var(--giallo); }
[data-indietro] { left: calc(50% - var(--w) / 2); }
[data-avanti] { left: calc(50% + var(--w) / 2); }
@media (max-width: 52rem) {
  .freccia-grande { width: 3.25rem; height: 3.25rem; box-shadow: 0 0 0 4px var(--bianco); }
  [data-indietro] { left: calc(50% - var(--w) / 2 + 1.9rem); }
  [data-avanti] { left: calc(50% + var(--w) / 2 - 1.9rem); }
}
@media (min-width: 52rem) {
  .freccia-grande { top: 50%; margin-top: -2.5rem; }
}
.cammino { padding-bottom: 1.6rem; }
.cammino-area { position: relative; }
.cammino svg { display: block; width: 100%; height: auto; overflow: visible; }
.traccia { fill: none; stroke: var(--viola); stroke-opacity: .28; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 2 14; }
.traccia-fatta { fill: none; stroke: var(--giallo); stroke-width: 6; stroke-linecap: round; }
.passo, .segnaposto { position: absolute; transform: translate(-50%, -50%); }
.passo {
  width: 1.4rem; height: 1.4rem; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--bianco); border: 3px solid var(--viola);
}
.passo[aria-current="true"] { background: var(--viola); }
.passo span {
  position: absolute; top: 1.5rem; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 600 .85rem/1.2 "Bricolage", system-ui, sans-serif; color: var(--testo-tenue);
}
.passo[aria-current="true"] span { color: var(--viola-notte); }
@media (max-width: 40rem) {
  .passo span { display: none; }
  .passo[aria-current="true"] span { display: block; }
}
.passo:first-of-type span { left: -.3rem; transform: none; }
.passo:last-of-type span { left: auto; right: -.3rem; transform: none; }
.segnaposto {
  width: 1rem; height: 1rem; border-radius: 50%; background: var(--giallo);
  box-shadow: 0 0 0 4px rgba(248, 182, 20, .35); pointer-events: none; z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
  .scheda, .scheda-img img { transform: none; opacity: 1; }
}

/* Affitti turistici + Comforty */
.affitti { background: var(--lavanda); }
.comforty .contenitore { display: grid; gap: var(--s4); align-items: center; }
@media (min-width: 52rem) { .comforty .contenitore { grid-template-columns: 6fr 5fr; } }
.comforty img { border-radius: 14px; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; height: auto; }

/* Chi siamo */
.chi .contenitore { display: grid; gap: var(--s4); align-items: center; }
@media (min-width: 52rem) { .chi .contenitore { grid-template-columns: 5fr 6fr; } }
.ritratti { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.ritratti figure { margin: 0; }
.ritratti img { border-radius: 14px; aspect-ratio: 1; object-fit: cover; width: 100%; }
.ritratti figcaption { margin-top: var(--s1); font-size: .95rem; line-height: 1.4; color: var(--testo-tenue); }
.ritratti strong { color: var(--inchiostro); }

/* Contatti */
.contatti { background: var(--viola-notte); color: var(--bianco); }
.contatti a { color: var(--giallo); }
.contatti p { color: #E9DDF2; }
.modulo { display: grid; gap: var(--s3); max-width: 38rem; margin-top: var(--s4); }
.modulo label { display: grid; gap: .35rem; font-weight: 600; font-size: 1rem; }
.modulo input, .modulo textarea {
  font: inherit; font-size: 1.05rem; padding: .8rem 1rem; border-radius: 10px;
  border: 2px solid transparent; background: var(--bianco); color: var(--inchiostro); width: 100%;
}
.modulo input:focus, .modulo textarea:focus { border-color: var(--giallo); outline: none; }
.modulo textarea { min-height: 9rem; resize: vertical; }
.esca { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.facoltativo { font-weight: 400; color: #CDBBDA; }
.esito { padding: var(--s2) var(--s3); border-radius: 10px; background: var(--giallo); color: var(--viola-notte); font-weight: 600; max-width: 38rem; }
.esito[hidden] { display: none; }
.privacy-nota { font-size: .95rem; }

/* Piede */
.piede { padding: var(--s4) 0; font-size: .95rem; color: var(--testo-tenue); }
.piede .contenitore { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; justify-content: space-between; }
.piede address { font-style: normal; }
.piede img { width: 44px; }

/* Pagine semplici (grazie, privacy, contatti) */
.pagina { padding: var(--s5) 0 var(--s6); }
.pagina h2 { margin-top: var(--s4); font-size: 1.5rem; }
