/* ═══════════════════════════════════════════════════════════
   DialogSphere — landing · "artigiano tecnico"
   Carta avorio + inchiostro caldo · blu elettrico = la voce
   ═══════════════════════════════════════════════════════════ */

/* ---------- Font (self-hosted, niente CDN a runtime) ---------- */
@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/fraunces-full.woff2") format("woff2");
  font-weight: 300 900;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
}
/* fallback statici (nel caso il browser non regga il variable full-axis) */
@font-face {
  font-family: "Fraunces Static";
  src: url("assets/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces Static";
  src: url("assets/fonts/fraunces-900.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("assets/fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("assets/fonts/GeistMono-Variable.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

/* ---------- Token ---------- */
:root {
  --paper: #F6F1E7;
  --paper-2: #FBF8F1;
  --ink: #1B1A17;
  --ink-soft: #565049;
  --ink-faint: #8B8479;
  --line: #E4DCCB;
  --line-strong: #D6CBB4;
  --voice: #1566F9;
  --voice-deep: #0E55D6;
  --voice-soft: rgba(21, 102, 249, 0.10);
  --voice-lite: #6EA3FC;
  --warm: #C6612F;

  /* Buio — token reali dell'admin */
  --dark: #08090C;
  --dark-card: #0E1116;
  --dark-card-2: #12161D;
  --dark-line: #1D232E;
  --dark-line-2: #2B3444;
  --dark-ink: #EEF1F6;
  --dark-muted: #9AA3B2;
  --dark-faint: #5E6675;
  --voice-glow: rgba(21, 102, 249, 0.45);

  --radius: 14px;
  --radius-sm: 9px;
  --radius-pill: 999px;

  --font-display: "Fraunces", "Fraunces Static", Georgia, "Times New Roman", serif;
  --font-body: "Geist", system-ui, -apple-system, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.3, 0.4, 1);

  --wrap: 1180px;
  --shadow-1: 0 1px 2px rgba(27, 26, 23, 0.05);
  --shadow-2: 0 8px 28px rgba(27, 26, 23, 0.08);
  --shadow-3: 0 24px 60px rgba(27, 26, 23, 0.14);

  /* grana carta (SVG noise inline) */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* grana globale sottilissima */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--grain);
  opacity: 0.5;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "tnum" 1;
}

/* ---------- Tipografia display ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 96, "SOFT" 0, "WONK" 0;
}

h1 {
  font-size: clamp(2.75rem, 6.5vw, 5.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; font-variation-settings: "opsz" 40; }

.kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--voice);
  margin: 0 0 1.1rem;
}
.kicker.on-dark { color: var(--voice-lite); }

.ink-voice { color: var(--voice); }

.section-lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 1rem 0 0;
}
.section-lead.on-dark { color: var(--dark-muted); }
.section-lead.on-dark strong { color: var(--dark-ink); font-weight: 600; }

/* ---------- Bottoni ---------- */
.btn {
  --pad-y: 0.62rem; --pad-x: 1.1rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background 160ms, border-color 160ms, box-shadow 160ms, color 160ms;
  white-space: nowrap;
}
.btn-lg { --pad-y: 0.85rem; --pad-x: 1.5rem; font-size: 1.02rem; }

.btn-voice {
  background: var(--voice);
  color: #fff;
  box-shadow: 0 4px 16px rgba(21, 102, 249, 0.28);
}
.btn-voice:hover { background: var(--voice-deep); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(21, 102, 249, 0.34); }

.btn-outline {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover { border-color: var(--ink); background: var(--paper-2); }

.btn-ghost { color: var(--ink-soft); background: transparent; }
.btn-ghost:hover { color: var(--ink); background: var(--voice-soft); }

.btn-outline-light { border-color: rgba(238, 241, 246, 0.28); color: var(--dark-ink); }
.btn-outline-light:hover { border-color: var(--dark-ink); background: rgba(238, 241, 246, 0.06); }

/* focus visibili AA */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--voice);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
[data-theme="dark"] a:focus-visible, [data-theme="dark"] button:focus-visible { outline-color: var(--voice-lite); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 241, 231, 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 64px; }

.wordmark {
  display: inline-flex; align-items: center; gap: 0.55rem;
  text-decoration: none; color: var(--ink); flex: none;
}
.wordmark-mark { color: var(--ink); flex: none; }
.wordmark-text {
  font-family: var(--font-display);
  font-weight: 600; font-size: 1.28rem; letter-spacing: -0.02em;
  font-variation-settings: "opsz" 40;
}
.wordmark-accent { color: var(--voice); }
.wordmark-logo { display: block; height: 30px; width: auto; }
.footer-brand .wordmark-logo { height: 28px; }

/* Fascia canali (hero): Telefono · WhatsApp · Web */
.channels {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  list-style: none; padding: 0; margin: 1.6rem 0 0;
}
.channels li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.9rem; border-radius: 999px;
  background: var(--voice-soft); color: var(--voice-deep);
  border: 1px solid color-mix(in srgb, var(--voice) 22%, transparent);
  font-weight: 600; font-size: 0.94rem; letter-spacing: -0.01em;
}
.channels li svg { color: var(--voice); flex: none; }
.hero-sub strong { color: var(--ink); font-weight: 650; }

.site-nav { display: flex; gap: 1.5rem; margin-left: 1rem; margin-right: auto; }
.site-nav a {
  text-decoration: none; color: var(--ink-soft); font-size: 0.95rem; font-weight: 500;
  padding: 0.3rem 0; position: relative; transition: color 140ms;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--voice); transition: width 180ms var(--ease-out);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { width: 100%; }

.header-cta { display: flex; align-items: center; gap: 0.6rem; flex: none; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); width: 42px; height: 42px; color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer; margin-left: auto;
}

