/* TecnoReport – sito di presentazione */
:root {
  --red: #c8102e;
  --red-2: #e0283f;
  --wine: #7d091e;
  --ink: #1d2025;
  --ink-2: #4a505a;
  --muted: #6b7280;
  --line: #e7e3df;
  --bg: #fbfaf8;
  --soft: #f3f0ec;
  --dark: #121417;
  --dark-2: #1b1e23;
  --radius: 22px;
  --shadow: 0 30px 60px -30px rgba(29, 32, 37, .35), 0 8px 20px -12px rgba(29, 32, 37, .18);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 400 17px/1.65 Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: Sora, Inter, sans-serif; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; color: var(--ink-2); }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.section { padding: clamp(72px, 10vw, 130px) 0; position: relative; }
.soft { background: var(--soft); }
.dark { background: var(--dark); color: #eef0f3; }
.dark p, .dark small { color: #a9b0bb; }
.eyebrow {
  display: inline-block; font: 600 .78rem/1 Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 1.1em; padding: .55em .9em; border-radius: 99px; background: rgba(200, 16, 46, .08);
}
.dark .eyebrow { color: #ff6b7f; background: rgba(255, 80, 100, .12); }
.head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.sub { font-size: 1.08rem; }
.grad { background: linear-gradient(100deg, var(--red-2), var(--wine)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; padding: 15px 26px; border-radius: 14px; border: 0; cursor: pointer;
  font: 600 1rem Inter, sans-serif; text-decoration: none; color: #fff;
  background: linear-gradient(135deg, var(--red-2), var(--wine));
  box-shadow: 0 14px 30px -12px rgba(200, 16, 46, .7), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 20px 36px -12px rgba(200, 16, 46, .8), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-sm { padding: 10px 18px; font-size: .92rem; border-radius: 12px; }
:focus-visible { outline: 3px solid var(--red-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- barra di avanzamento + nav ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--red-2), var(--wine)); }
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s, backdrop-filter .3s; }
.nav.scrolled { background: rgba(251, 250, 248, .82); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.35rem Sora, sans-serif; letter-spacing: -.02em; color: var(--ink); }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand b { color: var(--red); font-weight: 700; }
.menu { display: flex; align-items: center; gap: 4px; }
.menu a { white-space: nowrap; }
.menu a:not(.btn) { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--ink-2); position: relative; }
.menu a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--red); transform: scaleX(0); transition: transform .3s var(--ease); }
.menu a:not(.btn):hover { color: var(--ink); }
.menu a:not(.btn):hover::after { transform: scaleX(1); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 10px; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: transform .3s, opacity .3s; }

