/* Traxa — landing page
   Palette: blu notte profondo, accento blu della piattaforma,
   secondari azzurro e viola. Coerente con la login /platform. */
:root {
  --bg: #0a0f1e;
  --bg-2: #0f1730;
  --surface: #131c38;
  --surface-2: #1a2445;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #f0f4ff;
  --muted: #94a3c0;
  --dim: #5a6b8a;
  --accent: #2563eb;
  --accent-2: #1e40af;
  --accent-soft: rgba(37, 99, 235, .12);
  --lime: #60a5fa;
  --violet: #8b5cf6;
  --amber: #fbbf24;
  --rose: #f472b6;
  --radius: 18px;
  --radius-lg: 28px;
  --container: 1200px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font);
  --font-serif: 'Instrument Serif', Georgia, serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: #ffffff; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.accent { color: var(--accent); }
.grad-text {
  background: linear-gradient(100deg, #fff 10%, var(--lime) 45%, var(--violet) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Pulsanti ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s;
}
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: #ffffff; box-shadow: 0 0 0 0 rgba(37, 99, 235, .5), 0 10px 30px -10px rgba(37, 99, 235, .6); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 0 6px rgba(37, 99, 235, .12), 0 16px 40px -12px rgba(37, 99, 235, .7); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); transform: translateY(-2px); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

/* ---------- Navbar a pillola flottante ---------- */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1120px, 100% - 24px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 20px; border-radius: 999px;
  background: rgba(13, 20, 40, .55); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background .3s, border-color .3s, box-shadow .3s, top .3s;
}
.nav.scrolled { background: rgba(10, 15, 30, .85); border-color: var(--line-2); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8); }
.nav-logo { display: inline-flex; align-items: center; min-height: 40px; }
.nav-logo img { height: 18px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li > a, .nav-links > li > button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  font-size: 14.5px; color: var(--muted); background: none; border: 0; white-space: nowrap; transition: color .2s, background .2s;
}
.nav-links > li > a:hover, .nav-links > li > button:hover, .nav-links > li.open > button { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-links .chev { width: 14px; height: 14px; transition: transform .25s; }
.nav-links li.open .chev { transform: rotate(180deg); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-login { font-size: 14.5px; color: var(--muted); padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s; display: inline-flex; align-items: center; gap: 6px; }
.nav-login:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.nav-login svg { width: 16px; height: 16px; }
.nav-burger { display: none; width: 42px; height: 42px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); align-items: center; justify-content: center; }
.nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 16px; height: 1.5px; background: var(--text); position: relative; transition: transform .3s, background .3s; }
.nav-burger span::before, .nav-burger span::after { content: ''; position: absolute; left: 0; }
.nav-burger span::before { top: -5px; } .nav-burger span::after { top: 5px; }
body.menu-open .nav-burger span { background: transparent; }
body.menu-open .nav-burger span::before { transform: translateY(5px) rotate(45deg); }
body.menu-open .nav-burger span::after { transform: translateY(-5px) rotate(-45deg); }