.mobile-nav {
  display: none; flex-direction: column; gap: 0.25rem;
  padding: 1rem 24px 1.4rem; border-bottom: 1px solid var(--line);
  background: var(--paper-2);
}
[hidden] { display: none !important; }
.mobile-nav a { text-decoration: none; color: var(--ink); font-size: 1.05rem; padding: 0.65rem 0.2rem; }
.mobile-nav a:not(.btn) { border-bottom: 1px solid var(--line); }
.mobile-nav .btn { margin-top: 0.6rem; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; z-index: 2; }
.section-head { max-width: 52ch; margin-bottom: 3rem; }

/* ═══════════ HERO ═══════════ */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(4rem, 8vw, 7rem); z-index: 2; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-wave { position: absolute; left: 0; right: 0; top: 8%; width: 100%; height: 60%; }

.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy { max-width: 34ch; }
.hero h1 { margin-bottom: 1.4rem; }
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem); color: var(--ink-soft);
  max-width: 40ch; margin: 0 0 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.8rem; }

.hero-trust {
  list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem;
  padding: 0; margin: 0; font-size: 0.9rem; color: var(--ink-faint);
  font-family: var(--font-mono); letter-spacing: 0.01em;
}
.hero-trust li { display: inline-flex; align-items: center; gap: 0.5rem; }
.hero-trust .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--voice); flex: none; }

/* ---- Demo frame (riproduzione UI, scuro) ---- */
.demo-caption { text-align: center; color: var(--ink-faint); font-size: 0.72rem; margin: 0.9rem 0 0; }

