:root {
  --navy: #002a5c;
  --navy-deep: #001631;
  --navy-soft: #0d3a73;
  --orange: #e47a00;
  --orange-bright: #ff9a1f;
  --orange-soft: #fff1e0;
  --paper: #f3f5f8;
  --card: #ffffff;
  --ink: #0f1d33;
  --muted: #5b6b82;
  --line: #dde3eb;
  --green: #15803d;
  --amber: #d97706;
  --red: #dc2626;
  --black-red: #7f1d1d;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.story-guided { scroll-behavior: auto; }
body { margin: 0; background: var(--navy-deep); color: #fff; overflow-x: hidden; }

h1, h2, h3, p, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { line-height: 1.04; font-weight: 760; letter-spacing: -0.045em; }
h1 { font-size: clamp(46px, 6vw, 96px); }
h2 { font-size: clamp(40px, 5vw, 78px); }
h3 { font-size: 24px; letter-spacing: -0.03em; }
em { font-style: normal; color: var(--orange); }
.dark em { color: var(--orange-bright); }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: 0.35; }
button:focus-visible, a:focus-visible { outline: 3px solid var(--orange-bright); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; top: 12px; left: 20px; z-index: 100; transform: translateY(-160%);
  background: #fff; color: var(--ink); padding: 12px 20px; font-weight: 700; border-radius: 8px;
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: none; }

/* Masthead */
.masthead {
  position: fixed; inset: 0 0 auto; z-index: 40; height: 76px; padding: 0 clamp(16px, 4vw, 56px);
  display: flex; align-items: center; justify-content: space-between; pointer-events: none;
}
.masthead > * { pointer-events: auto; }
.brand {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 12px 7px;
  background: rgba(255, 255, 255, 0.96); color: var(--navy); border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 22, 49, 0.18); font-size: 11px; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap;
}
.brand img { width: 44px; height: auto; }
.brand b { color: var(--orange); font-weight: 800; }
.back-show {
  padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 650;
  background: rgba(0, 22, 49, 0.55); border: 1px solid rgba(255, 255, 255, 0.18); backdrop-filter: blur(10px);
}
.back-show:hover { background: var(--orange); border-color: var(--orange); }

/* Elementi comuni */
.chapter { position: relative; min-height: 100vh; min-height: 100svh; }
.light { background: var(--paper); color: var(--ink); }
.dark { background: var(--navy); color: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  font-size: 12px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange);
}
.eyebrow::before { content: ""; width: 26px; height: 3px; border-radius: 2px; background: currentColor; }
.dark .eyebrow { color: var(--orange-bright); }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.45; margin-top: 24px; font-weight: 500; }
.copy > p:not(.eyebrow):not(.lead) { margin-top: 16px; font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 52ch; }
.dark .copy > p:not(.eyebrow):not(.lead) { color: rgba(255, 255, 255, 0.72); }
.editorial-note {
  margin-top: 28px; padding: 18px 20px; border-left: 4px solid var(--orange); border-radius: 0 12px 12px 0;
  background: var(--card); box-shadow: 0 10px 30px rgba(15, 29, 51, 0.06); display: grid; gap: 6px; max-width: 52ch;
}
.editorial-note b { font-size: 15px; }
.editorial-note span { font-size: 14px; line-height: 1.55; color: var(--muted); }
.demo-note { margin-top: 14px; font-size: 11px; color: var(--muted); text-align: right; }
.dark .demo-note { color: rgba(255, 255, 255, 0.5); }

.spread {
  min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center; gap: clamp(32px, 6vw, 96px); padding: 120px clamp(16px, 6vw, 110px) 110px;
  max-width: 1500px; margin: 0 auto;
}