/* Mega menu "Settori" (card per tipo di attività) */
.mega {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(-6px);
  width: min(880px, 100vw - 32px); padding: 14px; border-radius: 22px;
  background: rgba(13, 20, 40, .96); border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  max-height: calc(100vh - 100px); max-height: calc(100dvh - 100px); overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.nav-links li.open .mega { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mega a { display: flex; gap: 12px; padding: 12px; border-radius: 14px; transition: background .2s; }
.mega a:hover { background: rgba(255, 255, 255, .05); }
.mega .ico { flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--lime); }
.mega .ico svg { width: 20px; height: 20px; }
.mega strong { display: block; font-size: 14px; font-weight: 600; color: var(--text); }
.mega small { display: block; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.mega-foot { margin-top: 8px; padding: 12px 14px; border-radius: 14px; background: linear-gradient(90deg, rgba(37, 99, 235, .12), transparent); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--muted); }
.mega-foot a { padding: 0; color: var(--lime); font-weight: 600; display: inline; }
.mega-foot a:hover { background: none; }

/* Menu mobile a tutto schermo */
.mobile-menu {
  position: fixed; inset: 0; z-index: 40; background: rgba(10, 15, 30, .97);
  padding: 96px 24px 32px; display: flex; flex-direction: column; gap: 6px;
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; overflow-y: auto;
}
body.menu-open { overflow: hidden; }
body.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.mobile-menu a.big { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.02em; padding: 6px 0; transform: translateY(14px); opacity: 0; transition: transform .45s var(--ease), opacity .45s; }
body.menu-open .mobile-menu a.big { transform: none; opacity: 1; }
body.menu-open .mobile-menu a.big:nth-child(2) { transition-delay: .05s; }
body.menu-open .mobile-menu a.big:nth-child(3) { transition-delay: .1s; }
body.menu-open .mobile-menu a.big:nth-child(4) { transition-delay: .15s; }
body.menu-open .mobile-menu a.big:nth-child(5) { transition-delay: .2s; }
.mobile-menu .mm-actions { margin-top: auto; display: grid; gap: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 150px 0 40px; text-align: center; isolation: isolate; }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hero-bg .grid {
  position: absolute; inset: -2px; opacity: .5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 30%, transparent 75%);
}
.hero-bg .glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.hero-bg .g1 { width: 620px; height: 620px; left: 50%; top: -260px; margin-left: -310px; background: radial-gradient(circle, rgba(37, 99, 235, .55), transparent 65%); }
.hero-bg .g2 { width: 460px; height: 460px; left: 8%; top: 200px; background: radial-gradient(circle, rgba(139, 92, 246, .35), transparent 65%); animation-delay: -6s; }
.hero-bg .g3 { width: 420px; height: 420px; right: 5%; top: 120px; background: radial-gradient(circle, rgba(96, 165, 250, .28), transparent 65%); animation-delay: -12s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.08); } 100% { transform: translate(-30px, 10px) scale(.95); } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line-2); font-size: 13.5px; color: var(--muted);
}
.eyebrow b { background: var(--accent); color: #ffffff; font-weight: 700; font-size: 11.5px; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.045em; line-height: 1.02;
  font-size: clamp(42px, 7.4vw, 96px); margin: 26px auto 0; max-width: 13ch;
}
.hero h1 .serif { font-size: 1.08em; letter-spacing: -.02em; }
.hero p.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 640px; margin: 22px auto 0; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--dim); display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 15px; height: 15px; color: var(--lime); }

/* Parola che cambia nel titolo */
.rotator { display: inline-grid; vertical-align: bottom; }
.rotator > span { grid-area: 1 / 1; color: var(--lime); opacity: 0; transform: translateY(40%); filter: blur(8px); transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s; white-space: nowrap; }
.rotator > span.on { opacity: 1; transform: none; filter: none; }
.rotator > span.off { opacity: 0; transform: translateY(-40%); filter: blur(8px); }

