/* Lap Timer Pro · pagina di presentazione su AppArea (stessa struttura di TerryTalk).
   Sempre scura come l'app, accento giallo cronometro, viola miglior giro, verde/rosso delta. */
:root {
  --petrolio: #FFD400;
  --petrolio-scuro: #121218;
  --petrolio-2: #1C1C24;
  --fondo: #0B0B0F;
  --carta: #15151B;
  --carta-2: #1E1E26;
  --linea: #2A2A34;
  --testo: #F4F4F8;
  --testo-2: #C9C9D4;
  --testo-3: #9A9AA8;
  --accento: #FFD400;
  --accento-forte: #FFE45C;
  --accento-tenue: #2E2A10;
  --arancio: #FFD400;
  --arancio-tenue: #2E2A10;
  --verde: #00E676;
  --verde-tenue: #0E2A1B;
  --rosso: #FF5252;
  --rosso-tenue: #2E1414;
  --viola: #C77DFF;
  --azzurro: #4FC3F7;
  --su-scuro: #E2E2EA;
  --su-scuro-2: #FFD400;
  --ombra: 0 1px 2px rgba(0,0,0,.4), 0 14px 36px rgba(0,0,0,.5);
  --titoli: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --corpo: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--fondo); color: var(--testo); font: 400 17px/1.6 var(--corpo); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accento-forte); text-underline-offset: 3px; }