.demo-frame {
  background: var(--dark);
  border: 1px solid var(--dark-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-3), 0 0 0 1px rgba(21,102,249,0.08);
  padding: 1.1rem 1.1rem 1.2rem;
  color: var(--dark-ink);
  position: relative;
  overflow: hidden;
}
.demo-frame::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 60% at 50% -10%, rgba(21,102,249,0.14), transparent 60%);
}
.demo-topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; position: relative; z-index: 1; }
.demo-agent { font-size: 0.82rem; color: var(--dark-muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.live-pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.32rem 0.75rem 0.32rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--dark-card); border: 1px solid var(--dark-line);
  font-size: 0.78rem; color: var(--dark-ink); font-weight: 500;
}
.live-pill.sm { padding: 0.22rem 0.6rem 0.22rem 0.5rem; font-size: 0.7rem; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #E5484D; flex: none; animation: livedot 1.6s ease-in-out infinite; }
.pill-sep { width: 1px; height: 12px; background: var(--dark-line); }
.live-pill .mono { color: var(--dark-muted); font-size: 0.72rem; }

.demo-stage { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; padding: 1.2rem 0 0.6rem; position: relative; z-index: 1; }
.demo-state { font-size: 0.82rem; color: var(--dark-muted); min-height: 1.2em; }

/* ---- Anello-visualizer (rifatto dal Playground) ---- */
.ring-viz {
  --ring: 190px;
  position: relative; width: var(--ring); height: var(--ring); flex: none;
}
.hero-demo .ring-viz { --ring: clamp(150px, 22vw, 190px); }
.ring-viz span { position: absolute; border-radius: 50%; }
.ring-glow {
  inset: 26%;
  background: radial-gradient(circle, rgba(21,102,249,0.55), rgba(21,102,249,0) 70%);
  filter: blur(2px);
  animation: breathe 3.2s ease-in-out infinite;
  opacity: 0.55;
}
.ring-base { inset: 0; border: 1.5px solid rgba(21,102,249,0.16); }
.ring-a {
  inset: 0; border: 2px solid transparent; border-top-color: #3B7BFA;
  animation: spin 4.5s linear infinite;
}
.ring-b {
  inset: 14px; border: 2px solid transparent; border-bottom-color: rgba(110,163,252,0.7);
  animation: spin 6s linear infinite reverse;
}
.ring-core {
  inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 38%; height: 38%; min-width: 66px; min-height: 66px;
  background: var(--dark-card); border: 1px solid var(--dark-line);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; color: var(--voice-lite);
  font-variation-settings: "opsz" 40;
}
/* stati */
.ring-viz[data-state="speak"] .ring-glow { animation-duration: 1.1s; opacity: 1; }
.ring-viz[data-state="speak"] .ring-a { animation-duration: 1.1s; border-right-color: rgba(59,123,250,0.5); }
.ring-viz[data-state="speak"] .ring-b { animation-duration: 1.6s; }
.ring-viz[data-state="think"] .ring-a { animation-duration: 0.7s; }
.ring-viz[data-state="think"] .ring-b { animation-duration: 1s; }

/* ---- Transcript hero (typing in JS) ---- */
.demo-transcript {
  display: flex; flex-direction: column; gap: 0.55rem;
  min-height: 132px; position: relative; z-index: 1;
  padding: 0.4rem 0.1rem 0;
}
.bubble {
  padding: 0.5rem 0.75rem; font-size: 0.82rem; line-height: 1.45; max-width: 85%;
  animation: msgin 350ms var(--ease-out) both;
}
.bubble.user {
  align-self: flex-end;
  border-radius: 12px 12px 4px 12px;
  background: rgba(21,102,249,0.16); border: 1px solid rgba(21,102,249,0.25); color: #DCE7FB;
}
.bubble-agent { align-self: flex-start; max-width: 90%; animation: msgin 350ms var(--ease-out) both; }
.bubble-who {
  font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dark-faint); margin: 0 0 0.2rem 0.25rem;
}
.bubble.agent {
  align-self: flex-start; border-radius: 12px 12px 12px 4px;
  background: var(--dark-card-2); border: 1px solid var(--dark-line); color: var(--dark-ink); max-width: 100%;
}
.bubble .cite { color: var(--voice-lite); font-weight: 500; }