/* Chip dei moduli fluttuanti attorno al titolo */
.chips { position: absolute; inset: 0; pointer-events: none; z-index: -1; }
.chip {
  position: absolute; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px;
  border-radius: 999px; background: rgba(19, 28, 56, .75); border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .8); backdrop-filter: blur(8px);
  animation: float 7s ease-in-out infinite;
}
.chip i { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; font-style: normal; }
.chip i svg { width: 14px; height: 14px; }
.chip.c1 { left: 4%; top: 190px; } .chip.c1 i { background: rgba(37, 99, 235, .18); color: var(--lime); }
.chip.c2 { left: 9%; top: 330px; animation-delay: -2s; } .chip.c2 i { background: rgba(139, 92, 246, .18); color: var(--violet); }
.chip.c3 { right: 5%; top: 175px; animation-delay: -4s; } .chip.c3 i { background: rgba(251, 191, 36, .16); color: var(--amber); }
.chip.c4 { right: 8%; top: 320px; animation-delay: -1s; } .chip.c4 i { background: rgba(96, 165, 250, .18); color: var(--lime); }
.chip.c5 { left: 15%; top: 465px; animation-delay: -3s; } .chip.c5 i { background: rgba(244, 114, 182, .16); color: var(--rose); }
.chip.c6 { right: 14%; top: 455px; animation-delay: -5s; } .chip.c6 i { background: rgba(37, 99, 235, .18); color: var(--lime); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* Finestra del prodotto con inclinazione 3D */
.stage { perspective: 1600px; margin-top: 64px; }
.window {
  position: relative; border-radius: 16px; background: #0a1020; border: 1px solid var(--line-2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .02), 0 50px 120px -40px rgba(37, 99, 235, .35), 0 30px 80px -30px rgba(0, 0, 0, .9);
  transform-origin: 50% 0; transform: rotateX(var(--tilt, 22deg)) scale(var(--scale, .85)); transition: transform .1s linear;
  overflow: hidden;
}
.window::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.window-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #0f1730; }
.dots { display: flex; gap: 7px; } .dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a3450; }
.dots i:nth-child(1) { background: #ff5f57; } .dots i:nth-child(2) { background: #febc2e; } .dots i:nth-child(3) { background: #28c840; }
.url { flex: 1; max-width: 420px; margin: 0 auto; height: 24px; border-radius: 7px; background: rgba(255, 255, 255, .05); font-size: 12px; color: var(--dim); display: flex; align-items: center; justify-content: center; gap: 6px; }
.url svg { width: 12px; height: 12px; }
.window-body { position: relative; aspect-ratio: 16 / 10; background: #f7f8f8; }
.window-body img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0; transform: scale(1.015); transition: opacity .8s var(--ease), transform 1.2s var(--ease); }
.window-body img.on { opacity: 1; transform: none; }

/* Linguette sotto la finestra dell'hero */
.hero-tabs { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 26px; }
.hero-tabs button {
  position: relative; overflow: hidden; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); color: var(--muted); font-size: 13.5px; font-weight: 500; transition: color .2s, border-color .2s, background .2s;
}
.hero-tabs button:hover { color: var(--text); }
.hero-tabs button.on { color: var(--text); border-color: rgba(37, 99, 235, .45); background: rgba(37, 99, 235, .08); }
.hero-tabs button .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--accent); }
.hero-tabs button.on .bar { animation: fill var(--dur, 5s) linear forwards; }
@keyframes fill { to { width: 100%; } }

/* ---------- Striscia di settori che scorre ---------- */
.marquee { position: relative; overflow: hidden; padding: 30px 0; border-block: 1px solid var(--line); margin-top: 90px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--muted); white-space: nowrap; letter-spacing: -.01em; }
.marquee-item svg { width: 22px; height: 22px; color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sezioni ---------- */
section { position: relative; }
.section { padding: 130px 0; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--lime); }
.kicker::before { content: ''; width: 18px; height: 1.5px; background: currentColor; }
.h2 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; line-height: 1.06; font-size: clamp(34px, 5vw, 60px); margin: 16px 0 0; }
.h2 .serif { font-size: 1.06em; }
.sub { color: var(--muted); font-size: 18px; max-width: 620px; margin: 18px 0 0; }
.center { text-align: center; } .center .sub { margin-inline: auto; }

/* Frase che si illumina parola per parola allo scorrimento */
.statement { padding: 150px 0 120px; }
.statement p { font-family: var(--font-display); font-weight: 700; letter-spacing: -.03em; line-height: 1.18; font-size: clamp(28px, 4.2vw, 52px); margin: 0; max-width: 22ch; }
.statement .w { color: rgba(240, 244, 255, .14); transition: color .35s; }
.statement .w.lit { color: var(--text); }
.statement .w.hl.lit { color: var(--lime); }

/* ---------- Vetrina settori ---------- */
.showcase { display: grid; grid-template-columns: 330px 1fr; gap: 40px; margin-top: 60px; align-items: start; }
.sector-list { display: grid; gap: 6px; position: sticky; top: 110px; }
.sector-btn {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px;
  background: transparent; border: 1px solid transparent; transition: background .25s, border-color .25s;
}
.sector-btn .ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--muted); transition: background .25s, color .25s; }
.sector-btn .ico svg { width: 20px; height: 20px; }
.sector-btn strong { display: block; font-size: 15.5px; font-weight: 600; color: var(--muted); transition: color .25s; }
.sector-btn small { display: block; font-size: 13px; color: var(--dim); line-height: 1.35; }
.sector-btn:hover strong { color: var(--text); }
.sector-btn.on { background: var(--surface); border-color: var(--line-2); }
.sector-btn.on .ico { background: var(--accent-soft); color: var(--lime); }
.sector-btn.on strong { color: var(--text); }