a:hover { color: var(--accento); }
:focus-visible { outline: 3px solid var(--accento); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--titoli); font-weight: 700; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }
.colonna { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.stretta { max-width: 780px; }

/* Barra in alto */
.barra { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--fondo) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.barra .colonna { display: flex; align-items: center; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.marchio { display: flex; align-items: center; gap: 10px; font-family: var(--titoli); font-weight: 700; font-size: 1.2rem; color: var(--testo); text-decoration: none; }
.marchio img { width: 34px; height: 34px; border-radius: 9px; }
.barra nav { display: flex; gap: 4px 18px; flex-wrap: wrap; margin-left: auto; font-size: .95rem; }
.barra nav a { color: var(--testo-2); text-decoration: none; padding: 6px 0; }
.barra nav a:hover, .barra nav a[aria-current] { color: var(--accento-forte); }

/* Bottoni */
.bottoni { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 24px; border-radius: 14px; font-weight: 600; text-decoration: none; border: 1px solid transparent; font-size: 1rem; font-family: var(--corpo); cursor: pointer; }
.btn-pieno { background: var(--petrolio); color: #000; }
.btn-pieno:hover { background: var(--accento-forte); color: #000; }
.btn-vuoto { background: var(--carta); color: var(--testo); border-color: var(--linea); }
.btn-vuoto:hover { border-color: var(--accento); color: var(--accento-forte); }
.btn-chiaro { background: #fff; color: var(--petrolio-scuro); }
.btn-chiaro:hover { background: var(--su-scuro); color: var(--petrolio-scuro); }

/* Bande */
.banda { padding: 88px 0; }
.banda-carta { background: var(--carta); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.banda-scura { background: var(--petrolio-scuro); color: var(--su-scuro); }
.banda-scura h2, .banda-scura h3 { color: #fff; }
.banda-scura p { color: var(--su-scuro); }
.occhiello { font-size: .82rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accento-forte); margin-bottom: 12px; }
.banda-scura .occhiello { color: var(--su-scuro-2); }
.intro { font-size: 1.15rem; color: var(--testo-2); margin-top: 16px; max-width: 760px; }
.banda-scura .intro { color: var(--su-scuro); }

/* Apertura */
.apertura { padding: 64px 0 80px; }
.apertura .colonna { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; }
.apertura .sopra { display: inline-flex; gap: 8px; align-items: center; background: var(--arancio-tenue); color: var(--arancio); padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .9rem; margin-bottom: 20px; }
.apertura p.sotto { font-size: 1.2rem; color: var(--testo-2); margin: 20px 0 28px; }
.apertura .note { margin-top: 18px; font-size: .92rem; color: var(--testo-3); }
.scena { position: relative; min-height: 440px; }
.scena .tab { position: absolute; left: 0; top: 30px; width: 88%; border-radius: 18px; border: 10px solid #10161B; box-shadow: var(--ombra); background: #10161B; }
.scena .tel { position: absolute; right: 0; bottom: 0; width: 34%; border-radius: 28px; border: 8px solid #10161B; box-shadow: var(--ombra); background: #10161B; }
.scena img { border-radius: 10px; }
.scena .tel img { border-radius: 20px; }

/* Griglie e schede */
.griglia { display: grid; gap: 20px; margin-top: 40px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.scheda { background: var(--carta); border: 1px solid var(--linea); border-radius: 18px; padding: 24px; }
.banda-carta .scheda { background: var(--fondo); }
.banda-scura .scheda { background: var(--petrolio-2); border-color: #6B3219; }
.scheda h3 { margin-bottom: 8px; }
.scheda p { color: var(--testo-2); }
.banda-scura .scheda p { color: var(--su-scuro); }
.passo { position: relative; padding-top: 64px; }
.passo .n { position: absolute; top: 22px; left: 24px; width: 34px; height: 34px; border-radius: 10px; background: var(--petrolio); color: #000; font-family: var(--titoli); font-weight: 700; display: grid; place-items: center; }
.passo img { margin-top: 18px; border-radius: 12px; border: 1px solid var(--linea); }
.icona { width: 44px; height: 44px; border-radius: 12px; background: var(--accento-tenue); color: var(--accento-forte); display: grid; place-items: center; margin-bottom: 14px; }
.icona svg { width: 24px; height: 24px; }

/* Righe immagine + testo */
.riga { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; margin-top: 64px; }
.riga.inversa > :first-child { order: 2; }
.riga h3 { font-size: 1.7rem; margin-bottom: 14px; }
.riga p + p { margin-top: 12px; }
.riga ul { margin: 16px 0 0; padding-left: 20px; color: var(--testo-2); }
.riga li + li { margin-top: 6px; }
.telefoni { display: flex; gap: 16px; justify-content: center; }
.telefoni figure { margin: 0; flex: 1; max-width: 240px; }
.telefoni img, .cornice-tel { border-radius: 22px; border: 7px solid #10161B; background: #10161B; box-shadow: var(--ombra); }
.cornice-tab { border-radius: 16px; border: 9px solid #10161B; background: #10161B; box-shadow: var(--ombra); }
figcaption { font-size: .88rem; color: var(--testo-3); text-align: center; margin-top: 10px; }

/* Tabelle */
.tabella { width: 100%; border-collapse: collapse; margin-top: 32px; background: var(--carta); border-radius: 16px; overflow: hidden; border: 1px solid var(--linea); }
.tabella th, .tabella td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--linea); vertical-align: top; }
.tabella th { background: var(--carta-2); font-weight: 600; }
.tabella tr:last-child td { border-bottom: none; }
.scorre { overflow-x: auto; }

/* Linea del tempo (orari) */
.tempo { margin-top: 40px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; position: relative; }
.tempo::before { content: ""; position: absolute; top: 19px; left: 12%; right: 12%; height: 4px; background: linear-gradient(90deg, var(--su-scuro-2), #fff); border-radius: 2px; }
.tempo div { text-align: center; position: relative; padding: 0 10px; }
.tempo b { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #fff; color: var(--petrolio-scuro); font-family: var(--titoli); margin-bottom: 12px; }
.tempo strong { display: block; color: #fff; font-family: var(--titoli); font-size: 1.4rem; }
.tempo span { display: block; font-size: .95rem; color: var(--su-scuro); }

/* Settori */
.settori { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 36px; }
.settori div { background: var(--carta); border: 1px solid var(--linea); border-radius: 14px; padding: 16px; font-weight: 600; }
.settori small { display: block; font-weight: 400; color: var(--testo-3); font-size: .88rem; margin-top: 4px; }

/* Piani */
.piano { display: flex; flex-direction: column; gap: 14px; }
.piano .etichetta { align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--verde-tenue); color: var(--verde); }
.piano.pro .etichetta { background: var(--arancio-tenue); color: var(--arancio); }
.piano ul { margin: 0; padding-left: 20px; color: var(--testo-2); }
.piano li + li { margin-top: 6px; }
.prezzo { display: flex; align-items: baseline; gap: 8px; }
.prezzo strong { font-family: var(--titoli); font-size: 2.6rem; line-height: 1; color: var(--testo); }
.prezzo span { color: var(--testo-3); font-weight: 500; }
.prezzo-anno { background: var(--arancio-tenue); border-radius: 12px; padding: 10px 14px; color: var(--testo); font-size: .97rem; }
.prezzo-anno small { color: var(--testo-3); font-size: .86rem; }
.sconto { display: inline-block; background: var(--arancio); color: #fff; font-weight: 700; font-size: .78rem; padding: 2px 8px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }

/* Domande */
details { background: var(--carta); border: 1px solid var(--linea); border-radius: 14px; padding: 0 20px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--titoli); font-size: 1.4rem; line-height: 1; color: var(--accento); }
details[open] summary::after { content: "–"; }
details p { padding-bottom: 18px; color: var(--testo-2); }

/* Riquadri di avviso */
.nota { border-radius: 14px; padding: 16px 18px; background: var(--accento-tenue); color: var(--testo); }
.nota.calda { background: var(--arancio-tenue); }
.nota.verde { background: var(--verde-tenue); }
.nota.rossa { background: var(--rosso-tenue); }
.nota b { display: block; margin-bottom: 4px; }

/* Chiusura e piede */
.finale { text-align: center; }
.finale .bottoni { justify-content: center; margin-top: 28px; }
.piede { padding: 40px 0; font-size: .92rem; color: var(--testo-3); border-top: 1px solid var(--linea); }
.piede .colonna { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.piede a { color: var(--testo-2); }

/* Manuale */
.manuale { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; padding: 48px 0 80px; }
.indice { position: sticky; top: 88px; align-self: start; font-size: .94rem; }
.indice ol { margin: 0; padding-left: 20px; }
.indice li { margin: 6px 0; }
.indice a { color: var(--testo-2); text-decoration: none; }
.indice a:hover { color: var(--accento-forte); }
.capitolo { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--linea); scroll-margin-top: 80px; }
.capitolo:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.capitolo h2 { font-size: 1.9rem; margin-bottom: 14px; }
.capitolo h3 { margin: 26px 0 10px; scroll-margin-top: 80px; }
.capitolo p { color: var(--testo-2); margin: 10px 0; }
.capitolo ol, .capitolo ul { color: var(--testo-2); padding-left: 22px; }
.capitolo li { margin: 7px 0; }
.capitolo figure { margin: 22px 0; }
.capitolo .tel-piccolo { max-width: 270px; }
.tasto { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--carta-2); border: 1px solid var(--linea); font-weight: 600; font-size: .92em; white-space: nowrap; }

@media (max-width: 900px) {
  .apertura .colonna, .riga, .manuale { grid-template-columns: minmax(0, 1fr); }
  .riga.inversa > :first-child { order: 0; }
  .g3, .g4, .settori { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .indice { position: static; }
  .scena { min-height: 360px; }
  .banda { padding: 64px 0; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4, .settori { grid-template-columns: minmax(0, 1fr); }
  .tempo { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .tempo::before { display: none; }
  .scena { min-height: 300px; }
  .barra nav { font-size: .9rem; }
}

/* ---- Terry Smart PBX: dialoghi della chiamata ed esempi pratici ---- */
.scena .tel.a { left: 4%; right: auto; bottom: auto; top: 0; width: 44%; transform: rotate(-3deg); }
.scena .tel.b { right: 4%; bottom: 0; width: 44%; transform: rotate(3deg); }
.dialogo { background: var(--carta); border: 1px solid var(--linea); border-radius: 18px; padding: 22px; box-shadow: var(--ombra); display: flex; flex-direction: column; gap: 10px; }
.banda-carta .dialogo { background: var(--fondo); }
.dialogo .titolo { font-family: var(--titoli); font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; display: flex; gap: 10px; align-items: center; }
.dialogo .titolo small { font-family: var(--corpo); font-weight: 500; color: var(--testo-3); font-size: .85rem; }
.battuta { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: .97rem; line-height: 1.45; }
.battuta.voce { background: var(--accento-tenue); border-bottom-left-radius: 4px; align-self: flex-start; }
.battuta.voce::before { content: "🔊 Centralino"; display: block; font-size: .75rem; font-weight: 700; color: var(--accento-forte); margin-bottom: 2px; letter-spacing: .02em; }
.battuta.cliente { background: var(--arancio-tenue); border-bottom-right-radius: 4px; align-self: flex-end; text-align: right; }
.battuta.cliente::before { content: "Cliente"; display: block; font-size: .75rem; font-weight: 700; color: var(--arancio); margin-bottom: 2px; }
.battuta.fatto { align-self: center; max-width: 100%; background: transparent; color: var(--testo-3); font-size: .88rem; text-align: center; padding: 2px 8px; border-top: 1px dashed var(--linea); border-radius: 0; width: 100%; }
.battuta.fatto b { color: var(--testo); }
.battuta.ok { background: var(--verde-tenue); align-self: center; text-align: center; max-width: 100%; font-weight: 600; color: var(--verde); }
.esempi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 40px; }
.esempio { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; background: var(--carta); border: 1px solid var(--linea); border-radius: 22px; padding: 30px; box-shadow: var(--ombra); }
.banda-carta .esempio { background: var(--carta); }
.esempio .chi { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.esempio .chi .avatar { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--accento-tenue); flex: none; }
.esempio .chi h3 { font-size: 1.35rem; }
.esempio .chi small { display: block; color: var(--testo-3); font-size: .9rem; margin-top: 3px; }
.esempio .situazione { color: var(--testo-2); }
.esempio h4 { font-family: var(--titoli); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accento-forte); margin: 18px 0 8px; }
.esempio ol, .esempio ul { margin: 0; padding-left: 20px; color: var(--testo-2); }
.esempio li + li { margin-top: 5px; }
.esempio .dialogo { box-shadow: none; align-self: start; }
.etq-pro { display: inline-block; font-family: var(--corpo); font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--arancio-tenue); color: var(--arancio); vertical-align: middle; letter-spacing: .03em; }
.modi .scheda .icona { font-size: 1.5rem; }
@media (max-width: 900px) {
  .esempio { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .scena .tel.a, .scena .tel.b { width: 46%; }
}

/* Video verticale */
.spot { display: flex; justify-content: center; margin-top: 36px; }
.spot video { display: block; width: 100%; max-width: 360px; aspect-ratio: 9 / 16; border-radius: 22px; background: #0C0D10; box-shadow: var(--ombra); }
.tablet img { border-radius: 18px; box-shadow: var(--ombra); }
.scena.due { display: flex; gap: 18px; justify-content: center; align-items: flex-start; min-height: 0; }
.scena.due .tel { position: static; width: 44%; }
.scena.due .tel.b { margin-top: 64px; }
.battuta[data-chi]::before { content: attr(data-chi); }

/* Lap Timer Pro */
.scacchi { background-image: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0); background-size: 28px 28px; opacity: .08; position: absolute; inset: 0; pointer-events: none; }
.apertura { position: relative; overflow: hidden; }
.tempone { font-family: "DejaVu Sans Mono", "Roboto Mono", ui-monospace, monospace; font-weight: 700; letter-spacing: -1px; }
.viola { color: var(--viola); } .verde { color: var(--verde); } .rosso { color: var(--rosso); } .giallo { color: var(--accento); } .azzurro { color: var(--azzurro); }
.numeri { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.numeri div { background: var(--carta); border: 1px solid var(--linea); border-radius: 18px; padding: 22px; text-align: center; }
.numeri small { display: block; color: var(--testo-3); font-size: .9rem; }
.numeri b { font-size: 2rem; }
.pro { border: 2px solid var(--accento); }
.pro .prezzo { font-family: var(--titoli); font-size: 1.6rem; color: var(--accento); margin: 6px 0 10px; }
@media (max-width: 860px) { .numeri { grid-template-columns: 1fr; } }
.scena-lt { position: relative; min-height: 560px; }
.scena-lt .tel { position: absolute; width: 46%; border-radius: 30px; border: 8px solid #2b2b33; background: #000; box-shadow: var(--ombra); overflow: hidden; }
.scena-lt .tel img { border-radius: 22px; }
.scena-lt .a { left: 4%; top: 0; z-index: 2; }
.scena-lt .b { right: 4%; top: 70px; transform: rotate(4deg); opacity: .92; }
@media (max-width: 900px) { .scena-lt { min-height: 0; display: flex; justify-content: center; gap: 12px; } .scena-lt .tel { position: static; width: 46%; max-width: 240px; transform: none; } }
