/* WeMap - sito di presentazione
   Palette presa dalla cartografia escursionistica: bosco, carta, segnavia CAI.
   I colori delle mappe sono quelli dell'app (MapColors). */
:root {
  --forest: #0f2a1d;
  --forest-2: #17392a;
  --forest-3: #21503a;
  --paper: #eef2ea;
  --paper-2: #e1e9dc;
  --ink: #12241a;
  --ink-soft: #46584c;
  --mist: #46584c;
  --green: #2e7d32;
  --leaf: #4caf50;
  --leaf-soft: #b9e3a8;
  --cai: #d21f2b;
  --trail: #ef4444;
  --track: #2563eb;
  --white: #ffffff;
  --ui-bg: #ffffff;
  --ui-2: #eef2ea;
  --ui-text: #12241a;
  --ui-muted: #5d6e62;
  --ui-track: #dde6d8;
  --ui-shadow: 0 24px 50px -24px rgba(15,42,29,.35);
  --radius-s: 10px;
  --radius-m: 18px;
  --radius-l: 30px;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
  --font: 'Bricolage Grotesque', system-ui, sans-serif;
  --step--1: clamp(0.84rem, 0.8rem + 0.15vw, 0.92rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.12rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.4vw, 1.42rem);
  --step-2: clamp(1.45rem, 1.25rem + 0.9vw, 2rem);
  --step-3: clamp(2rem, 1.55rem + 2vw, 3.3rem);
  --step-4: clamp(2.6rem, 1.8rem + 4.2vw, 5.8rem);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: var(--step-0); line-height: 1.55;
  color: var(--ink); background: var(--paper); overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-only:focus { position: fixed; z-index: 100; top: 8px; left: 8px; width: auto; height: auto; clip: auto; padding: .6rem 1rem; background: var(--white); color: var(--ink); border-radius: 8px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.map-fill { position: absolute; inset: 0; }

h1, h2, h3 { font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.01em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
.fineprint { margin-top: 1rem; font-size: .8rem; opacity: .7; }

/* ---------- pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em; padding: .85em 1.35em; border-radius: 999px;
  font: 600 var(--step-0)/1 var(--font); text-decoration: none; border: 0; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-lg { font-size: var(--step-1); padding: 1em 1.6em; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #276b2b; }
.btn-ghost { background: rgba(255,255,255,.75); color: var(--ink); }
.btn-ghost:hover { background: #fff; }
.btn-dark { background: var(--forest); color: var(--white); }
.btn-dark:hover { background: var(--forest-3); }
.btn-sm { font: 600 .85rem/1 var(--font); padding: .6rem 1rem; border-radius: 999px; border: 0; background: var(--green); color: #fff; cursor: pointer; }

.store { display: inline-flex; align-items: center; gap: .7rem; padding: .6rem 1.1rem .6rem .9rem; border-radius: 14px; background: #000; color: #fff; text-decoration: none; transition: transform .25s var(--ease); }
.store:hover { transform: translateY(-2px); }
.store svg { width: 26px; height: 26px; }
.store small { display: block; font-size: .7rem; opacity: .8; line-height: 1.1; }
.store strong { display: block; font-size: 1.05rem; line-height: 1.15; font-weight: 600; }

/* ---------- barra in alto ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 1.4rem;
  padding: .7rem var(--gutter); color: var(--ink); transition: background-color .4s, color .4s;
}
.topbar.is-solid { background: rgba(238, 242, 234, .9); }
.topbar.on-light { background: rgba(238, 242, 234, .9); color: var(--ink); }
.brand { display: flex; align-items: center; text-decoration: none; flex: none; }
/* il logo e' gia' la scritta: mai affiancato da "WeMap" */
.logo { display: block; height: 42px; width: auto; aspect-ratio: 437 / 296; fill: var(--green); overflow: visible; }
.logo path { transition: fill .3s; }
.brand:hover .logo path { fill: #63c467; }
.topbar.on-light .logo { fill: var(--green); }
.logo-xs { height: 22px; }
.foot .logo { height: 48px; fill: var(--leaf); }
/* apertura: il logo si disegna, si riempie e vola nella barra */
.logo-intro { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; pointer-events: none; background: var(--paper); transition: background-color .9s var(--ease); }
.logo-intro.is-clear { background: transparent; }
.logo-big { height: min(34vh, 260px, 57vw); fill: transparent; stroke: var(--green); stroke-width: 3; stroke-linejoin: round; transform-origin: 0 0; }
.logo-big path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.5s cubic-bezier(.6,.05,.3,1) forwards, fillin .6s ease 1.35s forwards; }
.logo-big path:nth-child(2) { animation-delay: .25s, 1.5s; }
.logo-big path:nth-child(3) { animation-delay: .45s, 1.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill: var(--green); stroke-width: 0; } }
.topbar .brand .logo { opacity: 0; transition: opacity .2s; }
.logo-done .topbar .brand .logo { opacity: 1; }
.no-js .topbar .brand .logo, .reduced .topbar .brand .logo { opacity: 1; }
/* su telefono il logo nella barra non c'e' sopra la mappa iniziale: compare dalle sezioni dopo */
@media (max-width: 900px) { .topbar.on-map .brand .logo { opacity: 0 !important; } .topbar .brand .logo { transition: opacity .35s; } }
.reduced .logo-intro { display: none; }
.route { flex: 1; min-width: 0; max-width: 760px; margin-inline: auto; padding-inline: clamp(12px, 2vw, 32px); position: relative; height: 42px; display: flex; align-items: center; }
.route svg { position: absolute; left: clamp(12px, 2vw, 32px); right: clamp(12px, 2vw, 32px); top: -9px; width: calc(100% - 2 * clamp(12px, 2vw, 32px)); height: 20px; overflow: visible; }
.route .profile-bg { fill: none; stroke: currentColor; stroke-opacity: .28; stroke-width: 1.5; }
.route .profile-done { fill: none; stroke: var(--cai); stroke-width: 2.5; stroke-linecap: round; }
.route .walker { fill: var(--paper); stroke: var(--cai); stroke-width: 2.5; }
.route-stops { position: relative; display: flex; justify-content: space-between; width: 100%; list-style: none; margin: 0; padding: 0; }
.route-stops a { font-size: .78rem; font-weight: 600; text-decoration: none; opacity: .7; padding: 2px 4px; border-radius: 4px; display: inline-block; }
.route-stops a:hover, .route-stops a.is-here { opacity: 1; }
.route-stops a.is-here { text-decoration: underline; text-decoration-color: var(--cai); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.topbar-link { font-weight: 600; font-size: .92rem; text-decoration: none; flex: none; }
.topbar-link:hover { text-decoration: underline; }
.topbar .btn { padding: .65em 1.1em; font-size: .92rem; flex: none; }

/* ---------- apertura ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; background: var(--paper); color: var(--ink); }
.hero-stage { position: relative; height: 100%; overflow: hidden; }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(238,242,234,.85) 0%, rgba(238,242,234,.4) 30%, rgba(238,242,234,0) 46%);
}
.hero-copy { position: absolute; z-index: 2; left: var(--gutter); top: clamp(96px, 16vh, 170px); max-width: 760px; }
.hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4.8rem); letter-spacing: -0.04em; line-height: .95; font-variation-settings: "wdth" 85; color: var(--forest); }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.hero-sub { margin-top: 1.4rem; font-size: var(--step-1); max-width: 34ch; color: var(--ink-soft); }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-scroll { position: absolute; z-index: 2; left: 50%; bottom: 18px; transform: translateX(-50%); font-size: .8rem; color: var(--ink-soft); display: flex; flex-direction: column; align-items: center; gap: 6px; white-space: nowrap; }
.hero-scroll span { width: 2px; height: 34px; background: linear-gradient(var(--leaf), transparent); animation: drip 2s infinite var(--ease); transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* pannello "Layer Dati" */
.layer-card {
  position: absolute; z-index: 2; right: var(--gutter); top: 50%; transform: translate(20px, -50%); width: 280px;
  padding: 1.1rem 1.2rem; border-radius: var(--radius-m); background: rgba(18, 23, 19, .82);
  color: var(--ui-text); opacity: 0; transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.layer-card.is-visible { opacity: 1; transform: translate(0, -50%); }
.layer-card-title { font-weight: 700; margin-bottom: .7rem; }
.layer-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.layer-card li { display: flex; align-items: center; gap: .7rem; padding: .45rem .5rem; border-radius: 10px; font-size: .9rem; opacity: .45; transition: opacity .4s, background-color .4s; }
.layer-card li.is-on { opacity: 1; background: rgba(76,175,80,.12); }
.layer-card li img { width: 22px; height: 22px; }
.layer-card li i { margin-left: auto; width: 32px; height: 18px; border-radius: 999px; background: #c9d3c4; position: relative; transition: background-color .3s; flex: none; }
.layer-card li i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.layer-card li.is-on i { background: var(--leaf); }
.layer-card li.is-on i::after { transform: translateX(14px); }
.layer-card-caption { margin-top: .9rem; font-size: .85rem; color: var(--ui-muted); min-height: 2.6em; }
.sw { width: 22px; height: 22px; border-radius: 6px; flex: none; display: inline-block; }
.sw-map { background: linear-gradient(135deg, #cfe3bd, #7fae6e); }
.sw-wmt { background: repeating-linear-gradient(135deg, #d21f2b 0 3px, transparent 3px 7px), #fff; }
.sw-trail { background: linear-gradient(transparent 9px, var(--trail) 9px 13px, transparent 13px); background-color: #e7efe0; }
.sw-track { background: linear-gradient(transparent 9px, var(--track) 9px 13px, transparent 13px); background-color: #e7efe0; }

/* ---------- sezioni ---------- */
.stage { position: relative; padding-block: clamp(56px, 7vw, 100px); }
.stage-dark { background: #e3ebdd; color: var(--ink); }
.marker { display: inline-flex; align-items: center; margin-bottom: 1.3rem; font-weight: 600; font-size: var(--step--1); color: var(--ink-soft); }
.stage-dark .marker, .record .marker { color: var(--ink-soft); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; margin-bottom: clamp(24px, 3.5vw, 48px); }
.section-head h2 { max-width: 16ch; }
.section-head > p { max-width: 44ch; color: var(--ink-soft); }
.stage-dark .section-head > p { color: var(--mist); }
.reveal { opacity: 0; transform: translateY(28px); }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- progetto ---------- */
.purpose { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 96px); align-items: end; }
.purpose h2 { max-width: 16ch; }
.purpose-text { display: grid; gap: 1.2rem; color: var(--ink-soft); max-width: 46ch; }
.purpose-text strong { color: var(--ink); font-weight: 600; }
.pillars { margin-top: clamp(56px, 8vw, 110px); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.pillar { padding-top: 1.4rem; border-top: 3px solid var(--ink); }
.pillar h3 { margin-bottom: .6rem; }
.pillar p { color: var(--ink-soft); }
.pillar .glyph { width: 46px; height: 46px; margin-bottom: 1.2rem; color: var(--green); }

/* ---------- mappa esplorabile ---------- */
.explore { display: grid; grid-template-columns: 1fr 300px; gap: 1rem; }
.explore-map { position: relative; height: min(72vh, 680px); min-height: 460px; border-radius: var(--radius-l); overflow: hidden; background: #dfe8d6; }
.comune-jump { position: absolute; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: .4rem; z-index: 2; }
.comune-jump button { font-weight: 600; font-size: .82rem; padding: .5rem .85rem; border-radius: 999px; border: 0; background: rgba(255,255,255,.94); color: var(--ink); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.comune-jump button:hover { background: var(--green); color: #fff; }
.settings { background: var(--ui-bg); border-radius: var(--radius-l); padding: 1.3rem; color: var(--ui-text); align-self: start; }
.settings-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }
.settings fieldset { border: 0; margin: 0 0 1.2rem; padding: 0; }
.settings legend { font-size: .78rem; font-weight: 600; color: var(--ui-muted); margin-bottom: .6rem; padding: 0; }
.style-cards { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.style-card { display: grid; gap: .45rem; padding: .5rem; border-radius: 14px; border: 2px solid transparent; background: var(--ui-2); color: var(--ui-text); font-weight: 600; font-size: .85rem; cursor: pointer; text-align: center; }
.style-card[aria-pressed="true"] { border-color: var(--green); }
.thumb { display: block; height: 62px; border-radius: 9px; }
.thumb-wemap { background: radial-gradient(circle at 30% 40%, #f3f6ee 0 18%, transparent 19%), linear-gradient(160deg, #dfe9d3, #b9d3a6 60%, #a7c79a); position: relative; }
.thumb-wemap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 45%, var(--trail) 45% 48%, transparent 48%); border-radius: 9px; }
.thumb-sat { background: radial-gradient(circle at 70% 30%, #6f7a52 0 20%, transparent 21%), linear-gradient(150deg, #2f4a2a, #4a5e35 50%, #6b6a45); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--ui-2); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; color: var(--ui-muted); font-weight: 700; padding: .55rem; border-radius: 9px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--green); color: #fff; }
.switch { display: flex; align-items: center; gap: .65rem; padding: .5rem .2rem; font-size: .9rem; cursor: pointer; position: relative; }
.switch img { width: 22px; height: 22px; }
.switch input { appearance: none; order: 3; margin: 0 0 0 auto; width: 36px; height: 20px; border-radius: 999px; background: #c9d3c4; position: relative; cursor: pointer; transition: background-color .25s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.switch input:focus-visible { outline: 3px solid var(--leaf); outline-offset: 2px; }

.wm-popup .mapboxgl-popup-content { font-family: var(--font); background: var(--ui-bg); color: var(--ui-text); border-radius: 12px; padding: .75rem .9rem; display: grid; gap: .25rem; box-shadow: var(--ui-shadow); }
.wm-popup .mapboxgl-popup-tip { border-top-color: var(--ui-bg); border-bottom-color: var(--ui-bg); }
.wm-popup b { font-size: .92rem; }
.pop-meta { font-size: .78rem; color: var(--ui-muted); }
.pop-status { display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 600; margin-top: .2rem; }
.pop-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--s); }

/* ---------- funzione con mappa a lato ---------- */
.feature { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.feature-copy h2 { max-width: 15ch; margin-bottom: 1.2rem; }
.feature-copy > p { color: var(--ink-soft); max-width: 46ch; }
.mini-steps { list-style: none; counter-reset: s; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.mini-steps li { counter-increment: s; display: grid; grid-template-columns: 2.2rem 1fr; column-gap: .9rem; }
.mini-steps li::before { content: counter(s); grid-row: span 2; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--forest); color: var(--leaf-soft); display: grid; place-items: center; font-weight: 700; }
.mini-steps b { font-weight: 600; }
.mini-steps span { color: var(--ink-soft); font-size: var(--step--1); }
.device-map { position: relative; height: 560px; border-radius: var(--radius-l); overflow: hidden; background: #dfe8d6; box-shadow: 0 40px 80px -40px rgba(15,42,29,.45); }
.offline-sheet { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 1rem 1.1rem; border-radius: 18px; background: var(--ui-bg); color: var(--ui-text); display: grid; gap: .7rem; font-size: .88rem; }
.offline-row { display: flex; justify-content: space-between; gap: 1rem; }
.offline-zoom { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; color: var(--ui-muted); }
.zoom-range { position: relative; height: 6px; border-radius: 6px; background: var(--ui-track); }
.zoom-range i { position: absolute; top: 0; bottom: 0; background: var(--leaf); border-radius: 6px; }
.zoom-range i::after { content: ""; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
#offToggle { display: inline-block; cursor: default; }
.mini-steps.is-auto li { opacity: .45; transition: opacity .4s; }
.mini-steps.is-auto li.is-now { opacity: 1; }
.zoom-val { font-weight: 600; color: var(--ui-text); }
.progress { height: 8px; border-radius: 8px; background: var(--ui-track); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--leaf); transition: width .15s linear; }
.offline-actions { display: flex; align-items: center; gap: .9rem; color: var(--ui-muted); }

/* ---------- registrazione ---------- */
.record { position: relative; height: 100vh; height: 100svh; min-height: 620px; background: var(--paper); color: var(--ink); }
.record-stage { position: relative; height: 100%; overflow: hidden; }
.record-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(238,242,234,.88) 0%, rgba(238,242,234,.4) 32%, rgba(238,242,234,0) 48%), linear-gradient(180deg, rgba(238,242,234,.6), transparent 12%); }
.record-copy { position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%); max-width: 470px; z-index: 2; }
.record-copy h2 { margin-bottom: 1.1rem; }
.record-copy p { color: var(--ink-soft); max-width: 40ch; }
.hud { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(24px, 8vh, 80px); width: min(360px, calc(100% - 2 * var(--gutter))); padding: 1rem 1.1rem; border-radius: var(--radius-m); background: rgba(255,255,255,.92); box-shadow: var(--ui-shadow); }
.hud-head { display: flex; align-items: center; gap: .55rem; font-weight: 700; font-size: .9rem; margin-bottom: .8rem; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ef4444; animation: rec 1.4s infinite; }
@keyframes rec { 50% { opacity: .25; } }
.hud dl { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem .6rem; }
.hud dt { font-size: .72rem; color: var(--ui-muted); }
.hud dd { margin: 0; font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.record-hint { left: 50%; }

.track-facts { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 90px); }
.track-facts h2 { max-width: 12ch; margin-bottom: 1.1rem; }
.track-facts > div > p { color: var(--ink-soft); max-width: 36ch; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
.facts li { padding-top: 1rem; border-top: 2px solid var(--ink); display: grid; gap: .35rem; }
.facts b { font-weight: 600; font-size: var(--step-1); letter-spacing: -0.01em; }
.facts span { color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- editor ---------- */
.editor { display: grid; gap: .8rem; }
.editor-map { position: relative; height: min(62vh, 560px); min-height: 400px; border-radius: var(--radius-l); overflow: hidden; background: #dfe8d6; }
.editor-toast { position: absolute; left: 50%; top: 16px; transform: translate(-50%, -10px); padding: .6rem 1rem; border-radius: 999px; background: var(--ui-bg); color: var(--ui-text); font-size: .88rem; font-weight: 600; opacity: 0; transition: opacity .3s, transform .3s var(--ease); pointer-events: none; white-space: nowrap; z-index: 2; }
.editor-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.editor-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; padding: .55rem; border-radius: 20px; background: var(--ui-bg); }
.editor-tools { pointer-events: none; }
.editor-tools button.is-pressed { background: var(--green); color: #fff; transform: scale(.95); }
.editor-tools button { display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .9rem; border-radius: 14px; border: 0; background: var(--ui-2); color: var(--ui-text); font-weight: 600; font-size: .88rem; cursor: pointer; transition: background-color .2s; }
.editor-tools button:hover:not(:disabled) { background: #dfe8da; }
.editor-tools button:disabled { opacity: .35; }
.editor-tools button.is-pressed:disabled { opacity: 1; }
.editor-tools svg { width: 18px; height: 18px; }
.tool-sep { width: 1px; height: 26px; background: #d4ddd0; margin-inline: .2rem; }
.tool-count { margin-left: auto; color: var(--ui-muted); font-size: .85rem; padding-right: .5rem; font-variant-numeric: tabular-nums; }
.editor-tools .tool-count { font-weight: 700; color: var(--ink); }
.profile-chart { padding: .9rem 1.1rem; border-radius: 20px; background: var(--ui-bg); }
.profile-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--ui-muted); margin-bottom: .4rem; }
.profile-head b { color: var(--ink); }
#edProfile { width: 100%; height: 120px; display: block; }

/* ---------- avatar ---------- */
.avatars { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.avatars h2 { max-width: 13ch; margin-bottom: 1.2rem; }
.avatars > div > p { color: var(--ink-soft); max-width: 42ch; }
.avatar-stage { position: relative; aspect-ratio: 1 / 1; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #ffffff 0, var(--paper-2) 60%); }
.avatar-stage model-viewer { position: relative; z-index: 1; width: 100%; height: 100%; --poster-color: transparent; --progress-bar-color: var(--leaf); }
.avatar-ring { position: absolute; left: 50%; top: 74%; width: 34%; aspect-ratio: 3 / 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(33,150,243,.45), rgba(33,150,243,0) 70%); animation: ring 3s infinite var(--ease); }
@keyframes ring { 0% { transform: translate(-50%, -50%) scale(.6); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.6); opacity: 0; } }
.avatar-picker { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.avatar-picker button { font-weight: 600; font-size: var(--step--1); padding: .7rem 1rem; border-radius: 999px; cursor: pointer; border: 0; background: var(--paper-2); color: var(--ink); transition: background-color .25s, color .25s; }
.avatar-picker button[aria-pressed="true"] { background: var(--forest); color: var(--white); }
.avatar-modes { margin-top: 1.6rem; color: var(--ink-soft); font-size: var(--step--1); }
.avatar-modes b { color: var(--ink); }

/* ---------- richieste ---------- */
.how { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 96px); }
.how-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.how-head h2 { max-width: 15ch; }
.how-head p { max-width: 42ch; color: var(--mist); }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; padding-left: 4.4rem; position: relative; opacity: .35; transition: opacity .5s var(--ease); }
.step.is-active { opacity: 1; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: calc(50% - 6rem); width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.15rem; background: #cfdcc8; color: var(--forest); transition: background-color .4s, color .4s; }
.step.is-active::before { background: var(--green); color: #fff; }
.step h3 { font-size: var(--step-2); margin-bottom: .9rem; }
.step > p { color: var(--mist); max-width: 44ch; }
.kinds { list-style: none; margin: 1.4rem 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.kinds li { display: grid; grid-template-columns: 32px 1fr; column-gap: .7rem; padding: .75rem .85rem; border-radius: 14px; background: #fff; }
.kinds img { width: 32px; height: 32px; grid-row: span 2; image-rendering: auto; }
.kinds b { font-weight: 600; font-size: .95rem; }
.kinds span { font-size: .78rem; color: var(--ui-muted); line-height: 1.35; }
.status-line { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.status-line span { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px; background: #fff; font-size: .85rem; font-weight: 600; }
.status-line span::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--s); }
.status-line span + span { position: relative; margin-left: 1rem; }
.status-line span + span::after { content: ""; position: absolute; left: -1.15rem; top: 50%; width: .9rem; height: 2px; background: rgba(18,36,26,.2); }
.icon-states { margin-top: 1.4rem; display: flex; gap: 1.2rem; }
.icon-states figure { margin: 0; display: grid; justify-items: center; gap: .4rem; font-size: .78rem; color: var(--ui-muted); }
.icon-states img { width: 40px; height: 40px; }
.step-shot { display: none; width: min(220px, 60%); margin-top: 1.4rem; border-radius: 22px; box-shadow: 0 30px 60px -25px rgba(0,0,0,.6); }

/* telefono */
.phone { position: relative; width: min(300px, 70vw); aspect-ratio: 1170 / 2532; border-radius: 46px; padding: 11px; background: #0a0f0c; box-shadow: 0 50px 90px -30px rgba(0,0,0,.6), inset 0 0 0 2px #2b3530; }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; width: 30%; height: 24px; transform: translateX(-50%); background: #000; border-radius: 20px; z-index: 3; }
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: #111; }
.phone .screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#howPhone .screen img { opacity: 0; transform: scale(1.04); transition: opacity .6s var(--ease), transform .8s var(--ease); }
#howPhone .screen img.is-on { opacity: 1; transform: none; }
.phone-glow { position: absolute; width: 70%; height: 60%; border-radius: 50%; background: radial-gradient(circle, rgba(76,175,80,.4), transparent 70%); filter: blur(40px); }
.phone.small { width: min(250px, 60vw); border-radius: 40px; }
.phone.small .screen { border-radius: 31px; }

/* ---------- comuni ---------- */
.comuni-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 1.4rem; align-items: stretch; }
.comuni-map { position: relative; min-height: 440px; border-radius: var(--radius-l); overflow: hidden; background: #dfe8d6; }
.comuni-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.comuni-list button { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.1rem .4rem; border: 0; border-bottom: 2px solid rgba(18,36,26,.12); background: none; cursor: pointer; text-align: left; color: var(--ink); transition: padding .3s var(--ease), border-color .3s; }
.comuni-list button:hover, .comuni-list button.is-on { padding-left: 1rem; border-color: var(--cai); }
.comuni-list b { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; }
.comuni-list span { color: var(--ink-soft); font-size: var(--step--1); }
.comune-pin { font: 700 .82rem/1 var(--font); padding: .5rem .8rem; border-radius: 999px; border: 0; background: var(--green); color: #fff; cursor: pointer; position: relative; box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.comune-pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--green); border-bottom: 0; }
.comune-page { margin-top: clamp(56px, 8vw, 100px); display: grid; grid-template-columns: auto 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.comune-sections { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
.comune-sections li { display: grid; gap: .3rem; padding-left: 1rem; border-left: 3px solid var(--leaf); }
.comune-sections b { font-weight: 600; font-size: var(--step-1); }
.comune-sections span { color: var(--ink-soft); font-size: var(--step--1); }

/* ---------- rendicontazione ---------- */
.report { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.report h2 { max-width: 14ch; margin-bottom: 1.2rem; }
.report > div > p { color: var(--mist); max-width: 44ch; }
.feature-list { list-style: none; padding: 0; margin: 1.8rem 0; display: grid; gap: 1rem; }
.feature-list li { display: grid; grid-template-columns: 28px 1fr; gap: .9rem; align-items: start; }
.feature-list svg { width: 26px; height: 26px; color: var(--green); }
.feature-list b { display: block; font-weight: 600; }
.feature-list span { color: var(--ink-soft); font-size: var(--step--1); }
.feature-list.on-dark svg { color: var(--green); }
.feature-list.on-dark span { color: var(--mist); }
.pdf-stack { position: relative; height: 520px; perspective: 1400px; }
.pdf { position: absolute; width: min(340px, 78%); aspect-ratio: 1 / 1.414; padding: 22px; border-radius: 6px; background: #fff; color: var(--ink); box-shadow: 0 40px 70px -30px rgba(15,42,29,.4); display: grid; align-content: start; gap: 14px; }
.pdf-3 { left: 4%; top: 6%; }
.pdf-2 { left: 22%; top: 2%; }
.pdf-1 { left: 38%; top: 10%; }
.pdf-head { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 2px solid var(--green); }
.pdf-head b { font-size: .95rem; }
.pdf-head span { font-size: .7rem; color: var(--ink-soft); }
.pdf-lines { display: grid; gap: 7px; }
.pdf-lines i { display: block; height: 7px; border-radius: 4px; background: #e3e9df; }
.pdf-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pdf-photos figure { margin: 0; display: grid; gap: 4px; font-size: .68rem; color: var(--ink-soft); }
.ph { display: block; aspect-ratio: 3 / 4; border-radius: 4px; }
.ph-before { background: #6b5a43 url("../assets/photos/albero-caduto.jpg") center / cover; }
.ph-after { background: #6f8a55 url("../assets/photos/sentiero-libero.jpg") center / cover; }
.pdf-map { width: 100%; height: auto; }

/* ---------- WeMap Web ---------- */
.web { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.web h2 { max-width: 14ch; margin-bottom: 1.2rem; }
.web > div > p { color: var(--ink-soft); max-width: 44ch; }
.browser-wrap { perspective: 1800px; }
.browser { border-radius: var(--radius-m); overflow: hidden; background: #fff; box-shadow: 0 60px 120px -40px rgba(15,42,29,.55); transform-origin: 30% 50%; }
.browser-bar { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; background: #e7ede3; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #c9d3c4; }
.browser-bar span { margin-left: .8rem; font-size: .78rem; color: var(--ui-muted); background: #fff; padding: .3rem .9rem; border-radius: 999px; }
/* anteprima fedele al gestionale: stessi colori, raggi e font di sistema di WeMap Web */
.fl-head { margin: 1.6rem 0 -.8rem; font-weight: 700; font-size: var(--step--1); color: var(--forest); }
.gw-roles { display: flex; gap: 4px; width: max-content; margin: 0 0 14px auto; padding: 4px; border-radius: 999px; background: #e3eadf; font-size: .82rem; font-weight: 600; }
.gw-roles span { padding: .4rem .9rem; border-radius: 999px; color: var(--ink-soft); transition: background-color .35s, color .35s; }
.gw-roles span.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.gw { --p: #2E7D32; --line: #E5E5E5; --t1: #171717; --t2: #737373; position: relative; display: grid; grid-template-columns: 158px 1fr; height: 480px; font: 12px/1.4 -apple-system, BlinkMacSystemFont, Roboto, system-ui, sans-serif; color: var(--t1); background: #FAFAFA; text-align: left; }
.gw-side { background: #fff; border-right: 1px solid var(--line); padding: 0 8px 10px; display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
.gw-logo { height: 46px; display: flex; align-items: center; padding-left: 6px; color: var(--p); }
.gw-logo .logo { height: 24px; width: auto; }
.gw-item, .gw-sub a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--t2); font-size: 12px; transition: background-color .25s, color .25s; }
.gw-item svg { width: 16px; height: 16px; flex: none; }
.gw-sub { margin: 1px 0 3px 18px; padding-left: 8px; border-left: 1px solid var(--line); display: grid; gap: 1px; }
.gw-sub a { padding: 5px 8px; font-size: 11.5px; }
.gw-item.is-on, .gw-sub a.is-on { background: rgba(46,125,50,.1); color: #1B5E20; font-weight: 600; }
.gw-group small { display: block; margin: 8px 0 3px 10px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--t2); }
.gw-settings { margin-top: auto; border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; padding-top: 9px; }
.gw[data-role="hiker"] .only-coord, .gw[data-role="coord"] .only-hiker { display: none; }
.gw-main { position: relative; display: grid; grid-template-rows: 46px 1fr; min-width: 0; overflow: hidden; }
.gw-head { display: flex; align-items: center; gap: 10px; padding: 0 14px; background: #fff; border-bottom: 1px solid var(--line); }
.gw-head b { font-size: 14px; font-weight: 600; margin-right: auto; }
.gw-role { padding: 2px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 600; color: var(--rc, #2563EB); background: color-mix(in srgb, var(--rc, #3B82F6) 18%, transparent); border: 1px solid color-mix(in srgb, var(--rc, #3B82F6) 50%, transparent); transition: color .3s, background-color .3s, border-color .3s; }
.gw[data-role="coord"] .gw-role { --rc: #D97706; }
.gw-avatar { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #E8F5E9; color: #1B5E20; font-style: normal; font-weight: 700; font-size: 11px; }
.gw-body { position: relative; overflow: hidden; }
.gw-page { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.gw-page.is-on { opacity: 1; visibility: visible; transition: opacity .35s; }
.gw-pad { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.gw-page[data-page="home"] { background: #dfe8d6; }
.gw-search { position: absolute; z-index: 2; top: 12px; left: 50%; transform: translateX(-50%); width: min(300px, 80%); padding: 8px 12px; border-radius: 12px; background: #fff; color: #A3A3A3; box-shadow: 0 4px 14.86px rgba(0,0,0,.08); }
.gw-pin { position: absolute; z-index: 2; left: 46%; top: 52%; width: 30px; height: 30px; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); }
.gw-fab { position: absolute; z-index: 2; right: 14px; bottom: 16px; padding: 7px 12px; border-radius: 8px; background: var(--p); color: #fff; font-weight: 500; box-shadow: 0 4px 14.86px rgba(0,0,0,.18); }
.gw-sheet { position: absolute; z-index: 3; top: 0; right: 0; bottom: 0; width: min(250px, 72%); padding: 12px 14px; background: #fff; border-left: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.1); display: grid; align-content: start; gap: 8px; transform: translateX(105%); transition: transform .45s var(--ease); }
.gw-sheet.is-on { transform: none; }
.gw-sheet p { margin: 0; }
.gw-sheet-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.gw-x { font-style: normal; font-size: 18px; color: var(--t2); line-height: 1; }
.gw-kind { display: flex; align-items: center; gap: 8px; }
.gw-kind b { display: block; font-size: 12px; font-weight: 600; }
.gw-kind small { color: var(--t2); font-size: 10.5px; }
.gw-tile { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; background: color-mix(in srgb, var(--t, #22C55E) 12%, transparent); flex: none; }
.gw-steps { list-style: none; margin: 4px 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); font-size: 9px; color: var(--t2); text-align: center; }
.gw-steps li { position: relative; display: grid; justify-items: center; gap: 4px; }
.gw-steps li::before { content: ""; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.gw-steps li:first-child::before { display: none; }
.gw-steps i { position: relative; z-index: 1; width: 18px; height: 18px; border-radius: 50%; background: var(--line); }
.gw-steps li.now i { background: #F59E0B; box-shadow: inset 0 0 0 5px #F59E0B, inset 0 0 0 9px #fff; }
.gw-steps li.now { color: var(--t1); font-weight: 600; }
.gw-label { font-weight: 600; font-size: 11.5px; margin-top: 4px !important; }
.gw-kv { display: flex; justify-content: space-between; color: var(--t2); }
.gw-kv b { color: var(--t1); font-weight: 500; }
.gw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gw-h { font-size: 15px; font-weight: 600; }
.gw-btn { display: inline-block; padding: 6px 11px; border-radius: 8px; background: var(--p); color: #fff; font-weight: 500; font-size: 11.5px; white-space: nowrap; transition: transform .15s, filter .2s; }
.gw-btn.is-press { transform: scale(.95); filter: brightness(.9); }
.gw-btn-ghost { background: transparent; color: var(--t1); border: 1px solid var(--line); }
.gw-tabs, .gw-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.gw-tabs span, .gw-chips span { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--t2); font-size: 11px; }
.gw-tabs span.on, .gw-chips span.on { background: #E8F5E9; border-color: #C8E6C9; color: #1B5E20; font-weight: 600; }
.gw-list { display: grid; gap: 8px; }
.gw-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; box-shadow: 0 1px 2.3px rgba(0,0,0,.1); }
.gw-track { display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; align-items: center; }
.gw-track > i { align-self: stretch; border-radius: 4px; background: var(--c); }
.gw-track b { display: block; font-weight: 600; }
.gw-track small { color: var(--t2); font-size: 10.5px; }
.gw-track.is-new { animation: gwIn .6s var(--ease); }
@keyframes gwIn { from { opacity: 0; transform: translateY(-10px); } }
.gw-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; color: var(--t1); border: 1px solid var(--t); background: color-mix(in srgb, var(--t) 10%, transparent); white-space: nowrap; transition: background-color .3s, border-color .3s; }
.gw-stabs { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); font-size: 10.5px; color: var(--t2); text-align: center; }
.gw-stabs span { padding: 4px 2px 7px; border-bottom: 2px solid transparent; }
.gw-stabs span.on { border-color: var(--p); color: var(--t1); font-weight: 600; }
.gw-stabs em { font-style: normal; margin-left: 2px; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--t) 15%, transparent); }
.gw-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gw-req { display: grid; gap: 6px; align-content: start; }
.gw-req p, .gw-appr p { margin: 0; color: var(--t1); }
.gw-req > small { color: var(--t2); font-size: 10.5px; }
.gw-req .gw-pill { justify-self: start; }
.gw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gw-stats small, .gw-chart small { color: var(--t2); font-size: 10.5px; }
.gw-stats b { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gw-chart { display: grid; gap: 10px; }
.gw-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; }
.gw-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: #4CAF50; transform-origin: bottom; transition: transform .8s var(--ease); }
.gw-page:not(.is-on) .gw-bars i { transform: scaleY(0); }
.gw-appr { display: grid; gap: 8px; }
.gw-done { display: grid; gap: 6px; padding: 8px; border-radius: 8px; background: #E8F5E9; }
.gw-photos { display: flex; gap: 6px; }
.gw-photos .ph { width: 54px; aspect-ratio: 1; border-radius: 6px; }
.gw-actions { display: flex; justify-content: flex-end; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.gw-cursor { position: absolute; z-index: 20; left: 0; top: 0; width: 18px; height: 24px; pointer-events: none; opacity: 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 24'%3E%3Cpath d='M1 1v19l5-5 3.5 7 3-1.5L9 13.5h7z' fill='%23171717' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat 0 0 / contain; filter: drop-shadow(0 2px 3px rgba(0,0,0,.3)); transition: translate .8s cubic-bezier(.45,0,.2,1), opacity .3s; }
.gw-cursor.is-on { opacity: 1; }
.gw-cursor::after { content: ""; position: absolute; left: -9px; top: -9px; width: 20px; height: 20px; border-radius: 50%; background: rgba(46,125,50,.35); opacity: 0; }
.gw-cursor.is-click::after { animation: ripple .6s var(--ease); }
.gw-toast { position: absolute; z-index: 15; left: 50%; bottom: 14px; padding: 8px 14px; border-radius: 8px; background: #171717; color: #fff; font-size: 11.5px; transform: translate(-50%, 12px); opacity: 0; transition: opacity .3s, transform .3s var(--ease); white-space: nowrap; }
.gw-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.gw-main .mapboxgl-ctrl-logo { transform: scale(.8); transform-origin: left bottom; }

/* ---------- banda enti ---------- */
.enti-band { background: var(--leaf-soft); padding-block: clamp(44px, 5vw, 72px); }
.enti-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; }
.enti-inner h2 { font-size: var(--step-3); max-width: 16ch; margin-bottom: .9rem; }
.enti-inner p { max-width: 52ch; color: var(--ink); }
.enti-band .btn-primary { background: var(--forest); color: #fff; }

/* ---------- partner ---------- */
.partners-stage { padding-block: clamp(44px, 6vw, 80px); }
.partners-stage .partners { background: #fff; }
.partners { padding: clamp(28px, 4vw, 48px); border-radius: var(--radius-l); background: var(--paper); color: var(--ink); display: grid; grid-template-columns: 1.2fr 2fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.partners p { color: var(--ink-soft); max-width: 44ch; }
.partners h3 { font-size: var(--step-2); margin-bottom: .8rem; }
.partner-logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; align-items: center; }
.partner-logos a { display: grid; place-items: center; gap: .6rem; text-decoration: none; padding: 1.2rem; border-radius: var(--radius-m); background: var(--white); min-height: 150px; text-align: center; transition: transform .3s var(--ease); }
.partner-logos a:hover { transform: translateY(-3px); }
.partner-logos img { max-height: 84px; width: auto; object-fit: contain; }
.partner-logos span { font-size: .78rem; color: var(--ink-soft); }
.netweight { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; color: var(--ink) !important; }

/* ---------- scarica ---------- */
.download { position: relative; overflow: hidden; background: var(--green); color: var(--white); text-align: center; padding-block: clamp(64px, 8vw, 120px); }
.download h2 { font-size: var(--step-4); letter-spacing: -0.04em; max-width: 14ch; margin-inline: auto; line-height: .98; }
.download p { margin: 1.4rem auto 0; max-width: 46ch; color: #e1f3dc; font-size: var(--step-1); }
.download .row { margin-top: 2.4rem; display: flex; justify-content: center; flex-wrap: wrap; gap: .8rem; }
.download .contours { position: absolute; inset: -10%; width: 120%; height: 120%; opacity: .22; pointer-events: none; }
.download > .wrap { position: relative; }
.download .app-icon { width: 92px; height: 92px; border-radius: 22px; margin: 0 auto 2rem; box-shadow: 0 20px 50px -10px rgba(0,0,0,.4); }

footer { background: var(--forest); color: var(--ui-muted); padding-block: 56px 32px; font-size: var(--step--1); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 1fr 1fr; gap: 2rem; }
.foot h4 { color: var(--white); margin: 0 0 .9rem; font-size: .95rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }
.foot .brand { margin-bottom: 1rem; }
.foot-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* Mapbox: attribuzione leggibile anche sulle sezioni scure */
.mapboxgl-ctrl-attrib { font-family: var(--font); }


/* ---------- processo della richiesta ---------- */
.how-stage { position: sticky; top: 10vh; height: 80vh; }
.proc { position: relative; height: 100%; border-radius: var(--radius-l); overflow: hidden; background: #dfe8d6; }
.push { position: absolute; z-index: 3; top: 14px; left: 50%; width: min(360px, calc(100% - 28px)); display: flex; gap: .7rem; align-items: center; padding: .7rem .8rem; border-radius: 16px; background: rgba(250,250,248,.94); color: var(--ink); box-shadow: 0 14px 34px -12px rgba(0,0,0,.45); transform: translate(-50%, -140%); transition: transform .6s var(--ease); font-size: .85rem; }
.push.is-on { transform: translate(-50%, 0); animation: pushout .6s var(--ease) 3.6s forwards; }
@keyframes pushout { to { transform: translate(-50%, -140%); } }
.push img { width: 34px; height: 34px; border-radius: 9px; }
.push b { display: block; font-size: .78rem; }
.req-card { position: absolute; z-index: 2; left: 14px; bottom: 14px; width: min(310px, calc(100% - 28px)); padding: .9rem; border-radius: 18px; background: var(--ui-bg); color: var(--ui-text); display: grid; gap: .8rem; box-shadow: var(--ui-shadow); }
.req-top { display: flex; gap: .7rem; align-items: center; }
.req-top img { width: 36px; height: 36px; transition: transform .4s var(--ease); }
.req-top b { display: block; font-size: .92rem; }
.req-top span { font-size: .76rem; color: var(--ui-muted); }
.req-photos { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.req-photos figure { margin: 0; display: grid; gap: .25rem; font-size: .7rem; color: var(--ui-muted); }
.req-photos .ph { aspect-ratio: 4 / 3; border-radius: 8px; }
.req-photos .after { opacity: .18; transition: opacity .6s; }
.req-photos .after .ph { clip-path: inset(0 100% 0 0); transition: clip-path 1s var(--ease); }
.req-card.has-after .after { opacity: 1; }
.req-card.has-after .after .ph { clip-path: inset(0 0 0 0); }
.req-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.req-steps li { font-size: .62rem; color: #8a998e; padding-top: 8px; position: relative; text-align: center; }
.req-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--ui-track); transition: background-color .5s; }
.req-steps li.is-done::before, .req-steps li.is-now::before { background: var(--s); }
.req-steps li.is-now { color: var(--ink); font-weight: 700; }
.req-actions { display: none; gap: .5rem; }
.req-actions.is-on { display: flex; animation: fadein .5s var(--ease); }
.ra { flex: 1; text-align: center; padding: .5rem; border-radius: 10px; font-size: .8rem; font-weight: 700; color: #fff; }
.ra-ok { background: #2E7D32; animation: tap 2.2s 1.2s var(--ease); }
.ra-no { background: #C62828; }
@keyframes tap { 0%, 100% { transform: none; } 40% { transform: scale(.94); box-shadow: 0 0 0 6px rgba(76,175,80,.35); } }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } }
.phone.tiny { position: absolute; z-index: 2; right: 14px; bottom: 14px; width: 150px; border-radius: 26px; padding: 6px; }
.phone.tiny::before { top: 11px; height: 12px; }
.phone.tiny .screen { border-radius: 21px; }
.phone.tiny .screen img { opacity: 0; transition: opacity .5s; }
.phone.tiny .screen img.is-on { opacity: 1; }

/* ---------- rendicontazione animata ---------- */
.report-visual { display: grid; gap: 1.2rem; }
.report-builder { padding: 1.1rem 1.2rem; border-radius: var(--radius-m); background: var(--ui-bg); color: var(--ui-text); display: grid; gap: .45rem; font-size: .88rem; max-width: 420px; }
.rb-title { font-weight: 700; margin-bottom: .3rem; }
.rb-row { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .7rem; border-radius: 10px; background: var(--ui-2); }
.rb-row span, .rb-label { color: var(--ui-muted); font-size: .78rem; }
.rb-label { margin-top: .4rem; }
.rb-check { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; opacity: .5; transition: opacity .4s; }
.rb-check i { width: 18px; height: 18px; border-radius: 5px; border: 2px solid #b8c4b3; display: grid; place-items: center; transition: background-color .3s, border-color .3s; flex: none; }
.rb-check.is-on { opacity: 1; }
.rb-check.is-on i { background: var(--green); border-color: var(--green); }
.rb-check.is-on i::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.rb-bar { height: 6px; border-radius: 6px; background: var(--ui-track); overflow: hidden; margin-top: .5rem; }
.rb-bar i { display: block; height: 100%; width: 0; background: var(--leaf); transition: width .1s linear; }
.rb-status { font-size: .8rem; color: var(--ui-muted); }
.pdf-stack .pdf { opacity: 0; transform: translateY(60px) scale(.9); transition: opacity .8s var(--ease), transform 1s var(--ease); }
.pdf-stack.is-out .pdf { opacity: 1; transform: none; }
.pdf-stack.is-out .pdf-2 { transition-delay: .15s; }
.pdf-stack.is-out .pdf-1 { transition-delay: .3s; }
.pdf-map circle, .pdf-map text { opacity: 0; transition: opacity .4s; }
.pdf-stack.is-out .pdf-map circle, .pdf-stack.is-out .pdf-map text { opacity: 1; transition-delay: 1.2s; }
.pdf-stack.is-out .pdf-map g circle:nth-of-type(2), .pdf-stack.is-out .pdf-map g text:nth-of-type(2) { transition-delay: 1.5s; }
.pdf-stack.is-out .pdf-map g circle:nth-of-type(3), .pdf-stack.is-out .pdf-map g text:nth-of-type(3) { transition-delay: 1.8s; }
.pdf-map path[stroke="#2563EB"] { stroke-dasharray: 700; stroke-dashoffset: 700; transition: stroke-dashoffset 1.6s var(--ease) .6s; }
.pdf-stack.is-out .pdf-map path[stroke="#2563EB"] { stroke-dashoffset: 0; }

@media (max-width: 900px) {
  .how-stage { position: relative; top: 0; height: 520px; order: -1; grid-row: 2; }
  .how .steps { grid-row: 3; }
  .phone.tiny { display: none; }
}


/* ---------- tour guidato ---------- */
.hero-shade { transition: opacity .8s var(--ease); }
.is-touring .hero-shade { opacity: 0; }
.hero-copy { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.hero-copy.is-hidden { opacity: 0; transform: translateY(-30px); pointer-events: none; }
.tour-ui { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
/* mano che tocca: la punta dell'indice e' nel punto (0,0) dell'elemento */
.finger { position: absolute; z-index: 10; left: 0; top: 0; width: 40px; height: 50px; margin: -3px 0 0 -18px; background: url("../assets/img/hand.svg") no-repeat center / contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)); opacity: 0; transform-origin: 18px 3px; will-change: translate; transition: translate .7s cubic-bezier(.45,0,.2,1), opacity .3s, scale .2s; }
.finger.is-on { opacity: 1; }
.finger::after { content: ""; position: absolute; left: 4px; top: -11px; width: 28px; height: 28px; border-radius: 50%; background: rgba(46,125,50,.35); border: 2px solid rgba(46,125,50,.8); opacity: 0; }
.finger.is-tap { animation: press .38s var(--ease); }
.finger.is-tap::after { animation: ripple .7s var(--ease); }
@keyframes press { 50% { scale: .88; } }
@keyframes ripple { from { opacity: 1; transform: scale(.4); } to { opacity: 0; transform: scale(2.2); } }
.sheet { position: absolute; right: var(--gutter); bottom: 130px; width: min(380px, calc(100% - 32px)); padding: 1rem 1.1rem 1.1rem; border-radius: 22px; background: var(--ui-bg); color: var(--ui-text); box-shadow: var(--ui-shadow); display: grid; gap: .7rem; transform: translateY(30px); opacity: 0; transition: transform .5s var(--ease), opacity .4s; font-size: .9rem; }
.sheet.is-on { transform: none; opacity: 1; }
.sh-grip { width: 38px; height: 4px; border-radius: 4px; background: #c9d3c4; margin: -2px auto 2px; }
.sh-head { display: flex; gap: .75rem; align-items: center; }
.sh-head img { width: 38px; height: 38px; }
.sh-head b { display: block; font-size: 1rem; }
.sh-head small, .sh-sub { color: var(--ui-muted); font-size: .78rem; }
.sh-badge { display: grid; place-items: center; min-width: 46px; height: 32px; padding: 0 .5rem; border-radius: 8px; color: #fff; font-weight: 800; font-size: .82rem; }
.sh-rows { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; font-size: .82rem; padding: .6rem .7rem; border-radius: 12px; background: var(--ui-2); }
.sh-rows span { color: var(--ui-muted); }
.sh-rows b { text-align: right; }
.sh-btn { display: flex; justify-content: center; align-items: center; gap: .5rem; padding: .8rem; border-radius: 14px; border: 0; background: #2E7D32; color: #fff; font: 700 .92rem/1 var(--font); text-decoration: none; transition: transform .15s, filter .15s; pointer-events: auto; }
.sh-btn.ghost { background: var(--ui-2); color: var(--ink); }
.is-pressed { transform: scale(.95); filter: brightness(1.25); }
.sh-title { font-weight: 700; font-size: 1.02rem; }
.sh-label { color: var(--ui-muted); font-size: .76rem; font-weight: 600; margin-top: .2rem; }
.sh-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.sh-chips span { padding: .4rem .7rem; border-radius: 999px; background: var(--ui-2); font-size: .78rem; transition: background-color .25s, color .25s; }
.sh-chips span.is-on { background: #2E7D32; color: #fff; font-weight: 700; }
.sh-chips.static span { background: rgba(46,125,50,.1); color: var(--green); }
.sh-input { min-height: 2.6rem; padding: .6rem .7rem; border-radius: 12px; background: var(--ui-2); font-size: .84rem; }
.sh-input:empty::before { content: "Descrivi il problema (facoltativo)"; color: #8a998e; }
.sh-photo-row { display: flex; gap: .4rem; align-items: center; }
.sh-cam { padding: .55rem .8rem; border-radius: 12px; background: var(--ui-2); font-size: .8rem; font-weight: 600; }
.sh-thumb { width: 52px; height: 40px; border-radius: 8px; margin-left: auto; background: #6b5a43 url("../assets/photos/albero-caduto.jpg") center / cover; opacity: 0; transform: scale(.6); transition: opacity .4s, transform .4s var(--ease); }
.sh-thumb.is-on { opacity: 1; transform: none; }
.sh-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sh-steps li { font-size: .62rem; color: #8a998e; padding-top: 9px; position: relative; text-align: center; line-height: 1.2; }
.sh-steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 4px; background: var(--ui-track); }
.sh-steps li.done::before, .sh-steps li.now::before { background: var(--s); }
.sh-steps li.now { color: var(--ink); font-weight: 700; }
.sh-before-after { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.sh-before-after figure { margin: 0; display: grid; gap: .25rem; font-size: .7rem; color: var(--ui-muted); }
.sh-before-after .ph { aspect-ratio: 4 / 3; border-radius: 8px; }
.sh-wipe { animation: wipe 1.2s var(--ease) .4s both; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.sh-actions { display: flex; gap: .5rem; }
.sh-ok, .sh-no { flex: 1; text-align: center; padding: .7rem; border-radius: 12px; font-weight: 700; color: #fff; transition: transform .15s; }
.sh-ok { background: #2E7D32; }
.sh-no { background: #C62828; }
.sh-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.sh-tools span { text-align: center; padding: .6rem .3rem; border-radius: 12px; background: var(--ui-2); font-size: .78rem; font-weight: 600; transition: transform .15s; }
.sh-count { color: var(--ui-muted); font-size: .8rem; text-align: right; font-variant-numeric: tabular-nums; }
.sh-progress { height: 8px; border-radius: 8px; background: var(--ui-track); overflow: hidden; }
.sh-progress i { display: block; height: 100%; width: 0; background: #4CAF50; }
.sh-final { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.tour-ui .push { top: 84px; left: auto; right: var(--gutter); width: min(380px, calc(100% - 32px)); transform: translateY(-20px); opacity: 0; transition: transform .5s var(--ease), opacity .4s; }
.tour-ui .push.is-on { transform: none; opacity: 1; animation: none; }
.tour-toast { position: absolute; left: 50%; top: 92px; transform: translate(-50%, -12px); padding: .65rem 1.1rem; border-radius: 999px; background: var(--forest); color: #fff; font-weight: 600; font-size: .9rem; opacity: 0; white-space: nowrap; }
.tour-toast.is-on { animation: toast 2.6s var(--ease) forwards; }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -12px); } 12%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -12px); } }
.tour-hud { right: var(--gutter); bottom: auto; top: 84px; opacity: 0; transform: translateY(-10px); transition: opacity .4s, transform .4s var(--ease); }
.tour-hud.is-on { opacity: 1; transform: none; }
.tour-hud dl { grid-template-columns: repeat(4, 1fr); }

/* fascia del passo: niente riquadro, solo testo sulla sfumatura e barra a segmenti */
.tour-panel { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; padding: 1.6rem var(--gutter) 1.8rem; background: linear-gradient(0deg, rgba(238,242,234,.94) 0%, rgba(238,242,234,.94) 72%, rgba(238,242,234,0) 100%); color: var(--ink); pointer-events: none; opacity: 0; transition: opacity .6s var(--ease); }
.tour-panel.is-ready { opacity: 1; }
.tour-panel > * { pointer-events: auto; }
.tour-dots { display: flex; gap: 4px; margin-bottom: .9rem; max-width: 560px; }
.tour-dots button { flex: 1; height: 3px; padding: 0; border: 0; border-radius: 3px; background: rgba(18,36,26,.15); cursor: pointer; position: relative; overflow: hidden; }
.tour-dots button::after { content: ""; position: absolute; inset: 0; background: var(--green); transform-origin: left; transform: scaleX(0); }
.tour-dots button.is-done::after { transform: scaleX(1); }
.tour-dots button[aria-current="step"]::after { transform: scaleX(var(--p, 0)); }
.tour-dots button:hover { background: rgba(18,36,26,.3); }
.tour-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.tour-copy { max-width: 560px; min-width: 0; }
.tour-title { display: flex; align-items: baseline; gap: .7rem; font-size: var(--step-1); letter-spacing: -0.01em; }
.tour-title b { font-weight: 700; }
.tour-title span { font-size: .78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; flex: none; }
.tour-text { margin-top: .3rem; color: var(--ink-soft); font-size: .92rem; line-height: 1.45; }
.tour-ctrl { display: flex; gap: .3rem; flex: none; }
.tour-ctrl button { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.85); color: var(--ink); cursor: pointer; transition: background-color .2s, border-color .2s; }
.tour-ctrl button:hover { background: #fff; }
.tour-ctrl button svg { width: 18px; height: 18px; }
.tour-ctrl .i-play { display: none; }
.tour-ctrl [aria-pressed="true"] .i-play { display: block; }
.tour-ctrl [aria-pressed="true"] .i-pause { display: none; }
/* schermi grandi: fascia del passo piu' leggibile; chi sta sopra segue --panel-h */
@media (min-width: 901px) {
  .tour-panel { padding-block: 1.8rem 2rem; }
  .tour-dots { max-width: 720px; gap: 5px; margin-bottom: 1.1rem; }
  .tour-dots button { height: 4px; }
  .tour-copy { max-width: 720px; }
  .tour-title { font-size: clamp(1.45rem, 1rem + 1vw, 2.1rem); gap: .9rem; }
  .tour-title span { font-size: clamp(.85rem, .7rem + .25vw, 1rem); }
  .tour-text { margin-top: .45rem; font-size: clamp(1rem, .82rem + .38vw, 1.22rem); line-height: 1.5; }
  .tour-ctrl { gap: .45rem; }
  .tour-ctrl button { width: 48px; height: 48px; }
  .tour-ctrl button svg { width: 20px; height: 20px; }
  .sheet { bottom: calc(var(--panel-h, 160px) + 16px); }
}
@media (min-width: 901px) and (max-height: 760px) {
  .tour-panel { padding-block: 1.3rem 1.4rem; }
  .tour-title { font-size: clamp(1.3rem, 1rem + .7vw, 1.7rem); }
  .tour-text { font-size: 1rem; }
}
/* prima schermata: titolo grande, il pannello compare con il secondo passo */
.hero .hero-copy .hero-cta { pointer-events: auto; }
.hero-start { margin-top: 1.4rem; }

@media (max-width: 900px) {
  /* su telefono: notifica in cima, scheda sotto (mai sopra la fascia dei passi), avviso in basso */
  .sheet { right: 12px; left: 12px; width: auto; bottom: auto; top: 160px; max-height: calc(100% - 160px - var(--panel-h, 150px) - 64px); overflow: hidden; padding: .8rem .9rem; gap: .5rem; font-size: .82rem; }
  .sh-chips span { font-size: .72rem; padding: .32rem .6rem; }
  .sh-btn { padding: .65rem; }
  .tour-panel { padding: 1.2rem 16px 1rem; }
  .tour-title { font-size: 1.05rem; }
  .tour-text { font-size: .82rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .tour-ctrl button { width: 36px; height: 36px; }
  .tour-row { gap: .8rem; }
  .tour-ui .push { right: 12px; left: 12px; width: auto; top: 66px; }
  .tour-hud { right: 16px; left: 16px; width: auto; top: 124px; }
  .tour-toast { top: auto; bottom: calc(var(--panel-h, 150px) + 14px); white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 32px); }
  .tour-hud dl { grid-template-columns: repeat(2, 1fr); }
  /* su telefono nel tour bastano distanza e durata: niente dislivello e altitudine */
  .tour-hud dl > div:nth-child(n+3) { display: none; }
  .hero-copy { top: 90px; }
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .route { display: none; }
  .topbar { justify-content: space-between; }
  .topbar .brand { margin-right: auto; }
}
@media (max-width: 900px) {
  .purpose, .how, .feature, .avatars, .web, .report, .partners, .track-facts, .comuni-grid, .comune-page { grid-template-columns: 1fr; }
  .explore { grid-template-columns: 1fr; }
  .pillars, .facts, .comune-sections { grid-template-columns: 1fr; }
  .step { min-height: auto; padding-block: 2.2rem; opacity: 1; padding-left: 4rem; }
  .step::before { top: 2.2rem; }
  .layer-card { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; transform: translateY(20px); padding: .8rem 1rem; }
  .layer-card.is-visible { transform: none; }
  .layer-card ul { grid-template-columns: 1fr 1fr; }
  .layer-card li { font-size: .78rem; padding: .3rem .4rem; }
  .layer-card li i { display: none; }
  .layer-card-caption { display: none; }
  .record-copy { top: 90px; transform: none; }
  .record-shade { background: linear-gradient(180deg, rgba(238,242,234,.95) 0%, rgba(238,242,234,.6) 40%, rgba(238,242,234,0) 65%); }
  .hud dl { grid-template-columns: repeat(3, 1fr); }
  .record-hint { display: none; }
  .pdf-stack { height: 440px; }
  .foot { grid-template-columns: 1fr 1fr; }
  .comune-page .phone { margin-inline: auto; }
}
@media (max-width: 560px) {
  .topbar-link { display: none; }
  .topbar .btn span { display: none; }
  .topbar .btn { padding: .65em; }
  .partner-logos, .kinds { grid-template-columns: 1fr; }
  .gw { grid-template-columns: 1fr; height: 420px; }
  .gw-side { display: none; }
  .gw-stats { grid-template-columns: 1fr 1fr; }
  .gw-grid { grid-template-columns: 1fr; }
  .gw-stabs { font-size: 9px; }
  .gw-roles { margin-inline: auto; }
  .device-map { height: 480px; }
  .editor-tools button { padding: .55rem .7rem; font-size: .8rem; }
  .hud { padding: .8rem; }
  .hud dd { font-size: .95rem; }
  .status-line span + span { margin-left: 0; }
  .status-line span + span::after { display: none; }
  .pdf { width: 70%; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

@media (max-height: 760px) and (min-width: 901px) {
  .hero-copy { top: 90px; }
}

.download .btn-ghost { background: rgba(255,255,255,.16); color: #fff; }
.download .btn-ghost:hover { background: rgba(255,255,255,.26); }

/* ---------- editor animato ---------- */
.editor { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.editor-side h2 { font-size: var(--step-3); max-width: 13ch; margin-bottom: 1.6rem; }
.editor-intro { color: var(--ink-soft); margin-bottom: 1.6rem; }
.ed-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.ed-steps li { position: relative; padding: .55rem 0 .65rem 1rem; display: grid; gap: .15rem; opacity: .45; transition: opacity .4s; }
.ed-steps li::before { content: ""; position: absolute; left: 0; top: .55rem; bottom: .65rem; width: 3px; border-radius: 3px; background: rgba(18,36,26,.14); }
.ed-steps li i { position: absolute; left: 0; top: .55rem; width: 3px; height: calc((100% - 1.2rem) * var(--p, 0)); border-radius: 3px; background: var(--green); }
.ed-steps li.is-done i { height: calc(100% - 1.2rem); }
.ed-steps li.is-now, .ed-steps li.is-done { opacity: 1; }
.ed-steps b { font-weight: 700; }
.ed-steps span { display: none; color: var(--ink-soft); font-size: var(--step--1); }
.ed-steps li.is-now span { display: block; animation: fadein .4s var(--ease); }
.editor-main { display: grid; gap: .8rem; min-width: 0; }
.editor-map { position: relative; height: min(64vh, 580px); min-height: 380px; border-radius: var(--radius-l); overflow: hidden; background: #dfe8d6; }
.editor-map .editor-tools { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; box-shadow: var(--ui-shadow); pointer-events: none; }
.editor-map .finger { z-index: 3; }
.finger.is-hold { scale: .9; }
.finger.is-hold::after { opacity: 1; transform: scale(1); background: rgba(255,152,0,.35); border-color: #FF9800; }
#edProfileBox { transition: box-shadow .4s, transform .4s var(--ease); }
.show-profile #edProfileBox { box-shadow: 0 0 0 3px var(--green); transform: translateY(-4px); }
.editor-tools .tool-count { font-weight: 700; color: var(--ink); }
@media (max-width: 900px) {
  .editor { grid-template-columns: 1fr; }
  .editor-side h2 { max-width: none; }
  .ed-steps { grid-template-columns: repeat(7, 1fr); gap: 4px; }
  .ed-steps li { padding: 10px 0 0; opacity: 1; }
  .ed-steps li::before, .ed-steps li i { top: 0; bottom: auto; left: 0; height: 3px; width: 100%; }
  .ed-steps li i { width: calc(100% * var(--p, 0)); height: 3px; }
  .ed-steps li.is-done i { width: 100%; height: 3px; }
  .ed-steps b { display: none; }
  .ed-steps li.is-now { grid-column: 1 / -1; grid-row: 2; padding-top: .6rem; }
  .ed-steps li.is-now::before, .ed-steps li.is-now i { display: none; }
  .ed-steps li.is-now b { display: block; font-size: var(--step-1); }
  .editor-main { order: 2; }
  .editor-map { height: 62vh; min-height: 340px; }
}
@media (max-width: 560px) {
  .editor-map .editor-tools { left: 8px; right: 8px; bottom: 8px; padding: .4rem; gap: .25rem; flex-wrap: nowrap; }
  .editor-map .editor-tools button { flex: 1; flex-direction: column; gap: .2rem; padding: .45rem .2rem; font-size: .66rem; }
  .editor-map .editor-tools .tool-count { position: absolute; right: 8px; top: -30px; width: auto; padding: .25rem .6rem; border-radius: 999px; background: #fff; font-size: .75rem; box-shadow: var(--ui-shadow); }
}

/* foglio "Esplora comuni" e pagina comunale nel tour */
.sh-list { display: grid; gap: .35rem; }
.sh-item { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 12px; background: var(--ui-2); transition: transform .15s, filter .15s; }
.sh-item .sh-badge { min-width: 34px; height: 28px; font-size: .74rem; }
/* stemma comunale al posto delle iniziali */
.sh-stemma { width: 34px; height: 40px; object-fit: contain; flex: none; }
.sh-item .sh-stemma { width: 30px; height: 34px; }
.sh-item small { margin-left: auto; color: var(--green); font-weight: 700; }
.sh-tabs { display: flex; gap: .3rem; overflow: hidden; }
.sh-tabs span { flex: none; padding: .4rem .7rem; border-radius: 999px; background: var(--ui-2); font-size: .74rem; font-weight: 600; }
.sh-tabs span.is-on { background: #2E7D32; color: #fff; }
.sh-sync { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .8rem; }
.sh-sync li { display: flex; align-items: center; gap: .5rem; color: var(--ui-muted); }
.sh-sync li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #c9d3c4; flex: none; transition: background-color .3s, border-color .3s; }
.sh-sync li.is-on { color: var(--ink); }
.sh-sync li.is-on::before { background: #2E7D32 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8 3 3 5-6' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/12px no-repeat; border-color: #2E7D32; }

/* ---------- community comunali ---------- */
.community { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.community-visual { position: relative; height: min(70vh, 600px); min-height: 440px; border-radius: var(--radius-l); overflow: hidden; background: #dfe8d6; }
.sync-card { position: absolute; z-index: 2; right: 16px; bottom: 16px; width: min(290px, calc(100% - 32px)); padding: 1rem; border-radius: 20px; background: #fff; box-shadow: var(--ui-shadow); display: grid; gap: .8rem; }
.sync-head { display: flex; gap: .7rem; align-items: center; }
.sync-head b { display: block; }
.sync-head small { color: var(--ui-muted); font-size: .78rem; }
.sync-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.sync-list li { display: flex; align-items: center; gap: .6rem; font-size: .86rem; color: var(--ui-muted); position: relative; padding-right: 26px; transition: color .3s; }
.sync-list li img, .sync-list li .sw { width: 22px; height: 22px; opacity: .45; transition: opacity .3s; }
.sync-list li::after { content: ""; position: absolute; right: 0; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #d4ddd0; transition: background-color .3s, border-color .3s; }
.sync-list li.is-on { color: var(--ink); }
.sync-list li.is-on img, .sync-list li.is-on .sw { opacity: 1; }
.sync-list li.is-on::after { background: #2E7D32 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8 3 3 5-6' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/12px no-repeat; border-color: #2E7D32; }
.sync-foot { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--ui-muted); padding-top: .6rem; border-top: 2px solid var(--ui-2); }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9d3c4; }
.sync-card.is-done .sync-dot { background: #4CAF50; box-shadow: 0 0 0 4px rgba(76,175,80,.2); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; }
.benefits li { display: grid; gap: .25rem; padding-left: 1rem; border-left: 3px solid var(--green); }
.benefits b { font-size: var(--step-1); font-weight: 600; letter-spacing: -0.01em; }
.benefits span { color: var(--ink-soft); font-size: var(--step--1); }
.convenzione { margin-top: clamp(32px, 4.5vw, 60px); padding: clamp(22px, 3vw, 36px); border-radius: var(--radius-l); background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.convenzione h3 { font-size: var(--step-2); margin-bottom: .5rem; }
.convenzione p { color: var(--ink-soft); max-width: 60ch; }
@media (max-width: 900px) {
  .community { grid-template-columns: 1fr; }
  .community-visual { height: 520px; }
}

/* CTA sopra la mappa: badge degli store e WeMap Web, sempre visibili */
.hero-cta { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.btn-web { display: inline-flex; align-items: center; gap: .7rem; padding: .6rem 1.1rem .6rem .9rem; border-radius: 14px; background: var(--green); color: #fff; text-decoration: none; transition: transform .25s var(--ease), background-color .25s; }
.btn-web:hover { transform: translateY(-2px); background: #276b2b; }
.btn-web svg { width: 24px; height: 24px; }
.btn-web small { display: block; font-size: .7rem; opacity: .85; line-height: 1.1; }
.btn-web strong { display: block; font-size: 1.05rem; line-height: 1.15; font-weight: 600; }
.hero-cta .store, .hero-cta .btn-web { box-shadow: 0 10px 24px -12px rgba(15,42,29,.45); }
.hero-copy h1, .hero-copy .hero-sub { transition: opacity .5s var(--ease), max-height .7s var(--ease), margin .7s var(--ease); max-height: 22rem; overflow: hidden; }
.hero-copy.is-compact h1, .hero-copy.is-compact .hero-sub { opacity: 0; max-height: 0; margin: 0; }
.hero-copy.is-compact .hero-cta { margin-top: 0; }
.hero-copy.is-compact { top: 80px; }
.hero-copy.is-compact .store, .hero-copy.is-compact .btn-web { padding: .45rem .8rem .45rem .7rem; }
.hero-copy.is-compact .store strong, .hero-copy.is-compact .btn-web strong { font-size: .92rem; }
@media (max-width: 560px) {
  .hero-cta { gap: .4rem; }
  .hero-cta .store, .hero-cta .btn-web { padding: .4rem .65rem .4rem .55rem; gap: .45rem; }
  .hero-cta .store svg, .hero-cta .btn-web svg { width: 20px; height: 20px; }
  .hero-cta strong { font-size: .85rem !important; }
  .hero-cta small { font-size: .6rem; }
  .hero-copy.is-compact { top: 70px; }
}

@keyframes pinIn { from { opacity: 0; transform: translateY(-14px) scale(.8); } }
.sh-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 12px; background: var(--ui-2); font-size: .84rem; animation: fadein .35s var(--ease) both; }
.sh-row img { width: 26px; height: 26px; }
.sh-row .sw { width: 22px; height: 22px; }
.sh-row small { margin-left: auto; display: inline-flex; align-items: center; gap: .35rem; color: var(--ui-muted); font-size: .72rem; font-weight: 600; }
.sh-row small[style]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--s); }
.sh-row:nth-child(2) { animation-delay: .08s; } .sh-row:nth-child(3) { animation-delay: .16s; }
.sh-tabs span { transition: background-color .25s, color .25s, transform .15s; }
.sh-offline { display: flex; gap: .7rem; align-items: center; padding: .7rem; border-radius: 12px; background: #FFF3E0; }
.sh-offline b { display: block; font-size: .88rem; }
.sh-offline small { color: var(--ui-muted); font-size: .76rem; }
.sh-plane { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #FF9800; color: #fff; font-size: 1rem; flex: none; }

/* ---------- chiusura del tour ---------- */
/* la mappa che si piega: pannelli annidati, ognuno ruota attorno al bordo insieme a quelli dopo */
.fold { position: absolute; z-index: 4; perspective: 1500px; perspective-origin: 40% 20%; pointer-events: none; transition: opacity .45s; }
.fold.is-gone { opacity: 0; }
.fold.no-anim *, .fold.no-anim *::after { transition: none !important; }
/* apertura del sito: la carta sta sotto barra e pulsanti, che entrano mentre si apre */
.fold-intro { z-index: 1; }
.hero-shade { z-index: 1; }
.intro-map-hold #tourMap { opacity: 0; }
.topbar, .hero-copy { transition: opacity .7s var(--ease), transform .7s var(--ease), background-color .4s, color .4s; }
.intro-ui-hold .topbar { opacity: 0; transform: translateY(-14px); }
.intro-ui-hold .hero-copy { opacity: 0; transform: translateY(18px); }
.intro-ui-hold .hero-shade { opacity: 0; }
/* apertura del sito: stessa carta, ma piu' svelta */
.fold.is-fast .fold-sheet { transition-duration: .65s; }
.fold.is-fast .fold-tilt { transition-duration: .45s; }
.fold.is-fast .fold-col { transition-duration: .4s; }
.fold.is-fast .fold-row2 { transition-duration: .52s; }
.fold.is-fast .fold-shadow { transition-duration: .4s, .52s; }
.logo-intro.is-fast .logo-big path { animation-duration: 1s, .4s; animation-delay: 0s, .85s; }
.logo-intro.is-fast .logo-big path:nth-child(2) { animation-delay: .12s, .95s; }
.logo-intro.is-fast .logo-big path:nth-child(3) { animation-delay: .22s, 1.02s; }

.fold-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 35%; transition: transform .9s cubic-bezier(.45,0,.25,1); }
.fold-sheet { position: absolute; left: 0; top: 0; transform-origin: 0 0; transform-style: preserve-3d; transition: transform 1.1s cubic-bezier(.55,0,.2,1); }
/* in volo la carta si solleva: ombra piu' larga e morbida */
.fold.is-flying .fold-shadow { box-shadow: 0 60px 90px -30px rgba(15,42,29,.5), 0 18px 30px -12px rgba(15,42,29,.3); }
.fold-shadow { position: absolute; left: 0; top: 0; border-radius: 4px; box-shadow: 0 30px 60px -20px rgba(15,42,29,.55), 0 8px 18px -8px rgba(15,42,29,.35); transform: translateZ(-1px); transition: width .6s cubic-bezier(.55,0,.3,1), height .8s cubic-bezier(.55,0,.3,1), box-shadow .6s; }
.fold-col { position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform-style: preserve-3d; transform-origin: 0 50%; transition: transform .75s cubic-bezier(.5,0,.25,1); }
.fold-col .fold-col:not(.fold-row2) { left: 100%; }
.fold-row2 { top: 100%; transform-origin: 50% 0; transition-duration: .85s; }
.fold-front, .fold-back { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
/* piega della carta: un filo d'ombra sui bordi e la luce che cala mentre il pannello gira */
.fold-front::after, .fold-back::after { content: ""; position: absolute; inset: 0; pointer-events: none; transition: opacity .62s cubic-bezier(.55,0,.3,1); }
/* luce sulle facce: ogni colonna ha i suoi valori (le colonne annidate ripartono dai predefiniti).
   --fs scurisce il fronte mentre gira, --bs il retro, --under e' l'ombra del pannello che arriva sopra */
.fold-col { --fs: 0; --bs: 1; --under: 0; }
.fold-col.is-folded { --fs: 1; --bs: .15; }
.fold-col.is-shaded { --under: 1; }
.fold-front { box-shadow: inset 1px 0 0 rgba(0,0,0,.1), inset -1px 0 0 rgba(255,255,255,.25); }
.fold-front::after { background: linear-gradient(90deg, rgba(10,20,14,.55), rgba(10,20,14,.25)); opacity: var(--fs); }
.fold-front::before { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: linear-gradient(270deg, rgba(10,22,15,.5), rgba(10,22,15,.14) 50%, rgba(10,22,15,0) 85%); opacity: var(--under); transition: opacity .6s .1s; }
.fold-back { background-color: #f1f2ea; transform: rotateY(180deg); }
.fold-back::after { background: linear-gradient(270deg, rgba(0,0,0,.34), rgba(0,0,0,.08)); opacity: var(--bs); }
/* telefono: niente ombre sfumate sui pannelli, le piu' costose da ridisegnare a ogni fotogramma */
.fold.is-lite .fold-front { box-shadow: none; }
.fold.is-lite .fold-shadow { box-shadow: 0 16px 30px -14px rgba(15,42,29,.5); }
/* piega calcolata fotogramma per fotogramma: niente transizioni sulle luci */
.fold.is-live .fold-col, .fold.is-live .fold-front::after, .fold.is-live .fold-back::after, .fold.is-live .fold-front::before, .fold.is-live .fold-shadow { transition: none !important; }
.fold-cover { transform: rotateX(180deg) translateZ(1px); background-color: #dfe8d6; }
/* arrivando dalla carta piegata il logo e' gia' pieno: niente tratto che si disegna */
.from-fold .logo-outro.is-drawing path { animation: none; stroke-dashoffset: 0; fill: var(--green); }
.is-folding .tour-panel, .is-folding .tour-ui, .is-folding .hero-shade { opacity: 0 !important; pointer-events: none !important; transition: opacity .25s !important; }
.from-fold.is-outro .outro-claim { animation-delay: .5s; }
.from-fold.is-outro .outro-cta > :nth-child(1) { animation-delay: .7s; }
.from-fold.is-outro .outro-cta > :nth-child(2) { animation-delay: .8s; }
.from-fold.is-outro .outro-cta > :nth-child(3) { animation-delay: .9s; }
.from-fold.is-outro .outro-replay { animation-delay: 1.2s; }
.from-fold .tour-outro { transition-delay: 0s; }
#tourMap { transition: clip-path 1.3s cubic-bezier(.7,0,.2,1); clip-path: circle(150% at 50% 50%); }
.is-outro #tourMap { clip-path: circle(0% at 50% 50%); }
.is-outro .hero-shade, .is-outro .tour-ui, .is-outro .tour-panel { opacity: 0 !important; pointer-events: none !important; transition: opacity .5s; }
.tour-outro { position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 1.2rem; text-align: center; padding: 90px 16px 110px; opacity: 0; pointer-events: none; transition: opacity .5s .7s; }
.is-outro .tour-outro { opacity: 1; pointer-events: auto; }
.logo-outro { height: min(26vh, 200px); fill: transparent; stroke: var(--green); stroke-width: 3; stroke-linejoin: round; }
.logo-outro path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.logo-outro.is-drawing path { animation: draw 1.5s cubic-bezier(.6,.05,.3,1) .9s forwards, fillin .6s ease 2.25s forwards; }
.logo-outro.is-drawing path:nth-child(2) { animation-delay: 1.15s, 2.4s; }
.logo-outro.is-drawing path:nth-child(3) { animation-delay: 1.35s, 2.5s; }
.outro-claim { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.02em; color: var(--forest); }
.outro-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; margin-top: .4rem; }
.outro-cta .store, .outro-cta .btn-web { padding: .75rem 1.3rem .75rem 1.05rem; border-radius: 16px; box-shadow: 0 14px 30px -14px rgba(15,42,29,.5); }
.outro-cta strong { font-size: 1.15rem !important; }
.outro-claim, .outro-cta > *, .outro-replay, .outro-down { opacity: 0; transform: translateY(16px); }
.is-outro .outro-claim, .is-outro .outro-cta > *, .is-outro .outro-replay, .is-outro .outro-down { animation: rise .7s var(--ease) forwards; }
.is-outro .outro-claim { animation-delay: 2.6s; }
.is-outro .outro-cta > :nth-child(1) { animation-delay: 2.9s; }
.is-outro .outro-cta > :nth-child(2) { animation-delay: 3s; }
.is-outro .outro-cta > :nth-child(3) { animation-delay: 3.1s; }
.is-outro .outro-replay { animation-delay: 3.4s; }
.is-outro .outro-down { animation-delay: 3.6s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.outro-replay { border: 0; background: none; color: var(--ink-soft); font: 600 .9rem/1 var(--font); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: .4rem; }
.outro-replay:hover { color: var(--ink); }
.outro-down { position: absolute; left: 50%; bottom: 24px; margin-left: -60px; width: 120px; display: grid; justify-items: center; gap: .2rem; color: var(--ink); text-decoration: none; font-size: .85rem; font-weight: 600; }
.outro-down svg { width: 30px; height: 30px; color: var(--green); }
.is-outro .outro-down svg { animation: bob 1.8s ease-in-out 4.3s infinite; }
@keyframes bob { 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) {
  .logo-outro path { stroke-dashoffset: 0; fill: var(--green); }
  .outro-claim, .outro-cta > *, .outro-replay, .outro-down { opacity: 1; transform: none; }
}

/* barra bianca sopra la mappa del tour */
.hero-stage::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 120px; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(15,42,29,.42), rgba(15,42,29,0)); transition: opacity .6s; }
.is-outro.hero-stage::before { opacity: 0; }
.topbar.on-map { background: transparent; color: #fff; }
.topbar.on-map .logo { fill: #fff; }
.topbar.on-map .brand:hover .logo path { fill: #fff; opacity: .85; }
.topbar.on-map .route .profile-bg { stroke: #fff; stroke-opacity: .5; }
.topbar.on-map .route .walker { fill: #fff; }
.topbar.on-map .route-stops a, .topbar.on-map .topbar-link { text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.topbar .logo, .topbar .logo path { transition: fill .5s; }

.sh-hero-photo { display: block; aspect-ratio: 16 / 8; border-radius: 12px; }

/* ---------- il progetto: testo che si scrive ---------- */
.manifesto { padding-block: clamp(72px, 9vw, 130px); }
.type { max-width: 30ch; margin-inline: auto; text-align: center; display: grid; gap: 1.6rem; font-size: clamp(1.35rem, 1rem + 1.5vw, 2.25rem); line-height: 1.35; letter-spacing: -0.015em; color: var(--ink-soft); }
.type p + p { font-size: .66em; line-height: 1.55; max-width: 44ch; margin-inline: auto; }
.type strong { color: var(--forest); font-weight: 700; }
.js-type .w { display: inline-block; opacity: 0; transform: translateY(.35em); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js-type.is-on .w { opacity: 1; transform: none; }

/* ---------- richieste: stessa impostazione dell'editor ---------- */
.reqs { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.reqs-side h2 { font-size: var(--step-3); max-width: 14ch; margin-bottom: 1.6rem; }
.reqs-stage { position: relative; height: min(72vh, 640px); min-height: 520px; border-radius: var(--radius-l); overflow: hidden; background: #dfe8d6; }
.req-sheet { position: absolute; z-index: 3; right: 16px; bottom: 16px; width: min(340px, calc(100% - 32px)); padding: 1rem 1.1rem 1.1rem; border-radius: 22px; background: var(--ui-bg); color: var(--ui-text); box-shadow: var(--ui-shadow); display: grid; gap: .7rem; font-size: .9rem; transform: translateY(24px); opacity: 0; transition: transform .45s var(--ease), opacity .35s; }
.req-sheet.is-on { transform: none; opacity: 1; }
.reqs-stage .finger { z-index: 10; }
.req-push { position: absolute; z-index: 4; top: 14px; left: 50%; right: auto; width: min(360px, calc(100% - 28px)); transform: translate(-50%, -20px); opacity: 0; transition: transform .5s var(--ease), opacity .4s; }
.req-push.is-on { transform: translate(-50%, 0); opacity: 1; animation: pushout3 .5s var(--ease) 3.4s forwards; }
@keyframes pushout3 { to { transform: translate(-50%, -20px); opacity: 0; } }
.reqs-stage .editor-toast { z-index: 4; }
.sh-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.sh-kinds span { display: grid; justify-items: center; gap: .3rem; padding: .55rem .2rem; border-radius: 12px; background: var(--ui-2); font-size: .72rem; font-weight: 600; transition: background-color .25s, color .25s, transform .15s; }
.sh-kinds img { width: 28px; height: 28px; }
.sh-kinds span.is-on { background: rgba(46,125,50,.14); color: var(--green); box-shadow: inset 0 0 0 2px var(--green); }
.sh-more { display: grid; gap: .6rem; }
.sh-more:not(:empty) { animation: fadein .4s var(--ease); }
@media (max-width: 900px) {
  .reqs { grid-template-columns: 1fr; }
  .reqs-side h2 { max-width: none; }
  #reqSteps { grid-template-columns: repeat(4, 1fr); }
  .reqs-stage { height: 600px; min-height: 0; }
}
@media (max-width: 560px) {
  .reqs-stage { height: 620px; }
  .req-sheet { left: 10px; right: 10px; bottom: 10px; width: auto; padding: .85rem .9rem; font-size: .84rem; }
  .sh-kinds span { font-size: .66rem; }
}

/* ---------- rendicontazione animata ---------- */
.rep-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: center; min-height: 560px; overflow: visible; }
.rep-builder { padding: 1.1rem 1.2rem; border-radius: 20px; background: #fff; display: grid; gap: .45rem; font-size: .88rem; box-shadow: var(--ui-shadow); transition: transform .6s var(--ease), opacity .6s; }
.rep-builder .sh-btn { margin-top: .5rem; }
.rep-doc { position: relative; display: grid; place-items: center; perspective: 1200px; }
.rep-page { width: min(100%, 360px); aspect-ratio: 1 / 1.414; padding: 22px; border-radius: 6px; background: #fff; box-shadow: 0 30px 60px -28px rgba(15,42,29,.45); display: grid; align-content: start; gap: 12px; color: var(--ink); opacity: 0; transform: translateY(20px) rotateY(-14deg); transform-origin: left center; }
.rep-page:empty { visibility: hidden; }
.rep-page.is-in { animation: pageIn .7s var(--ease) forwards; }
@keyframes pageIn { to { opacity: 1; transform: none; } }
.rep-pages { margin-top: .6rem; font-size: .78rem; color: var(--ink-soft); min-height: 1em; }
.pg-cover { display: grid; gap: .5rem; height: 100%; align-content: center; text-align: center; }
.pg-kicker { font-size: .72rem; color: var(--green); font-weight: 700; }
.pg-title { font-size: 1.5rem; letter-spacing: -0.02em; }
.pg-sub { font-size: .8rem; color: var(--ink-soft); }
.pg-sum { margin: 1.2rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; }
.pg-sum div { padding: .6rem .3rem; border-radius: 8px; background: var(--paper); }
.pg-sum dt { font-size: .62rem; color: var(--ink-soft); }
.pg-sum dd { margin: 0; font-weight: 800; font-size: 1.1rem; }
.pg-foot { margin-top: 1.4rem; font-size: .65rem; color: var(--ink-soft); }
.pg-head { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 2px solid var(--green); }
.pg-head b { font-size: .9rem; }
.pg-head span { font-size: .66rem; color: var(--ink-soft); }
.pg-map { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 520 / 300; background: #e3ebdd; }
.pg-map img { width: 100%; height: 100%; object-fit: cover; clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease); }
.pins-on .pg-map img, .rep-page.is-in .pg-map img { clip-path: inset(0 0 0 0); transition-delay: .3s; }
.pg-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: .74rem; }
.pg-list li { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 6px; background: var(--paper); opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s var(--ease); }
.pg-list li b { width: 18px; height: 18px; border-radius: 50%; background: #4caf50; color: #fff; display: grid; place-items: center; font-size: .66rem; }
.pg-list li span { margin-left: auto; color: var(--ink-soft); }
.pins-on .pg-list li { opacity: 1; transform: none; }
.pins-on .pg-list li:nth-child(2) { transition-delay: .2s; } .pins-on .pg-list li:nth-child(3) { transition-delay: .4s; }
.pg-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pg-photos figure { margin: 0; display: grid; gap: 3px; font-size: .64rem; color: var(--ink-soft); }
.pg-photos .ph { aspect-ratio: 3 / 4; border-radius: 4px; }
.pg-photos.small .ph { aspect-ratio: 4 / 3; }
.rep-page.is-in .pg-photos .ph-after { animation: wipe 1.1s var(--ease) .5s both; }
.pg-lines { display: grid; gap: 6px; }
.pg-lines i { display: block; height: 6px; border-radius: 4px; background: #e3e9df; }
.pg-links { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; }
.pg-link { font-size: .74rem; font-weight: 600; color: #1565C0; text-decoration: underline; padding: .3rem .4rem; border-radius: 6px; transition: background-color .3s, transform .15s; grid-column: 1; }
.pg-link.is-hit { background: rgba(21,101,192,.12); }
.pg-qr { grid-column: 2; grid-row: 1 / span 2; width: 64px; height: 64px; border-radius: 4px; background:
  conic-gradient(from 90deg at 30% 30%, #12241a 25%, transparent 0) 0 0 / 16px 16px,
  repeating-linear-gradient(90deg, #12241a 0 4px, transparent 4px 8px), #fff; opacity: .85; }
.rep-stage .finger { z-index: 10; }
@media (max-width: 900px) {
  #repSteps { grid-template-columns: repeat(5, 1fr); }
  .rep-stage { grid-template-columns: 1fr; min-height: 0; }
  .rep-builder, .rep-doc { grid-area: 1 / 1; }
  .rep-stage.show-doc .rep-builder { opacity: 0; transform: translateY(-20px); pointer-events: none; }
  .rep-stage:not(.show-doc) .rep-doc { opacity: 0; }
  .rep-doc { transition: opacity .5s; }
  .rep-page { width: min(100%, 330px); }
}

/* ---------- avatar in fila ---------- */
.av-carousel { position: relative; padding-bottom: 48px; }
.av-track { list-style: none; margin: 0; padding: 1rem calc(50% - 130px) 2rem; display: flex; gap: 1.2rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.av-track::-webkit-scrollbar { display: none; }
.av-track:focus-visible { outline: none; }
.av-card { flex: 0 0 260px; scroll-snap-align: center; display: grid; justify-items: center; gap: .4rem; border-radius: var(--radius-l); background: #fff; padding: 1rem 1rem 1.2rem; transform: scale(.82); opacity: .55; transition: transform .5s var(--ease), opacity .5s; cursor: pointer; }
.av-card.is-center { transform: none; opacity: 1; }
.av-card model-viewer { width: 100%; height: 260px; --poster-color: transparent; --progress-bar-color: var(--green); background: radial-gradient(circle at 50% 70%, rgba(33,150,243,.18), transparent 45%); pointer-events: none; }
.av-card.is-center model-viewer { pointer-events: auto; }
.av-card span { font-weight: 700; font-size: var(--step-1); }
.av-nav { position: absolute; bottom: -18px; z-index: 2; width: 52px; height: 52px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--ui-shadow); transition: background-color .2s, color .2s; }
.av-nav:hover { background: var(--green); color: #fff; }
.av-nav svg { width: 22px; height: 22px; }
.av-prev { left: calc(50% - 62px); }
.av-next { right: calc(50% - 62px); }
@media (max-width: 560px) {
  .av-track { padding-inline: calc(50% - 110px); }
  .av-card { flex-basis: 220px; }
  .av-card model-viewer { height: 220px; }
}

/* ---------- freccia per scendere alla sezione successiva ---------- */
.next-down { display: grid; justify-items: center; gap: .2rem; width: max-content; margin: clamp(32px, 4vw, 56px) auto 0; color: var(--ink); text-decoration: none; font-size: .85rem; font-weight: 600; }
.next-down svg { width: 30px; height: 30px; color: var(--green); animation: bob 1.8s ease-in-out infinite; }
.next-down:hover svg { color: var(--forest); }

/* ---------- le tue tracce: minimal ---------- */
.tracks-min { text-align: center; }
.tracks-min h2 { max-width: 16ch; margin: 0 auto .9rem; }
.tracks-min > p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto; }
.tracks-grid { list-style: none; margin: clamp(28px, 4vw, 52px) auto 0; padding: 0; max-width: 980px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem 2rem; text-align: left; }
.tracks-grid li { display: grid; grid-template-columns: 40px 1fr; column-gap: .9rem; align-items: start; }
.tracks-grid svg { grid-row: span 2; width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: #fff; color: var(--green); }
.tracks-grid b { font-weight: 600; font-size: 1.02rem; }
.tracks-grid span { color: var(--ink-soft); font-size: var(--step--1); }
@media (max-width: 900px) { .tracks-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tracks-grid { grid-template-columns: 1fr; gap: 1.4rem; } }

.community-list { margin: 0; max-width: none; grid-template-columns: 1fr; gap: 1.5rem; }
.community-list li { align-items: center; }

/* ---------- chi c'e' dietro: senza card ---------- */
.partners-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.partners-text h2 { font-size: var(--step-3); margin-bottom: 1.2rem; }
.partners-text p { color: var(--ink-soft); max-width: 50ch; }
.partners-text p + p { margin-top: 1rem; }
.partners-text b { color: var(--ink); font-weight: 600; }
.partners-logos { display: grid; grid-template-columns: auto auto; justify-content: space-around; align-items: center; gap: clamp(28px, 3.5vw, 48px) clamp(20px, 3vw, 48px); }
/* sopra Trekking Taro Ceno e Net Weight, sotto da solo il logo della Fondazione, che ha finanziato l'app */
.partners-logos a:nth-child(2) { grid-column: 1 / -1; order: 1; justify-self: center; }
.partners-logos a { display: block; transition: transform .3s var(--ease), opacity .3s; }
.partners-logos a:hover { transform: translateY(-3px); }
.partners-logos img { display: block; height: auto; }
.partners-logos a:nth-child(1) img { width: clamp(104px, 9vw, 140px); }
.partners-logos a:nth-child(2) img { width: min(100%, clamp(280px, 30vw, 420px)); }
.partners-text .funding { color: var(--ink); }
.foot .foot-funding { margin-top: .9rem; font-size: .82rem; line-height: 1.45; opacity: .8; max-width: 34ch; }
.partners-logos .nw { display: flex; align-items: center; gap: .8rem; color: #0986C0; text-decoration: none; }
.partners-logos .nw svg { width: clamp(48px, 5vw, 64px); height: auto; flex: none; }
.partners-logos .nw small { display: block; font-size: .8rem; font-weight: 500; color: var(--ink-soft); }
.partners-logos .nw b { display: block; font-size: clamp(1.4rem, 1.05rem + 1vw, 2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
@media (max-width: 1180px) {
  .partners-wrap { grid-template-columns: 1fr; }
  /* sotto il testo: i tre loghi in fila su tutta la larghezza, la Fondazione al centro */
  .partners-logos { grid-template-columns: auto auto auto; justify-content: space-between; padding-top: .5rem; }
  .partners-logos a:nth-child(2) { grid-column: auto; order: 0; }
  .partners-logos a:nth-child(1) img { width: clamp(96px, 13vw, 130px); }
  .partners-logos a:nth-child(2) img { width: clamp(220px, 34vw, 340px); }
}
@media (max-width: 640px) {
  /* telefono: Trekking Taro Ceno e Net Weight sopra, la Fondazione sotto, tutto centrato */
  .partners-logos { grid-template-columns: 1fr 1fr; justify-items: center; gap: 2rem 1rem; padding-top: 1rem; }
  .partners-logos a:nth-child(2) { grid-column: 1 / -1; order: 1; }
  .partners-logos a:nth-child(2) img { width: min(84vw, 330px); }
  .partners-logos a:nth-child(1) img { width: clamp(96px, 27vw, 120px); }
  .partners-logos .nw { gap: .6rem; }
  .partners-logos .nw svg { width: 40px; }
  .partners-logos .nw b { white-space: nowrap; font-size: 1.3rem; }
}

/* PDF di rendicontazione piu' realistico */
.rep-page { gap: 10px; padding: 18px 20px 14px; position: relative; }
.pg-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .56rem; color: var(--ink-soft); padding-bottom: 6px; border-bottom: 1px solid #e3e9df; }
.pg-logo { height: 18px; width: auto; fill: var(--green); }
.pg-bottom { position: absolute; left: 20px; right: 20px; bottom: 10px; display: flex; justify-content: space-between; font-size: .5rem; color: #8a998e; }
.pg-cover { display: grid; gap: .45rem; text-align: left; margin-top: 1.2rem; }
.pg-cover .pg-title { font-size: 1.35rem; }
.pg-table { width: 100%; border-collapse: collapse; font-size: .62rem; margin-top: .6rem; }
.pg-table th { text-align: left; font-weight: 700; color: var(--ink-soft); padding: 4px 4px; border-bottom: 1.5px solid var(--green); }
.pg-table td { padding: 4px 4px; border-bottom: 1px solid #eef2ea; }
.pg-table tr.tot td { font-weight: 800; border-bottom: 0; }
.pg-table td:not(:first-child), .pg-table th:not(:first-child) { white-space: nowrap; }
.pg-list td b { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #4caf50; color: #fff; font-size: .55rem; }
.pg-list tr:not(:first-child) { opacity: 0; transition: opacity .4s; }
.pins-on .pg-list tr { opacity: 1; }
.pins-on .pg-list tr:nth-child(3) { transition-delay: .2s; } .pins-on .pg-list tr:nth-child(4) { transition-delay: .4s; }
.pg-note, .pg-small { font-size: .58rem; color: var(--ink-soft); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .95em; letter-spacing: -0.02em; }
.pg-meta { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: .6rem; }
.pg-meta dt { color: var(--ink-soft); font-size: .52rem; }
.pg-meta dd { margin: 0; font-weight: 600; }
.pg-photos figure figcaption { font-size: .55rem; }
.pg-links .pg-link { font-size: .6rem; word-break: break-all; }

/* ---------- link alle pagine dedicate ---------- */
.more { margin-top: clamp(28px, 4vw, 48px); }
.more-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; color: var(--green); text-decoration: none; }
.more-link svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.more-link:hover { color: var(--forest); }
.more-link:hover svg { transform: translateX(3px); }
.manifesto .more, .tracks-min .more { text-align: center; }
/* intestazione delle pagine dedicate */
.page-intro { padding: clamp(120px, 14vw, 170px) 0 clamp(16px, 3vw, 32px); }
.crumbs { display: flex; gap: .5rem; font-size: .85rem; color: var(--ink-soft); margin-bottom: 1.2rem; }
.crumbs a { color: var(--green); text-decoration: none; font-weight: 600; }
.page-intro h1 { font-size: var(--step-4); letter-spacing: -0.04em; line-height: .98; max-width: 14ch; color: var(--forest); font-variation-settings: "wdth" 88; }
.lead-seo { margin-top: 1.3rem; font-size: var(--step-1); color: var(--ink-soft); max-width: 52ch; }
.page-sub .stage:first-of-type { padding-top: clamp(40px, 6vw, 80px); }
.other-pages h2 { font-size: var(--step-2); margin-bottom: 1.2rem; }
.page-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.page-links a { display: inline-block; padding: .7rem 1.1rem; border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .92rem; transition: background-color .2s, color .2s; }
.page-links a:hover { background: var(--green); color: #fff; }
.page-sub .topbar { background: rgba(238, 242, 234, .9); }

/* ancoraggi delle sezioni: il titolo non finisce sotto la barra */
.anchor { display: block; height: 0; scroll-margin-top: 70px; }

.hero-copy .hero-sub { margin-top: 0; font-size: clamp(1.35rem, 1rem + 1.4vw, 2.1rem); line-height: 1.3; max-width: 26ch; color: var(--forest); font-weight: 600; letter-spacing: -0.015em; }

.hero-go .hero-copy:not(.is-compact) .hero-sub { animation: rise .9s var(--ease) var(--hero-delay, 2.7s) both; }
.reduced .hero-copy .hero-sub, .logo-done-fast .hero-copy .hero-sub { animation: none; }

/* apertura: solo i pulsanti, in basso sopra i testi dei passaggi */
.hero-copy { top: auto; bottom: 150px; }
.hero-copy .hero-cta { margin-top: 0; gap: .8rem; }
.hero-copy .store, .hero-copy .btn-web { padding: .95rem 1.6rem .95rem 1.25rem; border-radius: 18px; gap: .85rem; box-shadow: 0 18px 36px -14px rgba(15,42,29,.55); }
.hero-copy .store svg, .hero-copy .btn-web svg { width: 32px; height: 32px; }
.hero-copy .store small, .hero-copy .btn-web small { font-size: .8rem; }
.hero-copy .store strong, .hero-copy .btn-web strong { font-size: 1.35rem; }
.hero-copy.is-hidden { transform: translateY(20px); }
@media (max-height: 760px) and (min-width: 901px) { .hero-copy { top: auto; bottom: 140px; } }
@media (max-width: 900px) {
  .hero-copy { top: auto; bottom: 150px; left: 16px; right: 16px; }
  .hero-copy .hero-cta { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-copy .btn-web { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 560px) {
  .hero-copy .store, .hero-copy .btn-web { padding: .7rem .9rem; }
  .hero-copy .store strong, .hero-copy .btn-web strong { font-size: 1.05rem !important; }
  .hero-copy .store svg, .hero-copy .btn-web svg { width: 24px; height: 24px; }
}

/* cerchio azzurro della posizione (anche sotto l'avatar) */
.map-pulse { width: 18px; height: 18px; border-radius: 50%; pointer-events: none; }
.map-pulse::before, .map-pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(33,150,243,.35); animation: mapPulse 2.4s ease-out infinite; }
.map-pulse::after { animation-delay: 1.2s; }
.map-pulse.is-off { display: none; }
@keyframes mapPulse { from { transform: scale(1); opacity: .9; } to { transform: scale(4.5); opacity: 0; } }

/* frecce per scendere: piu' grandi e leggibili */
.outro-down, .next-down { font-size: 1.15rem; font-weight: 700; gap: .3rem; }
.outro-down { width: 200px; margin-left: -100px; bottom: 20px; }
.outro-down svg, .next-down svg { width: 44px; height: 44px; stroke-width: 2.6; }


/* ---------- banner dei cookie ---------- */
.cookie-banner { position: fixed; z-index: 120; left: 16px; right: 16px; bottom: 16px; margin-inline: auto; width: min(560px, calc(100% - 32px)); padding: 1.2rem 1.3rem 1.1rem; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 30px 70px -20px rgba(15,42,29,.45); display: grid; gap: .8rem; transform: translateY(24px); opacity: 0; transition: transform .45s var(--ease), opacity .35s; }
.cookie-banner.is-on { transform: none; opacity: 1; }
/* su schermi larghi in alto a sinistra, sotto la barra: e' la zona della mappa senza animazioni */
@media (min-width: 901px) {
  .cookie-banner { left: var(--gutter); right: auto; top: 76px; bottom: auto; margin: 0; width: min(420px, calc(100% - 32px)); padding: 1rem 1.1rem .95rem; gap: .65rem; transform: translateY(-16px); }
  .cookie-banner.is-out { transform: translateY(-16px); }
  .cookie-banner .cookie-text { font-size: .84rem; }
  .cookie-banner .cookie-btn { padding: .7rem .5rem; font-size: .86rem; }
}
.cookie-banner.is-out { transform: translateY(24px); opacity: 0; }
.cookie-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--ui-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.cookie-x svg { width: 18px; height: 18px; }
.cookie-title { font-weight: 700; font-size: 1.1rem; padding-right: 2.5rem; }
.cookie-text { font-size: .9rem; color: var(--ink-soft); line-height: 1.5; }
.cookie-text a { color: var(--green); font-weight: 600; }
.cookie-prefs { display: grid; gap: .5rem; }
.cookie-prefs[hidden] { display: none; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border-radius: 12px; background: var(--ui-2); cursor: pointer; }
.cookie-row b { display: block; font-size: .92rem; }
.cookie-row small { display: block; font-size: .78rem; color: var(--ink-soft); }
.cookie-row input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.cookie-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
/* stessa evidenza per Rifiuta e Accetta */
.cookie-btn { padding: .8rem .6rem; border-radius: 999px; border: 2px solid var(--green); background: #fff; color: var(--green); font: 700 .92rem/1 var(--font); cursor: pointer; transition: background-color .2s, color .2s; }
.cookie-btn:hover { background: var(--green); color: #fff; }
@media (max-width: 480px) { .cookie-actions { grid-template-columns: 1fr 1fr; } .cookie-btn[data-c="prefs"] { grid-column: 1 / -1; order: 3; } }

/* ---------- pagine legali ---------- */
.legal { padding: clamp(110px, 13vw, 150px) 0 clamp(56px, 7vw, 100px); }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: var(--step-3); letter-spacing: -0.03em; margin-bottom: .6rem; color: var(--forest); }
.legal .updated { color: var(--ink-soft); font-size: .9rem; margin-bottom: 2rem; }
.legal h2 { font-size: var(--step-1); margin: 2.2rem 0 .7rem; }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.65; }
.legal p + p { margin-top: .8rem; }
.legal ul { padding-left: 1.2rem; margin: .6rem 0; display: grid; gap: .35rem; }
.legal b, .legal strong { color: var(--ink); }
.legal a { color: var(--green); font-weight: 600; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .9rem; }
.legal th, .legal td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid #dfe7da; vertical-align: top; }
.legal th { color: var(--ink); }
.legal .todo { background: #fff3cd; color: #6b5100; padding: 0 .3rem; border-radius: 4px; }
.legal .btn-prefs { margin-top: 1rem; }
@media (max-width: 600px) { .legal table, .legal thead, .legal tbody, .legal tr, .legal td, .legal th { display: block; } .legal thead { display: none; } .legal td { border: 0; padding: .2rem 0; } .legal tr { padding: .7rem 0; border-bottom: 1px solid #dfe7da; } }
.enti-kicker { font-weight: 600; font-size: var(--step--1); color: var(--green); margin-bottom: .5rem; }
.enti-inner h2 { max-width: 18ch; }

/* footer su telefono: compatto */
@media (max-width: 700px) {
  footer { padding-block: 40px 28px; }
  .foot { grid-template-columns: 1fr 1fr; gap: 1.8rem 1rem; }
  .foot > div:first-child, .foot .foot-pages { grid-column: 1 / -1; }
  .foot .foot-pages { order: 4; }
  .foot > div:last-child { order: 5; }
  .foot > div:first-child p { max-width: 32ch; }
  .foot .foot-pages ul { grid-template-columns: 1fr 1fr; column-gap: 1rem; }
  .foot > div:last-child { grid-column: 1 / -1; }
  .foot > div:last-child ul { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
  .foot h4 { margin-bottom: .6rem; }
  .foot-bottom { margin-top: 32px; flex-direction: column; gap: .4rem; font-size: .78rem; }
}

.hero-copy, .hero-copy.is-compact { top: auto; bottom: calc(var(--panel-h, 140px) + 14px); }
@media (max-height: 760px) and (min-width: 901px) { .hero-copy { bottom: calc(var(--panel-h, 140px) + 12px); } }
@media (max-width: 900px) { .hero-copy { bottom: calc(var(--panel-h, 150px) + 12px); } }


/* su telefono niente pulsante WeMap Web nella barra */
@media (max-width: 700px) { .topbar > .btn { display: none; } }

/* niente barra di caricamento sopra gli avatar */
model-viewer { --progress-bar-height: 0px; --progress-bar-color: transparent; }

/* testi legali dell'app (vecchi indirizzi /home/...) */
.legal h3 { font-size: var(--step-0); margin: 1.6rem 0 .5rem; color: var(--ink); }
.legal .doc-title { font-size: var(--step-2); letter-spacing: -0.02em; margin-top: 3rem; padding-top: 1.5rem; color: var(--forest); }
.legal section { scroll-margin-top: 90px; }
.legal .doc-index { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin-top: 1.2rem; }
.legal em { color: var(--ink-soft); }
.legal h4 { font-size: var(--step-0); font-weight: 600; margin: 1.1rem 0 .4rem; color: var(--ink); }