/* page card che scivola */
.page-card {
  position: relative; z-index: 1; margin-top: 0.6rem;
  background: var(--dark-card); border: 1px solid var(--dark-line-2); border-radius: 10px; overflow: hidden;
  animation: panelin 450ms var(--ease-out) both;
}
.page-card-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--dark-line); }
.page-file { flex: 1; font-size: 0.66rem; color: var(--dark-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-num { font-size: 0.66rem; color: var(--voice-lite); }
.page-card-body {
  height: 84px; display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #10141B 0 10px, #0C0F15 10px 20px);
}
.page-tag {
  font-size: 0.64rem; color: var(--dark-faint);
  background: var(--dark); padding: 0.25rem 0.65rem; border-radius: var(--radius-pill); border: 1px solid var(--dark-line);
}

/* ═══════════ PROBLEMA ═══════════ */
.problem { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.problem-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.problem-copy p { color: var(--ink-soft); font-size: 1.1rem; margin: 1.2rem 0 0; max-width: 46ch; }
.problem-copy h2 { margin-top: 0.4rem; }

.problem-figure { margin: 0; }
figure figcaption { font-size: 0.72rem; color: var(--ink-faint); margin-top: 0.75rem; text-align: center; letter-spacing: 0.02em; }

/* slot foto elegante */
.photo-slot {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background-color: var(--paper);
  background-image:
    linear-gradient(135deg, rgba(198,97,47,0.05), rgba(21,102,249,0.04)),
    var(--grain);
  background-size: cover, 120px 120px;
  box-shadow: var(--shadow-2);
  overflow: hidden; display: grid; place-items: center;
}
.photo-slot.loaded { background-image: none; border-color: var(--line); }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-label {
  font-size: 0.7rem; color: var(--ink-faint); letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px dashed var(--line-strong); padding: 0.4rem 0.9rem; border-radius: var(--radius-pill);
  background: rgba(251,248,241,0.7);
}
.photo-slot.loaded .photo-label { display: none; }

/* ═══════════ COME FUNZIONA ═══════════ */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); counter-reset: step; }
.step { position: relative; padding-top: 0.5rem; }
.step-num {
  display: block; font-size: 0.8rem; color: var(--voice); font-weight: 600; letter-spacing: 0.1em; margin-bottom: 1rem;
}
.step-illo {
  width: 74px; height: 74px; border-radius: var(--radius);
  background: var(--paper-2); border: 1px solid var(--line);
  display: grid; place-items: center; margin-bottom: 1.2rem;
}
.step h3 { margin-bottom: 0.5rem; }
.step p { color: var(--ink-soft); font-size: 1rem; margin: 0; max-width: 32ch; }

/* linea che collega gli step su desktop */
.steps .step:not(:last-child)::before {
  content: ""; position: absolute; top: 37px; left: calc(74px + 1rem); right: -1.5rem; height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}
@media (max-width: 860px) { .steps .step::before { display: none; } }

/* ═══════════ FUNZIONI ═══════════ */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.feature-card {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: transform 200ms var(--ease-out), box-shadow 200ms, border-color 200ms;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.feature-icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: var(--radius-sm);
  background: var(--voice-soft); color: var(--voice); margin-bottom: 1.1rem;
}
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--ink-soft); font-size: 0.98rem; margin: 0; }

/* ═══════════ SHOWCASE (scuro) ═══════════ */
.showcase { background: var(--dark); color: var(--dark-ink); border-top: 1px solid var(--dark-line); }
.showcase::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 40% at 50% 0%, rgba(21,102,249,0.10), transparent 55%);
}
.showcase .wrap { position: relative; }
.showcase-grid { display: grid; grid-template-columns: 1.15fr 0.85fr 1fr; gap: 1.4rem; align-items: start; }

.shot figcaption { color: var(--dark-faint); }
.shot-frame {
  background: var(--dark-card); border: 1px solid var(--dark-line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-3);
}
.shot-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--dark-line);
}
.shot-tab { font-size: 0.62rem; letter-spacing: 0.14em; color: var(--dark-faint); }
.shot-count { font-size: 0.68rem; color: var(--dark-muted); }
.shot-body { padding: 1rem; }

