/* ==========================================================================
   LEADWIN LMS — HULY.IO INSPIRED DARK PREMIUM THEME
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('../assets/fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Google Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/google-sans-latin.woff2') format('woff2');
}

:root {
  --bg: #090A0C;
  --surface: #111214;
  --surface-2: #18191C;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);
  --ring: rgba(255,255,255,0.06);
  --text: #FFFFFF;
  --text-muted: rgba(255,255,255,0.55);
  --text-dim: rgba(255,255,255,0.35);
  --blue: #3D7EFF;
  /* superfici blu scuro delle schermate disegnate a mano */
  --hm-bg: #0B1322;
  --hm-2: #131E35;
  --hm-3: #1A2742;
  --hm-line: rgba(125,165,255,0.16);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Google Sans', 'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { 
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
/* Lenis (dal suo lenis.css) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* === TYPOGRAPHY === */
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 7vw, 5.25rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  background: linear-gradient(160deg, #fff 30%, #d5d8f6 70%, #fdf7fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  max-width: 620px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.section-subtitle {
  font-size: 1.125rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--text-muted);
  max-width: 520px;
}

.gradient-text {
  background: linear-gradient(135deg, #fff 20%, #d5d8f6 60%, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === BUTTONS === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 700; font-family: var(--font);
  text-transform: uppercase; letter-spacing: -0.01em;
  cursor: pointer; transition: all 0.2s ease; border: none;
  position: relative;
  background: transparent; color: #000;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.6), 0 2px 10px rgba(0,0,0,0.2);
  text-decoration: none;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #d4d4d4;
  border-radius: 999px;
  z-index: -2;
  transition: background 0.2s ease;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle 60px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.95), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
}

.btn:hover::after {
  opacity: 1;
}

.btn:hover::before {
  background: #e5e5e5;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.7), 0 4px 15px rgba(0,0,0,0.3);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* For backwards compatibility with existing HTML classes */
.btn-cta, .btn-outline {
  /* Inherit all unified styles from .btn */
}

/* === NAVBAR === */
.navbar {
  position: fixed; 
  top: 0; 
  left: 0; 
  right: 0;
  width: 100%;
  z-index: 100;
  height: 64px; 
  background: rgba(9, 10, 12, 0);
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Liquid glass allo scroll: quattro strati di sfocatura sempre piu' leggera,
   ognuno coperto dal successivo, cosi' non si vede dove finisce il vetro */
.navbar::before,
.navbar::after,
.navbar-inner::before,
.navbar-inner::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}
.navbar::before {
  height: 100%;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(28px) saturate(150%); -webkit-backdrop-filter: blur(28px) saturate(150%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 62%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 30%, transparent 62%);
}
.navbar::after {
  height: calc(100% + 10px);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 80%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 45%, transparent 80%);
}
.navbar-inner::before {
  height: calc(100% + 24px);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 90%);
}
.navbar-inner::after {
  height: calc(100% + 38px);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}
.navbar.scrolled::before, .navbar.scrolled::after,
.navbar.scrolled .navbar-inner::before, .navbar.scrolled .navbar-inner::after { opacity: 1; }
/* Sopra le sezioni chiare (classe messa da main.js): vetro più pieno e testo scuro */
.navbar.on-light::before {
  background: rgba(255,255,255,0.62);
}
.navbar.on-light .nav-logo,
.navbar.on-light .nav-links > a,
.navbar.on-light .nav-item-dropdown > a { color: #0f172a; }
.navbar.on-light .nav-links > a:hover,
.navbar.on-light .nav-links > a.active,
.navbar.on-light .nav-item-dropdown > a:hover,
.navbar.on-light .nav-item-dropdown:hover > a { color: #0f172a; background: rgba(15,23,42,0.06); }
.navbar.scrolled .mega-menu { overflow: hidden;
  background: #08090C;
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.navbar-inner { position: relative; display: flex; align-items: center; height: 100%;
}
/* Il logo leadwin è sempre in Inter, ovunque compaia */
.nav-logo, .brand-wordmark, #brandText, .eco-main-node span { font-family: 'Inter', sans-serif !important; }
.nav-logo {
  font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em;
  margin-right: auto;
}
.nav-links { display: flex; gap: 4px; margin-right: 24px; }
.nav-links > a, .nav-item-dropdown > a {
  position: relative;
  padding: 8px 14px; 
  font-family: var(--font-heading);
  font-size: 0.9375rem; 
  font-weight: 500;
  color: rgba(255,255,255,0.7); 
  transition: all 0.2s;
  border-radius: 99px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}
.nav-links > a:hover, .nav-links > a.active, .nav-item-dropdown > a:hover, .nav-item-dropdown:hover > a { 
  color: #ffffff; 
  background: rgba(255,255,255,0.08); 
}

/* MEGA MENU */
.nav-item-dropdown { position: static; display: flex; align-items: center; }
.nav-item-dropdown > a::after { content: ''; position: absolute; top: 100%; left: 0; width: 100%; height: 24px; }
.nav-item-dropdown:hover .mega-menu { overflow: hidden; opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.mega-menu { overflow: hidden;
  position: absolute; top: calc(100% + 16px); left: 50%; transform: translateX(-50%) translateY(10px);
  width: 1200px; max-width: 95vw;
  background: #08090C;
  border: 1px solid rgba(255,255,255,0.06); border-radius: 24px;
  padding: 16px; display: grid; grid-template-columns: 2.2fr 1.1fr 1.1fr; gap: 16px;
  opacity: 0; visibility: hidden; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04) inset;
  z-index: 1000;
}

.mega-card-dark { position: relative; z-index: 1;
  background: #18191C;
  border-radius: 16px;
  padding: 32px 28px;
  display: flex; flex-direction: column;
}
.mega-eyebrow {
  font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.4);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 24px;
}
.mega-link-large {
  font-family: var(--font-heading);
  font-size: 1.35rem; font-weight: 600; color: #fff;
  margin-bottom: 20px; display: block;
  transition: color 0.2s, transform 0.2s;
}
.mega-link-large:hover { color: var(--blue); transform: translateX(4px); }
.mega-card-footer {
  margin-top: auto; padding-top: 32px;
  display: flex; gap: 24px; align-items: center;
}
.mega-link-small {
  font-size: 0.8rem; color: rgba(255,255,255,0.6);
  font-weight: 500; transition: color 0.2s; display: flex; align-items: center; gap: 8px;
}
.mega-link-small:hover { color: #fff; }
.badge-new {
  background: #6366f1; color: #fff; font-size: 0.55rem; font-weight: 800;
  padding: 2px 6px; border-radius: 4px; letter-spacing: 0.05em;
}

.mega-list-col { position: relative; z-index: 1;
  padding: 32px 20px;
  display: flex; flex-direction: column;
}
.mega-link-text {
  font-size: 1.1rem; color: #fff; font-weight: 500;
  margin-bottom: 20px; display: block; transition: color 0.2s;
}
.mega-link-text:hover { color: var(--blue); }

.mega-link-icon-simple {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, transform 0.2s ease;
  margin-bottom: 4px;
}
.mega-link-icon-simple:hover {
  color: var(--blue);
  transform: translateX(4px);
}
.mega-ico {
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(61,126,255,0.2));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.mega-link-icon-simple:hover .mega-ico {
  transform: scale(1.15);
  filter: drop-shadow(0 4px 8px rgba(61,126,255,0.4));
}
.mega-socials {
  margin-top: auto; display: flex; gap: 12px;
}
.social-cir {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.social-cir:hover { background: rgba(255,255,255,0.15); color: #fff; }

.mega-highlight-card { position: relative; z-index: 1;
  background: linear-gradient(180deg, #18191C 0%, #111214 100%);
  border-radius: 16px; padding: 32px 28px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 1px solid rgba(255,255,255,0.03);
}
.mega-hl-badge {
  background: rgba(255,255,255,0.05); padding: 4px 12px; border-radius: 20px;
  font-size: 0.6rem; font-weight: 700; color: #a1a1aa; letter-spacing: 0.05em;
  margin-bottom: 20px;
}
.mega-hl-badge span { color: #fff; margin-left: 6px; background: #3b82f6; padding: 2px 6px; border-radius: 4px; font-size: 0.55rem; }
.mega-hl-title {
  font-family: var(--font-heading); font-size: 1.3rem; line-height: 1.1;
  font-weight: 700; color: #fff; margin-bottom: 24px;
}
.mega-hl-img-wrapper {
  width: 100%; aspect-ratio: 16/10; border-radius: 12px;
  overflow: hidden; margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.1);
}
.mega-hl-img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.8; transition: opacity 0.3s;
}
.mega-highlight-card:hover .mega-hl-img { opacity: 1; }
.mega-hl-btn {
  background: #fff; color: #000; font-weight: 600; font-size: 0.85rem;
  padding: 12px 24px; border-radius: 8px; width: 100%; transition: background 0.2s;
}
.mega-hl-btn:hover { background: #e4e4e7; }
}
.mega-link:hover { background: rgba(255, 255, 255, 0.04); }
.mega-link-icon {
  width: 24px; height: 24px; flex-shrink: 0; transition: transform 0.2s ease, filter 0.2s ease;
  margin-top: 2px; filter: drop-shadow(0 2px 4px rgba(61,126,255,0.2));
}
.mega-link:hover .mega-link-icon { transform: scale(1.15); filter: drop-shadow(0 4px 8px rgba(61,126,255,0.4)); }
.mega-link-text h4 { font-size: 0.875rem; font-weight: 500; margin: 0 0 4px; line-height: 1.2; color: #fff; }
.mega-link-text p { font-size: 0.8125rem; color: var(--text-muted); margin: 0; line-height: 1.4; }

/* === HERO === */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  padding-top: 184px; overflow: hidden;
  background: transparent; /* lascia vedere lo strato di puntini fisso dietro la pagina */
}
.hero-desc {
  margin-top: 20px; max-width: 440px;
  font-size: 1.125rem; line-height: 1.4;
  letter-spacing: -0.02em; color: rgba(255,255,255,0.6);
}
.hero-buttons { margin-top: 44px; display: flex; gap: 14px; align-items: center; }

/* Hero product image */
.hero-product {
  position: relative;
  margin-top: 60px;
  max-width: 1024px;
}
.hero-product img {
  width: 100%; height: auto;
  display: block;
  border-radius: 10px 10px 0 0;
  position: relative;
  z-index: 2;
}
/* Gradient fade at bottom */
.hero-fade {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 180px; z-index: 3;
  background: linear-gradient(to bottom, rgba(9,10,12,0) 0%, var(--bg) 100%);
  pointer-events: none;
}

/* Hero transition strip */
.hero-strip {
  padding: 48px 0 56px;
  background: transparent;
  position: relative;
  overflow: hidden;
}
.strip-label {
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
}
.strip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.strip-list li {
  padding: 0 12px;
  white-space: nowrap;
}
.strip-list li.dot {
  color: rgba(255,255,255,0.2);
  padding: 0 4px;
  font-weight: 300;
}
.strip-list li.strip-dup { display: none; }
/* Finestre strette, tablet e mobile: la lista va su una riga e scorre (prima andava a capo in disordine) */
@media (max-width: 992px) {
  .strip-scroll { overflow: hidden; -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent); }
  .strip-list { flex-wrap: nowrap; width: max-content; animation: marquee-scroll 32s linear infinite; }
  .strip-list li.strip-dup { display: block; }
}
@media (max-width: 992px) and (prefers-reduced-motion: reduce) {
  .strip-list { animation: none; }
}
/* Glow blobs behind hero */
.hero-glow {
  position: absolute; pointer-events: none; z-index: 0;
}
.hero-glow-1 {
  width: 900px; height: 700px;
  top: 100px; left: -200px;
  background: radial-gradient(ellipse, rgba(248,230,221,0.12) 0%, rgba(203,211,235,0.08) 50%, transparent 80%);
  filter: blur(80px);
}
.hero-glow-2 {
  width: 600px; height: 500px;
  top: 50px; right: -100px;
  background: radial-gradient(ellipse, rgba(219,226,240,0.15) 0%, transparent 70%);
  filter: blur(60px);
}

/* === LIGHT CASCADE (Massive flowing beam like Huly) === */
.light-cascade {
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 100%; height: 100%;
  pointer-events: none; z-index: 5;
  overflow: hidden;
  container-type: size;
}
/* Core bright beam */
.light-cascade::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  transform-origin: 50% 0;
  /* si spegne dentro al blocco LeadWin dello schema Meta, che lo copre. Non oltre:
     beam-shimmer lo allunga del 2% e con l'alone sbucava sotto al blocco */
  width: 4px; height: 72%;
  background: linear-gradient(to bottom,
    rgba(255,255,255,0.95) 0%,
    rgba(200,220,255,0.8) 25%,
    rgba(140,170,255,0.6) 50%,
    rgba(80,120,255,0.3) 70%,
    transparent 100%
  );
  box-shadow:
    0 0 20px 10px rgba(180,200,255,0.6),
    0 0 60px 30px rgba(140,170,255,0.3),
    0 0 140px 70px rgba(100,140,255,0.15),
    0 0 250px 120px rgba(80,120,255,0.06);
  animation: beam-shimmer 3s ease-in-out infinite;
}
/* Wide luminous nebula */
.light-cascade::after {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  transform-origin: 50% 0; /* scala dal bordo alto: il bordo non entra nella pagina */
  width: 800px; height: 85%;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(100,140,255,0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 45% 40%, rgba(160,130,255,0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 55% 35%, rgba(80,120,255,0.08) 0%, transparent 45%);
  animation: glow-breathe 5s ease-in-out infinite;
}
@keyframes beam-shimmer {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleY(1); }
  50% { opacity: 1; transform: translateX(-50%) scaleY(1.02); }
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(0.92); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.12); }
}

/* Flowing light particles */
.cascade-particle {
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none; z-index: 2;
  animation: fall-down linear infinite;
}
.cascade-particle:nth-child(1) {
  width: 6px; height: 80px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.9), transparent);
  box-shadow: 0 0 20px 8px rgba(180,200,255,0.6), 0 0 60px 20px rgba(120,150,255,0.2);
  animation-duration: 2.2s; animation-delay: 0s;
}
.cascade-particle:nth-child(2) {
  width: 4px; height: 50px;
  background: linear-gradient(to bottom, transparent, rgba(180,200,255,0.7), transparent);
  box-shadow: 0 0 15px 6px rgba(140,170,255,0.5), 0 0 40px 15px rgba(100,140,255,0.15);
  animation-duration: 3s; animation-delay: 0.6s;
}
.cascade-particle:nth-child(3) {
  width: 8px; height: 100px;
  background: linear-gradient(to bottom, transparent, rgba(200,215,255,0.6), transparent);
  box-shadow: 0 0 25px 10px rgba(150,180,255,0.4), 0 0 80px 30px rgba(100,140,255,0.12);
  animation-duration: 3.8s; animation-delay: 1.3s;
}
.cascade-particle:nth-child(4) {
  width: 5px; height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.8), transparent);
  box-shadow: 0 0 18px 7px rgba(200,210,255,0.6), 0 0 50px 18px rgba(140,170,255,0.2);
  animation-duration: 2.6s; animation-delay: 2s;
}
@keyframes fall-down {
  0% { transform: translate(-50%, -12cqh); opacity: 0; }
  8% { opacity: 1; }
  75% { opacity: 0.5; }
  100% { transform: translate(-50%, 78cqh); opacity: 0; }
}

