/* Mini sito DiriGO! — stile condiviso (coerente con DESIGN.md del sito) */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: #fafafa; color: var(--ink); font-family: 'Archivo', system-ui, sans-serif; --ink: #0a0a0a; --navy: #16325a; --accent: #ef7622; --accent-text: #c4560f; --teal: #2b87a0; --green: #a8d08a; -webkit-font-smoothing: antialiased; }
a { color: inherit; }

/* NAV */
.nav { position: sticky; top: 0; background: #fafafa; z-index: 50; display: grid; grid-template-columns: 1fr auto; padding: 18px 32px; border-bottom: 1px solid var(--navy); align-items: center; }
.brand { font-family: 'Bebas Neue', sans-serif; font-size: 32px; letter-spacing: .005em; line-height: 1; display: flex; align-items: baseline; gap: 14px; text-decoration: none; color: inherit; }
.brand-sub { font-family: 'JetBrains Mono', monospace; color: #666; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.menu { display: flex; gap: 4px; font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.menu a { text-decoration: none; padding: 6px 12px; text-transform: uppercase; letter-spacing: .08em; border: 1px solid transparent; transition: all .15s; }
.menu a:hover { border-color: var(--navy); }
.menu a.current { background: var(--navy); color: #fafafa; }

/* SOTTOMENU GUIDA */
.guide-nav { position: sticky; top: var(--navh, 66px); z-index: 49; background: #fafafa; display: flex; gap: 4px; flex-wrap: wrap; padding: 12px 32px; border-bottom: 1px solid var(--navy); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.guide-nav img { height: 22px; width: auto; margin-right: 12px; align-self: center; }
.guide-nav a { text-decoration: none; padding: 5px 10px; text-transform: uppercase; letter-spacing: .08em; border: 1px solid transparent; }
.guide-nav a:hover { border-color: var(--navy); }
.guide-nav a.current { background: var(--navy); color: #fafafa; }

/* HERO */
.hero { padding: 56px 32px 64px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero-text { container-type: inline-size; }
.hero-logo { display: block; width: min(260px, 70%); height: auto; margin-bottom: 30px; }
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.eyebrow::before { content: ''; width: 10px; height: 10px; background: var(--accent); border-radius: 50%; }
.hero h1 { font-weight: 900; text-transform: uppercase; font-size: clamp(32px, 10.5cqw, 64px); line-height: .96; letter-spacing: -.04em; }
.hero h1 span { color: var(--accent); display: block; }
.hero .lead { margin-top: 28px; font-size: 18px; line-height: 1.6; color: #333; max-width: 62ch; }
.hero .lead + .lead { margin-top: 16px; }
.hero .lead strong { font-weight: 700; color: #1c1c1c; }

/* ANIMAZIONE HERO */
.stage { border: 1px solid var(--navy); background: #fff; --p: .25; }
.stage-bar { display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-bottom: 1px solid var(--navy); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.stage-bar .dots { display: flex; gap: 5px; }
.stage-bar .dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--navy); }
.screen { position: relative; aspect-ratio: 16 / 10; background: #f1f1f1; overflow: hidden; }
.slide { position: absolute; inset: 0; opacity: 0; transform: translateX(7%) scale(.985); transition: opacity .55s ease, transform .7s cubic-bezier(.2, .8, .3, 1); pointer-events: none; }
.slide.on { opacity: 1; transform: none; }
.slide.past { transform: translateX(-7%) scale(.985); }
.slide .shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; background: #fff; }
.slide.duo .shot { object-fit: contain; object-position: center; background: #f1f1f1; }
.slide .shot { object-position: top left; }
.ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: repeating-linear-gradient(135deg, #f6f6f6 0 14px, #efefef 14px 28px); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: #777; }
.ph b { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: 26px; letter-spacing: -.02em; color: var(--ink); }
.ph-logo { width: 52px; height: 52px; margin-bottom: 6px; }
.slide.on .ph-logo { animation: pop .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.stage-cap { min-height: 3.4em; padding: 14px 16px 6px; font-size: 16px; font-weight: 700; line-height: 1.35; color: #1c1c1c; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--navy); }
.stepper li + li { border-left: 1px solid var(--navy); }
.stepper button { position: relative; width: 100%; padding: 12px 10px 14px; background: none; border: 0; cursor: pointer; text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #777; transition: color .2s, background .2s; overflow: hidden; }
.stepper button span { display: block; font-size: 10px; color: #aaa; margin-bottom: 3px; }
.stepper button:hover { background: #fafafa; }
.stepper button.on { color: var(--ink); font-weight: 500; }
.stepper button.on span, .stepper button.done span { color: var(--accent-text); }
.stepper button.done { color: var(--ink); }
.stepper button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.stepper .fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); transform-origin: left; animation: bar linear forwards; }
.stage.paused .fill { animation-play-state: paused; }
@keyframes bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .slide, .slide.on .ph-logo { transition: none; animation: none; } }

/* SEZIONI */
.section { padding: 64px 32px; border-top: 1px solid var(--navy); }
.section-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; margin-bottom: 36px; padding-bottom: 20px; border-bottom: 1px solid var(--navy); align-items: end; }
.section-title { grid-column: 1 / 10; font-weight: 900; text-transform: uppercase; letter-spacing: -.02em; line-height: 1; font-size: clamp(26px, 3.6vw, 44px); }
.section-num { grid-column: 10 / 13; text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .05em; }
.prose { max-width: 62ch; font-size: 17px; line-height: 1.65; color: #333; }
.prose p + p { margin-top: 14px; }
.prose strong { font-weight: 700; color: #1c1c1c; }

/* PERCORSO (elenco numerato) */
.flow { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--navy); background: #fff; }
.flow li { padding: 22px 22px 24px; border-right: 1px solid var(--navy); }
.flow li:last-child { border-right: 0; }
.flow .n { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .1em; color: var(--accent-text); }
.flow h3 { font-weight: 900; text-transform: uppercase; font-size: 20px; letter-spacing: -.01em; margin: 8px 0 8px; }
.flow p { font-size: 15px; line-height: 1.55; color: #444; }

/* CARD GUIDE */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--navy); border-left: 1px solid var(--navy); }
.card { display: flex; flex-direction: column; padding: 24px; border-right: 1px solid var(--navy); border-bottom: 1px solid var(--navy); text-decoration: none; background: #fafafa; transition: background .15s; }
.card:hover { background: #fff; }
.card .n { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .1em; color: var(--accent-text); }
.card h3 { font-weight: 900; text-transform: uppercase; font-size: 21px; letter-spacing: -.01em; line-height: 1.05; margin: 10px 0 10px; }
.card p { font-size: 15px; line-height: 1.55; color: #444; flex: 1; }
.card .go { margin-top: 18px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.card:hover .go { color: var(--accent-text); }

/* CTA */
.cta { padding: 56px 32px 72px; border-top: 1px solid var(--navy); display: flex; gap: 32px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.cta p { font-size: 20px; font-weight: 700; max-width: 34ch; line-height: 1.3; }
.btn { font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; background: var(--navy); color: #fafafa; padding: 14px 22px; border: 1px solid var(--navy); transition: all .2s; white-space: nowrap; }
.btn:hover { background: var(--accent-text); border-color: var(--accent-text); }

/* FOOTER */
.foot { padding: 22px 32px; border-top: 1px solid var(--navy); font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .05em; color: #666; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero h1 { font-size: clamp(32px, 9cqw, 64px); }
}
@media (max-width: 960px) {
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li:nth-child(2) { border-right: 0; }
  .flow li:nth-child(-n+2) { border-bottom: 1px solid var(--navy); }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav { padding: 14px 16px; grid-template-columns: 1fr; gap: 10px; }
  .menu { flex-wrap: wrap; gap: 2px; }
  .guide-nav { padding: 10px 16px; }
  .hero { padding: 48px 16px 40px; }
  .section { padding: 44px 16px; }
  .section-title { grid-column: 1 / 13; }
  .section-num { display: none; }
  .flow, .cards { grid-template-columns: 1fr; }
  .flow li { border-right: 0; border-bottom: 1px solid var(--navy); }
  .flow li:last-child { border-bottom: 0; }
  .cta, .foot { padding-left: 16px; padding-right: 16px; }
}

/* PAGINA CON TELEFONI */
.hero-split { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
.phones { display: flex; gap: 24px; justify-content: center; align-items: flex-start; }
.phone { flex: 1 1 0; max-width: 250px; }
.phone img { display: block; width: 100%; height: auto; border: 1px solid var(--navy); background: #1c1c1e; }
.phone figcaption { margin-top: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--navy); }
.phone:nth-child(2) { margin-top: 36px; }
.flow3 { grid-template-columns: repeat(3, 1fr); }
.facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--navy); border-left: 1px solid var(--navy); }
.facts li { padding: 20px 22px 22px; border-right: 1px solid var(--navy); border-bottom: 1px solid var(--navy); background: #fff; }
.facts b { display: block; font-weight: 900; text-transform: uppercase; font-size: 17px; letter-spacing: -.01em; margin-bottom: 6px; }
.facts span { font-size: 15px; line-height: 1.55; color: #444; }
@media (max-width: 1000px) { .hero-split { grid-template-columns: 1fr; } }
@media (max-width: 960px) { .flow3 { grid-template-columns: 1fr; } .flow3 li { border-right: 0; border-bottom: 1px solid var(--navy); } .flow3 li:last-child { border-bottom: 0; } .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } .phones { gap: 14px; } }

/* evidenzia il microfono */
.pimg { position: relative; }
.hot { position: absolute; left: 50%; top: 29%; width: 25%; aspect-ratio: 1; transform: translate(-50%, -50%); border: 3px solid var(--accent); border-radius: 50%; pointer-events: none; }
.hot::after { content: ''; position: absolute; inset: -3px; border: 3px solid var(--accent); border-radius: 50%; animation: hotring 1.8s ease-out infinite; }
@keyframes hotring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.7); opacity: 0; } }
.hot-tag { position: absolute; left: 66%; top: 29%; transform: translateY(-50%); background: var(--accent-text); color: #fff; font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; text-align: left; line-height: 1.35; padding: 5px 8px; white-space: nowrap; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .hot::after { animation: none; } }

/* note a piè (asterisco) */
.fn { color: var(--accent-text); font-weight: 900; text-decoration: none; margin-left: 1px; }
.fn:hover { text-decoration: underline; }
.footnote { margin-top: 18px; max-width: 62ch; font-size: 13.5px; line-height: 1.55; color: #555; padding-top: 12px; border-top: 1px solid var(--navy); }
.footnote:target { color: var(--ink); }

/* slide sopralluogo nella hero: due telefoni affiancati */
.slide.duo .pair { position: absolute; inset: 0; display: flex; gap: 22px; justify-content: center; align-items: center; padding: 14px; background: #f1f1f1; }
.slide.duo .pair .pimg { flex: 0 0 auto; height: 100%; aspect-ratio: 338 / 732; }
.slide.duo .pair .shot { position: static; width: 100%; height: 100%; display: block; object-fit: fill; border: 1px solid var(--navy); background: #1c1c1e; }
.slide.duo .pair .hot-tag { font-size: 8.5px; padding: 4px 6px; }

/* SCREENSHOT IN PAGINA */
.shotfig { margin: 0; }
.shotfig img { display: block; width: 100%; height: auto; border: 1px solid var(--navy); background: #fff; }
.shotfig figcaption { margin-top: 10px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); line-height: 1.5; }
.dual { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.dual-rev { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.facts1 { grid-template-columns: 1fr; }
.prose-after { margin-top: 28px; }
.prose a { color: var(--accent-text); font-weight: 700; }
@media (max-width: 900px) { .dual, .dual-rev { grid-template-columns: 1fr; gap: 28px; } }
.hero .lead-note { padding-top: 14px; border-top: 1px solid var(--navy); }

/* RIEPILOGO ANIMATO: FORMATO STANDARD per i punti salienti (voci a sinistra, schermata a destra). Riusare .rot, .rot-list, .rot-stage, .rot-slide e lo script #rot di briefing.html */
.rot { align-items: stretch; }
.rot-list { list-style: none; display: flex; flex-direction: column; gap: 0; border: 1px solid var(--navy); background: #fff; }
.rot-list li + li { border-top: 1px solid var(--navy); }
.rot-list button { position: relative; display: block; width: 100%; text-align: left; padding: 24px 26px 26px; background: #fff; border: 0; cursor: pointer; font: inherit; color: inherit; overflow: hidden; transition: background .3s; }
.rot-list button b { display: block; font-weight: 900; text-transform: uppercase; font-size: 18px; letter-spacing: -.01em; color: #777; transition: color .3s; }
.rot-list button span { display: block; margin-top: 8px; font-size: 15px; line-height: 1.55; color: #777; transition: color .3s; }
.rot-list button.on { background: #fafafa; }
.rot-list button.on b { color: var(--ink); }
.rot-list button.on span { color: #333; }
.rot-list button .fill { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.rot-list button.on .fill { animation: rotbar 5.2s linear forwards; }
.rot.paused .fill { animation-play-state: paused !important; }
@keyframes rotbar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.rot-list button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.rot-stage { position: relative; aspect-ratio: 8 / 5; border: 1px solid var(--navy); background: #f1f1f1; overflow: hidden; }
.rot-slide { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(10px) scale(.99); transition: opacity .5s ease, transform .6s cubic-bezier(.2,.8,.3,1); pointer-events: none; }
.rot-slide.on { opacity: 1; transform: none; pointer-events: auto; }
.rot-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.mail { width: min(86%, 380px); background: #fff; border: 1px solid var(--navy); font-size: 15px; line-height: 1.5; box-shadow: none; }
.mail-bar { padding: 9px 14px; border-bottom: 1px solid var(--navy); font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; display: flex; justify-content: space-between; gap: 10px; }
.mail-bar em { font-style: normal; color: var(--accent-text); }
.mail-body { padding: 18px 20px 20px; color: #222; }
.mail-body p + p, .mail-body ol { margin-top: 12px; }
.mail-body ol { padding-left: 22px; }
.rot-slide.on .mail-body li { animation: mailin .5s ease both; }
.rot-slide.on .mail-body li:nth-child(2) { animation-delay: .2s; }
.rot-slide.on .mail-body li:nth-child(3) { animation-delay: .4s; }
@keyframes mailin { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) { .rot-stage { aspect-ratio: 8 / 5; } }
@media (prefers-reduced-motion: reduce) { .rot-slide, .rot-list button .fill { transition: none; animation: none !important; } }
.rot-list li { flex: 1; display: flex; }
.rot-list button { height: 100%; }

/* REGOLA: niente colonne mezze vuote. Testo solo = griglia di note a tutta larghezza (.notes), oppure testo + immagine (.dual). */
.notes { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); border-top: 1px solid var(--navy); border-left: 1px solid var(--navy); }
.notes li { padding: 22px 24px 26px; border-right: 1px solid var(--navy); border-bottom: 1px solid var(--navy); background: #fff; }
.notes b { display: block; font-weight: 900; text-transform: uppercase; font-size: 17px; letter-spacing: -.01em; line-height: 1.1; margin-bottom: 10px; }
.notes span { display: block; font-size: 15.5px; line-height: 1.6; color: #333; }
.notes strong { color: #1c1c1c; font-weight: 700; }
.prose-after { max-width: none; font-size: 18px; line-height: 1.6; }
.rot-stage { width: 100%; align-self: center; }

/* ALBERO A TRE LIVELLI */
.tree { display: flex; flex-direction: column; gap: 10px; }
.tr { display: grid; grid-template-columns: 92px 1fr; grid-template-rows: auto auto; column-gap: 14px; padding: 14px 18px; background: #fff; border: 1px solid var(--navy); }
.tr .tl { grid-row: 1 / 3; align-self: center; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.tr b { font-weight: 900; text-transform: uppercase; font-size: 17px; letter-spacing: -.01em; line-height: 1.15; }
.tr em { font-style: normal; font-size: 14px; color: #555; margin-top: 3px; }
.tr1 { background: #f1f1f1; }
.tr2 { margin-left: 28px; }
.tr3 { margin-left: 56px; background: #fafafa; }
.notes1 { grid-template-columns: 1fr; }
@media (max-width: 640px) { .tr2 { margin-left: 14px; } .tr3 { margin-left: 28px; } .tr { grid-template-columns: 74px 1fr; } }

/* SCHERMATA CON ETICHETTE DEI LIVELLI */
.dual-wide { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.levels { position: relative; padding-right: 92px; }
.levels figcaption { padding-right: 0; }
.lv { position: absolute; right: 0; width: 84px; transform: translateY(-50%); font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--accent-text); padding: 5px 7px; line-height: 1.2; }
.lv-area { top: 6.4%; }
.lv-voce { top: 28%; }
.lv-sub { top: 61%; }
@media (max-width: 900px) { .dual-wide { grid-template-columns: 1fr; } .levels { padding-right: 70px; } .lv { width: 64px; font-size: 9px; } }

/* Lightbox screenshot */
img[data-lb] { cursor: zoom-in; }
.lb { position: fixed; inset: 0; background: rgba(8,8,8,.96); z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 56px 24px 24px; opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease; cursor: zoom-out; }
.lb.open { opacity: 1; visibility: visible; }
.lb img { max-width: 100%; max-height: calc(100vh - 120px); width: auto; height: auto; object-fit: contain; }
.lb-cap { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #fafafa; text-align: center; max-width: 80ch; }
.lb-x { position: absolute; top: 14px; right: 20px; background: none; border: 1px solid #fafafa; color: #fafafa; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 8px 12px; cursor: pointer; border-radius: 0; }
.lb-x:hover { background: #fafafa; color: #0a0a0a; }
.guide-nav a.nav-cta { background: var(--accent-text); color: #fff; margin-left: auto; }
.btn.btn-accent { background: var(--accent-text); border-color: var(--accent-text); }
.btn.btn-accent:hover { background: var(--navy); border-color: var(--navy); }
.foot a { color: inherit; }