.sector-panel { min-width: 0; }
.sector-stage { position: relative; }
.sector-stage .window { transform: none; }
.sector-stage .window-body { aspect-ratio: 16 / 10; }
.phone.sector-phone { position: absolute; right: -28px; bottom: -56px; width: 19%; min-width: 140px; max-width: 220px; transform: rotate(3deg); transition: opacity .5s, transform .6s var(--ease); }
.phone.sector-phone .screen { /* nessun padding-top: l'immagine parte dal bordo */ }
.phone.sector-phone .notch { width: 36%; height: 12px; }
.phone.sector-phone.hide { opacity: 0; transform: rotate(6deg) translateY(30px); }
.sector-info { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; margin-top: 34px; }
.sector-info h3 { font-family: var(--font-display); font-size: 26px; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.sector-info p { color: var(--muted); margin: 10px 0 0; }
.feat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.feat-list li { display: flex; gap: 10px; font-size: 15px; color: var(--text); }
.feat-list li svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--lime); }
.shot-dots { display: flex; gap: 6px; margin-top: 6px; }
.shot-dots button { position: relative; width: 26px; height: 24px; border: 0; background: none; padding: 0; transition: width .25s; }
.shot-dots button::before { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .15); transition: background .25s; }
.shot-dots button.on { width: 40px; }
.shot-dots button.on::before { background: var(--lime); }
.fade-swap { animation: swapIn .6s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Bento moduli ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 60px; }
.card {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 28px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line);
  isolation: isolate; transition: border-color .3s, transform .4s var(--ease);
}
.card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(37, 99, 235, .14), transparent 45%);
}
.card:hover { border-color: var(--line-2); }
.card:hover::before { opacity: 1; }
.card h3 { font-family: var(--font-display); font-size: 21px; letter-spacing: -.02em; margin: 0; line-height: 1.25; }
.card p { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
.card .tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--lime); background: var(--accent-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; }
.viz { margin-top: 24px; }

.toggles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); font-size: 14px; }
.toggle .sw { flex: none; width: 36px; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, .12); position: relative; transition: background .35s; }
.toggle .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .35s var(--ease); }
.toggle.on .sw { background: var(--accent); }
.toggle.on .sw::after { transform: translateX(16px); }

.mini-cal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.mini-cal .col { display: grid; gap: 6px; align-content: start; }
.mini-cal .day { font-size: 11px; color: var(--dim); text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.mini-cal .ev { height: var(--h, 34px); border-radius: 8px; background: var(--c, var(--accent-soft)); border-left: 3px solid var(--b, var(--lime)); transform-origin: top; animation: grow 1s var(--ease) both; animation-play-state: paused; }
.in .mini-cal .ev { animation-play-state: running; }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } }

.chat { display: grid; gap: 8px; }
.bubble { max-width: 85%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.45; opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease); }
.bubble.in-msg { background: rgba(255, 255, 255, .06); border-top-left-radius: 4px; }
.bubble.out-msg { background: #1e40af; margin-left: auto; border-top-right-radius: 4px; }
.bubble small { display: block; font-size: 10.5px; color: rgba(255, 255, 255, .45); text-align: right; margin-top: 2px; }
.in .bubble { opacity: 1; transform: none; }
.in .bubble:nth-child(2) { transition-delay: .5s; } .in .bubble:nth-child(3) { transition-delay: 1.1s; } .in .bubble:nth-child(4) { transition-delay: 1.7s; }

.stock { display: grid; gap: 12px; }
.stock-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13.5px; }
.stock-row .bar { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.stock-row .bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c, var(--accent)); transition: width 1.4s var(--ease); }
.in .stock-row .bar i { width: var(--w); }
.stock-row b { font-weight: 600; } .stock-row span { color: var(--muted); }
.stock-row.low span { color: var(--amber); }