/* Massive blue flare at impact point */
.cascade-flare {
  /* alto quanto la hero con top fisso: se la hero cresce durante il caricamento il bagliore
     non "salta" (niente layout shift). Il bagliore 700x350 resta al 20% dal fondo via background. */
  position: absolute;
  top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 700px;
  background:
    radial-gradient(ellipse at 50% 20%, rgba(100,140,255,0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 40%, rgba(80,120,255,0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 10%, rgba(160,130,255,0.12) 0%, transparent 35%);
  background-size: 700px 350px;
  background-repeat: no-repeat;
  background-position: 50% calc(80% - 70px);
  filter: blur(30px);
  pointer-events: none; z-index: 5;
  animation: flare-pulse 4s ease-in-out infinite;
}
/* solo opacità: con scale il bordo del riquadro sfocato (alto quanto la hero) si vedeva salire e scendere */
@keyframes flare-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
/* Su mobile il fascio di luce centrale e il suo bagliore coprivano i blocchi: spenti */
@media (max-width: 768px) {
  .light-cascade, .cascade-flare { display: none; }
}

/* Hero product - clean, no border */
.hero-product {
  position: relative;
  margin-top: 60px;
  max-width: 1024px;
}
.hero-product img {
  width: 100%;
  border-radius: 12px 12px 0 0;
  position: relative;
  z-index: 2;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

/* Horizontal beams from sides */
.beam-left, .beam-right {
  position: absolute;
  top: 50%; height: 3px;
  width: 50%;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
  container-type: inline-size;
}
.beam-left {
  right: 100%; transform: translateY(-50%);
  background: linear-gradient(to right,
    transparent 0%,
    rgba(80,120,255,0.2) 30%,
    rgba(140,170,255,0.5) 70%,
    rgba(255,255,255,0.8) 100%
  );
  box-shadow:
    0 0 15px 6px rgba(140,170,255,0.3),
    0 0 50px 20px rgba(100,140,255,0.1);
  animation: beam-left-pulse 3.5s ease-in-out infinite;
}
.beam-right {
  left: 100%; transform: translateY(-50%);
  background: linear-gradient(to left,
    transparent 0%,
    rgba(255,120,40,0.2) 30%,
    rgba(255,160,80,0.5) 70%,
    rgba(255,220,150,0.8) 100%
  );
  box-shadow:
    0 0 15px 6px rgba(255,150,60,0.3),
    0 0 50px 20px rgba(255,120,40,0.1);
  animation: beam-right-pulse 3.5s ease-in-out infinite 0.5s;
}
/* Particle flowing left to right */
.beam-left::after {
  content: '';
  position: absolute;
  right: 0; top: 50%; transform: translateY(-50%);
  width: 120px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, transparent, rgba(180,200,255,0.9), rgba(255,255,255,1));
  box-shadow: 0 0 12px 4px rgba(150,180,255,0.4);
  animation: particle-to-right 2.5s linear infinite;
}
/* Particle flowing right to left */
.beam-right::after {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 120px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(to left, transparent, rgba(255,180,100,0.9), rgba(255,230,180,1));
  box-shadow: 0 0 12px 4px rgba(255,150,60,0.4);
  animation: particle-to-left 2.8s linear infinite 0.3s;
}
@keyframes beam-left-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes beam-right-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes particle-to-right {
  0% { transform: translate(-100cqw, -50%); opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 0.8; }
  100% { transform: translate(20px, -50%); opacity: 0; }
}
@keyframes particle-to-left {
  0% { transform: translate(100cqw, -50%); opacity: 0; }
  10% { opacity: 1; }
  80% { opacity: 0.8; }
  100% { transform: translate(-20px, -50%); opacity: 0; }
}

/* Mini cascade beams for feature sections */
.mini-cascade {
  position: absolute;
  top: 0; width: 2px; height: 100%;
  pointer-events: none; z-index: 1;
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(140,170,255,0.15) 20%,
    rgba(100,140,255,0.08) 50%,
    transparent 80%
  );
  box-shadow:
    0 0 10px 4px rgba(130,160,255,0.08),
    0 0 40px 15px rgba(100,140,255,0.04);
  overflow: hidden;
  container-type: size;
}
.mini-cascade::before {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 2px; height: 60px;
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent, rgba(180,200,255,0.6), transparent);
  box-shadow: 0 0 8px 3px rgba(150,180,255,0.25);
  animation: mini-fall 3.5s linear infinite;
}
.mini-cascade::after {
  content: '';
  position: absolute;
  left: 50%; transform: translateX(-50%);
  width: 2px; height: 40px;
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent, rgba(200,215,255,0.5), transparent);
  box-shadow: 0 0 6px 2px rgba(140,170,255,0.2);
  animation: mini-fall 4.2s linear infinite 1.8s;
}
@keyframes mini-fall {
  0% { transform: translate(-50%, -8cqh); opacity: 0; }
  10% { opacity: 1; }
  70% { opacity: 0.4; }
  100% { transform: translate(-50%, 95cqh); opacity: 0; }
}

@keyframes feat-scroll-tags {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes feat-scroll-tags-reverse {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Horizontal beams for white sections */
.mini-beam-h {
  position: absolute;
  left: 0; width: 100%; height: 2px;
  pointer-events: none; z-index: 1;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(61,126,255,0.1) 20%,
    rgba(61,126,255,0.06) 50%,
    transparent 80%
  );
  box-shadow: 0 0 8px 3px rgba(61,126,255,0.04);
  overflow: visible;
  container-type: inline-size;
}
.mini-beam-h::before {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 120px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, transparent, rgba(61,126,255,0.5), transparent);
  box-shadow: 0 0 8px 3px rgba(61,126,255,0.15);
  animation: h-slide 4s linear infinite;
}
.mini-beam-h::after {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 80px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(to right, transparent, rgba(100,140,255,0.4), transparent);
  box-shadow: 0 0 6px 2px rgba(61,126,255,0.1);
  animation: h-slide 5s linear infinite 2s;
}
@keyframes h-slide {
  0% { transform: translate(-5cqw, -50%); opacity: 0; }
  8% { opacity: 1; }
  70% { opacity: 0.4; }
  100% { transform: translate(100cqw, -50%); opacity: 0; }
}

/* === FEATURE SECTION (Bento Cards) === */
.features-section {
  padding: 120px 0;
  position: relative;
}
.features-section .section-glow {
  position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 1200px; height: 800px;
  background: radial-gradient(ellipse, rgba(210,208,208,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.bento-grid {
  display: flex; flex-wrap: wrap; gap: 20px;
  margin-top: 40px;
}
.bento-card {
  position: relative;
  background: var(--hm-bg);
  border-radius: 12px;
  overflow: hidden;
  ring: 6px;
  box-shadow: 0 0 0 6px var(--ring);
  transition: box-shadow 0.3s ease;
}
.bento-card:hover {
  box-shadow: 0 0 0 6px rgba(255,255,255,0.1);
}

/* Card sizes */
.card-sm { width: calc(35% - 10px); min-height: 420px; }
.card-lg { width: calc(65% - 10px); min-height: 420px; }
.card-full { width: 100%; min-height: 500px; }

.card-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 24px;
  z-index: 10;
}
.card-content::before {
  content: '';
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 200%;
  background: linear-gradient(to bottom, transparent 0%, var(--hm-bg) 60%);
  z-index: -1;
}
.card-content strong {
  color: var(--text); font-weight: 500;
}
.card-content p {
  font-size: 0.9375rem; line-height: 1.4;
  letter-spacing: -0.01em; color: var(--text-muted);
}
.card-image {
  width: 100%; height: 100%; object-fit: cover;
  position: absolute; top: 0; left: 0;
}

/* === SPLIT SECTION === */
.split-section {
  padding: 120px 0;
}
.split-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.split-image {
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 0 0 6px var(--ring);
  background: var(--surface);
}
.split-image img { width: 100%; display: block; }

/* === HULY BENTO GRID (MetaBrain style) === */
.hb-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
}
.hb-card {
  background: var(--hm-bg);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.hb-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.hb-label {
  padding: 22px 22px 14px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255,255,255,0.55);
}
.hb-label strong {
  color: #fff;
  font-weight: 600;
}
.hb-card img {
  width: 100%;
  margin-top: auto;
  display: block;
  border-radius: 0 0 20px 20px;
  object-fit: cover;
  object-position: top left;
  height: 180px;
}
/* Row sizes */
.hb-r1c1, .hb-r1c2, .hb-r1c3 { min-height: 280px; }
.hb-r2c1, .hb-r2c2, .hb-r2c3 { min-height: 260px; }
.hb-r1c2 img, .hb-r2c2 img { height: 200px; }

@media (max-width: 768px) {
  .hb-grid {
    grid-template-columns: 1fr;
  }
}

/* Huly-style animated border glow on screenshots */
.screenshot-glow {
  position: relative;
  border-radius: 14px;
  padding: 2px;
  overflow: visible;
}
/* Rotating conic-gradient border */
.screenshot-glow::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 15px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    transparent 25%,
    rgba(80,130,255,0.7) 30%,
    rgba(150,190,255,1) 35%,
    rgba(80,130,255,0.7) 40%,
    transparent 45%,
    transparent 100%
  );
  animation: rotate-border 4s linear infinite;
  z-index: 0;
}
@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotate-border {
  to { --border-angle: 360deg; }
}
/* Fallback for browsers without @property */
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .screenshot-glow::before {
    background: linear-gradient(135deg, rgba(80,130,255,0.4), transparent, rgba(80,130,255,0.4));
  }
}
/* Inner container to mask the gradient */
.screenshot-glow > img,
.screenshot-glow > picture > img { /* picture: su telefono serve il ritaglio */
  width: 100%;
  height: auto; /* senza questo l'attributo height deformava l'immagine */
  display: block;
  border-radius: 12px;
  position: relative;
  z-index: 2;
}
/* Ambient glow underneath */
.screenshot-glow::after {
  content: '';
  position: absolute;
  bottom: -25px; left: 8%; right: 8%;
  height: 100px;
  background: radial-gradient(ellipse at center, rgba(80,130,255,0.3) 0%, rgba(60,110,255,0.12) 40%, transparent 75%);
  filter: blur(35px);
  z-index: -1;
  animation: glow-pulse 4s ease-in-out infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scaleX(0.92); }
  50% { opacity: 1; transform: scaleX(1.05); }
}

/* Blue variant */
.screenshot-glow.glow-blue::before {
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    transparent 25%,
    rgba(61,126,255,0.8) 30%,
    rgba(140,180,255,1) 35%,
    rgba(61,126,255,0.8) 40%,
    transparent 45%,
    transparent 100%
  );
}
.screenshot-glow.glow-blue::after {
  background: radial-gradient(ellipse at center, rgba(61,126,255,0.4) 0%, rgba(100,140,255,0.15) 40%, transparent 75%);
}

/* Green variant */
.screenshot-glow.glow-green::before {
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    transparent 25%,
    rgba(52,168,83,0.8) 30%,
    rgba(100,220,140,1) 35%,
    rgba(52,168,83,0.8) 40%,
    transparent 45%,
    transparent 100%
  );
}
.screenshot-glow.glow-green::after {
  background: radial-gradient(ellipse at center, rgba(52,168,83,0.35) 0%, rgba(45,212,191,0.15) 40%, transparent 75%);
}

/* Orange variant */
.screenshot-glow.glow-orange::before {
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    transparent 25%,
    rgba(255,140,50,0.8) 30%,
    rgba(255,200,100,1) 35%,
    rgba(255,140,50,0.8) 40%,
    transparent 45%,
    transparent 100%
  );
}
.screenshot-glow.glow-orange::after {
  background: radial-gradient(ellipse at center, rgba(255,140,50,0.35) 0%, rgba(255,80,20,0.15) 40%, transparent 75%);
}

/* === FAQ === */
details {
  border-bottom: 1px solid var(--border);
}
details summary {
  padding: 24px 0; font-size: 1.0625rem; font-weight: 500;
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  letter-spacing: -0.01em;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: '+'; font-size: 1.25rem; color: var(--text-muted);
  transition: transform 0.2s ease;
}
details[open] summary::after { transform: rotate(45deg); }
details .faq-body {
  padding-bottom: 24px;
  font-size: 0.9375rem; line-height: 1.6;
  color: var(--text-muted);
}

/* === FOOTER === */
.footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border);
  margin-top: 80px;
  position: relative;
  overflow: hidden;
}
.footer > .container {
  position: relative;
  z-index: 10;
}
.footer-inner {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 64px;
}
.footer-heading {
  font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-dim); margin-bottom: 20px;
}
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 0.875rem; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 0.8125rem; color: var(--text-dim);
}
.footer-bottom span + span::before { content: ' · '; }

/* === SCROLL REVEAL === */
.reveal {
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
/* nascosti solo quando main.js è pronto a mostrarli (classe js-reveal): senza JS, o finché
   non arriva, i contenuti restano visibili invece di lasciare zone vuote sotto la hero */
.js-reveal .reveal:not(.visible) { opacity: 0; transform: translateY(30px); }
.reveal.visible { opacity: 1; transform: none; }
/* Hero: entra subito via CSS, senza aspettare il JS (FCP/LCP) */
.hero-title.reveal, .hero-desc.reveal, .hero-buttons.reveal { animation: reveal-in 0.7s cubic-bezier(0.4,0,0.2,1) both; }
.hero-desc.reveal-d1 { animation-delay: 0.1s; }
.hero-buttons.reveal-d2 { animation-delay: 0.2s; }
@keyframes reveal-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }

/* === RESPONSIVE (see comprehensive mobile section at bottom of file) === */

/* ==========================================================================
   AELINE-INSPIRED COMPONENTS
   ========================================================================== */

/* === EYEBROW LABEL === */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 16px;
  font-family: 'Inter', monospace;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 2px;
  background: var(--blue);
  flex-shrink: 0;
}
/* Light sections */
.eyebrow-dark {
  color: rgba(0,0,0,0.45);
}
.eyebrow-dark::before {
  background: #000;
}

/* === STATS GRID (Aeline masonry) === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}
/* Card dei numeri: bianche su sezione scura, testo scuro */
.stat-card {
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 200px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}
.stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
  color: #0f172a;
}
.stat-label {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.4;
  min-height: 2.8em; /* 2 righe: numeri allineati anche con etichette corte */
}