.button {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 999px;
  border: 0; font-weight: 750; font-size: 15px; transition: transform 0.2s ease, background 0.2s ease;
}
.button.orange { background: var(--orange); color: #fff; box-shadow: 0 12px 30px rgba(228, 122, 0, 0.35); }
.button.orange:hover { background: var(--orange-bright); transform: translateY(-2px); }
.text-link { font-size: 14px; font-weight: 650; opacity: 0.8; }
.text-link:hover { opacity: 1; color: var(--orange-bright); }

.step-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.dark .step-choices { border-top-color: rgba(255, 255, 255, 0.14); }
.step-choices button {
  padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 650;
  border: 1px solid var(--line); background: var(--card); transition: all 0.2s ease;
}
.dark .step-choices button { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.16); }
.step-choices button:hover { border-color: var(--orange); }
.step-choices button[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #fff; }

/* Ticket e stati */
.ticket {
  background: var(--card); color: var(--ink); border-radius: 18px; padding: 22px 24px;
  box-shadow: 0 30px 60px -20px rgba(0, 10, 30, 0.45); border-top: 5px solid var(--orange);
}
.ticket header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ticket-number { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ticket-title { font-size: 22px; letter-spacing: -0.025em; line-height: 1.2; }
.ticket dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.ticket dt {
  font-size: 10px; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.ticket dd { font-size: 14px; font-weight: 600; margin-top: 3px; }
.ticket-note { margin-top: 16px; font-size: 12px; font-weight: 650; color: var(--red); display: flex; gap: 8px; align-items: center; }
.ticket-note::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15); }

.status-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 750; background: #e8edf4; color: var(--navy); transition: background 0.3s ease, color 0.3s ease;
}
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip.is-new { background: var(--orange-soft); color: #b45309; }
.status-chip.is-pre { background: #e8edf4; color: var(--navy); }
.status-chip.is-hold { background: #fef3c7; color: #a16207; }
.status-chip.is-issued { background: #dbeafe; color: #1d4ed8; }
.status-chip.is-done { background: #dcfce7; color: var(--green); }
.status-chip.is-closed { background: var(--orange); color: #fff; }

/* 01 Intro: la cucina 3D, poi titolo con MacBook e iPhone */
.intro { overflow: hidden; background: radial-gradient(ellipse at 70% 40%, var(--navy-soft) 0%, var(--navy) 45%, var(--navy-deep) 100%); }
.intro-inner { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
.intro-field { position: absolute; inset: 0; pointer-events: none; opacity: 0.9; }
.intro-field i {
  position: absolute; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: rgba(255, 255, 255, 0.22);
  animation: twinkle 4s ease-in-out infinite; animation-delay: var(--d);
}
.field-active {
  position: absolute; width: 14px; height: 14px; margin: -7px; border-radius: 50%; background: var(--orange-bright);
  box-shadow: 0 0 24px var(--orange-bright);
}
.field-active::before, .field-active::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--orange-bright);
  animation: ping 2.4s ease-out infinite;
}
.field-active::after { animation-delay: 1.2s; }
@keyframes twinkle { 50% { opacity: 0.35; } }
@keyframes ping { from { transform: scale(1); opacity: 0.9; } to { transform: scale(5); opacity: 0; } }
.kitchen-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.intro.has-kitchen .kitchen-canvas { display: block; }
.intro.has-kitchen .intro-field { display: none; }
.intro-veil { position: absolute; inset: 0; pointer-events: none; opacity: var(--veil, 0.82); background: linear-gradient(100deg, rgba(0, 22, 49, .97) 0%, rgba(0, 22, 49, .86) 50%, rgba(0, 22, 49, .7) 100%); }
.intro:not(.has-kitchen) .intro-veil { display: none; }
.kitchen-captions { position: absolute; left: clamp(16px, 6vw, 110px); bottom: 120px; width: min(560px, calc(100% - 32px)); height: 0; opacity: calc(1 - var(--hero, 1)); pointer-events: none; }
.kitchen-caption {
  position: absolute; left: 0; bottom: 0; margin: 0; padding: 18px 22px; border-radius: 16px;
  background: rgba(0, 22, 49, .78); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12);
  font-size: clamp(22px, 2.4vw, 36px); font-weight: 760; letter-spacing: -0.03em; line-height: 1.12;
  opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease;
}
.kitchen-caption span { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--orange-bright); }
.kitchen-caption.is-on { opacity: 1; transform: none; }
.kitchen-hint { position: absolute; left: 0; top: 16px; margin: 0; font-size: 13px; font-weight: 650; color: rgba(255, 255, 255, .75); opacity: 0; transition: opacity .3s ease; }
.kitchen-hint.is-on { opacity: 1; }
.intro-hero {
  position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 56px;
  padding: 92px clamp(16px, 6vw, 110px) 104px; max-width: 1500px; margin: 0 auto;
  opacity: var(--hero, 1); transform: translateY(calc((1 - var(--hero, 1)) * 30px)); pointer-events: none;
}
.intro.is-hero .intro-hero, .intro:not(.story-chapter) .intro-hero { pointer-events: auto; }
.intro-copy { position: relative; z-index: 1; }
/* Il titolo segue anche l'altezza: il pulsante resta sempre sopra il player. */
.intro-copy h1 { font-size: clamp(38px, min(5vw, 7.6vh), 92px); }
.intro-copy .eyebrow { margin-bottom: 16px; }
.intro-lead { margin-top: 18px; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.5; color: rgba(255, 255, 255, 0.8); max-width: 46ch; }
.intro-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.stat-pill {
  display: grid; gap: 2px; padding: 12px 18px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px);
}
.stat-pill strong { font-size: 24px; font-weight: 780; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: var(--orange-bright); }
.stat-pill span { font-size: 12px; color: rgba(255, 255, 255, 0.7); }
.intro-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 24px; }
@media (max-height: 760px) and (min-width: 901px) { .intro-stats { display: none; } }

/* MacBook con la dashboard e posto dell'iPhone */
.intro-devices { position: relative; padding-bottom: 6%; }
.macbook { width: min(100%, 640px); margin-left: auto; }
.mb-screen { padding: 12px 12px 16px; background: #0b0d11; border: 1.5px solid #474d57; border-radius: 18px 18px 4px 4px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .55); }
.mb-slot { aspect-ratio: 760 / 475; overflow: hidden; border-radius: 4px; }
.mb-app { width: 760px; height: 475px; display: flex; background: #f3f5f8; }
.mb-app .br-app { border-radius: 0; height: 100%; flex: 1; }
.mb-app .br-main { gap: 4px; }
.mb-base { position: relative; height: 15px; margin: 0 -7%; background: linear-gradient(#e2e6eb, #9ba4ae); border-radius: 2px 2px 16px 16px; box-shadow: 0 18px 30px -10px rgba(0, 0, 0, .5); }
.mb-base::before { content: ""; position: absolute; left: 41%; right: 41%; top: 0; height: 5px; border-radius: 0 0 6px 6px; background: #b3bbc5; }
.mb-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.mb-kpi { display: grid; gap: 2px; padding: 10px 12px; background: #fff; border: 1px solid #e3e7ec; border-radius: 12px; }
.mb-kpi span { font-size: 9.5px; font-weight: 600; text-transform: uppercase; color: #495057; }
.mb-kpi b { font-size: 24px; color: #0a2a5b; line-height: 1.1; }
.mb-kpi small { font-size: 9.5px; color: #66758a; }
.mb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.mb-list { display: grid; gap: 6px; padding: 10px 12px; background: #fff; border: 1px solid #e3e7ec; border-radius: 12px; }
.mb-list b { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: #0d6efd; }
.mb-list i { font-style: normal; padding: 1px 6px; border-radius: 999px; background: #e7f0ff; font-size: 8.5px; }
.mb-list.green i { background: #e3f4ea; color: #198754; }
.mb-op { padding: 6px 8px; border: 1px solid #e3e7ec; border-left: 3px solid #0d6efd; border-radius: 7px; font-size: 10px; color: #212529; }
.mb-list.green .mb-op { border-left-color: #198754; }
.intro-phone { position: absolute; right: -2%; bottom: -4%; width: 27%; aspect-ratio: 300 / 620; }

/* Il telefono che viaggia: involucro trasformato, retro visibile durante la piroetta */
.phone-travel { position: absolute; inset: 0; z-index: 25; transform-origin: 50% 50%; transform-style: preserve-3d; will-change: transform; }
.iphone { transform-style: preserve-3d; }
.iphone-screen { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.iphone-back {
  position: absolute; inset: 0; border-radius: 46px; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border: 3px solid #aebdc7; background: linear-gradient(135deg, #e1e9ee, #acbcc8 55%, #d1dce3); box-shadow: 0 24px 55px rgba(7, 29, 51, .25);
}
.iphone-cam { position: absolute; top: 14px; left: 14px; width: 118px; height: 118px; border-radius: 30px; background: linear-gradient(145deg, #e4ecf1, #aabcc9); border: 1px solid #d6e1e8; box-shadow: 0 5px 9px #61778755; }
.iphone-cam b { position: absolute; width: 42px; height: 42px; border-radius: 50%; border: 3px solid #52616b; background: radial-gradient(circle at 36% 28%, #4c6c91 0%, #192839 20%, #070c13 40%, #1b2943 50%, #080c15 62%); }
.iphone-cam b:nth-child(1) { left: 12px; top: 10px; }
.iphone-cam b:nth-child(2) { left: 12px; bottom: 10px; }
.iphone-cam b:nth-child(3) { right: 10px; top: 38px; }
.device-slot.is-travelling .hand { visibility: hidden !important; }

/* 02 e 04: dispositivi, nello stile dell’applicazione (in fondo al file) */

/* 03 Il percorso */
.journey { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%); }
.track-demo { display: grid; gap: 34px; }
.track { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.track::before, .track::after {
  content: ""; position: absolute; top: 11px; left: 10%; right: 10%; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.15);
}
.track::after { background: var(--orange-bright); right: auto; width: calc(80% * var(--p, 0)); transition: width 0.5s ease; }
.track-demo[data-step="0"] .track { --p: 0; }
.track-demo[data-step="1"] .track { --p: 0.25; }
.track-demo[data-step="2"] .track { --p: 0.5; }
.track-demo[data-step="3"] .track { --p: 0.75; }
.track-demo[data-step="4"] .track { --p: 1; }
.track li { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; font-size: 12px; font-weight: 650; color: rgba(255, 255, 255, 0.5); text-align: center; }
.track li i {
  width: 25px; height: 25px; border-radius: 50%; background: var(--navy-deep); border: 3px solid rgba(255, 255, 255, 0.25);
  transition: all 0.4s ease;
}
.track-demo[data-step="0"] .track li:nth-child(-n+1),
.track-demo[data-step="1"] .track li:nth-child(-n+2),
.track-demo[data-step="2"] .track li:nth-child(-n+3),
.track-demo[data-step="3"] .track li:nth-child(-n+4),
.track-demo[data-step="4"] .track li { color: #fff; }
.track-demo[data-step="0"] .track li:nth-child(-n+1) i,
.track-demo[data-step="1"] .track li:nth-child(-n+2) i,
.track-demo[data-step="2"] .track li:nth-child(-n+3) i,
.track-demo[data-step="3"] .track li:nth-child(-n+4) i,
.track-demo[data-step="4"] .track li i { background: var(--orange-bright); border-color: var(--orange-bright); box-shadow: 0 0 18px rgba(255, 154, 31, 0.55); }
.track-ticket p { margin-top: 10px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.track-log { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 8px; }
.track-log li { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.track-log li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.track-log li.is-latest { color: var(--ink); font-weight: 650; }
.track-log li.is-latest::before { background: var(--orange); }

/* 05 I contratti */
.contracts { background: radial-gradient(ellipse at 80% 50%, var(--navy-soft), var(--navy) 60%); }
.monitor-demo { background: rgba(0, 10, 25, 0.45); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 22px; padding: 24px; }
.monitor-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; margin-bottom: 20px; }
.legend { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.7); }
.legend i { width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; }
.lv-0 { background: var(--green); } .lv-1 { background: var(--amber); } .lv-2 { background: var(--red); } .lv-3 { background: #111; border: 1px solid #fff; }
.monitor-rows { display: grid; gap: 18px; }
.monitor-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; align-items: center; }
.row-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; grid-column: 1 / -1; }
.row-budget { color: rgba(255, 255, 255, 0.55); font-size: 12px; font-variant-numeric: tabular-nums; }
.bar { position: relative; height: 14px; border-radius: 7px; background: rgba(255, 255, 255, 0.08); overflow: visible; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; width: 0; transition: width 0.7s cubic-bezier(.2, .8, .2, 1), background 0.4s ease; }
.bar-pend { background: repeating-linear-gradient(135deg, rgba(255, 154, 31, 0.85) 0 6px, rgba(255, 154, 31, 0.45) 6px 12px); }
.bar-cons { background: #8fb3e6; z-index: 1; }
.bar-cap { position: absolute; top: -6px; bottom: -6px; width: 2px; margin-left: -1px; background: #fff; border-radius: 1px; }
.bar-cap::after { content: "100%"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 9px; font-weight: 700; opacity: 0.7; }
.monitor-row:not(:first-child) .bar-cap::after { display: none; }
.row-pct { min-width: 64px; text-align: center; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums; opacity: 0; transition: opacity 0.4s ease, background 0.4s ease; }
.monitor-demo[data-step="0"] .bar { outline: 1px dashed rgba(255, 255, 255, 0.35); outline-offset: 2px; }
.monitor-demo:not([data-step="0"]) .bar i { width: var(--w); }
.monitor-demo:not([data-step="0"]) .row-pct { opacity: 1; background: rgba(255, 255, 255, 0.12); }
.monitor-demo[data-step="2"] .monitor-row[data-level="0"] .row-pct { background: var(--green); }
.monitor-demo[data-step="2"] .monitor-row[data-level="1"] .row-pct { background: var(--amber); }
.monitor-demo[data-step="2"] .monitor-row[data-level="2"] .row-pct { background: var(--red); }
.monitor-demo[data-step="2"] .monitor-row[data-level="3"] .row-pct { background: #111; outline: 1px solid #fff; }
.monitor-demo[data-step="2"] .monitor-row:not([data-level="0"]) .bar-cons { background: #f8b4b4; }
.monitor-demo[data-step="2"] .monitor-row:not([data-level="0"]) b::after { content: " · in allerta"; color: #fca5a5; font-weight: 600; font-size: 12px; }
.monitor-caption { margin-top: 22px; font-size: 14px; color: rgba(255, 255, 255, 0.78); min-height: 2.6em; }

/* 06 Il consuntivo */
.statement-stage { display: grid; gap: 20px; justify-items: center; }
.sal-steps { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.sal-steps span { padding: 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.sal-steps span.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.sal-steps i { width: 18px; height: 2px; background: var(--line); }
.receipt {
  position: relative; width: min(100%, 440px); background: var(--card); padding: 26px 26px 30px; border-radius: 6px; overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(15, 29, 51, 0.4); font-variant-numeric: tabular-nums;
  -webkit-mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 0 0 / 22px 100% repeat-x;
          mask: radial-gradient(circle 7px at 50% 100%, transparent 98%, #000) 0 0 / 22px 100% repeat-x;
}
.receipt header { display: grid; gap: 4px; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.receipt header b { font-size: 18px; letter-spacing: -0.02em; }
.receipt header span { font-size: 12px; color: var(--muted); }
.receipt ul { display: grid; gap: 12px; padding: 18px 0; border-bottom: 1px dashed var(--line); }
.receipt li { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.receipt li.extra { color: var(--red); }
.receipt footer { display: flex; justify-content: space-between; padding-top: 16px; font-size: 16px; font-weight: 780; }
.stamp {
  position: absolute; right: 20px; top: 20px; padding: 6px 12px; border: 3px solid var(--orange); color: var(--orange);
  border-radius: 8px; font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; transform: rotate(-12deg); opacity: 0.85;
}

/* 07 Attrezzature e report */
.overview { padding: 130px clamp(16px, 6vw, 110px) 120px; }
@media (min-width: 901px) {
  /* Tutto in una schermata: titolo e pannelli seguono anche l'altezza. */
  .overview { display: flex; flex-direction: column; justify-content: center; height: 100vh; height: 100svh; min-height: 600px; padding: 84px clamp(16px, 6vw, 110px) 100px; }
  .overview-heading { width: 100%; }
  .overview-heading h2 { font-size: clamp(32px, min(4.4vw, 6.6vh), 66px); }
  .overview-heading .eyebrow { margin-bottom: 12px; }
  .overview-heading .lead { margin-top: 12px; font-size: clamp(15px, min(1.4vw, 2.2vh), 20px); }
  .overview-grid { margin-top: clamp(16px, 3vh, 36px); width: 100%; }
  .overview .panel { padding: clamp(16px, 2.4vh, 26px); gap: clamp(8px, 1.3vh, 14px); }
  .overview .panel h3 { font-size: clamp(20px, 2.8vh, 30px); }
  .overview .panel p { font-size: clamp(13px, 1.7vh, 15px); line-height: 1.5; }
  .overview .report-list li { padding: clamp(7px, 1.1vh, 12px) 14px; }
  .overview .mini-chart { height: clamp(36px, 6vh, 70px); }
  .overview .equipment-card { padding: clamp(10px, 1.6vh, 16px); }
}
@media (min-width: 901px) and (max-height: 820px) {
  .overview-heading .lead, .overview .panel-foot { display: none; }
}
.overview-heading, .overview-grid { max-width: 1280px; margin: 0 auto; }
.overview-heading .lead { color: rgba(255, 255, 255, 0.78); max-width: 48ch; }
.overview-grid { display: grid; grid-template-columns: 1.1fr 1.1fr 0.8fr; gap: 18px; margin-top: 56px; }
.panel {
  position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 22px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.12);
}
.panel-label { font-size: 11px; font-weight: 750; letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange-bright); }
.panel h3 { font-size: 30px; }
.panel p { font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, 0.72); }
.equipment-card { margin-top: auto; display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: var(--card); color: var(--ink); }
.equipment-card span { font-size: 12px; color: var(--muted); }
.barcode.small { height: 24px; margin-bottom: 6px; }
.report-list { display: grid; gap: 10px; }
.report-list li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.report-list b { font-size: 15px; }
.report-list span { font-size: 13px; color: rgba(255, 255, 255, 0.62); }
.mini-chart { display: flex; align-items: flex-end; gap: 8px; height: 70px; margin-top: 4px; }
.mini-chart i { flex: 1; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--orange-bright), var(--orange)); }
.panel-foot { font-size: 13px !important; }
.assistant { background: linear-gradient(160deg, var(--orange) 0%, #b85f00 100%); border-color: transparent; }
.assistant .panel-label { color: #fff; opacity: 0.85; }
.assistant p { color: rgba(255, 255, 255, 0.9); }
.assistant-bubble {
  margin-top: auto; align-self: flex-end; display: flex; gap: 6px; padding: 16px 18px; border-radius: 20px 20px 4px 20px;
  background: #fff;
}
.assistant-bubble .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy); animation: typing 1.2s ease-in-out infinite; }
.assistant-bubble .dot:nth-child(2) { animation-delay: 0.15s; }
.assistant-bubble .dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: none; opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* 08 Finale: la prova completa, grande e al centro */
.finale { background: radial-gradient(ellipse at 50% 20%, var(--navy-soft), var(--navy-deep) 70%); padding: 96px clamp(12px, 3vw, 40px) 110px; }
.finale-inner { width: min(1440px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 901px) {
  /* Una schermata: intestazione compatta sotto il logo, finestra fino al player. */
  .finale { display: flex; height: 100vh; height: 100svh; min-height: 620px; padding: 78px clamp(12px, 3vw, 40px) 92px; }
  /* Finestra 16:10 come un monitor: la larghezza segue l'altezza disponibile. */
  .finale { --frame-w: min(1440px, 100%, calc((100svh - 270px) * 1.6)); align-items: flex-start; justify-content: center; }
  .finale-note { display: none; }
  .finale-head h2 { white-space: nowrap; }
  .finale-inner { flex: none; width: var(--frame-w); gap: 12px; }
  .finale-head { align-items: center; }
  .finale-head .eyebrow { margin-bottom: 4px; }
  .finale-head h2 { font-size: clamp(24px, min(2.6vw, 4.4vh), 40px); }
  .finale .tryapp-frame { flex: none; width: 100%; height: auto; aspect-ratio: 16 / 10; }
}
.finale-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; }
.finale-head .eyebrow { margin-bottom: 10px; }
.finale-head h2 { font-size: clamp(30px, 3.4vw, 52px); }
.finale-note { font-size: 13px; color: rgba(255, 255, 255, .6); }
.try-strip { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .1); overflow-x: auto; scrollbar-width: none; }
.missions { flex: 1; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: mission; }
.missions li {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 5px; border-radius: 999px; counter-increment: mission;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16); font-size: 12.5px; font-weight: 600; color: rgba(255, 255, 255, .8);
  transition: background .3s ease, border-color .3s ease, color .3s ease;
}
.missions li::before {
  content: counter(mission); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); font-size: 11px; font-weight: 800;
}
.missions li.is-done { background: rgba(25, 135, 84, .3); border-color: #3fbf7f; color: #fff; }
.missions li.is-done::before { content: "✓"; background: #198754; }
.tryapp-frame {
  display: flex; flex-direction: column; width: 100%; height: clamp(540px, calc(100svh - 176px), 940px);
  border-radius: 14px; overflow: hidden; background: #f3f5f8; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08);
}
.tryapp-frame .br-bar { border-radius: 0; }
.tryapp-reset { flex: none; padding: 6px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: transparent; color: #fff; font-weight: 650; font-size: 12.5px; }
.tryapp-reset:hover { background: var(--orange); border-color: var(--orange); }
.finale-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.finale-footer a:hover { color: var(--orange-bright); }

/* 09 Firma Alesca */
.outro { display: grid; place-items: center; background: #fff; color: #1d3557; padding: 100px 16px 130px; }
.outro-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.outro-logo { width: clamp(180px, 26vw, 320px); height: auto; }
.outro-motto { margin-top: 10px; font-size: clamp(22px, 2.4vw, 34px); font-weight: 650; letter-spacing: -0.02em; color: #0054a1; }
.outro-for { font-size: 15px; color: #5b6b82; }
.outro-for b { color: var(--navy); }
.outro-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 26px; font-size: 14px; font-weight: 600; }
.outro-links a { color: #2e8ac7; }
.outro-links a:hover { color: var(--orange); }

/* Dispositivi: disegnati a misura fissa, scalati da presentation.js */
.supplier .spread { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(28px, 4vw, 64px); }
.device-slot { position: relative; width: 100%; justify-self: center; align-self: center; }
.phone-slot { width: min(300px, calc((100svh - 230px) * 300 / 620)); aspect-ratio: 300 / 620; }
.browser-slot { width: min(100%, calc((100svh - 220px) * 760 / 520)); aspect-ratio: 760 / 520; }
.device { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.device * { box-sizing: border-box; }

/* Manina, la stessa del Planner */
.hand {
  position: absolute; left: 0; top: 0; z-index: 30; width: 46px; height: 58px; pointer-events: none;
  background: url("img/tap-pointer.svg") center / contain no-repeat; filter: drop-shadow(0 4px 4px rgba(0, 34, 67, .3));
  transform-origin: 18px 5px;
}
.hand::before {
  content: ""; position: absolute; left: 6px; top: -7px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #38a5da; box-shadow: 0 0 0 5px rgba(56, 165, 218, .16);
  opacity: var(--tap, 0); transform: scale(calc(0.6 + var(--tap, 0) * 0.6));
}

/* iPhone (scocca come nel Planner) */
.iphone { width: 300px; height: 620px; }
.iphone-screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden;
  background: #f3f5f8; border: 6px solid #080b10; border-radius: 46px;
  box-shadow: 0 30px 60px rgba(7, 29, 51, .3), 0 0 0 1.5px #9eaeb9, 0 0 0 3px #52616d;
}
.iphone::before, .iphone::after { content: ""; position: absolute; width: 4px; border-radius: 3px; background: linear-gradient(90deg, #7b8b96, #e0e7ec, #95a5b1); }
.iphone::before { left: -6px; top: 120px; height: 60px; box-shadow: 0 -38px 0 -12px #95a5b1; }
.iphone::after { right: -6px; top: 160px; height: 80px; }
.ios-status { flex: 0 0 40px; display: flex; align-items: center; justify-content: space-between; padding: 6px 22px 0; background: #fff; color: #111; font-size: 12px; font-weight: 650; position: relative; }
.ios-status svg { width: 46px; height: 11px; fill: currentColor; }
.ios-island { position: absolute; left: calc(50% - 32px); top: 9px; width: 64px; height: 20px; border-radius: 14px; background: #030507; }
.ios-home { flex: 0 0 18px; display: grid; place-items: center; background: #fff; }
.ios-home i { width: 34%; height: 4px; border-radius: 4px; background: #111; }

/* Interfaccia dell'applicazione (Bootstrap, Inter, navy #0a2a5b) */
.iphone, .browser, .macbook { --app-navy: #0a2a5b; --app-text: #212529; --app-muted: #66758a; --app-orange: #f79000; color: var(--app-text); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: left; letter-spacing: normal; }
.app-topbar { flex: 0 0 46px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: #fff; border-bottom: 1px solid #e3e7ec; }
.app-topbar img { width: 40px; height: auto; }
.app-burger { width: 34px; height: 30px; display: grid; align-content: center; justify-items: end; gap: 3px; padding: 0 8px; border: 1px solid #dee2e6; border-radius: 6px; background: #f8f9fa; }
.app-burger i { display: block; height: 2px; background: #222; border-radius: 1px; width: 16px; }
.app-burger i:nth-child(2) { width: 12px; } .app-burger i:nth-child(3) { width: 8px; }
.app-screens { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.app-screen { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s; }
.app-screen.is-on { opacity: 1; visibility: visible; }
.app-page { padding: 14px 14px 18px; display: flex; flex-direction: column; gap: 8px; }
.app-scroll { will-change: transform; }
.app-h1 { font-size: 21px; font-weight: 500; line-height: 1.2; color: var(--app-text); }
.app-sub { font-size: 11px; color: var(--app-muted); margin-top: -4px; }
.app-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 10px; border-radius: 6px;
  border: 1px solid #6c757d; color: #6c757d; background: transparent; font-size: 12px; line-height: 1.3; white-space: nowrap; transition: transform .12s ease, filter .12s ease;
}
.app-btn.primary { background: var(--app-navy); border-color: var(--app-navy); color: #fff; }
.app-btn.warn { border-color: var(--app-orange); color: var(--app-orange); }
.app-btn.block { display: flex; padding: 9px 12px; font-size: 13px; margin: 2px 0; }
.app-btn.is-pressed { transform: scale(.96); filter: brightness(1.25); }
.app-card { background: #fff; border: 1px solid #e3e7ec; border-radius: 12px; padding: 9px 10px; }
.app-row { display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; align-items: center; font-size: 11px; }
.app-row b { font-size: 12px; }
.app-row > span:last-child { grid-column: 1 / -1; color: var(--app-muted); }
.app-chip { display: inline-flex; padding: 2px 8px; border-radius: 999px; border: 1px solid #d5dbe2; background: #f1f3f6; font-size: 10px; font-weight: 600; color: #3b4656; }
.app-chip.hold { background: #fff6d6; border-color: #f4dc8a; color: #8a6200; }
.app-fieldset { position: relative; margin: 6px 0 0; padding: 12px 12px 12px; border: 1px solid rgba(0, 0, 0, .176); border-radius: 14px; background: #fff; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.app-fieldset legend { float: none; width: auto; padding: 0 4px; margin-left: -4px; font-size: 13px; font-weight: 500; }
.app-label { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--app-text); margin-top: 3px; }
.app-input {
  position: relative; min-height: 28px; padding: 5px 9px; border: 1px solid #dee2e6; border-radius: 6px; background: #fff;
  font-size: 12px; line-height: 1.35; color: var(--app-text); transition: border-color .15s ease, box-shadow .15s ease; min-width: 0;
}
.app-input.area { min-height: 54px; }
.app-input.readonly { background: #eef2f6; border-color: #b8c2cc; box-shadow: inset 3px 0 0 #9aa6b2; color: #5f6b7a; }
.app-input.select { padding-right: 26px; }
.app-input.select::after { content: ""; position: absolute; right: 10px; top: 50%; width: 6px; height: 6px; border: solid #343a40; border-width: 0 1.5px 1.5px 0; transform: translateY(-70%) rotate(45deg); }
.app-input.is-focus { border-color: #86b7fe; box-shadow: 0 0 0 3px rgba(13, 110, 253, .22); }
.app-input .ph-placeholder { color: #6c757d; }
.app-input .ph-value { display: none; }
.app-input.is-filled .ph-placeholder { display: none; }
.app-input.is-filled .ph-value { display: inline; }
.app-input.readonly .ph-value { color: #5f6b7a; }
.caret { display: none; width: 1px; height: 13px; margin-left: 1px; vertical-align: -2px; background: var(--app-text); animation: caret 1s steps(1) infinite; }
.is-focus > .caret { display: inline-block; }
@keyframes caret { 50% { opacity: 0; } }
.app-input-row { display: flex; gap: 6px; }
.app-input-row .app-input { flex: 1; }
.app-menu {
  position: absolute; z-index: 20; display: flex; flex-direction: column; padding: 4px 0; background: #fff; border: 1px solid rgba(0, 0, 0, .15);
  border-radius: 6px; box-shadow: 0 8px 22px rgba(0, 0, 0, .16); font-size: 12px; opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.app-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.app-menu span { padding: 6px 12px; white-space: nowrap; }
.app-menu span.is-hover { background: #0d6efd; color: #fff; }
.app-found { display: flex; flex-direction: column; gap: 5px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .3s ease, opacity .3s ease; }
.app-found.is-on { max-height: 80px; opacity: 1; }
.app-toast { align-self: center; padding: 7px 14px; border-radius: 8px; background: #198754; color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 8px 20px rgba(25, 135, 84, .3); }
.app-badge-row { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #495057; }
.app-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 6px; background: var(--app-orange); color: #fff; font-size: 10px; font-weight: 700; }
.app-badge.is-hidden { visibility: hidden; }
.app-fab { position: absolute; right: 14px; bottom: 30px; width: 40px; height: 40px; border-radius: 50%; background: var(--app-navy); display: flex; align-items: center; justify-content: center; gap: 3px; box-shadow: 0 6px 16px rgba(10, 42, 91, .35); }
.app-fab i { width: 4px; height: 4px; border-radius: 50%; background: #fff; }

/* Browser */
.browser { width: 760px; height: 520px; display: flex; flex-direction: column; border-radius: 12px; overflow: visible; background: #f3f5f8; box-shadow: 0 30px 70px -20px rgba(7, 29, 51, .45), 0 0 0 1px rgba(15, 29, 51, .12); }
.br-bar { flex: 0 0 36px; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: #e9edf2; border-bottom: 1px solid #d5dbe2; border-radius: 12px 12px 0 0; font-size: 11px; color: #4a5566; }
.br-dots { display: flex; gap: 6px; }
.br-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.br-dots i:nth-child(2) { background: #febc2e; } .br-dots i:nth-child(3) { background: #28c840; }
.br-tab { padding: 5px 14px; border-radius: 8px 8px 0 0; background: #f3f5f8; align-self: flex-end; font-weight: 600; }
.br-address { flex: 1; display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #fff; color: #6b7686; }
.br-lock { width: 8px; height: 7px; border-radius: 1px; background: #8b95a3; position: relative; margin-top: 3px; }
.br-lock::before { content: ""; position: absolute; left: 1px; top: -5px; width: 4px; height: 5px; border: 1.5px solid #8b95a3; border-bottom: 0; border-radius: 3px 3px 0 0; }
.br-app { position: relative; flex: 1; min-height: 0; display: flex; border-radius: 0 0 12px 12px; overflow: hidden; }
.br-side { flex: 0 0 150px; display: flex; flex-direction: column; gap: 2px; padding: 12px 8px; background: #fff; border-right: 1px solid #e3e7ec; font-size: 10.5px; color: #66758a; }
.br-side img { width: 54px; height: auto; margin: 0 auto 12px; }
.br-side span { padding: 6px 8px; border-radius: 8px; }
.br-side .is-active { background: var(--app-navy); color: #fff; box-shadow: 0 5px 10px rgba(10, 42, 91, .2); }
.br-main { position: relative; flex: 1; min-width: 0; padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.br-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 8px; border-bottom: 1px solid #dfe3e8; }
.br-h1 { font-size: 18px; font-weight: 500; margin-bottom: 3px; }
.br-head .app-badge-row { font-size: 11px; }
.br-toolbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; border: 1px solid #e3e7ec; border-radius: 12px; background: #f8fafc; }
.br-toolbar .app-btn { font-size: 10.5px; padding: 4px 8px; }
.br-order-only, .browser.is-order .br-pre-only { display: none !important; }
.browser.is-order .br-order-only { display: inline-flex !important; }
.br-view { display: flex; flex-direction: column; gap: 6px; }
.br-view-order, .browser.is-order .br-view-pre { display: none; }
.browser.is-order .br-view-order { display: flex; }
.browser .app-fieldset { padding: 9px 12px 11px; gap: 4px; margin-top: 2px; }
.browser .app-fieldset legend { font-size: 12px; }
.browser .app-label { font-size: 9px; }
.browser .app-input { font-size: 11px; min-height: 25px; padding: 4px 8px; }
.browser .app-input.area { min-height: 44px; }
.br-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.br-grid > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.br-grid.wide-right { grid-template-columns: 0.6fr 1.4fr; }
.br-menu { font-size: 11px; }
.br-toast { position: absolute; right: 16px; top: 14px; opacity: 0; transform: translateY(-6px); transition: opacity .2s ease, transform .2s ease; }
.br-toast.is-on { opacity: 1; transform: none; }
.barcode { display: flex; gap: 3px; height: 34px; align-items: stretch; }
.barcode i { width: 3px; background: var(--ink); border-radius: 1px; }
.barcode i:nth-child(3n) { width: 6px; }
.barcode i:nth-child(4n) { width: 2px; }
.barcode i:nth-child(5n) { width: 5px; }


/* Prova tu */
.try-step { border-style: dashed !important; }
.try-step[aria-pressed="true"] { border-style: solid !important; }
.try-badge {
  position: absolute; left: 50%; top: -14px; z-index: 40; transform: translate(-50%, -100%); margin: 0; white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; background: var(--orange); color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: 0 10px 24px rgba(228, 122, 0, .35); opacity: 0; transition: opacity .3s ease, transform .3s ease; pointer-events: none;
}
.is-try .try-badge { opacity: 1; transform: translate(-50%, calc(-100% - 4px)); }
.is-try .hand { display: none; }
.app-real { display: none; }
.is-try .app-real { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.is-try .app-input:not(.readonly):not(.select) { cursor: text; }
.is-try .typed { display: block; min-height: 1.35em; outline: none; white-space: pre-wrap; word-break: break-word; }
.is-try .app-input:focus-within { border-color: #86b7fe; box-shadow: 0 0 0 3px rgba(13, 110, 253, .22); }
.is-try .app-input .caret { display: none !important; }
.is-try [role="button"] { cursor: pointer; }
.is-try [role="button"]:focus-visible { outline: 3px solid #86b7fe; outline-offset: 2px; }
.is-try .app-screen { overflow-y: auto; scrollbar-width: none; }
.try-only { display: none; }
.is-try .try-only { display: flex; }
.app-input.is-invalid { border-color: #dc3545 !important; box-shadow: 0 0 0 3px rgba(220, 53, 69, .25) !important; animation: shake .35s ease; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

/* Indice e player */
.chapter-nav { position: fixed; right: 22px; top: 50%; z-index: 30; display: grid; gap: 14px; transform: translateY(-50%); }
.chapter-nav a { position: relative; display: block; width: 10px; height: 10px; }
.chapter-nav a::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(140, 160, 190, 0.55);
  box-shadow: 0 0 0 2px rgba(0, 22, 49, 0.25); transition: transform 0.25s ease, background 0.25s ease;
}
.chapter-nav a[aria-current]::after { background: var(--orange); transform: scale(1.5); }
.chapter-nav a span {
  position: absolute; right: 22px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; pointer-events: none;
  padding: 6px 10px; border-radius: 8px; background: var(--navy-deep); color: #fff; font-size: 12px; font-weight: 650;
  opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease;
}
.chapter-nav a:hover span, .chapter-nav a:focus-visible span { opacity: 1; transform: translate(0, -50%); }

.player {
  position: fixed; left: 50%; bottom: 20px; z-index: 30; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px; overflow: hidden;
  background: rgba(0, 22, 49, 0.82); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.player > button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: #fff; font-size: 16px; }
.player > button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); color: var(--orange-bright); }
.player #play { background: var(--orange); }
.player #play:hover { background: var(--orange-bright); color: #fff; }
.player-counter { min-width: 62px; text-align: center; font-size: 11px; font-weight: 750; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.player-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.player-progress i { display: block; height: 100%; background: var(--orange-bright); transform-origin: left; transform: scaleX(0); }

/* Scene fissate */
.story-progress { display: none; }
.story-chapter .story-progress { display: flex; align-items: center; gap: 14px; margin-top: 26px; font-size: 12px; font-weight: 700; }
.story-chapter .story-progress + .step-choices { margin-top: 10px; }
.story-position { font-variant-numeric: tabular-nums; color: var(--orange); }
.dark .story-position { color: var(--orange-bright); }
.story-hint { margin-left: auto; opacity: 0.55; font-size: 11px; }
.story-chapter .spread { height: 100vh; height: 100svh; min-height: 0; }

@media (max-height: 820px) {
  .story-chapter .copy > p:not(.eyebrow):not(.lead) { display: none; }
  .story-chapter .spread { padding-top: 96px; padding-bottom: 120px; }
  .story-chapter h2 { font-size: clamp(34px, 4vw, 56px); }
}

@media (max-width: 1080px) {
  .overview-grid { grid-template-columns: 1fr 1fr; }
  .assistant { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  h1 { font-size: clamp(38px, 10vw, 60px); }
  h2 { font-size: clamp(32px, 8.5vw, 50px); }
  .masthead { height: 64px; }
  .brand { font-size: 10px; padding: 4px 10px 5px; }
  .brand img { width: 36px; }
  .intro-hero { grid-template-columns: 1fr; align-content: center; gap: 24px; padding: 84px 16px 110px; }
  .intro-stats, .intro-lead { display: none; }
  .intro-copy h1 { font-size: clamp(34px, 9vw, 54px); }
  .intro-actions { margin-top: 18px; }
  .intro-devices { width: min(100%, 420px); justify-self: center; }
  .kitchen-captions { bottom: 100px; }
  .spread { grid-template-columns: 1fr; padding-top: 96px; padding-bottom: 110px; gap: 32px; }
  .statement .statement-stage { order: 2; }
  .chapter-nav { display: none; }

  .story-chapter .spread { display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 14px; padding: 80px 16px 130px; }
  .story-chapter .copy { display: contents; }
  .story-chapter .eyebrow { order: 0; margin: 0; }
  .story-chapter h2 { order: 1; font-size: clamp(26px, 7vw, 36px); }
  .story-chapter h2 br { display: none; }
  .story-chapter .lead { order: 2; font-size: 15px; margin: 0; }
  .story-chapter .copy > p:not(.eyebrow):not(.lead) { display: none; }
  .story-chapter .device-slot, .story-chapter .track-demo, .story-chapter .monitor-demo { order: 4; }
  .story-chapter .step-choices { order: 3; margin: 0; padding-top: 12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .story-chapter .step-choices button { flex: none; padding: 8px 12px; font-size: 13px; }
  .story-chapter .story-progress { order: 3; margin: 0; }
  .story-chapter .story-hint { display: none; }
  .story-chapter .demo-note { display: none; }
  .story-chapter .track-demo { gap: 20px; }
  .story-chapter .track-ticket { padding: 16px; }
  .story-chapter .track-ticket p { font-size: 13px; }
  .story-chapter .track-log { display: none; }
  .story-chapter .monitor-demo { padding: 16px; }
  .story-chapter .monitor-rows { gap: 12px; }
  .story-chapter .monitor-caption { margin-top: 12px; font-size: 13px; min-height: 0; }
}

@media (max-width: 900px) and (max-height: 760px) {
  .story-chapter .lead { display: none; }
  .story-chapter .spread { padding-top: 72px; }
}

@media (max-width: 600px) {
  .back-show { padding: 8px 12px; font-size: 12px; }
  .ticket dl { grid-template-columns: 1fr; }
  .track li span { font-size: 10px; }
  .overview { padding: 96px 16px 120px; }
  .overview-grid { grid-template-columns: 1fr; }
  .legend { display: none; }
  .player-counter { min-width: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Dispositivi nelle scene fissate su schermi stretti */
@media (max-width: 900px) {
  .supplier .spread { grid-template-columns: 1fr; }
  .story-chapter .try-badge { display: none; }
  .story-chapter .phone-slot { width: min(250px, calc((100svh - 330px) * 300 / 620)); }
  .story-chapter .browser-slot { width: min(100%, calc((100svh - 330px) * 760 / 520)); }
}