/* ---------- hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 110px 0 70px; position: relative; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 78% 40%, rgba(224, 40, 63, .16), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(125, 9, 30, .08), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(29, 32, 37, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(29, 32, 37, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 75%);
}
.hero-in { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.lead { font-size: 1.15rem; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 34px; }
.hero-chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-chips li { padding: 8px 14px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: .9rem; font-weight: 500; }
.hero-3d { position: relative; aspect-ratio: 1 / 1.02; width: 100%; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-fallback { position: absolute; inset: 15%; width: 70%; height: 70%; object-fit: contain; opacity: 0; transition: opacity .6s; animation: bob 6s ease-in-out infinite; }
.no-webgl .hero-fallback { opacity: 1; }
.float-card {
  position: absolute; z-index: 2; padding: 10px 16px; border-radius: 14px; font-size: .88rem; font-weight: 500; white-space: nowrap;
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .7);
  animation: bob 6s ease-in-out infinite;
}
.float-card b { color: var(--red); }
.fc1 { top: 9%; left: -2%; }
.fc2 { bottom: 16%; right: -2%; animation-delay: -2s; }
.fc3 { bottom: 4%; left: 8%; animation-delay: -4s; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.dot.ok { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); }
@keyframes bob { 50% { transform: translateY(-12px); } }
.scroll-hint { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; border-radius: 14px; box-shadow: inset 0 0 0 2px var(--ink-2); transform: translateX(-50%); }
.scroll-hint span { position: absolute; left: 50%; top: 9px; width: 4px; height: 8px; border-radius: 2px; background: var(--red); transform: translateX(-50%); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translate(-50%, 0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 14px); } }

/* ---------- strip ---------- */
.strip { background: linear-gradient(90deg, var(--wine), var(--red)); color: #fff; overflow: hidden; padding: 18px 0; transform: rotate(-1.2deg); margin: 0 -10px; }
.strip-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.strip span { font: 600 1.05rem Sora, sans-serif; padding: 0 28px; white-space: nowrap; }
.strip span::before { content: "✦"; margin-right: 28px; opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- prima/dopo ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare .col { padding: 28px; border-radius: var(--radius); }
.compare ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: .95rem; }
.compare li { padding-left: 28px; position: relative; }
.before { background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.before h3 { color: var(--muted); }
.before li { color: var(--muted); }
.before li::before { content: "✕"; position: absolute; left: 0; color: #b8b2ab; font-weight: 700; }
.after { background: linear-gradient(160deg, #fff, #fff4f5); box-shadow: var(--shadow), inset 0 0 0 1px rgba(200, 16, 46, .18); transform: translateY(-14px); }
.after h3 { color: var(--red); }
.after li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 800; }

/* ---------- step ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; position: relative; }
.steps::before { content: ""; position: absolute; top: 46px; left: 8%; right: 8%; height: 2px; background: linear-gradient(90deg, transparent, rgba(255, 90, 110, .5), transparent); }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--dark-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .4s var(--ease), box-shadow .4s; }
.step:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .35), 0 30px 60px -30px rgba(200, 16, 46, .6); }
.step-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--red-2), var(--wine)); box-shadow: 0 14px 30px -10px rgba(224, 40, 63, .7); margin-bottom: 22px; position: relative; z-index: 1; }
.step-ico svg { width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.step-ico.sign svg { width: 46px; stroke-width: 5; }
.num { position: absolute; top: 22px; right: 24px; font: 800 2.4rem Sora, sans-serif; color: rgba(255, 255, 255, .07); }

/* firme che si disegnano */
.sig { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 600; stroke-dashoffset: 600; }
.in .sig, .sig.in { animation: draw 2.4s var(--ease) .3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- documento 3D ---------- */
.doc-stage { perspective: 1600px; display: grid; place-items: center; min-height: 520px; }
.doc-stack { position: relative; width: min(420px, 100%); aspect-ratio: 1 / 1.3; transform-style: preserve-3d; transform: rotateX(18deg) rotateY(-22deg) rotateZ(4deg); transition: transform .8s var(--ease); }
.paper { position: absolute; inset: 0; border-radius: 10px; background: #fff; box-shadow: 0 1px 0 var(--line), 0 40px 70px -30px rgba(29, 32, 37, .45); }
.p3 { transform: translateZ(-60px) translate(26px, 26px); background: #efe9e4; }
.p2 { transform: translateZ(-30px) translate(13px, 13px); background: #f7f3ef; }
.p1 { padding: 22px; display: flex; flex-direction: column; gap: 14px; font-size: 11px; line-height: 1.3; }
.doc-head { display: grid; grid-template-columns: 38px 46px 1fr 80px; gap: 10px; align-items: center; padding-bottom: 12px; border-bottom: 3px solid var(--red); }
.doc-head img { width: 38px; }
.doc-head b { display: block; font: 700 11px Sora, sans-serif; color: var(--wine); }
.doc-head small { color: var(--muted); }
/* Riquadro «Portale cliente» con il QR tra logo e titolo, come nel PDF vero */
.doc-qr { display: grid; justify-items: center; gap: 2px; padding: 3px; border: 1.5px solid var(--red); border-radius: 5px; }
.doc-head .doc-qr small { font: 700 4.5px/1 Inter, sans-serif; letter-spacing: .06em; color: var(--red); white-space: nowrap; }
.doc-qr svg { width: 36px; height: 36px; }
.doc-qr path { fill: var(--ink); }
.barcode { width: 100%; height: 34px; }
.barcode rect { fill: var(--ink); }
.doc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.doc-grid div { padding: 8px; border-radius: 6px; background: var(--soft); }
.doc-grid small, .doc-sign small { display: block; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.doc-lines { display: grid; gap: 8px; padding: 6px 0; }
.doc-lines i { height: 7px; border-radius: 4px; background: #ece7e2; }
.doc-lines i.s { width: 60%; }
.doc-tot { display: flex; justify-content: space-between; gap: 8px; padding: 10px; border-radius: 8px; background: #fff4f5; color: var(--wine); }
.doc-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.doc-photos small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.doc-photos i { aspect-ratio: 4 / 3; border-radius: 6px; background: linear-gradient(135deg, #3a3f47, #6b7280 55%, #c8102e 140%); }
.doc-photos i:nth-of-type(2) { background: linear-gradient(160deg, #e6dcd4, #9aa1ab); }
.doc-photos i:nth-of-type(3) { background: linear-gradient(120deg, #1d2025, #7d091e); }
.doc-sign { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc-sign div { border-top: 1px dashed #cfc8c1; padding-top: 6px; }
.doc-sign svg { height: 40px; width: 100%; }
.doc-sign .sig { stroke: #1f3b8a; stroke-width: 2; }
.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 14px; }
.ticks li { padding-left: 36px; position: relative; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 7px; background: rgba(200, 16, 46, .1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23c8102e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.ticks b { color: var(--ink); }
.ticks.light li { color: #b8bec8; }
.ticks.light b { color: #fff; }
.ticks.light li::before { background-color: rgba(255, 90, 110, .16); }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  position: relative; padding: 26px; border-radius: var(--radius); background: #fff; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .4s var(--ease);
  transform-style: preserve-3d;
}
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s; background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(224, 40, 63, .12), transparent 60%); }
.card:hover { box-shadow: inset 0 0 0 1px rgba(200, 16, 46, .25), var(--shadow); }
.card:hover::before { opacity: 1; }
.card p { font-size: .95rem; margin: 0; }
.card.big { grid-column: span 2; grid-row: span 2; background: linear-gradient(160deg, #fff, #fff1f3); display: flex; flex-direction: column; }
.card.big h3 { font-size: 1.6rem; }
.ico { width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 15px; background: var(--soft); margin-bottom: 18px; transform: translateZ(30px); }
.sig-pad { margin-top: auto; padding-top: 24px; position: relative; }
.sig-pad svg { height: 120px; width: 100%; background: #fff; border-radius: 16px; box-shadow: inset 0 0 0 1.5px #e9d6d9; }
.sig-pad .sig { stroke: #1f3b8a; stroke-width: 3.2; stroke-dasharray: 1000; stroke-dashoffset: 1000; }
.sig-pad span { position: absolute; right: 16px; bottom: 10px; font-size: .75rem; color: var(--muted); }

/* ---------- monte ore ---------- */
.hours { position: relative; display: grid; place-items: center; min-height: 460px; padding-bottom: 90px; perspective: 1200px; }
.ring-card { width: min(360px, 100%); padding: 34px; border-radius: 28px; background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); position: relative; text-align: center; transform-style: preserve-3d; }
.ring { width: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 16; }
.ring .track { stroke: var(--soft); }
.ring .bar { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 527.8; stroke-dashoffset: 527.8; transition: stroke-dashoffset 2s var(--ease); }
.ring-txt { position: absolute; left: 0; right: 0; top: 34px; aspect-ratio: 1; display: grid; place-content: center; transform: translateZ(40px); }
.ring-txt b { font: 800 2.8rem Sora, sans-serif; }
.ring-txt small { color: var(--muted); }
.ring-meta { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 18px; font-size: .9rem; color: var(--muted); }
.badge { padding: 4px 10px; border-radius: 99px; font-weight: 600; font-size: .8rem; }
.badge.ok { background: #dcfce7; color: #166534; }
.alert-card { position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); box-shadow: var(--shadow), inset 0 0 0 1px #f5c9cf; animation: bob 7s ease-in-out infinite; }
.alert-card small { display: block; color: var(--muted); font-size: .82rem; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 0 0 rgba(245, 158, 11, .6); animation: pulse 1.8s infinite; flex: none; }
@keyframes pulse { to { box-shadow: 0 0 0 14px rgba(245, 158, 11, 0); } }
.mini-btn { padding: 7px 12px; border-radius: 10px; background: var(--red); color: #fff; font-size: .8rem; font-weight: 600; }

/* ---------- statistiche ---------- */
.split.rev > :first-child { order: 0; }
.chart-card { padding: 30px; border-radius: 26px; background: linear-gradient(160deg, #1f2329, #16181c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 0 40px 80px -40px rgba(224, 40, 63, .5); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
.kpis div { padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); }
.kpis small { display: block; font-size: .78rem; }
.kpis b { font: 700 1.6rem Sora, sans-serif; color: #fff; }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; height: 220px; align-items: end; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.bars div { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.bars div::before, .bars div::after { content: ""; display: block; border-radius: 6px; transform-origin: bottom; transform: scaleY(0); transition: transform 1.2s var(--ease); }
.bars div::before { height: calc(var(--h) - var(--c)); background: linear-gradient(var(--red-2), var(--wine)); border-radius: 6px 6px 0 0; }
.bars div::after { height: var(--c); background: #f4b6bf; border-radius: 0 0 2px 2px; }
.bars.in div::before, .bars.in div::after { transform: scaleY(1); }
.bars div:nth-child(2)::before, .bars div:nth-child(2)::after { transition-delay: .08s; }
.bars div:nth-child(3)::before, .bars div:nth-child(3)::after { transition-delay: .16s; }
.bars div:nth-child(4)::before, .bars div:nth-child(4)::after { transition-delay: .24s; }
.bars div:nth-child(5)::before, .bars div:nth-child(5)::after { transition-delay: .32s; }
.bars div:nth-child(6)::before, .bars div:nth-child(6)::after { transition-delay: .4s; }
.bars span { position: absolute; bottom: -28px; left: 0; right: 0; text-align: center; font-size: .78rem; color: #8a919c; }
.legend { display: flex; gap: 20px; margin-top: 42px; font-size: .82rem; color: #a9b0bb; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.legend .l1::before { background: var(--red-2); }
.legend .l2::before { background: #f4b6bf; }

/* ---------- barcode ---------- */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.feature-xl { display: grid; grid-template-rows: 420px auto; align-items: center; gap: 28px; padding: 36px; border-radius: 28px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); perspective: 1200px; }
.feature-xl h3 { font-size: 1.5rem; }
.duo.solo { grid-template-columns: 1fr; }
.duo.solo .feature-xl { grid-template-columns: 1fr 1fr; grid-template-rows: auto; min-height: 420px; gap: 48px; }
.feature-xl > div:first-child, .feature-xl > .phone, .feature-xl > .scanner { justify-self: center; }
.phone { width: 220px; height: 400px; padding: 12px; border-radius: 36px; background: #1d2025; box-shadow: var(--shadow), inset 0 0 0 2px #3a3f47; position: relative; transform: rotateY(-14deg) rotateX(8deg); transform-style: preserve-3d; }
.phone-notch { position: absolute; top: 18px; left: 50%; width: 70px; height: 18px; border-radius: 10px; background: #000; transform: translateX(-50%); z-index: 2; }
.phone-screen { height: 100%; border-radius: 26px; background: var(--bg); padding: 42px 14px 14px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; font-size: 11px; }
.ph-top { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; }
.ph-top img { width: 20px; }
.off { margin-left: auto; padding: 2px 8px; border-radius: 99px; background: #fef3c7; color: #92400e; font-style: normal; font-size: 10px; }
.ph-field { padding: 8px 10px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ph-field small { display: block; color: var(--muted); font-size: 9px; }
.ph-field svg { height: 30px; width: 100%; }
.ph-field .sig { stroke: #1f3b8a; stroke-width: 2; }
.ph-queue { margin-top: auto; padding: 9px 10px; border-radius: 10px; background: var(--ink); color: #fff; display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; animation: spin 1s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.scanner { width: min(340px, 100%); height: 220px; padding: 34px 30px; border-radius: 22px; background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); position: relative; overflow: hidden; transform: rotateX(14deg) rotateY(12deg); transform-style: preserve-3d; display: flex; flex-direction: column; justify-content: center; }
.barcode.big { height: 100px; }
.digits { text-align: center; font: 600 15px/1 ui-monospace, Consolas, monospace; letter-spacing: .18em; margin-top: 10px; }
.laser { position: absolute; left: 14px; right: 14px; height: 2px; top: 30%; background: #ff2442; box-shadow: 0 0 12px 3px rgba(255, 36, 66, .55); animation: scan 2.4s ease-in-out infinite alternate; }
@keyframes scan { to { top: 68%; } }

/* ---------- automazioni ---------- */
.auto { display: grid; grid-template-columns: 1fr 120px 1fr 120px 1fr; align-items: center; }
.auto-node { text-align: center; padding: 28px 20px; border-radius: var(--radius); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.auto-node span { font-size: 2rem; display: block; margin-bottom: 10px; }
.auto-node b { display: block; font-family: Sora, sans-serif; margin-bottom: 6px; }
.auto-node small { color: var(--muted); font-size: .88rem; }
.auto-line { height: 2px; background: repeating-linear-gradient(90deg, #d9cfc8 0 8px, transparent 8px 14px); position: relative; }
.auto-line i { position: absolute; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(200, 16, 46, .15); animation: travel 2.6s ease-in-out infinite; }
@keyframes travel { from { left: 0; } to { left: calc(100% - 12px); } }

/* ---------- sicurezza ---------- */
.shield-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.shield-grid li { padding: 20px; border-radius: 18px; background: var(--dark-2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .3s var(--ease), box-shadow .3s; }
.shield-grid li:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .35); }
.shield-grid b { display: block; color: #fff; margin-bottom: 4px; }
.shield-grid b::before { content: ""; display: inline-block; width: 15px; height: 15px; margin-right: 9px; vertical-align: -2px; background: #ff6b7f; -webkit-mask: var(--i-lock) center/contain no-repeat; mask: var(--i-lock) center/contain no-repeat; }
.shield-grid small { font-size: .88rem; }

/* ---------- dispositivi ---------- */
.devices { position: relative; height: 380px; max-width: 900px; margin: 0 auto 70px; perspective: 1800px; }
.dev { position: absolute; transform-style: preserve-3d; }
.scr { background: #fff; border-radius: 8px; height: 100%; overflow: hidden; padding: 14px; }
.laptop { left: 6%; top: 0; width: 62%; height: 300px; padding: 12px; border-radius: 16px 16px 4px 4px; background: #23272e; transform: rotateX(8deg) rotateY(14deg); box-shadow: var(--shadow); }
.laptop .base { position: absolute; left: -7%; right: -7%; bottom: -16px; height: 16px; border-radius: 0 0 14px 14px; background: linear-gradient(#cfd3d8, #a9aeb6); }
.tablet { right: 12%; top: 70px; width: 26%; height: 270px; padding: 10px; border-radius: 20px; background: #23272e; transform: rotateY(-18deg) rotateX(6deg) translateZ(60px); box-shadow: var(--shadow); }
.mobile { right: 2%; top: 150px; width: 13%; min-width: 92px; height: 210px; padding: 7px; border-radius: 18px; background: #23272e; transform: rotateY(-24deg) translateZ(120px); box-shadow: var(--shadow); }
.ui-rows { display: grid; gap: 10px; }
.ui-rows i { height: 34px; border-radius: 6px; background: linear-gradient(90deg, #fbe5e8 0 18%, #f3f0ec 18%); }
.ui-rows i:first-child { background: linear-gradient(90deg, var(--red) 0 30%, transparent 30%); height: 14px; }
.ui-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ui-cards i { height: 100px; border-radius: 8px; background: var(--soft); box-shadow: inset 0 4px 0 var(--red); }
.ui-cards.one { grid-template-columns: 1fr; }
.ui-cards.one i { height: 56px; background: #2a2e35; }
.dark-ui { background: #16181c; padding: 8px; border-radius: 12px; }
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: center; }
.numbers b { display: block; font: 800 clamp(2.4rem, 5vw, 3.6rem) Sora, sans-serif; background: linear-gradient(135deg, var(--red-2), var(--wine)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.numbers small { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details { border-radius: 18px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s; }
.faq details[open] { box-shadow: inset 0 0 0 1px rgba(200, 16, 46, .3), var(--shadow); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 60px 22px 24px; font: 600 1.05rem Sora, sans-serif; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 22px; top: 50%; width: 30px; height: 30px; margin-top: -15px; display: grid; place-items: center; border-radius: 50%; background: var(--soft); color: var(--red); font-size: 1.3rem; transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 24px 22px; margin: 0; }

/* ---------- CTA ---------- */
.cta { background: radial-gradient(70% 90% at 20% 30%, rgba(224, 40, 63, .14), transparent 70%), var(--bg); }
.cta-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; align-items: center; }
.cta-logo img { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(125, 9, 30, .25)); animation: bob 7s ease-in-out infinite; }
.contact { display: grid; gap: 14px; margin-top: 26px; padding: 28px; border-radius: 24px; background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.contact input, .contact textarea { font: inherit; font-weight: 400; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); transition: border-color .2s, box-shadow .2s; resize: vertical; }
.contact input:focus, .contact textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 4px rgba(200, 16, 46, .12); }
.contact .btn { justify-self: start; }
.small { font-size: .88rem; margin: 0; }
.small a { color: var(--red); font-weight: 600; }

/* ---------- footer ---------- */
.foot { padding: 40px 0; border-top: 1px solid var(--line); }
.foot-in { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.foot-in small { flex: 1; text-align: right; padding-right: 72px; }
.foot-made { width: 76px; height: auto; transition: transform .5s var(--ease); }
.foot-made:hover { transform: rotate(-8deg) scale(1.08); }
@media (max-width: 760px) { .foot-in { flex-direction: column; text-align: center; } .foot-in small { text-align: center; padding: 0 0 56px; } }
.foot small { color: var(--muted); }
.foot small a { color: var(--red); font-weight: 600; text-decoration: none; }
.foot small a:hover { text-decoration: underline; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.after.reveal.in { transform: translateY(-14px); }
.tilt { transition: transform .5s var(--ease), opacity .9s var(--ease), box-shadow .4s var(--ease); will-change: transform; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
}
@media (max-width: 960px) {
  .menu { position: fixed; inset: 76px 0 auto; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 22px; background: rgba(251, 250, 248, .97); backdrop-filter: blur(14px); box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .3); transform: translateY(-120%); visibility: hidden; transition: transform .4s var(--ease), visibility .4s; }
  .menu.open { transform: none; visibility: visible; }
  .burger { display: block; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero-in, .split, .cta-in, .duo { grid-template-columns: 1fr; }
  .duo.solo .feature-xl { grid-template-columns: 1fr; min-height: 0; gap: 28px; }
  .hero { padding-top: 100px; }
  .hero-3d { max-width: 520px; margin: 0 auto; }
  .split.rev > :first-child { order: 2; }
  .auto { grid-template-columns: 1fr; gap: 0; }
  .auto-line { width: 2px; height: 50px; margin: 0 auto; background: repeating-linear-gradient(180deg, #d9cfc8 0 8px, transparent 8px 14px); }
  .auto-line i { left: 50% !important; margin-left: -6px; top: 0; animation-name: travelv; }
  .cta-logo { max-width: 280px; margin: 0 auto; }
  .devices { height: 300px; }
  .laptop { height: 230px; }
  .tablet { height: 210px; top: 60px; }
  .mobile { height: 170px; top: 120px; }
}
@keyframes travelv { from { top: 0; } to { top: calc(100% - 12px); } }
@media (max-width: 640px) {
  body { font-size: 16px; }
  .eyebrow { font-size: .7rem; letter-spacing: .1em; }
  .compare, .shield-grid, .contact .row { grid-template-columns: 1fr; }
  .after, .after.reveal.in { transform: none; }
  .bento, .steps { grid-template-columns: 1fr; }
  .card.big { grid-column: auto; grid-row: auto; }
  .numbers { grid-template-columns: 1fr 1fr; gap: 28px 12px; }
  .float-card { font-size: .76rem; padding: 8px 12px; }
  .fc1 { left: 0; } .fc2 { right: 0; }
  .alert-card { position: relative; right: auto; bottom: auto; margin-top: 18px; }
  .hours { min-height: 0; }
  .feature-xl { padding: 24px; grid-template-rows: auto auto; }
  .doc-stage { min-height: 420px; }
  .devices { height: 230px; }
  .laptop { width: 74%; left: 0; height: 180px; }
  .tablet { width: 34%; right: 6%; height: 160px; top: 50px; }
  .mobile { height: 130px; top: 90px; min-width: 70px; }
  .scroll-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .sig { stroke-dashoffset: 0; }
}

/* link brochure nell'intestazione */
.dl-link { align-self: center; font-weight: 600; color: var(--red); text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; transition: border-color .2s; }
.dl-link:hover { border-bottom-color: var(--red); }

/* Trasferte: mappa del percorso finta */
.route { position: relative; display: grid; place-items: center; min-height: 460px; padding-bottom: 90px; perspective: 1200px; }
.route-card { width: min(440px, 100%); padding: 18px; border-radius: 28px; background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transform-style: preserve-3d; }
.route-map { width: 100%; height: auto; border-radius: 16px; }
.rm-water { fill: none; stroke: #bfd8ef; stroke-width: 14; }
.rm-street path { fill: none; stroke: #fff; stroke-width: 6; }
.rm-route { fill: none; stroke: var(--red); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 420; stroke-dashoffset: 420; }
.route.in .rm-route { animation: route-draw 2.4s var(--ease) .4s forwards; }
.rm-pin circle { fill: var(--red); stroke: #fff; stroke-width: 3; }
.rm-pin text { fill: #fff; font: 700 11px Inter, sans-serif; text-anchor: middle; }
.route-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 16px 6px 4px; font-size: .9rem; }
.route-meta small { display: block; color: var(--muted); font-size: .78rem; }
.route-meta .km { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); }
.route-meta .km b { font: 700 1.6rem Sora, Inter, sans-serif; color: var(--red); }
.gps-card { box-shadow: var(--shadow), inset 0 0 0 1px #cfe5d6; }
.gps-card .pin { font-size: 1.4rem; }
@keyframes route-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 640px) {
  .route { min-height: 0; padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .route .rm-route, .route.in .rm-route { animation: none; stroke-dashoffset: 0; }
}

/* Ufficio e tecnici: chiamata assegnata dal backoffice e presa in carico */
.dispatch { position: relative; display: grid; gap: 0; justify-items: center; perspective: 1200px; }
.ticket, .assigned { width: min(420px, 100%); padding: 20px; border-radius: 24px; background: #fff; color: var(--ink); box-shadow: 0 40px 80px -40px rgba(224, 40, 63, .55), inset 0 0 0 1px var(--line); }
.ticket small, .assigned small { display: block; color: var(--muted); font-size: .78rem; }
.ticket { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; transform: rotate(-1.5deg); }
.tk-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tk-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: #fde8eb; font-size: 1.2rem; flex: none; }
.tk-field b { font-size: .95rem; }
.tk-field.wide, .tk-row { grid-column: 1 / -1; }
.tk-row { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding-top: 4px; }
.tk-select { position: relative; flex: 1; padding: 8px 34px 8px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px var(--red); }
.tk-select i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--red); }
.dispatch-line { position: relative; width: 2px; height: 64px; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .35) 0 8px, transparent 8px 14px); }
.dispatch-line i { position: absolute; left: -5px; top: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--red-2); box-shadow: 0 0 18px var(--red-2); animation: travelv 1.8s var(--ease) infinite; }
.assigned { transform: rotate(1.2deg); box-shadow: 0 40px 80px -40px rgba(224, 40, 63, .55), inset 4px 0 0 var(--red), inset 0 0 0 1px var(--line); }
.as-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-family: Sora, Inter, sans-serif; }
.as-count { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font: 700 .75rem Inter, sans-serif; }
.as-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.as-item b { font-size: .95rem; }
.as-state { display: grid; flex: none; }
.as-state > span { grid-area: 1 / 1; padding: 4px 10px; border-radius: 99px; font-size: .74rem; font-weight: 600; white-space: nowrap; text-align: center; }
.st-wait { background: #fde8eb; color: var(--red); }
.st-ok { background: #dcfce7; color: #166534; opacity: 0; }
.as-btn { display: inline-block; margin-top: 4px; }
.dispatch.in .st-wait { animation: st-out 7s 1.5s infinite; }
.dispatch.in .st-ok { animation: st-in 7s 1.5s infinite; }
.dispatch.in .as-btn { animation: tap 7s 1.5s infinite; }
@keyframes st-out { 0%, 30% { opacity: 1; } 36%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes st-in { 0%, 30% { opacity: 0; } 36%, 92% { opacity: 1; } 100% { opacity: 0; } }
@keyframes tap { 0%, 24% { transform: none; } 28% { transform: scale(.92); } 33%, 100% { transform: none; } }
@media (max-width: 640px) {
  .ticket, .assigned { transform: none; padding: 16px; }
  .ticket { grid-template-columns: 1fr; }
  .tk-row { flex-direction: column; align-items: stretch; text-align: center; }
  .as-item { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .dispatch.in .st-wait, .dispatch.in .st-ok, .dispatch.in .as-btn { animation: none; }
}

/* Portale clienti: finestra del portale e richiesta di assistenza da remoto */
.portal { position: relative; display: grid; justify-items: center; padding-bottom: 225px; perspective: 1200px; }
.pt-win { width: min(440px, 100%); border-radius: 22px; overflow: hidden; background: #fff; box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transform: rotate(-1deg); }
.pt-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: var(--soft); border-bottom: 1px solid var(--line); }
.pt-bar i { width: 9px; height: 9px; border-radius: 50%; background: #d9d1ca; }
.pt-bar span { margin-left: 10px; padding: 2px 12px; border-radius: 99px; background: #fff; color: var(--muted); font-size: .72rem; }
.pt-body { display: grid; gap: 12px; padding: 18px; }
.pt-body small { display: block; color: var(--muted); font-size: .76rem; }
.pt-hello b { font: 700 1.05rem Sora, Inter, sans-serif; }
.pt-box { padding: 12px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.pt-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pt-box > .pt-row b, .pt-title { font-size: .9rem; }
.pt-meter { height: 8px; margin: 10px 0 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.pt-meter i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red-2), var(--wine)); transition: width 1.6s var(--ease) .4s; }
.portal.in .pt-meter i { width: 54%; }
.pt-hours { font-size: .8rem; color: var(--ink-2); }
.pt-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 9px; margin-top: 9px; border-top: 1px solid var(--line); font-size: .86rem; }
.pt-title + .pt-item { border-top: 0; margin-top: 2px; }
.pt-tag, .pt-pdf { flex: none; padding: 3px 9px; border-radius: 99px; font-size: .72rem; font-weight: 600; }
.pt-tag.ok { background: #dcfce7; color: #166534; }
.pt-tag.wait { background: #fde8eb; color: var(--red); }
.pt-pdf { border-radius: 8px; background: var(--red); color: #fff; }
.pt-req { position: absolute; right: -10px; bottom: 0; width: min(270px, 80%); display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); box-shadow: 0 40px 80px -40px rgba(224, 40, 63, .55), inset 0 0 0 1px #f5c9cf; transform: rotate(2deg); animation: bob 7s ease-in-out infinite; }
.pt-req .tk-head { padding-bottom: 10px; }
.pt-req small { display: block; color: var(--muted); font-size: .74rem; }
.pt-mode { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 11px; background: var(--soft); font-size: .76rem; text-align: center; }
.pt-mode span { padding: 5px 4px; border-radius: 8px; color: var(--muted); }
.pt-mode .on { background: #fff; color: var(--red); font-weight: 600; box-shadow: 0 2px 6px rgba(29, 32, 37, .1); }
.pt-field { padding: 7px 11px; border-radius: 11px; box-shadow: inset 0 0 0 1.5px var(--red); font-size: .9rem; }
.pt-req .mini-btn { text-align: center; }
@media (max-width: 640px) {
  .portal { padding-bottom: 0; }
  .pt-win, .pt-req { transform: none; }
  .pt-req { position: relative; right: auto; width: 100%; margin-top: 18px; animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-req { animation: none; }
  .pt-meter i { transition: none; }
}

/* ---------- Report Green ---------- */
.green-eyebrow { color: #15803d; background: rgba(22, 163, 74, .1); }
.green-ticks li::before { background: rgba(22, 163, 74, .12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2315803d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat; }
.green-stage { position: relative; display: grid; place-items: center; min-height: 460px; padding-bottom: 90px; perspective: 1200px; }
.green-card { width: min(440px, 100%); padding: 28px; border-radius: 26px; background: linear-gradient(160deg, #ffffff, #f0faf3); box-shadow: var(--shadow), inset 0 0 0 1px #cfe5d6; }
.gc-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.gc-leaf { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: #dcfce7; color: #15803d; }
.gc-leaf svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gc-head small { display: block; color: var(--muted); font-size: .85rem; }
.gc-head b { font: 800 2.4rem/1.1 Sora, sans-serif; color: #15803d; }
.gc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.gc-grid div { padding: 12px 14px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px #e2efe6; }
.gc-grid b { display: block; font: 700 1.3rem Sora, sans-serif; color: var(--ink); }
.gc-grid small { color: var(--muted); font-size: .8rem; }
.gc-bar { display: flex; gap: 3px; height: 12px; border-radius: 99px; overflow: hidden; background: #e2efe6; }
.gc-bar i { width: var(--w); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease); }
.gc-bar i:first-child { background: #22c55e; }
.gc-bar i:last-child { background: #2a78d6; transition-delay: .15s; }
.green-stage.in .gc-bar i { transform: scaleX(1); }
.gc-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.gc-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; }
.gc-legend .l1::before { background: #22c55e; }
.gc-legend .l2::before { background: #2a78d6; }
.green-alert { box-shadow: var(--shadow), inset 0 0 0 1px #cfe5d6; }
.green-alert .pin { font-size: 1.4rem; }

@media (max-width: 640px) {
  .green-stage { min-height: 0; padding-bottom: 0; }
  .gc-head b { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) { .gc-bar i { transition: none; transform: none; } }

/* ---------- App Android: telefono 3D animato ---------- */
.app-sec { overflow: hidden; }
.app-glow { position: absolute; right: -10%; top: 10%; width: 60%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(224, 40, 63, .28), rgba(224, 40, 63, 0)); filter: blur(10px); animation: app-glow 8s ease-in-out infinite alternate; }
@keyframes app-glow { to { transform: translate(-8%, 10%) scale(1.15); } }
.grad-light { background: linear-gradient(100deg, #ff8a9a, #ff3d57); -webkit-background-clip: text; background-clip: text; color: transparent; }

.app-feats { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; }
.app-feats li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
  transition: background .3s, transform .3s var(--ease); }
.app-feats li:hover { background: rgba(255, 90, 110, .1); transform: translateX(6px); }
.app-feats span { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 90, 110, .14); font-size: 1.25rem; }
.app-feats b { display: block; color: #fff; }
.app-feats small { font-size: .88rem; }
.js .app-copy .app-feats li { opacity: 0; transform: translateX(-24px); }
.app-copy.in .app-feats li { animation: feat-in .7s var(--ease) both; animation-delay: calc(.3s + var(--i) * .13s); }
@keyframes feat-in { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
.app-copy .cta-row { margin-bottom: 0; }

.app-stage { position: relative; display: grid; place-items: center; min-height: 620px; perspective: 1400px; }
.p3-tilt { position: relative; padding: 30px 110px; transform-style: preserve-3d; transform: rotateX(var(--ty, 0deg)) rotateY(var(--tx, 0deg)); transition: transform .6s var(--ease); }
.phone3d { position: relative; width: 240px; height: 490px; transform-style: preserve-3d; transform: rotateY(-24deg) rotateX(8deg); }
.app-stage.in .phone3d { animation: p3-spin 9s ease-in-out infinite alternate; }
@keyframes p3-spin {
  0% { transform: rotateY(-30deg) rotateX(10deg) translateY(0); }
  50% { transform: rotateY(-4deg) rotateX(4deg) translateY(-16px); }
  100% { transform: rotateY(22deg) rotateX(8deg) translateY(0); }
}
/* Spessore: lastre con lo stesso profilo arrotondato, una dietro l'altra */
.p3-face { position: absolute; inset: 0; border-radius: 38px; }
.p3-front { transform: translateZ(11px); padding: 9px; background: #0b0d10; box-shadow: inset 0 0 0 2px #3a3f47; }
.p3-back { transform: rotateY(180deg) translateZ(11px); display: grid; place-items: center; background: linear-gradient(145deg, #3a1018, #1a1d22 60%); box-shadow: inset 0 0 0 2px #3a3f47; }
.p3-back img { width: 64px; height: 64px; border-radius: 18px; opacity: .9; }
.p3-slab { position: absolute; inset: 0; border-radius: 38px; background: #2b3038; transform: translateZ(var(--z)); box-shadow: inset 0 0 0 1px #3a3f47; }
.p3-key { position: absolute; right: -3px; width: 5px; border-radius: 3px; background: #4a505a; transform: translateZ(0); }
.p3-key.k1 { top: 110px; height: 46px; }
.p3-key.k2 { top: 170px; height: 70px; }

.p3-screen { position: relative; height: 100%; border-radius: 30px; overflow: hidden; background: #f6f3ef; font: 500 11px/1.35 Inter, sans-serif; color: var(--ink); }
.p3-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .22) 45%, rgba(255, 255, 255, 0) 55%); background-size: 300% 100%; background-position: 100% 0; }
.app-stage.in .p3-screen::after { animation: p3-gloss 9s ease-in-out infinite alternate; }
@keyframes p3-gloss { to { background-position: 0 0; } }
.p3-status { position: absolute; z-index: 4; inset: 0 0 auto; height: 26px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; font-size: 10px; font-weight: 600; color: #fff; }
.p3-cam { width: 10px; height: 10px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px #1a1a1a; }

/* Schermata principale con l'icona dell'app */
.p3-home { position: absolute; inset: 0; padding: 46px 18px 18px; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(120% 80% at 20% 0%, #e0283f, #7d091e 60%, #2a070d); }
.p3-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 12px; justify-items: center; }
.p3-grid i { width: 38px; height: 38px; border-radius: 11px; background: var(--c); opacity: .85; box-shadow: 0 6px 12px -6px rgba(0, 0, 0, .5); }
.p3-appicon { position: relative; display: grid; justify-items: center; gap: 4px; }
.p3-appicon img { width: 38px; height: 38px; border-radius: 11px; background: #fff; padding: 3px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .7), 0 8px 16px -6px rgba(0, 0, 0, .6); }
.p3-appicon em { position: absolute; top: 42px; white-space: nowrap; font: 600 8px Inter, sans-serif; font-style: normal; color: #fff; }
.p3-appicon::after { content: ""; position: absolute; top: 19px; left: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(255, 255, 255, .6); transform: scale(0); opacity: 0; }
.p3-dock { display: flex; justify-content: space-around; padding: 10px; border-radius: 20px; background: rgba(255, 255, 255, .16); }
.p3-dock i { width: 34px; height: 34px; border-radius: 10px; background: rgba(255, 255, 255, .55); }

/* L'app aperta */
.p3-app { position: absolute; inset: 0; padding: 34px 10px 10px; display: flex; flex-direction: column; gap: 7px; background: #f6f3ef; transform-origin: 62% 26%; opacity: 0; }
.p3-bar { display: flex; align-items: center; gap: 7px; margin: -34px -10px 4px; padding: 32px 12px 10px; background: linear-gradient(120deg, var(--red-2), var(--wine)); color: #fff; font-size: 12.5px; }
.p3-bar img { width: 22px; height: 22px; border-radius: 6px; background: #fff; padding: 2px; }
.p3-badge { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 99px; background: #fff; color: var(--red); font-size: 10px; font-weight: 700; text-align: center; }
.p3-label { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.p3-card { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 10px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 6px 12px -10px rgba(0, 0, 0, .4); opacity: 0; }
.p3-card b { display: block; font-size: 10.5px; }
.p3-card small { color: var(--muted); font-size: 9px; }
.p3-pill { flex: none; padding: 2px 7px; border-radius: 99px; background: #fde8eb; color: var(--red); font-size: 8.5px; font-weight: 700; }
.p3-sign { margin-top: 2px; padding: 7px 9px; border-radius: 11px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); opacity: 0; }
.p3-sign small { display: block; color: var(--muted); font-size: 9px; }
.p3-sign svg { width: 100%; height: 44px; }
.p3-sig { fill: none; stroke: #1f3b8a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 320; stroke-dashoffset: 320; }
.p3-toast { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 12px; background: #15803d; color: #fff; font-size: 10.5px; font-weight: 600; opacity: 0; }
.p3-toast span { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255, 255, 255, .25); }

/* Storia in loop (10 s): tocco sull'icona, si apre l'app, arrivano gli interventi, firma, PDF inviato */
.app-stage.in .p3-home { animation: p3-home 10s infinite both; }
.app-stage.in .p3-appicon img { animation: p3-tap 10s infinite both; }
.app-stage.in .p3-appicon::after { animation: p3-ripple 10s infinite both; }
.app-stage.in .p3-app { animation: p3-open 10s infinite both; }
.app-stage.in .p3-card { animation: p3-card 10s infinite both; animation-delay: var(--d); }
.app-stage.in .p3-sign { animation: p3-sign 10s infinite both; }
.app-stage.in .p3-sig { animation: p3-sig 10s infinite both; }
.app-stage.in .p3-toast { animation: p3-toast 10s infinite both; }
@keyframes p3-home { 0%, 20% { opacity: 1; transform: none; } 27%, 93% { opacity: 0; transform: scale(1.12); } 100% { opacity: 1; transform: none; } }
@keyframes p3-tap { 0%, 12% { transform: none; } 15% { transform: scale(.82); } 19%, 100% { transform: none; } }
@keyframes p3-ripple { 0%, 13% { transform: scale(0); opacity: 0; } 15% { opacity: .8; } 22%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes p3-open { 0%, 18% { opacity: 0; transform: scale(.2); } 26%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: scale(.94); } }
@keyframes p3-card { 0%, 26% { opacity: 0; transform: translateX(40px); } 32%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; transform: none; } }
@keyframes p3-sign { 0%, 40% { opacity: 0; transform: translateY(14px); } 45%, 92% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }
@keyframes p3-sig { 0%, 46% { stroke-dashoffset: 320; } 64%, 100% { stroke-dashoffset: 0; } }
@keyframes p3-toast { 0%, 68% { opacity: 0; transform: translateY(18px) scale(.96); } 72%, 90% { opacity: 1; transform: none; } 95%, 100% { opacity: 0; transform: translateY(6px); } }

/* Etichette che fluttuano davanti al telefono, a profondità diverse (parallasse col mouse) */
.p3-chip { position: absolute; z-index: 3; padding: 9px 14px; border-radius: 14px; white-space: nowrap; font-size: .85rem; font-weight: 600; color: var(--ink);
  background: rgba(255, 255, 255, .92); box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .6); transform: translate3d(0, 0, var(--z)); }
.app-stage.in .p3-chip { animation: p3-float 6s ease-in-out infinite; }
.p3-chip.c1 { top: 6%; left: 2%; }
.p3-chip.c2 { top: 22%; right: 0; animation-delay: -1.2s; }
.p3-chip.c3 { top: 50%; left: -2%; animation-delay: -2.4s; }
.p3-chip.c4 { bottom: 14%; right: -4%; animation-delay: -3.6s; }
.p3-chip.c5 { bottom: 4%; left: 12%; animation-delay: -4.8s; }
@keyframes p3-float { 50% { transform: translate3d(0, -12px, var(--z)); } }
.p3-shadow { position: absolute; bottom: 30px; left: 50%; width: 220px; height: 26px; margin-left: -110px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .55), transparent); filter: blur(4px); }
.app-stage.in .p3-shadow { animation: p3-shadow 9s ease-in-out infinite alternate; }
@keyframes p3-shadow { 50% { transform: scale(.82); opacity: .7; } }

@media (max-width: 960px) {
  .app-stage { min-height: 580px; }
}
@media (max-width: 640px) {
  .app-stage { min-height: 500px; margin-inline: -16px; }
  .p3-tilt { scale: .8; padding: 20px 60px; }
  .p3-chip { font-size: .8rem; }
  .p3-chip.c2, .p3-chip.c5 { display: none; }
  .p3-chip.c1 { left: 0; } .p3-chip.c3 { left: -6%; } .p3-chip.c4 { right: -6%; }
}
@media (prefers-reduced-motion: reduce) {
  .app-glow, .app-stage.in .phone3d, .app-stage.in .p3-screen::after, .app-stage.in .p3-chip, .app-stage.in .p3-shadow,
  .app-stage.in .p3-home, .app-stage.in .p3-appicon img, .app-stage.in .p3-appicon::after, .app-stage.in .p3-app,
  .app-stage.in .p3-card, .app-stage.in .p3-sign, .app-stage.in .p3-sig, .app-stage.in .p3-toast, .app-copy.in .app-feats li { animation: none; }
  .p3-home { opacity: 0; }
  .p3-app, .p3-card, .p3-sign, .js .app-copy .app-feats li { opacity: 1; transform: none; }
  .p3-sig { stroke-dashoffset: 0; }
}

/* ---------- banner consenso cookie ---------- */
.cookie {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(440px, 100% - 32px);
  padding: 24px 24px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(16px); transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.cookie.show { opacity: 1; transform: none; }
.cookie [hidden] { display: none; }
.cookie h2 { font-size: 1.15rem; margin: 0 0 .4em; }
.cookie p { font-size: .9rem; line-height: 1.55; margin: 0 0 16px; }
.cookie-x {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 10px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 1.4rem; line-height: 1;
}
.cookie-x:hover { background: var(--soft); color: var(--ink); }
.cookie-opts { display: grid; gap: 10px; margin: 0 0 16px; }
.cookie-opts label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--soft); cursor: pointer; }
.cookie-opts input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--red); flex: none; }
.cookie-opts b { display: block; font-size: .92rem; }
.cookie-opts small { display: block; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.cookie-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cookie-btns .btn { flex: 1 1 auto; justify-content: center; }
.cookie-btns .btn:hover { transform: none; }
@media (max-width: 640px) {
  .cookie { right: 16px; bottom: 16px; padding: 20px 18px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie { transition: none; }
}

/* ---------- icone SVG (assets/img/icons.svg) ---------- */
:root { --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='3' y='11' width='18' height='11' rx='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E"); }
svg.i { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; }
.hero-chips li { display: inline-flex; align-items: center; gap: 8px; transition: transform .3s var(--ease), box-shadow .3s; }
.hero-chips li svg.i { color: var(--red); }
.hero-chips li:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(200, 16, 46, .35), 0 10px 20px -12px rgba(200, 16, 46, .5); }
.float-card svg.i, small svg.i { color: var(--red); width: 1em; height: 1em; vertical-align: -.12em; }
.dark small svg.i, .p3-card small svg.i { color: #ff6b7f; }

/* tessera dell'icona: gradiente lucido con profondità, si solleva e ruota in 3D al passaggio */
.ico, .tk-ico, .auto-node > span, .app-feats span, .alert-card .pin {
  position: relative; display: grid; place-items: center; color: #fff;
  background: linear-gradient(145deg, #ff4d63 0%, var(--red) 45%, var(--wine) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 -3px 0 rgba(0, 0, 0, .18) inset, 0 12px 22px -10px rgba(200, 16, 46, .75);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.ico::after, .tk-ico::after, .auto-node > span::after, .app-feats span::after {
  content: ""; position: absolute; inset: 1px 1px 50%; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0));
}
.ico svg.i { width: 26px; height: 26px; filter: drop-shadow(0 2px 2px rgba(80, 0, 15, .35)); }
.card:hover .ico { transform: translateZ(50px) rotateY(-16deg) rotateX(10deg) scale(1.08); box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 -3px 0 rgba(0, 0, 0, .18) inset, 0 22px 30px -12px rgba(200, 16, 46, .8); }
.card:hover .ico svg.i { animation: icoPop .6s var(--ease); }
@keyframes icoPop { 40% { transform: scale(1.25) rotate(-8deg); } }
.tk-ico svg.i { width: 22px; height: 22px; }
.auto-node > span { width: 64px; height: 64px; border-radius: 20px; margin: 0 auto 14px; font-size: 1rem; }
.auto-node > span svg.i { width: 30px; height: 30px; }
.auto-node:hover > span { transform: translateY(-4px) rotate(-6deg) scale(1.06); }
.app-feats span svg.i { width: 22px; height: 22px; }
.app-feats li:hover span { transform: rotate(-8deg) scale(1.08); }
.alert-card .pin { width: 40px; height: 40px; border-radius: 13px; flex: none; }
.alert-card .pin svg.i { width: 20px; height: 20px; }
.green-alert .pin { background: linear-gradient(145deg, #4ade80, #16a34a 55%, #166534); box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 12px 22px -10px rgba(22, 163, 74, .75); }
.p3-chip { display: flex; align-items: center; gap: 7px; }
.p3-chip svg.i { color: var(--red); }
.p3-toast svg.i, .st-ok svg.i { width: 1em; height: 1em; }

/* ---------- oggetti 3D di sezione (assets/js/objects3d.js) ---------- */
.obj3d { display: none; width: clamp(112px, 13vw, 150px); aspect-ratio: 1; margin: -10px 0 6px -12px; cursor: grab; position: relative; touch-action: pan-y; }
.obj3d-on .obj3d { display: block; }
.obj3d canvas { width: 100%; height: 100%; display: block; animation: objIn .9s var(--ease) both; }
.obj3d:active { cursor: grabbing; }
.obj3d::before { content: ""; position: absolute; left: 18%; right: 18%; bottom: 4%; height: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(200, 16, 46, .28), transparent); filter: blur(4px); }
.dark .obj3d::before { background: radial-gradient(closest-side, rgba(255, 90, 110, .35), transparent); }
.head .obj3d { margin-inline: auto; }
.head .obj3d { margin-top: -20px; }
@keyframes objIn { from { opacity: 0; transform: scale(.6) translateY(20px); } }
@media (max-width: 700px) { .obj3d { width: 104px; margin-top: -4px; } }
@media (prefers-reduced-motion: reduce) { .obj3d canvas { animation: none; } }

/* ---------- menu a livelli ---------- */
.dd { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border: 0; border-radius: 12px; cursor: pointer;
  background: none; font: 500 .95rem Inter, sans-serif; color: var(--ink-2); position: relative; transition: background .25s, color .25s;
}
.dd-btn:hover, .dd.open .dd-btn { color: var(--ink); background: rgba(29, 32, 37, .05); }
.dd-chev { width: 15px; height: 15px; transition: transform .35s var(--ease); opacity: .7; }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd.is-current .dd-btn { color: var(--red); }
.dd.is-current .dd-btn::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--red); }
.dd-in a { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); white-space: normal; transition: background .25s; }
.dd-in a::after { display: none; }
.dd-in a:hover, .dd-in a.is-current { background: #fff4f5; }
.dd-in a.is-current b { color: var(--red); }
.dd-in b { display: block; font: 600 .93rem/1.3 Inter, sans-serif; }
.dd-in small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: 2px; }
.dd-ico {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff;
  background: linear-gradient(145deg, #ff4d63 0%, var(--red) 45%, var(--wine) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .45) inset, 0 -2px 0 rgba(0, 0, 0, .18) inset, 0 8px 16px -8px rgba(200, 16, 46, .7);
  transition: transform .4s var(--ease);
}
.dd-ico svg.i { width: 19px; height: 19px; }
.dd-in a:hover .dd-ico { transform: rotate(-8deg) scale(1.08); }
.menu-cta { margin-left: 10px; }
.menu-cta svg.i { width: 17px; height: 17px; }

@media (min-width: 961px) {
  .dd-panel {
    position: absolute; top: calc(100% + 12px); left: 50%; width: 340px; z-index: 5;
    opacity: 0; visibility: hidden; transform: translateX(-50%) translateY(10px) scale(.97); transform-origin: 50% 0;
    transition: opacity .25s var(--ease), transform .35s var(--ease), visibility .35s;
  }
  .dd-panel::before { content: ""; position: absolute; inset: -14px 0 auto; height: 14px; }
  .dd-panel.dd-wide { width: 580px; }
  .dd-wide .dd-in { grid-template-columns: 1fr 1fr; }
  .dd-in {
    display: grid; gap: 2px; padding: 10px; border-radius: 22px; position: relative;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
    box-shadow: 0 30px 60px -24px rgba(29, 32, 37, .35), 0 10px 24px -14px rgba(29, 32, 37, .2), inset 0 0 0 1px var(--line);
  }
  .dd-in::before { content: ""; position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; margin-left: -6px; background: #fff; transform: rotate(45deg); border-radius: 3px 0 0 0; box-shadow: -1px -1px 0 var(--line); }
  .dd.open .dd-panel { opacity: 1; visibility: visible; transform: translateX(-50%); }
  .dd.open .dd-in a { animation: ddItem .4s var(--ease) both; animation-delay: calc(var(--n, 0) * 35ms); }
  .dd:last-of-type .dd-panel { left: auto; right: -40px; transform: translateY(10px) scale(.97); transform-origin: 80% 0; }
  .dd:last-of-type.open .dd-panel { transform: none; }
  .dd:last-of-type .dd-in::before { left: auto; right: 80px; }
}
@keyframes ddItem { from { opacity: 0; transform: translateY(6px); } }

@media (max-width: 960px) {
  .menu { max-height: calc(100svh - 76px); overflow-y: auto; overscroll-behavior: contain; }
  /* a menu aperto la barra non sfoca lo sfondo: con il filtro attivo la tendina lasciava trasparire la pagina */
  .nav:has(.menu.open) { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .dd { border-bottom: 1px solid var(--line); }
  .dd-btn { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 1.05rem; font-weight: 600; color: var(--ink); border-radius: 0; }
  .dd-btn:hover, .dd.open .dd-btn { background: none; }
  .dd.is-current .dd-btn::after { left: auto; right: 34px; bottom: auto; top: 50%; margin: -2.5px 0 0; }
  .dd-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
  .dd.open .dd-panel { grid-template-rows: 1fr; }
  .dd-in { overflow: hidden; min-height: 0; display: grid; gap: 2px; }
  .dd-in a:last-child { margin-bottom: 12px; }
  .menu-cta { margin: 18px 0 0; justify-content: center; }
}

/* ---------- torna in alto ---------- */
.totop {
  position: fixed; right: 22px; bottom: 22px; z-index: 55; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; color: var(--red); text-decoration: none;
  background: rgba(255, 255, 255, .9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 16px 30px -14px rgba(125, 9, 30, .55), 0 2px 6px rgba(29, 32, 37, .08);
  opacity: 0; visibility: hidden; transform: translateY(20px) scale(.8);
  transition: opacity .35s var(--ease), transform .45s var(--ease), visibility .45s, background .3s, color .3s;
}
.totop.show { opacity: 1; visibility: visible; transform: none; }
.totop > svg.i { width: 22px; height: 22px; position: relative; }
.totop-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.totop-ring circle { fill: none; stroke: rgba(200, 16, 46, .14); stroke-width: 3; }
.totop-ring .totop-bar { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 144.5; stroke-dashoffset: var(--off, 144.5); transition: stroke-dashoffset .15s linear; }
.totop:hover { background: linear-gradient(145deg, #ff4d63, var(--red) 45%, var(--wine)); color: #fff; transform: translateY(-4px); }
.totop:hover .totop-ring circle { stroke: rgba(255, 255, 255, .25); }
.totop:hover .totop-ring .totop-bar { stroke: #fff; }
.totop:hover > svg.i { animation: upBounce .8s var(--ease) infinite; }
@keyframes upBounce { 50% { transform: translateY(-4px); } }
body:has(#cookie:not([hidden])) .totop { opacity: 0; visibility: hidden; }
@media (max-width: 600px) { .totop { right: 16px; bottom: 16px; width: 48px; height: 48px; } }
@media (prefers-reduced-motion: reduce) { .totop:hover > svg.i { animation: none; } }