.play-body { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.ring-viz.static { --ring: 128px; }
.ring-viz.static .ring-core { min-width: 48px; min-height: 48px; font-size: 1.2rem; }
.play-transcript { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }

.handoff {
  align-self: center; text-align: center; margin: 0.15rem 0;
  padding: 0.5rem 1rem; border-radius: var(--radius-pill);
  background: rgba(21,102,249,0.14); border: 1px solid rgba(21,102,249,0.35);
  box-shadow: 0 0 24px rgba(21,102,249,0.22);
}
.handoff-kick { font-size: 0.56rem; letter-spacing: 0.12em; color: var(--voice-lite); margin-bottom: 0.15rem; }
.handoff-names { font-size: 0.76rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 0.45rem; flex-wrap: wrap; }

/* WhatsApp phone */
.phone-frame {
  background: #0B141A; border: 1px solid var(--dark-line-2); border-radius: 24px;
  overflow: hidden; box-shadow: var(--shadow-3); position: relative; padding-top: 0.4rem;
  max-width: 320px; margin: 0 auto;
}
.phone-notch { width: 42%; height: 6px; border-radius: 999px; background: #1F2C33; margin: 0.35rem auto 0.5rem; }
.wa-bar { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.85rem; background: #1F2C33; }
.wa-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--voice); color: #fff; display: grid; place-items: center; font-size: 0.72rem; font-weight: 600; flex: none; }
.wa-id { display: flex; flex-direction: column; line-height: 1.2; }
.wa-name { font-size: 0.82rem; font-weight: 600; color: #E9EDF0; }
.wa-status { font-size: 0.62rem; color: #8FA3AD; }
.wa-body {
  padding: 0.9rem 0.7rem 1.1rem; display: flex; flex-direction: column; gap: 0.45rem;
  background: #0B141A;
  background-image: var(--grain); background-size: 120px 120px; background-blend-mode: soft-light;
}
.wa-day { align-self: center; font-size: 0.58rem; color: #6B7C85; background: #182229; padding: 0.15rem 0.6rem; border-radius: 6px; margin-bottom: 0.2rem; }
.wa-msg {
  position: relative; max-width: 82%; padding: 0.45rem 0.6rem 0.85rem; border-radius: 9px;
  font-size: 0.78rem; line-height: 1.4; color: #E9EDF0;
}
.wa-in { align-self: flex-start; background: #202C33; border-top-left-radius: 3px; }
.wa-out { align-self: flex-end; background: #005C4B; border-top-right-radius: 3px; }
.wa-time { position: absolute; right: 0.5rem; bottom: 0.28rem; font-size: 0.54rem; color: rgba(233,237,240,0.55); }
.wa-attach { display: flex; flex-direction: column; gap: 0.35rem; }
.wa-page {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  background: rgba(0,0,0,0.22); border-radius: 6px; padding: 0.5rem 0.6rem;
  font-size: 0.62rem; color: #CFE9E0;
}
.wa-page-num { color: #8FD3C0; }
.wa-cap { font-size: 0.76rem; }

/* Team */
.team-body { display: flex; flex-direction: column; gap: 0.6rem; }
.agent-card {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--dark-card-2); border: 1px solid var(--dark-line); border-radius: var(--radius-sm);
  padding: 0.7rem 0.8rem;
}
.agent-card.lead { border-color: rgba(21,102,249,0.3); background: rgba(21,102,249,0.07); }
.agent-av {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: rgba(21,102,249,0.14); color: var(--voice-lite);
  display: grid; place-items: center; font-weight: 600; font-size: 0.85rem;
}
.agent-card.lead .agent-av { background: var(--voice); color: #fff; }
.agent-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.agent-name { font-size: 0.85rem; font-weight: 600; color: var(--dark-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-kind { font-size: 0.55rem; letter-spacing: 0.06em; color: var(--dark-faint); }
.agent-tool { font-size: 0.6rem; color: var(--voice-lite); flex: none; }

/* ═══════════ PER CHI ═══════════ */
.audience .section-head { margin-bottom: 2rem; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.65rem 1.1rem; border-radius: var(--radius-pill);
  background: var(--paper-2); border: 1px solid var(--line);
  font-size: 0.95rem; font-weight: 500; color: var(--ink);
  transition: border-color 160ms, transform 160ms var(--ease-out);
}
.chip:hover { border-color: var(--voice); transform: translateY(-2px); }

/* ═══════════ NUMERI ═══════════ */
.numbers { background: var(--paper-2); border-top: 1px solid var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin: 0; }
.metric { border-top: 2px solid var(--voice); padding-top: 1.1rem; }
.metric dt { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.6rem; }
.metric-val {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 3vw, 2.7rem);
  line-height: 1; letter-spacing: -0.02em; margin: 0; color: var(--ink);
  font-variation-settings: "opsz" 60;
}
.metric-unit { display: block; font-family: var(--font-body); font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); letter-spacing: 0; margin-top: 0.45rem; }

/* ═══════════ CTA FINALE ═══════════ */
.cta-final { background: var(--dark); color: var(--dark-ink); text-align: center; overflow: hidden; }
.cta-wave { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cta-wave svg { width: 130%; height: 100%; }
.cta-inner { position: relative; max-width: 42ch; margin-inline: auto; }
.cta-final h2 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: var(--dark-ink); }
.cta-final p { color: var(--dark-muted); font-size: 1.15rem; margin: 1.2rem auto 2rem; max-width: 40ch; }
.cta-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ═══════════ FOOTER ═══════════ */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2rem; }
.footer-brand .wordmark { margin-bottom: 1rem; }
.footer-tag { color: var(--ink-soft); font-size: 0.95rem; max-width: 34ch; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-h { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.4rem; }
.footer-links a { text-decoration: none; color: var(--ink-soft); font-size: 0.95rem; transition: color 140ms; width: fit-content; }
.footer-links a:hover { color: var(--voice); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.footer-bottom p { font-size: 0.72rem; color: var(--ink-faint); margin: 0; }

/* ═══════════ Keyframes ═══════════ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .82; } 50% { transform: scale(1.07); opacity: 1; } }
@keyframes livedot { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes msgin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes panelin { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }

/* ═══════════ Reveal (page-load + scroll) ═══════════ */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
/* stagger sopra la piega via data-delay */
.reveal[data-delay="1"].in { transition-delay: 90ms; }
.reveal[data-delay="2"].in { transition-delay: 180ms; }
.reveal[data-delay="3"].in { transition-delay: 270ms; }
.reveal[data-delay="4"].in { transition-delay: 360ms; }

/* ═══════════ Responsive ═══════════ */
@media (max-width: 960px) {
  .site-nav, .header-cta { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav:not([hidden]) { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-copy { max-width: 100%; }
  .hero-demo { max-width: 460px; margin: 0 auto; width: 100%; }
  .problem-grid { grid-template-columns: 1fr; }
  .problem-figure { max-width: 480px; margin: 0 auto; }
  .showcase-grid { grid-template-columns: 1fr 1fr; }
  .shot-play { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 1.6rem 1.2rem; }
  .showcase-grid { grid-template-columns: 1fr; }
  .shot-team, .shot-wa { max-width: 460px; margin-inline: auto; width: 100%; }
}

@media (max-width: 460px) {
  .wrap { padding: 0 18px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-actions .btn, .cta-actions .btn { flex: 1 1 auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.4rem; }
}

/* ═══════════ Reduced motion ═══════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .ring-a, .ring-b, .ring-glow { animation: none !important; }
  .live-dot { animation: none !important; }
}