.chart { display: flex; align-items: flex-end; gap: 8px; height: 130px; }
.chart i { flex: 1; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--accent), rgba(37, 99, 235, .15)); height: 0; transition: height 1.2s var(--ease); }
.in .chart i { height: var(--h); }
.chart i:nth-child(2) { transition-delay: .06s; } .chart i:nth-child(3) { transition-delay: .12s; } .chart i:nth-child(4) { transition-delay: .18s; } .chart i:nth-child(5) { transition-delay: .24s; } .chart i:nth-child(6) { transition-delay: .3s; } .chart i:nth-child(7) { transition-delay: .36s; }
.chart-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--dim); margin-top: 8px; }
.kpi { font-family: var(--font-display); font-size: 34px; font-weight: 800; letter-spacing: -.03em; }
.kpi small { font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--lime); margin-left: 8px; letter-spacing: 0; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { padding: 7px 12px; border-radius: 999px; font-size: 13px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: var(--muted); }
.pills span.hot { color: #93c5fd; border-color: rgba(37, 99, 235, .4); background: var(--accent-soft); }

/* ---------- Automazioni (flusso) ---------- */
.flow { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-top: 70px; }
.flow-line { position: absolute; left: 10%; right: 10%; top: 34px; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.flow-line i { position: absolute; inset: 0; transform: scaleX(0); transform-origin: left; background: linear-gradient(90deg, #2563eb, #8b5cf6); transition: transform 2.2s var(--ease); }
.flow.in .flow-line i { transform: scaleX(1); }
.flow-line::after { content: ''; position: absolute; top: -3px; width: 60px; height: 8px; border-radius: 8px; background: radial-gradient(closest-side, #fff, transparent); animation: pulse-run 3s linear infinite 2.4s; opacity: 0; }
@keyframes pulse-run { 0% { left: -60px; opacity: 1; } 100% { left: 100%; opacity: 1; } }
.step { position: relative; text-align: center; opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s var(--ease); }
.flow.in .step { opacity: 1; transform: none; }
.flow.in .step:nth-child(3) { transition-delay: .35s; } .flow.in .step:nth-child(4) { transition-delay: .7s; } .flow.in .step:nth-child(5) { transition-delay: 1.05s; } .flow.in .step:nth-child(6) { transition-delay: 1.4s; }
.step .node { width: 70px; height: 70px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line-2); color: var(--lime); box-shadow: 0 0 0 8px var(--bg); position: relative; }
.step .node svg { width: 28px; height: 28px; }
.step h4 { font-family: var(--font-display); font-size: 17px; margin: 18px 0 4px; letter-spacing: -.01em; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }
.step .when { display: inline-block; margin-top: 10px; font-size: 11.5px; font-weight: 600; color: var(--lime); background: var(--accent-soft); border-radius: 999px; padding: 3px 9px; }

/* ---------- Portali clienti (telefoni) ---------- */
#prenotazioni { overflow-x: clip; }
.portals { display: grid; grid-template-columns: 1fr 1.15fr; gap: 60px; align-items: center; }
.phones { position: relative; height: 640px; }
.phone {
  position: absolute; width: 270px; border-radius: 32px; padding: 6px; background: #0f1730;
  border: 1px solid var(--line-2); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .03), inset 0 0 0 2px #05070e;
  will-change: transform;
}
.phone .screen { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 390 / 844; background: #fff; }
.phone .screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.phone .notch { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 70px; height: 16px; border-radius: 0 0 10px 10px; background: #0f1730; z-index: 2; }
.phone.p1 { left: 4%; top: 40px; transform: rotate(-6deg); z-index: 2; }
.phone.p2 { left: 42%; top: 0; z-index: 3; }
.phone.p3 { left: 70%; top: 70px; transform: rotate(6deg); width: 240px; z-index: 1; opacity: .9; }
.check-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.check-list li { display: flex; gap: 14px; }
.check-list .ic { flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--lime); display: grid; place-items: center; }
.check-list .ic svg { width: 20px; height: 20px; }
.check-list strong { display: block; font-size: 16px; }
.check-list span { display: block; color: var(--muted); font-size: 14.5px; }

/* ---------- Numeri ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { padding: 36px 28px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .n { font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.stat .n em { font-style: normal; color: var(--lime); }
.stat p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- Integrazioni ---------- */
.integrations { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin-top: 56px; }
.integ { padding: 28px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: flex-start; transition: background .3s; }
.integ:hover { background: rgba(255, 255, 255, .025); }
.integ .lg { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .05); color: var(--text); }
.integ .lg svg { width: 22px; height: 22px; }
.integ strong { display: block; font-size: 15.5px; }
.integ span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }

/* ---------- Come funziona ---------- */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; counter-reset: how; }
.how .card { padding-top: 70px; }
.how .card::after { counter-increment: how; content: '0' counter(how); position: absolute; top: 22px; left: 28px; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: var(--lime); letter-spacing: .05em; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 50px auto 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 4px; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; width: 30px; height: 30px; border-radius: 999px; border: 1px solid var(--line-2); position: relative; transition: transform .3s, background .3s; }
.faq summary .pm::before, .faq summary .pm::after { content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: var(--text); transform: translate(-50%, -50%); }
.faq summary .pm::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .3s; }
.faq details[open] summary .pm { background: var(--accent); border-color: var(--accent); }
.faq details[open] summary .pm::before, .faq details[open] summary .pm::after { background: #ffffff; }
.faq details[open] summary .pm::after { transform: translate(-50%, -50%) rotate(0); }
.faq .ans { padding: 0 4px 24px; color: var(--muted); max-width: 70ch; }

/* ---------- CTA + modulo ---------- */
.cta-wrap { position: relative; border-radius: 36px; overflow: hidden; border: 1px solid var(--line-2); background: radial-gradient(900px 500px at 0% 0%, rgba(37, 99, 235, .16), transparent 60%), radial-gradient(700px 500px at 100% 100%, rgba(139, 92, 246, .12), transparent 60%), var(--bg-2); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 64px; }
.cta-grid .h2 { font-size: clamp(34px, 4.4vw, 54px); }
.cta-points { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 12px; }
.cta-points li { display: flex; gap: 10px; color: var(--muted); }
.cta-points svg { flex: none; width: 20px; height: 20px; color: var(--lime); margin-top: 2px; }
.form { background: rgba(10, 15, 30, .7); border: 1px solid var(--line-2); border-radius: 24px; padding: 28px; backdrop-filter: blur(10px); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); color: var(--text);
  padding: 12px 14px; font: inherit; font-size: 15px; transition: border-color .2s, box-shadow .2s, background .2s; outline: none;
}
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3c0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
.field select option { background: #131c38; color: var(--text); }
.field textarea { resize: vertical; min-height: 88px; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); background: rgba(255, 255, 255, .05); }
.field.err input, .field.err select { border-color: #ff6b6b; }
.field .msg { font-size: 12.5px; color: #ff8a8a; min-height: 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.consent input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.consent a { color: var(--lime); text-decoration: underline; text-underline-offset: 2px; }
.consent.err { color: #ff8a8a; }
.form .btn { width: 100%; }
.form .btn[disabled] { opacity: .7; cursor: progress; }
.form-error { display: none; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: rgba(255, 107, 107, .1); color: #ff9a9a; font-size: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Esito invio con messaggio WhatsApp precompilato */
.done { display: none; text-align: left; animation: swapIn .6s var(--ease); }
.done .ok { width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #ffffff; display: grid; place-items: center; margin-bottom: 16px; }
.done .ok svg { width: 28px; height: 28px; }
.done h3 { font-family: var(--font-display); font-size: 24px; margin: 0; letter-spacing: -.02em; }
.done p { color: var(--muted); margin: 8px 0 0; }
.wa-card { margin-top: 20px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); }
.wa-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #1e40af; font-size: 14px; font-weight: 600; }
.wa-head .av { width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.wa-head .av img { width: 18px; }
.wa-body { padding: 18px 14px; background: #0a1020 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23ffffff' fill-opacity='.04'/%3E%3C/svg%3E"); }
.wa-msg { margin-left: auto; max-width: 92%; background: #1e3a8a; border-radius: 12px 4px 12px 12px; padding: 10px 12px 6px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; }
.wa-msg small { display: block; text-align: right; font-size: 11px; color: rgba(255, 255, 255, .55); margin-top: 2px; }
.done .actions { display: grid; gap: 10px; margin-top: 16px; }
.btn-wa { background: #25d366; color: #052e16; }
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(37, 211, 102, .7); }

/* ---------- Footer con marchio gigante ---------- */
footer { position: relative; padding: 90px 0 0; margin-top: 130px; border-top: 1px solid var(--line); overflow: hidden; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.foot-grid h5 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin: 0 0 16px; font-weight: 600; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.foot-grid a { color: var(--muted); font-size: 15px; transition: color .2s; }
.foot-grid a:hover { color: var(--text); }
.foot-brand p { color: var(--muted); max-width: 34ch; margin: 18px 0 0; font-size: 15px; }
.foot-brand img { height: 20px; width: auto; }
.wordmark {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.06em; line-height: .78;
  font-size: clamp(60px, 26vw, 380px); text-align: center; margin: 70px 0 0; user-select: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wordmark span { background: linear-gradient(180deg, rgba(96, 165, 250, .55), rgba(96, 165, 250, 0) 85%); -webkit-background-clip: text; background-clip: text; }
.foot-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 28px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--dim); position: relative; z-index: 1; margin-top: -10px; }

/* ---------- Comparsa allo scorrimento ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
.hero .reveal { transition-duration: 1.1s; }

/* Barra di avanzamento della pagina */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #2563eb, #8b5cf6); z-index: 60; }

/* ---------- Responsive ---------- */
@media (max-width: 1260px) {
  .phone.sector-phone { right: -6px; }
}
@media (max-width: 1080px) {
  .chips { display: none; }
  .showcase { grid-template-columns: 1fr; gap: 26px; }
  .sector-list { position: static; display: flex; overflow-x: auto; gap: 8px; padding-bottom: 6px; scrollbar-width: none; }
  .sector-list::-webkit-scrollbar { display: none; }
  .sector-btn { flex: none; width: auto; padding: 10px 14px; }
  .sector-btn small { display: none; }
  .sector-btn .ico { width: 32px; height: 32px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .span-2, .span-3, .span-4 { grid-column: span 1; }
  .bento .wide { grid-column: span 2; }
  .portals { grid-template-columns: 1fr; }
  .phones { height: 560px; max-width: 640px; margin: 0 auto; width: 100%; }
  .phone.sector-phone { right: -6px; }
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow-line { left: 34px; right: auto; top: 30px; bottom: 30px; width: 2px; height: auto; }
  .flow-line i { transform: scaleY(0); transform-origin: top; }
  .flow.in .flow-line i { transform: scaleY(1); }
  .flow-line::after { display: none; }
  .step { display: grid; grid-template-columns: 70px 1fr; gap: 0 18px; text-align: left; align-items: center; }
  .step .node { margin: 0; grid-row: span 3; align-self: start; }
  .step h4 { margin: 0; }
  .step .when { justify-self: start; }
  .integrations { grid-template-columns: repeat(2, 1fr); }
  .cta-grid { grid-template-columns: 1fr; padding: 40px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .nav-links, .nav-actions .nav-login, .nav-actions .btn { display: none; }
  .nav-burger { display: inline-flex; }
  .nav { padding: 8px 8px 8px 18px; }
}
@media (max-width: 860px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .how { grid-template-columns: 1fr; }
  .sector-info { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hero { padding-top: 124px; }
  .section { padding: 90px 0; }
  .statement { padding: 100px 0 70px; }
  .stage { margin-top: 44px; }
  .window-bar { height: 30px; } .dots i { width: 8px; height: 8px; } .url { height: 18px; font-size: 10px; }
  .bento { grid-template-columns: 1fr; }
  .bento .wide { grid-column: span 1; }
  .card { padding: 22px; }
  .toggles { grid-template-columns: 1fr; }
  .phones { height: 470px; }
  .phone { width: 190px; border-radius: 24px; padding: 5px; }
  .phone .screen { border-radius: 20px; }
  .phone .notch { display: none; }
  .phone.p1 { left: 0; top: 50px; } .phone.p2 { left: 50%; margin-left: -95px; } .phone.p3 { left: auto; right: 0; width: 170px; top: 90px; }
  .integrations { grid-template-columns: 1fr; }
  .cta-wrap { border-radius: 26px; }
  .cta-grid { padding: 26px 18px; gap: 34px; }
  .form { padding: 20px; }
  .form .row { grid-template-columns: 1fr; gap: 0; }
  .foot-grid { grid-template-columns: 1fr; }
  .phone.sector-phone { display: none; }
  .hero-tabs button { padding: 7px 12px; font-size: 12.5px; }
}
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 22px; }
  .stat:last-child { border-bottom: 0; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .mobile-menu { padding: 76px 24px 20px; display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 2px 24px; }
  .mobile-menu a.big { font-size: 22px; padding: 4px 0; }
  .mobile-menu .mm-actions { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; margin-top: 14px; }
  .hero { padding-top: 104px; }
  .phone.sector-phone { width: 15%; min-width: 110px; bottom: -30px; right: -6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .window { transform: none !important; }
}