/* === TESTIMONIALS CAROUSEL === */
.testimonials-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 32px 20px;
  scrollbar-width: none;
}
.testimonials-track::-webkit-scrollbar { display: none; }

.testimonial-card {
  flex: 0 0 360px;
  height: 440px;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  background: var(--surface-2);
}
.testimonial-card img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.testimonial-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 32px 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  height: 60%;
}
.testimonial-quote-mark {
  font-size: 2.5rem; font-weight: 700;
  color: rgba(255,255,255,0.3);
  line-height: 1; margin-bottom: 12px;
  font-family: Georgia, serif;
}
.testimonial-text {
  font-size: 0.9375rem; line-height: 1.5;
  color: #fff; font-weight: 400;
  margin-bottom: 16px;
}
.testimonial-author {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}
.testimonial-header {
  display: flex; align-items: center; gap: 12px;
  position: absolute; top: 20px; left: 24px;
}
.testimonial-company {
  font-size: 0.8125rem; font-weight: 600;
  color: #fff; letter-spacing: 0.02em;
}
.testimonials-nav {
  display: flex; gap: 8px;
  margin-top: 0;
}
.testimonials-nav button {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent; color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  transition: all 0.2s ease;
}
.testimonials-nav button:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}

/* === CTA BANNER (Aeline style) === */
.cta-banner {
  margin: 0 32px 60px;
  padding: 80px 60px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1628 0%, #0f1d35 40%, #0a1628 100%);
  display: flex;
  align-items: center;
  min-height: 340px;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(61,126,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(100,80,200,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.cta-banner-content {
  position: relative; z-index: 2;
  max-width: 560px;
}
.cta-banner-content h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 16px;
}
.cta-banner-content p {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin-bottom: 32px;
  max-width: 440px;
}
.cta-banner-trust {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.cta-banner-avatars {
  display: flex;
}
.cta-banner-avatars span {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 2px solid #0a1628;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 600;
  margin-left: -8px;
}
.cta-banner-avatars span:first-child { margin-left: 0; }
.cta-banner-trust-text {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}
.cta-banner-visual {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 45%;
  opacity: 0.15;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 400"><circle cx="200" cy="200" r="150" fill="none" stroke="%233D7EFF" stroke-width="0.5" opacity="0.4"/><circle cx="200" cy="200" r="100" fill="none" stroke="%233D7EFF" stroke-width="0.5" opacity="0.3"/><circle cx="200" cy="200" r="50" fill="none" stroke="%233D7EFF" stroke-width="0.5" opacity="0.2"/></svg>') center/contain no-repeat;
  pointer-events: none;
}

/* === RESPONSIVE NEW COMPONENTS === */
@media (max-width: 992px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-card { flex: 0 0 300px; height: 380px; }
  .cta-banner { margin: 0 20px 40px; padding: 60px 40px; }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: 1fr; }
  .testimonial-card { flex: 0 0 280px; height: 360px; }
  .cta-banner { margin: 0 16px 32px; padding: 48px 28px; flex-direction: column; }
  .cta-banner-visual { display: none; }
}

/* === AELINE EXPERTISE BENTO (2x2 grid with floating screenshots) === */
.ae-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
}
.ae-bento-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px 36px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.ae-bento-card:hover { border-color: var(--border-hover); }

/* Light variant for light sections */
.ae-bento-card--light {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
}
.ae-bento-card--light:hover { border-color: rgba(0,0,0,0.12); }
.ae-bento-card--light .ae-bento-title { color: #000; }
.ae-bento-card--light .ae-bento-desc { color: rgba(0,0,0,0.55); }

.ae-bento-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 240px;
  margin-bottom: 24px;
}

/* Floating screenshot stack */
.ae-float-stack {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ae-float-stack img {
  position: absolute;
  border-radius: 12px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.3),
    0 2px 8px rgba(0,0,0,0.15);
  transition: transform 0.4s ease;
  max-width: 85%;
}
.ae-float-stack img:nth-child(1) {
  transform: rotate(-4deg) translate(-10%, -5%);
  z-index: 1;
}
.ae-float-stack img:nth-child(2) {
  transform: rotate(3deg) translate(10%, 5%);
  z-index: 2;
  max-width: 70%;
}
.ae-bento-card:hover .ae-float-stack img:nth-child(1) {
  transform: rotate(-6deg) translate(-12%, -8%);
}
.ae-bento-card:hover .ae-float-stack img:nth-child(2) {
  transform: rotate(5deg) translate(12%, 8%);
}

/* Light section float stack - lighter shadows */
.ae-bento-card--light .ae-float-stack img {
  box-shadow:
    0 8px 32px rgba(0,0,0,0.12),
    0 2px 8px rgba(0,0,0,0.06);
}

.ae-bento-title {
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.ae-bento-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === SERVICES CONTAINER ROW (Aeline style) === */
.ae-services-container {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 8px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 8px;
  margin-top: 48px;
}
.ae-services-container--light {
  background: #f0f0f0;
  border: 1px solid rgba(0,0,0,0.06);
}
.ae-service-card {
  background: var(--bg);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.ae-service-card--light {
  background: #fff;
}
.ae-service-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: auto;
}
.ae-service-icon svg { width: 48px; height: 48px; }
.ae-service-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.ae-service-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}
/* card scura dentro una sezione chiara: il titolo ereditava il colore scuro e spariva */
.ae-service-card .ae-service-title { color: var(--text); }
.ae-service-card--light .ae-service-title { color: #000; }
.ae-service-card--light .ae-service-desc { color: rgba(0,0,0,0.55); }

/* Section centered header (Aeline pattern) */
.ae-section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.ae-section-header .eyebrow {
  justify-content: center;
}

/* === 3D ARC CAROUSEL === */
.arc-carousel {
  perspective: 1200px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-top: 48px;
  position: relative;
  height: 320px;
  overflow: visible;
}
.arc-card {
  width: 200px;
  height: 260px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  position: absolute;
  transition: transform 0.5s ease, opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow: hidden;
}
/* Dark variant */
.arc-card--dark {
  background: #1a1a2e;
  color: #fff;
}
/* Positions: center card is flat, others fan out */
.arc-card:nth-child(1) { transform: translateX(-480px) rotateY(35deg) scale(0.85); opacity: 0.6; z-index: 1; }
.arc-card:nth-child(2) { transform: translateX(-280px) rotateY(25deg) scale(0.9); opacity: 0.8; z-index: 2; }
.arc-card:nth-child(3) { transform: translateX(-100px) rotateY(10deg) scale(0.95); opacity: 0.95; z-index: 3; }
.arc-card:nth-child(4) { transform: translateX(0) rotateY(0deg) scale(1); opacity: 1; z-index: 5; }
.arc-card:nth-child(5) { transform: translateX(100px) rotateY(-10deg) scale(0.95); opacity: 0.95; z-index: 3; }
.arc-card:nth-child(6) { transform: translateX(280px) rotateY(-25deg) scale(0.9); opacity: 0.8; z-index: 2; }
.arc-card:nth-child(7) { transform: translateX(480px) rotateY(-35deg) scale(0.85); opacity: 0.6; z-index: 1; }

/* === PURE HTML/CSS UI CARDS (Aeline style) === */
/* Mini dashboard card */
.ui-card {
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}
.ui-card--performance {
  background: #1a1a2e;
  color: #fff;
  padding: 18px;
}
.ui-card--performance .ui-card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.ui-card--performance .ui-card-label {
  font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.7);
}
.ui-card--performance .ui-card-sublabel {
  font-size: 0.625rem; color: rgba(255,255,255,0.4); margin-top: 2px;
}
.ui-card--performance .ui-card-value {
  font-size: 2.5rem; font-weight: 700; letter-spacing: -0.03em; margin-top: 12px;
}
.ui-card--performance .ui-card-metric {
  font-size: 0.6875rem; color: rgba(255,255,255,0.4); margin-top: 4px;
}

/* White expense card */
.ui-card--expense {
  background: #fff;
  color: #000;
  padding: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.ui-card--expense .ui-card-label {
  font-size: 0.6875rem; color: rgba(0,0,0,0.45); margin-bottom: 8px;
}
.ui-card--expense .ui-card-value {
  font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em;
}
.ui-card--expense .ui-card-value span {
  font-weight: 400; color: rgba(0,0,0,0.35);
}
/* Progress bar */
.ui-progress {
  width: 100%; height: 6px; border-radius: 3px;
  background: #e5e7eb; margin: 12px 0;
  overflow: hidden;
}
.ui-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), #60a5fa);
}
/* Row item */
.ui-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.ui-row-left {
  display: flex; align-items: center; gap: 8px;
}
.ui-row-icon {
  width: 24px; height: 24px; border-radius: 6px;
  background: #f3f4f6; display: flex; align-items: center; justify-content: center;
}
.ui-row-name { font-size: 0.75rem; font-weight: 500; }
.ui-row-date { font-size: 0.625rem; color: rgba(0,0,0,0.35); }
.ui-row-amount { font-size: 0.8125rem; font-weight: 600; }

/* Tags cloud card */
.ui-card--tags {
  background: #fff;
  color: #000;
  padding: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
}
.ui-tag-row {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.ui-tag {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  font-size: 0.6875rem;
  font-weight: 500;
  color: rgba(0,0,0,0.7);
  white-space: nowrap;
}

/* Stat highlight card */
.ui-card--stat {
  padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.ui-card--stat .ui-card-value {
  font-size: 2.25rem; font-weight: 700; letter-spacing: -0.03em;
}

/* Chart bars mini */
.ui-mini-bars {
  display: flex; gap: 4px; align-items: flex-end; height: 48px; margin-top: auto;
}
.ui-mini-bar {
  width: 12px; border-radius: 4px 4px 0 0;
  background: rgba(61,126,255,0.3);
}
.ui-mini-bar--active { background: var(--blue); }

/* === RESPONSIVE AE COMPONENTS === */
@media (max-width: 992px) {
  .arc-carousel { height: 240px; }
  .arc-card { width: 160px; height: 210px; padding: 14px; }
  .arc-card:nth-child(1) { transform: translateX(-360px) rotateY(35deg) scale(0.8); }
  .arc-card:nth-child(2) { transform: translateX(-210px) rotateY(25deg) scale(0.85); }
  .arc-card:nth-child(3) { transform: translateX(-80px) rotateY(10deg) scale(0.9); }
  .arc-card:nth-child(5) { transform: translateX(80px) rotateY(-10deg) scale(0.9); }
  .arc-card:nth-child(6) { transform: translateX(210px) rotateY(-25deg) scale(0.85); }
  .arc-card:nth-child(7) { transform: translateX(360px) rotateY(-35deg) scale(0.8); }

  .ae-bento { grid-template-columns: 1fr; }

  .ae-bento-card { min-height: 360px; }
  .ae-services-container { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .arc-carousel { height: 200px; overflow: hidden; }
  .arc-card { width: 130px; height: 180px; padding: 10px; }
  .arc-card:nth-child(1), .arc-card:nth-child(7) { display: none; }

  .ae-bento-card { min-height: 320px; padding: 28px 24px; }
  .ae-float-stack img { max-width: 90%; }
  .ae-float-stack img:nth-child(2) { max-width: 75%; }
}

/* === FEATURES BENTO GRID (Aeline Style) === */
.features-bento-section {
  padding: 120px 0;
  position: relative;
  background: var(--bg);
}
.features-bento-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 24px;
  margin-top: 60px;
  position: relative;
}

.features-bento-right {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.feat-card {
  background: #f4f4f5;
  border-radius: 28px;
  border: 1px solid rgba(0,0,0,0.05);
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.feat-card-tall {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  align-self: stretch !important;
}
.feat-card-wide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}
.feat-icon {
  width: 48px; height: 48px;
  background: #d4ff00;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  color: #000;
}
.feat-card h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #111;
  letter-spacing: -0.02em;
}
.feat-card p {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 24px;
}
.feat-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #e4e4e7;
  color: #111;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}
.feat-btn:hover { background: #d4d4d8; }

.feat-visual {
  position: relative;
  height: 240px;
  width: 100%;
}
.f-ui {
  position: absolute;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.08);
  font-family: 'Inter', sans-serif;
  transition: transform 0.3s ease;
}
.f-ui-dark {
  background: #121212;
  color: #fff;
  z-index: 1;
}
.f-ui-light {
  background: #fff;
  color: #111;
  z-index: 2;
}

@media (max-width: 992px) {
  .features-bento-grid { grid-template-columns: 1fr; }
  .feat-card-wide { grid-template-columns: 1fr; }
}

/* === FEATURES MARQUEE === */
.marquee-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 10;
  padding: 20px 0;
  margin-top: 60px;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: scrollMarquee 35s linear infinite;
}
.marquee-container:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-card {
  flex: 0 0 auto;
  width: 280px;
  height: 220px;
  border-radius: 20px;
  background: var(--surface-2);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  padding: 24px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.marquee-card.card-light {
  background: #f4f4f5;
  color: #111;
}
.marquee-card.card-accent {
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  color: #fff;
  border: none;
}
@keyframes scrollMarquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-1500px); } /* exactly 1 set width (5 cards * 280px + 5 gaps * 20px) for perfect infinite loop */
}
@keyframes orbit-cw {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes orbit-ccw {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

/* === LIGHT THEME UTILITIES === */
.section-light {
  background: #f8fafc;
  color: #0f172a;
}
.section-light .eyebrow {
  color: #64748b;
}
.section-light .section-title {
  color: #0f172a;
}
.section-light .section-subtitle {
  color: #475569;
}
.feat-card-light {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  padding: 0;
}
.feat-card-light h3 {
  color: #0f172a;
}
.feat-card-light p {
  color: #475569;
}
.feat-card-light .feat-visual {
  background: transparent;
}
.feat-card-light.feat-card-tall .feat-visual {
  border-top: none;
}
.feat-card-light.feat-card-wide .feat-visual {
  border-left: none;
  height: 100%;
}

/* === LIGHT THEME ANIMATIONS === */
@keyframes float-up-down {
  0% { transform: translateY(0px) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--rot, 0deg)); }
  100% { transform: translateY(0px) rotate(var(--rot, 0deg)); }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}
@keyframes slide-in-right {
  0% { transform: translateX(100%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Striscia loghi integrazioni (home): riga su desktop, nastro che scorre su mobile */
.logo-strip { overflow: hidden; }
.logo-track { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.logo-track > div { white-space: nowrap; flex-shrink: 0; }
.logo-track > .logo-dup { display: none !important; }
@media (max-width: 768px) {
  .logo-strip { padding: 0 !important; -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
  /* 2 copie dei loghi + padding = un gap: translateX(-50%) torna esattamente all'inizio */
  .logo-track { width: max-content; justify-content: flex-start; gap: 48px; padding-right: 48px; animation: marquee-scroll 24s linear infinite; }
  .logo-track > .logo-dup { display: flex !important; }
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
}

/* Marquee logos scroll */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* === TRANSIZIONE TRA PAGINE: onda di pixel (View Transitions tra documenti) === */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
/* la vecchia pagina resta ferma sotto, la nuova entra da sinistra */
::view-transition-old(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { animation: pt-reveal 1s linear both; mix-blend-mode: normal; }
@keyframes pt-reveal { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
/* la fascia di quadrati (main.js) sta sopra entrambe */
.pt-band { position: fixed; inset: 0; z-index: 999999; pointer-events: none; display: grid; overflow: hidden; view-transition-name: pt-band; }
.pt-band i { opacity: 0; }
::view-transition-new(pt-band) { animation: none; }
/* su telefono la transizione dura meno, come la fascia (js/pt.js) */
@media (max-width: 768px) { ::view-transition-new(root) { animation-duration: 0.42s; } }

/* ==========================================================================
   MOBILE RESPONSIVE — COMPLETE
   ========================================================================== */

/* === MOBILE MENU: hamburger nella navbar + pannello stile mega menu === */
.nav-burger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 44px; height: 44px; margin-left: 4px; padding: 10px;
  background: none; border: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; border-radius: 2px; background: #fff;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease, background 0.3s ease;
}
.nav-burger span:nth-child(2) { width: 16px; align-self: flex-end; margin-right: 1px; }
.nav-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.active span:nth-child(2) { opacity: 0; width: 0; }
.nav-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.navbar.on-light .nav-burger span { background: #0f172a; }

.mobile-popup-menu {
  display: none;
  position: fixed;
  /* 16px sotto la navbar (64px); in basso lascia 12px + la barra di sistema del telefono */
  top: 80px; left: 12px; right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 9998;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}
.mobile-popup-menu.active { opacity: 1; visibility: visible; transform: none; }
.mpm-box {
  display: flex; flex-direction: column; gap: 12px;
  height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 12px;
  background: #08090C;
  border: 1px solid rgba(255,255,255,0.06); border-radius: 24px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.04) inset;
}
.mpm-box::-webkit-scrollbar { display: none; }
.mpm-box .mega-eyebrow { margin-bottom: 6px; }
.mpm-card { background: #18191C; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; }
.mpm-col { padding: 8px 20px 0; display: flex; flex-direction: column; }
.mpm-item {
  display: flex; align-items: center; gap: 12px; padding: 9px 0;
  font-family: var(--font-heading); font-size: 1.02rem; font-weight: 500; color: #fff;
  text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.mpm-item svg, .mpm-item .mega-ico { width: 20px; height: 20px; flex-shrink: 0; }
.mpm-item:active { color: var(--blue); }
.mpm-all {
  margin-top: 12px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.875rem; font-weight: 500; color: rgba(255,255,255,0.6);
}
.mpm-sep { height: 1px; background: rgba(255,255,255,0.06); margin: 8px 0; }
.mpm-cta { margin: 4px 0 0; text-align: center; border-radius: 999px !important; display: block; box-sizing: border-box; overflow: hidden; }
.mpm-cta::before, .mpm-cta::after { border-radius: 999px !important; }

/* Backdrop overlay when menu is open */
.mobile-popup-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.3);
  z-index: 9997;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-popup-backdrop.active {
  opacity: 1;
}


/* === TABLET BREAKPOINT (992px) === */
@media (max-width: 992px) {
  .resp-grid-3 {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
  .resp-bento-3 {
    grid-template-columns: 1fr 1fr !important;
  }
  .resp-grid-2 {
    grid-template-columns: 1fr !important;
  }
  .resp-grid-hero {
    grid-template-columns: 1fr !important;
  }
  .resp-flex-row {
    flex-direction: column !important;
  }
  .hero-title {
    font-size: 3rem !important;
  }
  .hero-desc {
    font-size: 1rem;
    max-width: 100%;
  }
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
  .section-title {
    font-size: 2rem;
  }
  .section-subtitle {
    font-size: 1rem;
  }
  .card-sm, .card-lg {
    width: 100%;
    min-height: 320px;
  }
  .split-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* === MOBILE BREAKPOINT (768px) === */
@media (max-width: 768px) {
  /* Navbar in alto come su desktop: logo + hamburger, il menu si apre sotto */
  .navbar { z-index: 9999; } /* sopra lo sfondo scuro del menu aperto */
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav-logo { display: flex; align-items: center; }
  .mobile-popup-menu { display: block; }

  /* Navbar */
  .navbar-inner {
    padding: 0 16px;
  }

  /* Hero */
  .hero {
    padding-top: 104px !important;
    padding-bottom: 48px !important;
    min-height: 100svh !important;
  }
  .hero-title {
    font-size: 3rem !important;
    line-height: 1.05;
    max-width: 100%;
  }
  .hero-desc {
    font-size: 1rem;
    max-width: 100%;
    padding: 0 4px;
    line-height: 1.5;
  }
  .hero-buttons {
    margin-top: 30px !important;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }
  .hero-buttons .btn {
    text-align: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 0.9375rem;
  }
  .hero-product {
    max-width: 100%;
    margin-top: 48px;
  }

  /* Sections */
  .features-section, .split-section {
    padding: 60px 0;
  }
  .section-title {
    font-size: 2rem;
    line-height: 1.15;
  }
  .section-subtitle {
    font-size: 1rem;
    line-height: 1.5;
  }

  /* Container */
  .container {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Bento cards */
  .card-sm, .card-lg {
    min-height: 280px;
    padding: 28px;
  }

  /* Inline grid overrides */
  .resp-grid-3 {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .resp-bento-3 {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }
  .resp-bento-3 > div {
    grid-row: auto !important;
    grid-column: auto !important;
  }

  /* Footer */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .footer-links {
    padding-left: 0;
  }

  /* Meta flow */
  .flow-visual {
    flex-direction: column !important;
    gap: 0 !important;
  }
  .flow-node {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Features page bento */
  .feat-card {
    padding: 28px 24px !important;
  }
  .feat-card-wide {
    grid-template-columns: 1fr !important;
  }
  .feat-visual {
    height: auto !important;
    min-height: 280px !important;
  }
  .f-ui {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    margin: 8px auto;
    width: 100% !important;
    max-width: 100%; /* i riquadri usano tutta la card: prima 260px fissi schiacciavano i valori */
  }

  /* AE Bento (features AI section) */
  .ae-bento {
    grid-template-columns: 1fr !important;
  }
  .ae-bento-card {
    min-height: 300px;
    padding: 24px 20px;
  }
  .ae-services-container {
    grid-template-columns: 1fr !important;
  }

  /* CTA Banner */
  .cta-banner {
    margin: 0 16px 32px;
    padding: 48px 24px;
    flex-direction: column;
    text-align: center;
  }
  .cta-banner-visual {
    display: none;
  }
  .cta-banner h2 {
    font-size: 1.5rem;
  }

  /* Stats grid */
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Testimonial carousel */
  .testimonial-card {
    flex: 0 0 280px;
    height: 340px;
  }

  /* Hero strip */
  .hero-strip {
    font-size: 0.75rem;
  }

  /* Arc carousel */
  .arc-carousel {
    height: 200px;
    overflow: hidden;
  }
  .arc-card {
    width: 130px;
    height: 180px;
    padding: 10px;
  }
  .arc-card:nth-child(1),
  .arc-card:nth-child(7) {
    display: none;
  }

  /* HB Grid (Huly bento) */
  .hb-grid {
    grid-template-columns: 1fr;
  }

  /* About page hero bento */
  .resp-grid-hero {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .resp-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* WhatsApp bento chat */
  .wa-chat-container {
    max-width: 100%;
  }

  /* Marquee container */
  .marquee-container {
    margin-top: 40px;
    padding: 12px 0;
  }

  /* Feature card floating elements sizing */
  .ae-float-stack img {
    max-width: 90%;
  }
  .ae-float-stack img:nth-child(2) {
    max-width: 75%;
  }
}

/* === SMALL MOBILE BREAKPOINT (480px) === */
@media (max-width: 480px) {
  .hero {
    padding-top: 104px !important;
    padding-bottom: 48px !important;
    min-height: 100svh !important;
  }
  .hero-title {
    font-size: 3rem !important;
    line-height: 1.1;
  }
  .hero-desc {
    font-size: 0.9375rem;
    line-height: 1.5;
  }
  .hero-buttons {
    margin-top: 30px !important;
    max-width: 100%;
    padding: 0 12px;
  }
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }
  .section-title {
    font-size: 1.75rem;
  }
  .section-subtitle {
    font-size: 0.9375rem;
  }
  .card-sm, .card-lg {
    min-height: 240px;
    padding: 24px 20px;
  }
  .card-sm h3, .card-lg h3 {
    font-size: 1.125rem;
  }
  .cta-banner {
    padding: 36px 20px;
    margin: 0 12px 24px;
  }
  .cta-banner h2 {
    font-size: 1.25rem;
  }
  .footer {
    padding: 40px 0 24px;
  }
  /* mobile: logo un po' più grande, dati aziendali uno per riga e centrati */
  .footer .nav-logo { font-size: 1.6rem; }
  .footer-bottom { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; line-height: 1.5; }
  .footer-bottom span + span::before { content: none; }
  .footer-inner {
    gap: 24px;
  }
  .btn {
    font-size: 0.8125rem;
    padding: 12px 24px;
  }
  .mobile-menu-inner {
    padding: 90px 24px 32px;
  }
  .mobile-menu-inner > a,
  .mobile-menu-inner > .mobile-accordion > .mobile-accordion-toggle {
    font-size: 1.125rem;
    padding: 16px 0;
  }
  .ae-bento-card {
    min-height: 260px;
    padding: 20px 16px;
  }
  .feat-card {
    padding: 22px 14px !important;
  }
  .feat-card h3, .feat-card p { padding: 0 6px; }
  .stats-grid {
    gap: 12px;
  }
  .stat-card {
    padding: 24px 20px;
  }
  .testimonial-card {
    flex: 0 0 260px;
    height: 320px;
  }
}

/* === ABOUT PAGE SPECIFIC MOBILE === */
@media (max-width: 768px) {
  /* Portrait image - reduce fixed min-height */
  .resp-grid-hero > div:first-child {
    min-height: 300px !important;
  }
  /* Floating UI cards in about */
  .ui-card {
    position: relative !important;
    width: 100% !important;
    max-width: 240px;
    transform: none !important;
    margin: 8px auto;
  }
  .ae-float-stack {
    position: relative !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transform: none !important;
  }
  /* About Us statement */
  .resp-grid-hero ~ div h2 {
    font-size: clamp(1.5rem, 3.5vw, 2.5rem) !important;
  }
  .resp-grid-hero ~ div h2 br {
    display: none;
  }
  /* Section padding reduction */
  section[style*="padding: 100px"] {
    padding: 60px 0 !important;
  }
  /* About accent card text */
  .resp-grid-2 div[style*="font-size: 4rem"] {
    font-size: 2.5rem !important;
  }
  /* Logos marquee gap */
  .resp-grid-hero ~ div[style*="margin-top: 60px"] div[style*="gap: 80px"] {
    gap: 40px !important;
  }
}

/* === FEATURES PAGE SPECIFIC MOBILE === */
@media (max-width: 768px) {
  /* Terminal code box */
  .feat-card pre,
  .feat-card code {
    font-size: 0.6875rem !important;
    overflow-x: auto;
  }
  /* API card stacking */
  .resp-flex-row {
    flex-direction: column !important;
    min-height: auto !important;
  }
  .resp-flex-row > div {
    width: 100% !important;
  }
  /* Features hero */
  .features-bento-section {
    padding: 40px 0 !important;
  }
  /* Features bento grid */
  .features-bento-grid {
    gap: 16px !important;
  }
  .features-bento-left,
  .features-bento-right {
    gap: 16px !important;
  }
  /* Orbit security badges */
  .ae-orbit {
    width: 200px !important;
    height: 200px !important;
  }
}

/* === INDEX PAGE SPECIFIC MOBILE === */
@media (max-width: 768px) {
  /* Big Brand section */
  #bigBrand {
    padding: 40px 0 !important;
    min-height: auto !important;
  }
  #bigBrand .giant-text {
    font-size: clamp(3rem, 15vw, 5rem) !important;
  }
  /* Canvas elements - prevent horizontal overflow */
  canvas {
    max-width: 100% !important;
  }
  /* Meta flow glow (800px fixed) */
  .meta-flow-glow {
    width: 100% !important;
    max-width: 100vw !important;
  }
  /* Hero strip marquee */
  .hero-strip {
    padding: 40px 0 32px; /* spazio dallo screenshot della hero */
  }
  /* WhatsApp bento chat bubbles */
  .wa-bubble {
    max-width: 85% !important;
    font-size: 0.8125rem !important;
  }
  /* Video in CTA banner: su mobile fa da sfondo a tutto il banner, dietro al testo */
  .cta-banner video {
    width: 100% !important;
    opacity: 0.45 !important;
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 60%) !important;
    mask-image: linear-gradient(to bottom, transparent, black 60%) !important;
  }
}

/* === FAQ PAGE SPECIFIC MOBILE === */
@media (max-width: 768px) {
  .faq-item summary {
    font-size: 0.9375rem;
    padding: 18px 16px;
  }
  .faq-body {
    font-size: 0.875rem;
    padding: 0 16px 18px;
  }
  .faq-item {
    margin-bottom: 12px;
  }
}

/* === GLOBAL TOUCH IMPROVEMENTS === */
@media (max-width: 768px) {
  /* Better tap targets */
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
  /* Prevent horizontal scroll globally */
  body {
    overflow-x: hidden;
  }
  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  /* Hide decorative elements on small screens */
  .mini-cascade,
  .side-cascade {
    display: none !important;
  }
  /* Glow effects - reduce on mobile for performance */
  .hero-glow,
  .hero-glow-1,
  .hero-glow-2 {
    opacity: 0.3 !important;
    filter: blur(80px) !important;
  }
}

@media (max-width: 480px) {
  /* About page portrait */
  .resp-grid-hero > div:first-child {
    min-height: 220px !important;
  }
  /* Sections */
  section[style*="padding: 100px"] {
    padding: 48px 0 !important;
  }
  /* FAQ */
  .faq-item summary {
    font-size: 0.875rem;
    padding: 16px 14px;
  }
}

/* === MOBILE PADDING OVERRIDES === */
@media (max-width: 768px) {
  .resp-pad-mobile {
    padding: 24px 20px !important;
  }
}
@media (max-width: 480px) {
  .resp-pad-mobile {
    padding: 20px 16px !important;
  }
  
  /* Scale down fixed bento visuals to prevent clipping on tiny screens */
  .feat-visual > div[style*="width: 280px"] {
    transform: scale(0.85);
    transform-origin: center;
  }
}

/* === FEATURES FLOATING CARDS — MOBILE STACKING === */
@media (max-width: 768px) {
  /* Marketing & Automazioni floating cards */
  .feat-card-wide .feat-visual .f-ui {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 8px auto !important;
  }
  /* Marquee cards */
  .marquee-card {
    width: 220px !important;
    height: 180px !important;
    padding: 20px !important;
  }
  .marquee-card .marquee-value {
    font-size: 2rem !important;
  }
}










    /* Meta Flow Section */
    .meta-flow { padding: 120px 0; position: relative; overflow: hidden; }
    .meta-flow-glow {
      position: absolute; top: -100px; left: 50%; transform: translateX(-50%);
      width: 800px; height: 600px;
      background: radial-gradient(ellipse, rgba(66,103,178,0.12) 0%, transparent 70%);
      filter: blur(80px); pointer-events: none;
    }
    .flow-visual {
      display: flex; align-items: center; justify-content: center; gap: 48px;
      margin-top: 64px; flex-wrap: wrap;
    }
    .flow-node {
      display: flex; flex-direction: column; align-items: center; gap: 16px;
      padding: 40px 24px; border-radius: 16px;
      background: var(--surface); box-shadow: 0 0 0 6px var(--ring);
      text-align: center; flex: 1; min-width: 0;
      transition: box-shadow 0.3s ease, transform 0.3s ease;
    }
    .flow-node:hover { box-shadow: 0 0 0 6px rgba(255,255,255,0.12); transform: translateY(-4px); }
    .flow-node img { width: 48px; height: 48px; }
    .flow-node h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.02em; }
    .flow-node p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.4; max-width: 180px; }
    .flow-beam {
      flex-shrink: 0; flex-grow: 1; height: 2px;
      position: relative;
      container-type: inline-size;
      background: linear-gradient(to right,
        rgba(140,170,255,0.05) 0%,
        rgba(140,170,255,0.3) 30%,
        rgba(180,200,255,0.5) 50%,
        rgba(140,170,255,0.3) 70%,
        rgba(140,170,255,0.05) 100%
      );
      align-self: center;
      overflow: visible;
    }
    /* Wide ambient glow behind the beam */
    .flow-beam::before {
      content: '';
      position: absolute;
      top: 50%; left: -10%; transform: translateY(-50%);
      width: 120%; height: 80px;
      background: radial-gradient(ellipse at 50% 50%, rgba(100,140,255,0.12) 0%, transparent 70%);
      pointer-events: none;
    }
    /* Bright core glow */
    .flow-beam::after {
      content: '';
      position: absolute;
      top: 50%; left: 50%; transform: translate(-50%, -50%);
      width: 60%; height: 2px;
      background: rgba(200,215,255,0.6);
      box-shadow: 
        0 0 6px 2px rgba(180,200,255,0.5),
        0 0 20px 8px rgba(140,170,255,0.3),
        0 0 60px 20px rgba(100,140,255,0.15);
      border-radius: 50%;
    }
    .flow-beam-particle {
      position: absolute;
      top: 50%; transform: translateY(-50%);
      width: 12px; height: 4px;
      border-radius: 50%;
      background: rgba(255,255,255,0.95);
      box-shadow: 
        0 0 6px 3px rgba(255,255,255,0.8),
        0 0 16px 8px rgba(180,200,255,0.6),
        0 0 40px 16px rgba(120,150,255,0.3),
        0 0 80px 30px rgba(100,140,255,0.12);
      animation: flow-particle 2.5s ease-in-out infinite;
    }
    @keyframes flow-particle {
      0% { transform: translate(-5cqw, -50%); opacity: 0; }
      10% { opacity: 1; }
      90% { opacity: 1; }
      100% { transform: translate(100cqw, -50%); opacity: 0; }
    }
    /* Mobile: blocchi in colonna, la linea diventa verticale e la luce scende da un blocco all'altro */
    @media (max-width: 992px) {
      .flow-beam {
        flex-grow: 0; width: 2px; height: 56px; align-self: center;
        container-type: size;
        background: linear-gradient(to bottom, rgba(140,170,255,0.05), rgba(180,200,255,0.5) 50%, rgba(140,170,255,0.05));
      }
      .flow-beam::before { top: -10%; left: 50%; transform: translateX(-50%); width: 80px; height: 120%; }
      .flow-beam::after { top: 50%; left: 50%; transform: translate(-50%, -50%); width: 2px; height: 60%; }
      .flow-beam-particle { top: 0; left: 50%; width: 4px; height: 12px; animation-name: flow-particle-v; }
      @keyframes flow-particle-v {
        0% { transform: translate(-50%, -5cqh); opacity: 0; }
        10% { opacity: 1; }
        90% { opacity: 1; }
        100% { transform: translate(-50%, 100cqh); opacity: 0; }
      }
    }
    .flow-badge {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 8px 20px; border-radius: 999px;
      background: rgba(66,103,178,0.15); border: 1px solid rgba(66,103,178,0.25);
      font-size: 0.8125rem; font-weight: 600; color: #7B9EFF;
      margin-bottom: 24px;
    }
    .flow-badge::before {
      content: ''; width: 8px; height: 8px; border-radius: 50%;
      background: #3D7EFF; animation: blink 1.5s ease-in-out infinite;
    }
    @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

    /* Logo */
    .logo-dot { color: #8ccff8; }
    .gi { width: 40px; height: 40px; margin-bottom: 0; flex-shrink: 0; }


/* Ecosystem Map */
.eco-map { position: relative; max-width: 960px; width: 100%; margin: 40px auto 80px auto; padding-top: 40px; display: flex; flex-direction: column; align-items: center; }
.eco-main-node {
  padding: 0 40px; height: 80px; border-radius: 24px; width: auto;
  background: linear-gradient(135deg, rgba(61,126,255,0.15), rgba(61,126,255,0.02));
  border: 1px solid rgba(61,126,255,0.4);
  box-shadow: 0 0 30px rgba(61,126,255,0.2), inset 0 0 20px rgba(61,126,255,0.1);
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 10;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.eco-main-node span { font-size: 2rem; font-family: var(--font-heading); font-weight: 800; letter-spacing: -0.05em; color: #fff; line-height: 1;}
.eco-main-node span span { color: #8ccff8; }

.eco-lines {
  position: absolute; top: 120px; left: 0; width: 100%; height: 80px; z-index: 1; pointer-events: none;
}
.eco-lines svg { width: 100%; height: 100%; overflow: visible; }
.eco-lines path {
  fill: none; stroke: url(#eco-line-grad); stroke-width: 2;
  stroke-dasharray: 6 6; animation: eco-dash 30s linear infinite;
}
@keyframes eco-dash { to { stroke-dashoffset: -1000; } }

.eco-cards-container {
  display: flex; justify-content: center; gap: 24px; width: 100%; position: relative; z-index: 5; margin-top: 60px;
  flex-wrap: wrap;
}
.eco-card {
  flex: 1; min-width: 280px;
  background: rgba(14, 16, 22, 0.7);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 20px; padding: 32px 28px;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.05);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.eco-card:hover {
  transform: translateY(-4px); border-color: rgba(255,255,255,0.15);
}
.eco-card-title { text-align: center;
  color: #fff; font-size: 1.125rem; font-weight: 600; font-family: var(--font-heading); margin-bottom: 24px;
  letter-spacing: -0.02em;
}
.eco-icons-row {
  display: flex; gap: 28px; flex-wrap: nowrap; justify-content: center;
}
.eco-ico-box {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: transform 0.2s;
}
.eco-ico-box:hover {
  transform: translateY(-3px);
}
.eco-ico-box svg.gi { width: 36px; height: 36px; margin-bottom: 0; }
.eco-ico-label {
  font-size: 0.75rem; color: rgba(255,255,255,0.55); font-weight: 500;
  font-family: var(--font-heading); letter-spacing: -0.01em;
}
.eco-brand-ico {
  width: 36px; height: 36px; opacity: 0.85;
}

@media (max-width: 900px) {
  .eco-lines { display: none; }
  .eco-main-node { margin-bottom: 20px; }
  .eco-cards-container { margin-top: 0; flex-direction: column; align-items: center; gap: 16px; }
  .eco-card { width: 100%; max-width: 400px; }
}

/* === AGENTE AI WHATSAPP: teaser nelle sezioni WhatsApp === */
.wa-agent-teaser {
  display: flex; align-items: center; gap: 20px;
  margin-top: 16px; padding: 24px 28px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  transition: border-color 0.2s;
}
.wa-agent-teaser:hover { border-color: rgba(255,255,255,0.22); }
.wa-agent-teaser-ico {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
}
.wa-agent-teaser-text { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.wa-agent-teaser-eyebrow { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; color: #25d366; }
.wa-agent-teaser-text strong { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.wa-agent-teaser-text span:last-child { font-size: 0.9375rem; line-height: 1.45; color: var(--text-muted); }
.wa-agent-teaser-btn { flex-shrink: 0; }

/* === PAGINA AGENTE AI WHATSAPP === */
.wa-hero { position: relative; padding: 170px 0 110px; overflow: hidden; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; }
.wa-hero > .container { width: 100%; }
.wa-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center; }
.wa-hero .hero-title { font-size: clamp(2.75rem, 6vw, 4.75rem); }
.wa-note { margin-top: 28px; display: flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--text-dim); }
.wa-note img { opacity: 0.6; }

.wa-phone {
  width: 100%; max-width: 380px; margin-left: auto;
  background: #0b141a; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px; padding-bottom: 16px; overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.wa-phone-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: #1f2c34; }
.wa-avatar { width: 36px; height: 36px; border-radius: 50%; background: #25d366; color: #0b141a; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.wa-phone-name { font-weight: 600; font-size: 0.875rem; }
.wa-phone-status { font-size: 0.6875rem; color: rgba(255,255,255,0.5); }
.wa-chat { display: flex; flex-direction: column; gap: 8px; padding: 16px 14px 0; }
.wa-msg {
  max-width: 82%; padding: 8px 12px 6px; border-radius: 10px;
  font-size: 0.8125rem; line-height: 1.4;
  opacity: 0; animation: wa-msg-in 0.5s ease forwards;
}
.wa-msg time { display: block; text-align: right; font-size: 0.625rem; color: rgba(255,255,255,0.45); margin-top: 2px; }
.wa-in { align-self: flex-start; background: #1f2c34; border-top-left-radius: 2px; }
.wa-out { align-self: flex-end; background: #005c4b; border-top-right-radius: 2px; }
.wa-tag { display: block; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em; color: #7ae3b0; margin-bottom: 2px; }
.wa-btns { display: block; margin-top: 8px; }
.wa-btns span, .wa-list { display: block; text-align: center; padding: 7px 0 3px; border-top: 1px solid rgba(255,255,255,0.12); color: #53bdeb; font-weight: 500; }
.wa-list { margin-top: 8px; }
.wa-msg:nth-child(1) { animation-delay: 0.3s; }
.wa-msg:nth-child(2) { animation-delay: 1.1s; }
.wa-msg:nth-child(3) { animation-delay: 1.9s; }
.wa-msg:nth-child(4) { animation-delay: 2.7s; }
.wa-msg:nth-child(5) { animation-delay: 3.5s; }
.wa-msg:nth-child(6) { animation-delay: 4.3s; }
.wa-msg:nth-child(7) { animation-delay: 5.1s; }
@keyframes wa-msg-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wa-msg { animation: none; opacity: 1; } }

.wa-section { position: relative; padding: 120px 0; overflow: hidden; }
/* Contenuti sopra i fasci luminosi (mini-beam-h / mini-cascade, z-index 1) */
.wa-section > .container, .wa-section > .ly-wheel { position: relative; z-index: 2; }
.wa-head { max-width: 680px; }
.wa-head .section-subtitle { margin-top: 16px; max-width: 600px; }
.wa-head.center { margin: 0 auto; text-align: center; }

.wa-features .gi { width: 40px; height: 40px; margin-bottom: 20px; display: block; }
.wa-features h3 { font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; }
.wa-features p { margin-top: 8px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-muted); }

/* Come funziona: passaggio + finta schermata WhatsApp in HTML */
.wa-flow { list-style: none; margin-top: 56px; }
.wa-flow-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 56px 0; border-top: 1px solid rgba(15,23,42,0.08); }
.wa-flow-row:first-child { border-top: 0; padding-top: 8px; }
.wa-flow-num { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #0f172a; color: #fff; font-size: 0.8125rem; font-weight: 600; }
.wa-flow-text h3 { margin-top: 20px; font-family: var(--font-heading); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; color: #0f172a; }
.wa-flow-text p { margin-top: 10px; max-width: 460px; font-size: 1.0625rem; line-height: 1.55; color: #475569; }

.wa-mock {
  width: 100%; max-width: 420px; justify-self: end;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px; background: #0b141a; border-radius: 24px; color: #fff;
  box-shadow: 0 30px 60px rgba(15,23,42,0.22);
}
.wa-mock .wa-msg { opacity: 1; animation: none; max-width: 92%; }
.wa-msg strong { font-weight: 600; }
.wa-mock-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.wa-avatar-blue { background: var(--blue); color: #fff; }

.wa-lead { background: #111318; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 16px 18px; }
.wa-lead-top { display: flex; align-items: center; gap: 8px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; color: rgba(255,255,255,0.5); }
.wa-lead-time { margin-left: auto; font-weight: 500; letter-spacing: 0; }
.wa-live { width: 8px; height: 8px; border-radius: 50%; background: #25d366; }
.wa-lead-name { margin-top: 10px; font-family: var(--font-heading); font-size: 1.125rem; font-weight: 600; }
.wa-lead-meta { margin-top: 2px; font-size: 0.8125rem; color: rgba(255,255,255,0.5); }
.wa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.wa-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 100px; border: 1px solid rgba(255,255,255,0.12); font-size: 0.75rem; color: rgba(255,255,255,0.75); }
.wa-chip-ok { color: #25d366; }

.wa-sheet { background: #1f2c34; border-radius: 16px; padding: 14px 16px 12px; }
.wa-sheet-title { padding-bottom: 10px; text-align: center; font-size: 0.875rem; font-weight: 600; }
.wa-opt { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.8125rem; }
.wa-radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #8696a0; }
.wa-radio.on { border-color: #25d366; background: #25d366; box-shadow: inset 0 0 0 3px #1f2c34; }
.wa-sheet-send { margin-top: 8px; padding: 9px; border-radius: 100px; background: #25d366; color: #0b141a; text-align: center; font-size: 0.8125rem; font-weight: 600; }

.wa-pipe { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,0.1); font-size: 0.8125rem; color: rgba(255,255,255,0.75); }

.wa-shot { border-radius: 14px; overflow: hidden; border: 1px solid rgba(15,23,42,0.12); box-shadow: 0 30px 60px rgba(15,23,42,0.18); }
.wa-shot img { width: 100%; }

.wa-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px; margin-top: 64px; }

.wa-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 56px; }
.wa-duo h3 { margin-top: 24px; font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; color: #0f172a; }
.wa-duo p { margin-top: 6px; font-size: 0.9375rem; line-height: 1.55; color: #475569; }

.wa-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-top: 56px; }
.wa-metrics div { border-top: 1px solid var(--border); padding-top: 16px; }
.wa-metrics strong { display: block; font-family: var(--font-heading); font-size: 1.0625rem; font-weight: 600; }
.wa-metrics span { display: block; margin-top: 6px; font-size: 0.875rem; line-height: 1.5; color: var(--text-muted); }

.wa-faq { max-width: 820px; margin: 56px auto 0; }

@media (max-width: 992px) {
  .wa-hero-grid, .wa-flow-row { grid-template-columns: 1fr; }
  .wa-flow-row { gap: 32px; }
  .wa-mock { justify-self: start; }
  .wa-phone { margin: 0 auto; }
  .wa-features { grid-template-columns: 1fr 1fr; }
  .wa-metrics { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .wa-agent-teaser { flex-direction: column; align-items: flex-start; padding: 20px; }
  .wa-agent-teaser-btn { width: 100%; }
  .wa-hero { padding: 112px 0 64px; }
  .wa-section { padding: 80px 0; }
  .wa-features, .wa-duo, .wa-metrics { grid-template-columns: 1fr; }
}

/* === PAGINA LEADY === */
.ly-inline-link { color: #8ccff8; white-space: nowrap; }

/* finta chat di Leady, come nell'app: pannello chiaro, bolle utente viola */
.ly-chat {
  width: 100%; max-width: 420px; margin-left: auto; overflow: hidden;
  background: #fff; color: #334155; border-radius: 24px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5);
}
.ly-chat-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid #f1f5f9; color: #1e293b; font-size: 0.9375rem; }
.ly-chat-body, .ly-mock { display: flex; flex-direction: column; gap: 12px; }
.ly-chat-body { padding: 18px 16px 8px; }
.ly-chat-input { margin: 8px 16px 16px; padding: 11px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; font-size: 0.8125rem; color: #94a3b8; }
.ly-msg { font-size: 0.8125rem; line-height: 1.5; }
.ly-user {
  align-self: flex-end; max-width: 80%; padding: 9px 14px; border-radius: 16px 16px 4px 16px;
  background: linear-gradient(135deg, #8b5cf6, #4f46e5); color: #fff; box-shadow: 0 6px 16px rgba(139,92,246,0.25);
}
.ly-ai { align-self: flex-start; display: flex; gap: 8px; max-width: 94%; }
.ly-ai > img { width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px; }
.ly-bubble { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #f8fafc; border: 1px solid #f1f5f9; color: #334155; }
.ly-bubble b { color: #0f172a; font-weight: 600; }
.ly-bubble .ly-warn { color: #dc2626; }
.ly-action { display: block; margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid #ddd6fe; background: #f5f3ff; }
.ly-action-k { display: block; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #7c3aed; }
.ly-action-v { display: block; margin-top: 3px; font-weight: 500; color: #334155; }
.ly-action-btns { display: flex; gap: 6px; margin-top: 10px; }
.ly-action-btns span { padding: 6px 10px; border-radius: 8px; font-size: 0.6875rem; font-weight: 700; }
.ly-ok { flex: 1; text-align: center; background: linear-gradient(135deg, #8b5cf6, #4f46e5); color: #fff; }
.ly-no { background: #fff; border: 1px solid #e2e8f0; color: #64748b; }
/* i messaggi della hero entrano uno dopo l'altro */
.ly-chat .ly-msg { opacity: 0; animation: wa-msg-in 0.5s ease forwards; }
.ly-chat .ly-msg:nth-child(1) { animation-delay: 0.3s; }
.ly-chat .ly-msg:nth-child(2) { animation-delay: 1.2s; }
.ly-chat .ly-msg:nth-child(3) { animation-delay: 2.4s; }
.ly-chat .ly-msg:nth-child(4) { animation-delay: 3.2s; }
@media (prefers-reduced-motion: reduce) { .ly-chat .ly-msg { animation: none; opacity: 1; } }

.ly-mock {
  width: 100%; max-width: 440px; justify-self: end;
  padding: 20px; background: #fff; border: 1px solid rgba(15,23,42,0.08); border-radius: 24px;
  box-shadow: 0 30px 60px rgba(15,23,42,0.14);
}
.ly-mock-dark { border-color: rgba(255,255,255,0.1); box-shadow: 0 40px 80px rgba(0,0,0,0.45); }
.ly-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 4px; }
.ly-chips span { padding: 6px 10px; border-radius: 10px; border: 1px solid #e2e8f0; background: #f8fafc; font-size: 0.75rem; font-weight: 600; color: #475569; }

.ly-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.ly-actions { grid-template-columns: repeat(4, 1fr); }

.ly-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.ly-trust .gi { width: 40px; height: 40px; margin-bottom: 20px; display: block; }
.ly-trust h3 { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; color: #0f172a; }
.ly-trust p { margin-top: 8px; font-size: 0.9375rem; line-height: 1.55; color: #475569; }
.ly-disclaimer { margin-top: 48px; font-size: 0.8125rem; color: #94a3b8; }

@media (max-width: 992px) {
  .ly-split { grid-template-columns: 1fr; gap: 40px; }
  .ly-mock { justify-self: start; }
  .ly-chat { margin: 0 auto; }
  .ly-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .ly-trust, .ly-actions { grid-template-columns: 1fr; }
}
/* === Leady: ruota di card "Come si usa" === */
.ly-wheel { position: relative; height: 560px; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 60px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 60px), transparent); margin-top: 56px; overflow: hidden; overflow: clip; touch-action: pan-y; }
.ly-wheel-ring { position: absolute; left: 50%; top: 24px; }
.ly-wheel .ly-wheel-card {
  position: absolute; left: 0; top: 0;
  width: 380px; max-width: none; margin-left: -190px;
  transform-origin: 50% 50%; will-change: transform; cursor: pointer; user-select: none;
  box-shadow: 0 24px 48px rgba(15,23,42,0.12);
}
.ly-wheel-caps { display: grid; max-width: 560px; margin: 8px auto 0; text-align: center; }
.ly-wheel-cap { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity 0.45s ease, transform 0.45s ease; pointer-events: none; }
.ly-wheel-cap.is-active { opacity: 1; transform: none; pointer-events: auto; }
.ly-wheel-cap h3 { margin-top: 16px; font-family: var(--font-heading); font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; color: #0f172a; }
.ly-wheel-cap p { margin: 10px auto 0; font-size: 1.0625rem; line-height: 1.55; color: #475569; }
.ly-wheel-nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 32px; }
.ly-wheel-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; font-size: 1.1rem; cursor: pointer; transition: border-color 0.2s; }
.ly-wheel-btn:hover { border-color: #94a3b8; }
.ly-wheel-dots { display: flex; gap: 8px; }
.ly-wheel-dots span { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; transition: width 0.3s, background 0.3s; }
.ly-wheel-dots span.is-active { width: 24px; border-radius: 4px; background: #0f172a; }
@media (max-width: 768px) {
  .ly-wheel { height: 500px; margin-top: 24px; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 24px), transparent); }
  .ly-wheel-caps { margin-top: 0; }
  .ly-wheel-cap h3 { margin-top: 12px; }
  .ly-wheel-nav { margin-top: 20px; }
  .ly-wheel .ly-wheel-card { width: 300px; margin-left: -150px; padding: 16px; }
  .ly-wheel-cap h3 { font-size: 1.375rem; }
  .ly-wheel-cap p { font-size: 0.9375rem; }
}

/* === Telefoni: niente effetti che ridipingono a ogni fotogramma (scroll bloccato sotto la hero) === */
@media (hover: none) {
  /* bordo luminoso che gira attorno agli screenshot: animava una proprietà CSS = repaint continuo */
  .screenshot-glow::before, .screenshot-glow::after { animation: none !important; }
  /* titoli Meta Ads: 6 ombre sfocate da 50-60px per lettera (servivano a staccarli dal fascio, spento su mobile) */
  .meta-flow .section-title, .meta-flow .section-subtitle { text-shadow: none !important; }
  /* bagliore largo quanto lo schermo con blur 80px: il gradiente radiale è già morbido da solo */
  .meta-flow-glow { filter: none !important; }
}

/* Strato unico di puntini, fisso dietro tutta la pagina: le sezioni scure sono trasparenti e lo
   mostrano, quelle chiare lo coprono. z-index negativo = sta sotto ai contenuti ma sopra lo sfondo. */
#dotGridFixed {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

/* === TELEFONO: niente puntini disegnati, al loro posto due aloni sfumati che si muovono piano ===
   Stessi colori dei puntini (blu/viola). È un gradiente spostato con transform: il telefono lo
   disegna una volta sola e poi lo muove la GPU, quindi non pesa sul caricamento delle sezioni. */
@media (hover: none) {
  #dotGridFixed { display: none; }
  body::before {
    content: '';
    position: fixed; top: -25%; left: -25%; width: 150%; height: 150%;
    z-index: -1; pointer-events: none;
    background:
      radial-gradient(35% 30% at 30% 28%, rgba(61,126,255,0.26) 0%, rgba(61,126,255,0) 70%),
      radial-gradient(32% 28% at 72% 62%, rgba(140,207,248,0.20) 0%, rgba(140,207,248,0) 70%),
      radial-gradient(40% 35% at 50% 100%, rgba(99,102,241,0.18) 0%, rgba(99,102,241,0) 70%);
    /* si sposta e intanto cambia colore di continuo, come facevano i puntini */
    animation: bg-drift 26s ease-in-out infinite alternate, bg-hue 18s ease-in-out infinite alternate;
    will-change: transform, filter;
  }
  /* secondo strato sfasato: i colori si incrociano invece di girare tutti insieme */
  body::after {
    content: '';
    position: fixed; top: -30%; left: -30%; width: 160%; height: 160%;
    z-index: -1; pointer-events: none;
    background:
      radial-gradient(30% 26% at 68% 22%, rgba(140,207,248,0.17) 0%, rgba(140,207,248,0) 70%),
      radial-gradient(34% 30% at 24% 72%, rgba(99,102,241,0.16) 0%, rgba(99,102,241,0) 70%);
    animation: bg-drift-2 34s ease-in-out infinite alternate, bg-hue 22s ease-in-out infinite alternate -9s;
    will-change: transform, filter;
  }
}
@keyframes bg-drift {
  from { transform: translate3d(-3%, -2%, 0) scale(1); }
  to   { transform: translate3d(3%, 4%, 0) scale(1.12); }
}
@keyframes bg-drift-2 {
  from { transform: translate3d(4%, 3%, 0) scale(1.1); }
  to   { transform: translate3d(-4%, -3%, 0) scale(1); }
}
/* resta tra il celeste del punto leadwin e il blu/indaco: niente viola carico */
@keyframes bg-hue {
  from { filter: hue-rotate(-14deg) saturate(0.95); }
  to   { filter: hue-rotate(16deg) saturate(1.15); }
}
@media (hover: none) and (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

/* Card delle pagine dedicate: non hanno l'icona, quindi il testo parte dall'alto senza vuoto */
.ae-service-card.lp-card { justify-content: flex-start; min-height: 0; padding: 26px 24px; }
.ae-service-card.lp-card .ae-service-desc { margin-top: 8px; }

/* Stacco tra la hero e la sezione che segue: senza sfondo diverso sembravano un blocco unico */
.wa-hero + section { border-top: 1px solid rgba(255,255,255,0.08); }
.wa-hero + section.section-light { border-top: none; }

/* Pagine dedicate: i passaggi sono blocchi affiancati, non righe di testo separate da una linea */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.lp-steps .lp-step { display: block; padding: 28px 26px; border-radius: 20px; background: #fff; border: 1px solid rgba(15,23,42,0.08); box-shadow: 0 10px 30px rgba(15,23,42,0.06); }
.lp-steps .lp-step + .lp-step { border-top: 1px solid rgba(15,23,42,0.08); } /* annulla il separatore del flusso */
.lp-steps .lp-step h3 { margin-top: 16px; font-family: var(--font-heading); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; color: #0f172a; }
.lp-steps .lp-step p { margin-top: 8px; font-size: 0.9375rem; line-height: 1.55; color: #475569; max-width: none; }
@media (max-width: 992px) { .lp-steps { grid-template-columns: 1fr; gap: 16px; } }

/* Elenchi puntati dei blocchi con schermata nelle pagine dedicate */
.lp-list { margin: 22px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.lp-list li { position: relative; padding-left: 26px; font-size: 0.9375rem; line-height: 1.5; color: var(--text-muted); }
.lp-list li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.section-light .lp-list li { color: #475569; }
.ly-split .section-subtitle { margin-top: 14px; }

/* Pagine dedicate: sezioni un po' più basse, il salto tra un blocco e l'altro non diventa un buco */
body.lp .wa-section { padding: 100px 0; }
@media (max-width: 768px) { body.lp .wa-section { padding: 64px 0; } }

/* === Visual animato nella hero delle pagine dedicate === */
.lp-viz {
  position: relative; width: 100%; max-width: 400px; margin-left: auto;
  padding: 20px; border-radius: 20px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 40px 80px rgba(0,0,0,0.45);
}
.lp-viz-h { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.lp-viz-bar { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,0.13); }
.lp-viz-rows { display: flex; flex-direction: column; gap: 8px; }
.lp-viz-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); }
.lp-viz-row .lp-viz-bar { flex: 1; }
.lp-viz-row em { font-style: normal; font-size: 0.625rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.lp-viz-av { flex: none; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #3D7EFF, #8CCFF8); display: flex; align-items: center; justify-content: center; font-size: 0.625rem; font-weight: 700; color: #08111f; }
.lp-viz-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.75rem; font-weight: 500; }
.lp-viz-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); animation: lp-pulse 1.8s ease-in-out infinite; }
@keyframes lp-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.7); } }

/* la lead che scende dal modulo alla piattaforma */
.lp-viz-rail { position: relative; height: 48px; margin: 12px 0 14px; }
.lp-viz-rail-sm { height: 34px; margin: 10px 0 12px; }
.lp-viz-rail::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.2), transparent); }
.lp-viz-rail i { position: absolute; left: 50%; margin-left: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 12px rgba(61,126,255,0.9); animation: lp-fall 4.5s linear infinite; }
.lp-viz-rail-sm i { animation-duration: 6s; }
.lp-viz-rail i:nth-child(2) { animation-delay: 1.5s; }
.lp-viz-rail i:nth-child(3) { animation-delay: 3s; }
@keyframes lp-fall { 0% { top: -6px; opacity: 0; } 12% { opacity: 1; } 80% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* pagina Meta: il modulo compilato e le lead che arrivano */
.lp-viz-form { display: flex; flex-direction: column; gap: 11px; padding: 16px; border-radius: 14px; border: 1px solid var(--border); }
.lp-viz-send { align-self: flex-start; margin-top: 3px; padding: 7px 14px; border-radius: 9px; background: var(--blue); color: #fff; font-size: 0.6875rem; font-weight: 600; }
.lp-viz-meta .lp-viz-row { opacity: 0; animation: lp-arrive 4.5s ease infinite; }
.lp-viz-meta .lp-viz-row:nth-child(2) { animation-delay: 1.5s; }
.lp-viz-meta .lp-viz-row:nth-child(3) { animation-delay: 3s; }
@keyframes lp-arrive { 0% { opacity: 0; transform: translateY(10px); } 14%, 100% { opacity: 1; transform: none; } }

/* pagina team: la lead passa da un agente all'altro */
.lp-viz-team-rows .lp-viz-row { opacity: 0.4; animation: lp-hl 6s ease-in-out infinite; }
.lp-viz-team-rows .lp-viz-row:nth-child(2) { animation-delay: 2s; }
.lp-viz-team-rows .lp-viz-row:nth-child(3) { animation-delay: 4s; }
@keyframes lp-hl { 0%, 100% { opacity: 0.4; border-color: var(--border); } 6%, 28% { opacity: 1; border-color: rgba(61,126,255,0.55); } }

/* pagina pipeline: la trattativa che avanza di stato */
.lp-viz-cols { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lp-viz-col { display: flex; flex-direction: column; gap: 8px; min-height: 158px; padding: 10px; border-radius: 12px; border: 1px solid var(--border); }
.lp-viz-col > span { font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-dim); }
.lp-viz-col i { display: block; height: 36px; border-radius: 8px; background: rgba(255,255,255,0.05); }
.lp-viz-move { position: absolute; top: 30px; left: 10px; width: calc((100% - 20px) / 3 - 20px); padding: 9px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid rgba(61,126,255,0.5); box-shadow: 0 12px 28px rgba(0,0,0,0.45); animation: lp-move 8s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.lp-viz-score { display: block; margin-bottom: 7px; font-family: var(--font-heading); font-size: 0.6875rem; font-weight: 600; color: var(--blue); }
@keyframes lp-move {
  0%, 18% { transform: translate(0, 0); }
  33%, 51% { transform: translate(calc(100% + 30px), 44px); }
  66%, 88% { transform: translate(calc(200% + 60px), 8px); }
  100% { transform: translate(0, 0); }
}

/* pagina calendario: gli slot che si riempiono */
.lp-viz-days { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; margin-bottom: 8px; }
.lp-viz-days span { text-align: center; font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.06em; color: var(--text-dim); }
.lp-viz-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.lp-viz-grid i { display: block; height: 30px; border-radius: 7px; background: rgba(255,255,255,0.05); }
.lp-viz-grid i.on { background: var(--blue); opacity: 0; animation: lp-slot 7s ease-in-out infinite; }
.lp-viz-grid i.on:nth-of-type(7) { animation-delay: 0.9s; }
.lp-viz-grid i.on:nth-of-type(10) { animation-delay: 1.8s; }
.lp-viz-grid i.on:nth-of-type(11) { animation-delay: 2.7s; }
.lp-viz-grid i.on:nth-of-type(14) { animation-delay: 3.6s; }
.lp-viz-grid i.on:nth-of-type(18) { animation-delay: 4.5s; }
@keyframes lp-slot { 0% { opacity: 0; transform: scale(0.82); } 10%, 86% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(0.82); } }
.lp-viz-chip-ok { margin-top: 16px; color: var(--text); opacity: 0; animation: lp-confirm 7s ease-in-out infinite; }
.lp-viz-chip-ok svg { color: var(--blue); }
@keyframes lp-confirm { 0%, 60% { opacity: 0; transform: translateY(6px); } 70%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(6px); } }

@media (max-width: 992px) { .lp-viz { margin: 8px auto 0; } }
@media (max-width: 768px) {
  /* sul telefono la hero deve restare 100vh: il visual la farebbe sfondare */
  .lp-viz { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .lp-viz *, .lp-viz { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Pagine dedicate: hero centrata, titolo piu' piccolo delle altre pagine e grafica sotto */
body.lp .wa-hero-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 32px; }
body.lp .wa-hero-grid > div:first-child { max-width: 900px; }
body.lp .wa-hero .hero-title { font-size: clamp(2.75rem, 6vw, 4.75rem); }
body.lp .wa-hero .hero-desc { max-width: 600px; margin-left: auto; margin-right: auto; }
body.lp .wa-hero .hero-buttons { justify-content: center; }
body.lp .lp-viz { margin: 0 auto; max-width: 460px; padding: 16px; }
/* tutto deve stare nei 100vh: hero piu' compatta e grafica piu' stretta */
body.lp .wa-hero { padding: 96px 0 48px; }
body.lp .lp-viz-form { padding: 13px; gap: 8px; }
body.lp .lp-viz-rows { gap: 6px; }
body.lp .lp-viz { padding: 14px; }
body.lp .lp-viz-rail { height: 30px; margin: 8px 0 10px; }
body.lp .lp-viz-row { padding: 8px 12px; }
body.lp .lp-viz-col { min-height: 140px; }
@media (max-width: 768px) {
  body.lp .wa-hero { padding: 112px 0 64px; }
  /* le regole generali del mobile forzano 3rem: qui serve piu' piccolo o "Ads." resta solo */
  body.lp .wa-hero .hero-title { font-size: 2.5rem !important; }
}

/* Ritagli per telefono: <picture> non deve creare spazio sotto l'immagine */
picture { display: block; } /* i ritagli per telefono stanno dentro <picture>: senza questo resta spazio sotto */
.hero-product img { height: auto; } /* con il ritaglio cambia il rapporto: senza questo si deforma */

/* === Home: finestra dell'app disegnata a mano, al posto dello screenshot ===
   Stesso mestiere di .lp-viz nelle pagine dedicate: niente immagini del prodotto vero,
   solo componenti in HTML che si muovono in loop. Cosi' non si mostra tutto il software
   e i testi restano leggibili anche sul telefono (uno screenshot rimpicciolito no). */
.hm {
  position: relative; z-index: 2;
  text-align: left; font-family: var(--font);
  border-radius: 14px;
  background: var(--hm-bg);
  box-shadow: 0 0 0 1px rgba(125,165,255,0.14), 0 30px 70px rgba(0,0,0,0.45);
  overflow: hidden;
}

/* barra in alto */
.hm-top { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 16px; border-bottom: 1px solid var(--hm-line); }
.hm-brand { font-family: 'Inter', sans-serif; font-size: 0.8125rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.hm-brand i { font-style: normal; color: var(--blue); }
.hm-tabs { display: flex; gap: 2px; }
.hm-tab { padding: 5px 11px; border-radius: 8px; font-size: 0.75rem; color: var(--text-muted); }
.hm-tab.on { background: var(--hm-2); color: var(--text); }
.hm-me { margin-left: auto; width: 26px; height: 26px; border-radius: 50%; background: #8CCFF8; display: flex; align-items: center; justify-content: center; font-size: 0.625rem; font-weight: 700; color: #0B1322; }

.hm-body { display: grid; grid-template-columns: 178px 1fr; }

/* colonna di sinistra */
.hm-side { display: flex; flex-direction: column; gap: 2px; padding: 14px 12px; border-right: 1px solid var(--hm-line); }
.hm-nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; font-size: 0.75rem; color: var(--text-muted); }
.hm-nav.on { background: var(--hm-2); color: var(--text); }
.hm-nav svg { flex: none; width: 15px; height: 15px; }

.hm-ai { margin-top: auto; padding: 12px; border-radius: 11px; background: var(--hm-2); border: 1px solid var(--hm-line); }
.hm-ai span { display: block; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--blue); }
.hm-ai b { display: block; margin-top: 6px; font-size: 0.75rem; font-weight: 500; line-height: 1.35; color: var(--text); }

/* contenuto */
.hm-main { min-width: 0; padding: 18px 20px 20px; }
.hm-h { display: flex; align-items: center; margin-bottom: 16px; }
.hm-h h4 { margin: 0; font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.hm-live { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--hm-2); border: 1px solid var(--hm-line); font-size: 0.6875rem; color: var(--text-muted); }
.hm-live i { width: 6px; height: 6px; border-radius: 50%; background: #34D399; animation: lp-pulse 1.8s ease-in-out infinite; }

/* i quattro numeri in alto */
.hm-kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.hm-kpi > div { padding: 12px 14px; border-radius: 12px; background: var(--hm-2); border: 1px solid var(--hm-line); }
.hm-kpi span { display: block; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.hm-kpi b { display: block; margin-top: 6px; font-family: var(--font-heading); font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; color: var(--text); }
/* "Nuove oggi" sale di uno quando la lead nuova entra nella lista (stesso loop di 9s) */
@property --hm-n { syntax: '<integer>'; initial-value: 12; inherits: false; }
.hm-count { counter-reset: n var(--hm-n); animation: hm-count 9s infinite; }
.hm-count::after { content: counter(n); }
@keyframes hm-count { 0%, 5% { --hm-n: 12; } 6%, 100% { --hm-n: 13; } }

/* la tabella delle lead */
.hm-table { border: 1px solid var(--hm-line); border-radius: 12px; overflow: hidden; }
.hm-tr { display: grid; grid-template-columns: 1.45fr 1fr 122px 74px 30px; align-items: center; gap: 14px; height: 46px; padding: 0 14px; box-sizing: border-box; }
.hm-th { height: 34px; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--hm-line); }
.hm-rows { height: 230px; overflow: hidden; } /* 5 righe da 46px: la sesta resta fuori */
.hm-rows .hm-tr + .hm-tr { border-top: 1px solid var(--hm-line); }

.hm-lead { min-width: 0; }
.hm-lead b { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-lead i { display: block; margin-top: 2px; font-style: normal; font-size: 0.6875rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-src { display: flex; align-items: center; gap: 7px; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.hm-src svg { flex: none; width: 13px; height: 13px; }
/* stato: fondo pieno, mai tinte trasparenti. Solo la lead appena arrivata prende l'accento */
.hm-st { justify-self: start; padding: 4px 10px; border-radius: 7px; background: var(--hm-2); border: 1px solid var(--hm-line); font-size: 0.6875rem; color: var(--text-muted); white-space: nowrap; }
.hm-st-on { background: var(--blue); border-color: var(--blue); color: #fff; }
.hm-score b { display: block; font-size: 0.75rem; font-weight: 600; color: var(--text); }
.hm-score i { display: block; margin-top: 4px; height: 3px; border-radius: 2px; background: rgba(125,165,255,0.18); }
.hm-score i::before { content: ''; display: block; width: var(--w); height: 100%; border-radius: 2px; background: var(--blue); }
.hm-av { width: 26px; height: 26px; border-radius: 50%; background: #8CCFF8; display: flex; align-items: center; justify-content: center; font-size: 0.5625rem; font-weight: 700; color: #0B1322; }

/* la lead nuova entra dall'alto e spinge giu' le altre; l'ultima esce dal bordo */
.hm-tr-new { animation: hm-in 9s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes hm-in {
  0%   { margin-top: -46px; opacity: 0; box-shadow: inset 0 0 0 1px rgba(61,126,255,0.6); }
  6%   { margin-top: 0; opacity: 1; box-shadow: inset 0 0 0 1px rgba(61,126,255,0.6); }
  26%  { box-shadow: inset 0 0 0 1px rgba(61,126,255,0); }
  94%  { margin-top: 0; opacity: 1; }
  100% { margin-top: -46px; opacity: 0; }
}
/* l'agente arriva dopo la lead: e' l'assegnazione automatica */
.hm-tr-new .hm-av { opacity: 0; animation: hm-assign 9s ease-out infinite; }
@keyframes hm-assign { 0%, 14% { opacity: 0; transform: scale(0.6); } 22%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: scale(0.6); } }

@media (max-width: 992px) {
  .hm-body { grid-template-columns: 148px 1fr; }
  .hm-tr { grid-template-columns: 1.4fr 110px 74px 30px; }
  .hm-tr > .hm-src, .hm-th > :nth-child(2) { display: none; }
}
@media (max-width: 768px) {
  .hm-tabs, .hm-side { display: none; }
  .hm { border-radius: 12px; }
  .hm-body { grid-template-columns: 1fr; }
  .hm-main { padding: 14px 14px 16px; }
  .hm-kpi { grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
  .hm-kpi > div:nth-child(n+3) { display: none; }
  .hm-tr { grid-template-columns: 1fr 104px 30px; gap: 10px; padding: 0 12px; }
  .hm-tr > .hm-score, .hm-th > :nth-child(4) { display: none; }
  .hm-rows { height: 184px; } /* 4 righe */
}
@media (prefers-reduced-motion: reduce) {
  .hm *, .hm { animation: none !important; opacity: 1 !important; transform: none !important; margin-top: 0 !important; }
}

/* --- stessa finestra, contenuto "Campagne Meta" (sezione Meta) --- */
.hm-camp .hm-main { padding: 18px 20px 20px; }
.hm-camp .hm-tr { grid-template-columns: 1.7fr 104px 88px 62px 52px 84px; gap: 12px; }
.hm-camp .hm-rows { height: 184px; } /* 4 righe */
.hm-camp .hm-th > :nth-child(n+3) { text-align: right; }
.hm-camp-n { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 10px; min-width: 0; }
.hm-camp-n svg { grid-row: span 2; }
.hm-camp-n svg { flex: none; width: 15px; height: 15px; color: var(--text-muted); }
.hm-camp-n b { grid-column: 2; display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-camp-n i { grid-column: 2; display: block; margin-top: 2px; font-style: normal; font-size: 0.6875rem; color: var(--text-muted); }
.hm-camp .hm-st { display: inline-flex; align-items: center; gap: 7px; }
.hm-on { width: 6px; height: 6px; border-radius: 50%; background: #34D399; }
.hm-num { text-align: right; font-size: 0.8125rem; color: var(--text); font-variant-numeric: tabular-nums; }
.hm-cpl { font-weight: 600; }
/* la lead che arriva: una linea blu attraversa la riga, poi il numero sale */
.hm-tr-live { position: relative; }
.hm-tr-live::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--blue), transparent); transform: scaleX(0.28); transform-origin: left; animation: hm-scan 6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes hm-scan { 0% { transform: translateX(-30%) scaleX(0.28); opacity: 0; } 8% { opacity: 1; } 55% { transform: translateX(100%) scaleX(0.28); opacity: 1; } 62%, 100% { transform: translateX(100%) scaleX(0.28); opacity: 0; } }
@property --hm-lead { syntax: '<integer>'; initial-value: 78; inherits: false; }
@property --hm-kn { syntax: '<integer>'; initial-value: 151; inherits: false; }
.hm-lead-n { counter-reset: n var(--hm-lead); animation: hm-leadn 6s infinite; }
.hm-lead-n::after { content: counter(n); }
@keyframes hm-leadn { 0%, 57% { --hm-lead: 78; } 58%, 100% { --hm-lead: 79; } }
.hm-kn { counter-reset: n var(--hm-kn); animation: hm-knn 6s infinite; }
.hm-kn::after { content: counter(n); }
@keyframes hm-knn { 0%, 57% { --hm-kn: 151; } 58%, 100% { --hm-kn: 152; } }

@media (max-width: 992px) {
  .hm-camp .hm-tr { grid-template-columns: 1.5fr 96px 86px 52px 78px; }
  .hm-camp .hm-tr > :nth-child(4) { display: none; } /* click */
}
@media (max-width: 768px) {
  .hm-camp .hm-main { padding: 14px 14px 16px; }
  .hm-camp .hm-tr { grid-template-columns: 1fr 44px 72px; gap: 10px; padding: 0 12px; }
  .hm-camp .hm-th > :nth-child(6) { font-size: 0.5625rem; } /* "Costo/lead" non ci sta a 10px */
  .hm-camp .hm-tr > :nth-child(2), .hm-camp .hm-tr > :nth-child(3) { display: none; } /* stato, spesa */
  .hm-camp .hm-rows { height: 138px; } /* 3 righe */
  .hm-camp-n svg { display: none; }
}

/* --- 3. Kanban della pipeline --- */
.hm-kb-board { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.hm-kb-col { position: relative; min-height: 250px; padding: 10px; border-radius: 12px; background: var(--hm-2); border: 1px solid var(--hm-line); }
.hm-kb-col > span { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; padding: 0 2px; font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.hm-kb-col > span em { font-style: normal; color: var(--text-dim); }
.hm-kb-c { padding: 10px; border-radius: 9px; background: var(--hm-3); border: 1px solid var(--hm-line); }
.hm-kb-c + .hm-kb-c { margin-top: 8px; }
.hm-kb-c b { display: block; font-size: 0.75rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-kb-c span { display: block; margin-top: 3px; font-size: 0.6875rem; color: var(--text-muted); }
.hm-kb-c i { display: block; margin-top: 8px; height: 3px; border-radius: 2px; background: rgba(125,165,255,0.18); }
.hm-kb-c i::before { content: ''; display: block; width: var(--w); height: 100%; border-radius: 2px; background: var(--blue); }
/* la trattativa trascinata da una colonna all'altra */
.hm-kb-move { position: absolute; top: 175px; left: 10px; width: calc((100% - 36px) / 4 - 22px); border-color: rgba(61,126,255,0.55); box-shadow: 0 18px 36px rgba(0,0,0,0.55); animation: hm-drag 11s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes hm-drag {
  0%, 12%   { transform: translate(0, 0) rotate(-1.5deg) scale(1); opacity: 1; }
  18%       { transform: translate(calc(33% + 11px), -6px) rotate(-1.5deg) scale(1.04); }
  24%, 36%  { transform: translate(calc(100% + 34px), 0) rotate(-1.5deg) scale(1); }
  42%       { transform: translate(calc(150% + 51px), -6px) rotate(-1.5deg) scale(1.04); }
  48%, 60%  { transform: translate(calc(200% + 68px), 0) rotate(-1.5deg) scale(1); }
  66%       { transform: translate(calc(250% + 85px), -6px) rotate(-1.5deg) scale(1.04); }
  72%, 88%  { transform: translate(calc(300% + 102px), 0) rotate(-1.5deg) scale(1); opacity: 1; }
  93%, 96%  { transform: translate(calc(300% + 102px), 0) rotate(-1.5deg) scale(1); opacity: 0; }
  97%       { transform: translate(0, 0) rotate(-1.5deg) scale(1); opacity: 0; }
  100%      { transform: translate(0, 0) rotate(-1.5deg) scale(1); opacity: 1; }
}

/* --- 4. Google Ads + Calendar --- */
.hm-ga-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; }
.hm-panel { padding: 14px; border-radius: 12px; background: var(--hm-2); border: 1px solid var(--hm-line); }
.hm-panel-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.hm-panel-h span { font-size: 0.8125rem; font-weight: 500; color: var(--text); }
.hm-panel-h em { font-style: normal; font-size: 0.6875rem; color: var(--text-muted); }
.hm-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.hm-mini span { display: block; font-size: 0.625rem; color: var(--text-muted); }
.hm-mini b { display: block; margin-top: 3px; font-family: var(--font-heading); font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.hm-chart { display: flex; align-items: flex-end; gap: 6px; height: 104px; }
.hm-chart i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(to top, rgba(61,126,255,0.35), var(--blue)); transform-origin: bottom; animation: hm-bar 9s ease-in-out infinite; }
.hm-chart i:last-child { background: linear-gradient(to top, rgba(61,126,255,0.5), #8CCFF8); }
/* le barre salgono una dopo l'altra, da sinistra a destra */
.hm-chart i:nth-child(1) { animation-delay: 0s; } .hm-chart i:nth-child(2) { animation-delay: 0.05s; }
.hm-chart i:nth-child(3) { animation-delay: 0.1s; } .hm-chart i:nth-child(4) { animation-delay: 0.15s; }
.hm-chart i:nth-child(5) { animation-delay: 0.2s; } .hm-chart i:nth-child(6) { animation-delay: 0.25s; }
.hm-chart i:nth-child(7) { animation-delay: 0.3s; } .hm-chart i:nth-child(8) { animation-delay: 0.35s; }
.hm-chart i:nth-child(9) { animation-delay: 0.4s; } .hm-chart i:nth-child(10) { animation-delay: 0.45s; }
.hm-chart i:nth-child(11) { animation-delay: 0.5s; } .hm-chart i:nth-child(12) { animation-delay: 0.55s; }
.hm-chart i:nth-child(13) { animation-delay: 0.6s; } .hm-chart i:nth-child(14) { animation-delay: 0.65s; }
@keyframes hm-bar { 0% { transform: scaleY(0.08); } 12%, 100% { transform: scaleY(1); } }
.hm-slots { display: flex; flex-direction: column; gap: 8px; }
.hm-slot { display: flex; align-items: baseline; gap: 10px; padding: 9px 11px; border-radius: 9px; background: var(--hm-3); border: 1px solid var(--hm-line); }
.hm-slot b { flex: none; font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600; color: var(--blue); }
.hm-slot span { font-size: 0.6875rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* l'appuntamento che arriva da Calendar */
.hm-slot-new { opacity: 0; animation: hm-slot-in 9s ease-out infinite; }
@keyframes hm-slot-in { 0%, 30% { opacity: 0; transform: translateY(8px); border-color: rgba(61,126,255,0.55); } 40%, 92% { opacity: 1; transform: none; } 55%, 100% { border-color: var(--hm-line); } }
.hm-sync { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 0.6875rem; color: var(--text-muted); }
.hm-sync i { width: 6px; height: 6px; border-radius: 50%; background: #34D399; animation: lp-pulse 1.8s ease-in-out infinite; }

/* --- 5. Daily Brief AI --- */
.hm-brief-body { padding: 16px 18px; border-radius: 12px; background: var(--hm-2); border: 1px solid var(--hm-line); }
.hm-line { margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); opacity: 0; animation: hm-write 12s ease-out infinite; animation-delay: calc(var(--i) * 0.9s); }
.hm-line + .hm-line { margin-top: 8px; }
.hm-line b { font-weight: 600; color: var(--text); }
@keyframes hm-write { 0% { opacity: 0; transform: translateY(6px); } 6%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(6px); } }
.hm-caret { display: inline-block; width: 2px; height: 0.9em; margin-left: 3px; vertical-align: -1px; background: var(--blue); animation: hm-blink 1s steps(1) infinite; }
@keyframes hm-blink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
.hm-act-h { display: block; margin: 18px 0 10px; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.hm-acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.hm-act { padding: 12px 14px; border-radius: 11px; background: var(--hm-2); border: 1px solid var(--hm-line); opacity: 0; animation: hm-write 12s ease-out infinite; animation-delay: calc(3.2s + var(--i) * 0.5s); }
.hm-act b { display: block; font-size: 0.8125rem; font-weight: 500; color: var(--text); }
.hm-act span { display: block; margin-top: 4px; font-size: 0.6875rem; line-height: 1.45; color: var(--text-muted); }

@media (max-width: 992px) {
  .hm-ga-grid { grid-template-columns: 1fr; }
  .hm-mini { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .hm-kb-board { grid-template-columns: repeat(2, 1fr); }
  .hm-kb-col:nth-child(n+3) { display: none; }
  .hm-kb-move { width: calc((100% - 12px) / 2 - 22px); }
  @keyframes hm-drag {
    0%, 16%  { transform: translate(0, 0) rotate(-1.5deg) scale(1); opacity: 1; }
    24%      { transform: translate(calc(50% + 17px), -6px) rotate(-1.5deg) scale(1.04); }
    32%, 86% { transform: translate(calc(100% + 34px), 0) rotate(-1.5deg) scale(1); opacity: 1; }
    93%, 96% { transform: translate(calc(100% + 34px), 0) rotate(-1.5deg) scale(1); opacity: 0; }
    97%      { transform: translate(0, 0) rotate(-1.5deg) scale(1); opacity: 0; }
    100%     { transform: translate(0, 0) rotate(-1.5deg) scale(1); opacity: 1; }
  }
  .hm-chart { height: 74px; }
  .hm-chart i:nth-child(n+9) { display: none; }
  .hm-acts { grid-template-columns: 1fr; }
  .hm-act:nth-child(3) { display: none; }
}

/* === Mini schermate disegnate a mano: tessere del bento e card === */
.hb-viz { margin: 0 14px; height: 180px; padding: 12px; border: 1px solid var(--hm-line); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--hm-2); overflow: hidden; }
/* nelle card grandi il visual sta al centro dello spazio sopra al testo, senza stirarsi */
.bn-viz { position: absolute; top: 0; left: 0; right: 0; bottom: 118px; display: flex; align-items: center; padding: 22px; overflow: hidden; }
.bn-viz .mn { width: 100%; height: auto; gap: 12px; }
.bn-viz .mn-chart { flex: none; height: 108px; }
.bn-viz .mn-col { min-height: 152px; }
.mn { display: flex; flex-direction: column; gap: 9px; height: 100%; font-family: var(--font); text-align: left; }
.mn-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.mn-h em { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-dim); }
.mn-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 11px; border-radius: 9px; background: var(--hm-3); border: 1px solid var(--hm-line); }
.mn-row b { font-size: 0.75rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-row span { font-size: 0.6875rem; color: var(--text-muted); white-space: nowrap; }
.mn-row-on { border-color: rgba(61,126,255,0.5); }
.mn-bar { grid-column: 1 / -1; display: block; height: 3px; border-radius: 2px; background: rgba(125,165,255,0.18); }
.mn-bar::before { content: ''; display: block; width: var(--w); height: 100%; border-radius: 2px; background: var(--blue); }
.mn-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mn-kpi { padding: 9px 10px; border-radius: 9px; background: var(--hm-3); border: 1px solid var(--hm-line); }
.mn-kpi span { display: block; font-size: 0.5625rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); white-space: nowrap; }
.mn-kpi b { display: block; margin-top: 4px; font-family: var(--font-heading); font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.mn-chart { display: flex; align-items: flex-end; gap: 5px; flex: 1; min-height: 52px; }
.mn-chart i { flex: 1; height: var(--h); border-radius: 3px 3px 0 0; background: linear-gradient(to top, rgba(61,126,255,0.35), var(--blue)); transform-origin: bottom; animation: hm-bar 9s ease-in-out infinite; }
.mn-chart i:last-child { background: linear-gradient(to top, rgba(61,126,255,0.5), #8CCFF8); }
.mn-chart i:nth-child(2) { animation-delay: .05s } .mn-chart i:nth-child(3) { animation-delay: .1s }
.mn-chart i:nth-child(4) { animation-delay: .15s } .mn-chart i:nth-child(5) { animation-delay: .2s }
.mn-chart i:nth-child(6) { animation-delay: .25s } .mn-chart i:nth-child(7) { animation-delay: .3s }
.mn-chart i:nth-child(8) { animation-delay: .35s } .mn-chart i:nth-child(9) { animation-delay: .4s }
.mn-chart i:nth-child(10) { animation-delay: .45s } .mn-chart i:nth-child(11) { animation-delay: .5s }
.mn-chart i:nth-child(12) { animation-delay: .55s } .mn-chart i:nth-child(13) { animation-delay: .6s }
.mn-chart i:nth-child(14) { animation-delay: .65s }
/* kanban in miniatura */
.mn-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; flex: 1; }
.mn-col { display: flex; flex-direction: column; gap: 7px; padding: 8px; border-radius: 10px; background: var(--hm-3); border: 1px solid var(--hm-line); }
.mn-col > span { font-size: 0.5rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-muted); }
.mn-col em { display: block; padding: 7px 8px; border-radius: 7px; background: var(--hm-2); border: 1px solid var(--hm-line); font-style: normal; }
.mn-col em b { display: block; font-size: 0.6875rem; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mn-col em .mn-bar { margin-top: 6px; }
/* agenti: il giro del round robin scende da un agente all'altro */
.mn-ag-list { position: relative; display: flex; flex-direction: column; gap: 8px; }
.mn-ag-dot { position: absolute; left: -4px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 12px rgba(61,126,255,0.9); animation: mn-rr 6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
@keyframes mn-rr { 0%, 24% { transform: translateY(0); } 33%, 57% { transform: translateY(49px); } 66%, 90% { transform: translateY(98px); } 100% { transform: translateY(0); } }

@media (max-width: 992px) {
  .bn-viz { bottom: 132px; padding: 18px; }
  .mn-kpis { grid-template-columns: repeat(2, 1fr); }
  .mn-chart i:nth-child(n+11) { display: none; }
}
@media (max-width: 768px) {
  .hb-viz { margin: 0 12px; height: 168px; }
  .mn-chart i:nth-child(n+9) { display: none; }
  /* card basse: il visual parte dall'alto e sfuma sotto al testo invece di essere tagliato a meta' */
  .bn-viz { bottom: 0; align-items: flex-start; padding: 16px; }
  .bn-viz .mn { gap: 10px; }
  .bn-viz .mn-chart { height: 56px; }
  .bn-viz .mn-kpi:nth-child(n+3) { display: none; }
  .bn-viz .mn-cols, .bn-viz .mn-col { min-height: 0; }
  .bn-viz .mn-row { padding: 7px 10px; }
}
