/* ─────────────────────────────────────────────────────────────────────────────
   rescalable — Homepage Stylesheet
   Design system: docs/system-design.html | Brand: docs/brand-guidelines.html
───────────────────────────────────────────────────────────────────────────── */

/* ─── 1. Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ─── 2. Design Tokens ───────────────────────────────────────────────────── */
:root {
  /* Brand palette */
  --purple:        #834dfb;
  --purple-light:  #a87dfc;
  --purple-dark:   #5c2fd6;
  --purple-subtle: #f0eafe;
  --navy:          #18102b;
  --navy-mid:      #2e2049;
  --navy-light:    #4a3870;
  --white:         #ffffff;
  --off-white:     #f7f5ff;
  --grey-100:      #f0eefe;
  --grey-200:      #d4cff0;
  --grey-400:      #9590b8;
  --grey-600:      #5e5a7a;
  --grey-800:      #2e2b42;
  --success:       #22c55e;
  --error:         #ef4444;

  /* Typography */
  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Shape */
  --radius:    12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadow + glow (purple-tinted system) */
  --shadow-xs: 0 1px 2px rgba(24,16,43,0.04);
  --shadow-sm: 0 2px 8px rgba(131,77,251,0.06), 0 1px 2px rgba(24,16,43,0.04);
  --shadow-md: 0 4px 20px rgba(131,77,251,0.09), 0 2px 6px rgba(24,16,43,0.06);
  --shadow-lg: 0 8px 40px rgba(131,77,251,0.13), 0 4px 10px rgba(24,16,43,0.08);
  --shadow-xl: 0 20px 56px rgba(131,77,251,0.18), 0 8px 20px rgba(24,16,43,0.12);
  --glow-sm:   0 0 24px rgba(131,77,251,0.22);
  --glow-md:   0 0 48px rgba(131,77,251,0.32);

  /* Easing */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index scale */
  --z-base:    0;
  --z-content: 1;
  --z-nav:     1000;
  --z-drawer:  999;
  --z-overlay: 9999;

  /* Base transition */
  --transition: 0.25s ease;
}

/* ─── 3. Base Styles ─────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--navy);
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 { font-family: var(--font-head); }

h1 {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

p { text-wrap: pretty; }

*:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── 4. Layout ──────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px;
}

.section {
  padding: 96px 0;
}

.section--dark {
  background: var(--navy);
}

.section--light {
  background: var(--white);
}

.section--offwhite {
  background: var(--off-white);
}

/* ─── 5. Keyframes ───────────────────────────────────────────────────────── */

@keyframes notif-enter {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@keyframes hero-enter-copy {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

@keyframes hero-enter-visual {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: none; }
}

@keyframes row-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

@keyframes dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* ─── 6. Scroll Reveal ───────────────────────────────────────────────────── */
.will-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s var(--ease-out-quart),
              transform 0.65s var(--ease-out-quart);
}

.will-reveal.revealed {
  opacity: 1;
  transform: none;
}

.will-reveal.scale-reveal {
  transform: scale(0.96) translateY(16px);
}
.will-reveal.scale-reveal.revealed {
  transform: scale(1) translateY(0);
}

.stagger-1 { transition-delay: 0.08s; }
.stagger-2 { transition-delay: 0.16s; }
.stagger-3 { transition-delay: 0.24s; }
.stagger-4 { transition-delay: 0.32s; }

/* ─── 7. Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out-quart),
              box-shadow 0.2s var(--ease-out-quart),
              background 0.2s ease,
              border-color 0.2s ease;
  position: relative;
}

.btn:active { transform: translateY(1px) !important; }

.btn--purple {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(131,77,251,0.30), 0 1px 4px rgba(131,77,251,0.20);
}
.btn--purple:hover {
  background: #9260fc;
  box-shadow: 0 8px 28px rgba(131,77,251,0.40), 0 2px 8px rgba(131,77,251,0.25);
}

.btn--ghost {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.9);
  border: 1.5px solid rgba(255,255,255,0.22);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.45);
}

.btn--ghost-purple {
  background: transparent;
  color: var(--purple);
  border: 1.5px solid rgba(131,77,251,0.28);
}
.btn--ghost-purple:hover {
  background: var(--purple-subtle);
  border-color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.btn--lg {
  padding: 16px 32px;
  font-size: 15px;
}

/* ─── 8. Navbar ──────────────────────────────────────────────────────────── */
#header {
  position: fixed;
  top: max(16px, calc(env(safe-area-inset-top) + 8px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px);
  max-width: 1100px;
  height: 64px;
  background: var(--navy);
  border: 1px solid rgba(131,77,251,0.18);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 20px rgba(24,16,43,0.30);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: var(--z-nav);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

#header > nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

#header.scrolled {
  box-shadow: 0 4px 32px rgba(24,16,43,0.50), 0 0 0 1px rgba(131,77,251,0.12);
  border-color: rgba(131,77,251,0.25);
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 30px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.65);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 1.5px;
  background: var(--purple-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease-out-quart);
}

.nav-links a:hover {
  color: var(--white);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-cta-btn {
  border-radius: 100px;
}

.nav-product-logo {
  height: 15px;
  width: auto;
  display: block;
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.nav-links a:hover .nav-product-logo,
.nav-links a[aria-current="page"] .nav-product-logo {
  opacity: 1;
}

.drawer-nav .nav-product-logo {
  height: 28px;
  opacity: 0.9;
}

.drawer-nav a:hover .nav-product-logo,
.drawer-nav a[aria-current="page"] .nav-product-logo {
  opacity: 1;
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 3px;
}

.lang-btn {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  padding: 4px 8px;
  border-radius: 5px;
  transition: color 0.15s ease, background 0.15s ease;
}

.lang-btn.active {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
}

.lang-btn:hover:not(.active) {
  color: rgba(255,255,255,0.7);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(131,77,251,0.22);
  background: rgba(131,77,251,0.08);
  transition: background 0.2s ease;
}

.hamburger:hover { background: rgba(131,77,251,0.15); }

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: rgba(255,255,255,0.75);
  border-radius: 1px;
  transition: transform 0.25s var(--ease-out-quart), opacity 0.2s ease;
}

.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--navy);
  z-index: var(--z-drawer);
  display: flex;
  flex-direction: column;
  padding: 24px;
  transform: translateX(100%);
  transition: transform 0.35s var(--ease-out-expo);
}

.mobile-drawer.open {
  transform: none;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(131,77,251,0.12);
}

.drawer-header img { height: 28px; }

.drawer-close {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(131,77,251,0.22);
  background: rgba(131,77,251,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  transition: background 0.2s ease;
}
.drawer-close:hover { background: rgba(131,77,251,0.2); }

.drawer-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.drawer-nav li {
  border-bottom: 1px solid rgba(131,77,251,0.08);
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 900;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.02em;
  transition: color 0.2s ease;
}

.drawer-nav a:hover { color: var(--purple-light); }

.drawer-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(131,77,251,0.1);
}

/* ─── 9. Hero ─────────────────────────────────────────────────────────────── */
#hero {
  background: var(--navy);
  min-height: 100vh;
  padding: 160px 0 96px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Top accent line */
#hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--purple) 0%, var(--purple-light) 100%);
}

/* Ensure container fills hero flex parent so child margin:auto works */
#hero > .container {
  width: 100%;
}

/* Compact hero — legal pages */
#hero.hero--compact {
  min-height: 0;
  padding: 148px 0 56px;
  align-items: flex-end;
}

#hero.hero--compact .hero-bg-pattern {
  display: none;
}

#hero.hero--compact .hero-inner {
  animation: none;
  max-width: 740px;
  margin-left: auto;
  margin-right: auto;
}

#hero.hero--compact .hero-inner h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 12px;
}

#hero.hero--compact .hero-subhead {
  font-size: 0.95rem;
  margin-bottom: 0;
  color: rgba(255,255,255,0.50);
}

/* Hexagon bg texture — larger, more present without the dashboard competing */
.hero-bg-pattern {
  position: absolute;
  right: -160px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.07;
  width: 820px;
  height: auto;
  pointer-events: none;
}

.hero-inner {
  max-width: 700px;
  position: relative;
  z-index: var(--z-content);
  animation: hero-enter-copy 0.8s var(--ease-out-expo) both;
}

.hero-inner h1 {
  color: var(--white);
  margin-bottom: 28px;
}

.hero-inner h1 em {
  font-style: normal;
  color: var(--purple-light);
}

.hero-subhead {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.60);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-trust {
  font-size: 12px;
  color: rgba(255,255,255,0.26);
  letter-spacing: 0.03em;
  margin: 0;
}

/* ─── 10. Hero Dashboard ──────────────────────────────────────────────────── */
.hero-dashboard-wrap {
  position: relative;
  padding: 48px 0 56px;
}

.hd-notification {
  position: absolute;
  top: 8px;
  right: -8px;
  background: rgba(131,77,251,0.14);
  border: 1px solid rgba(131,77,251,0.32);
  border-radius: 10px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: notif-enter 0.6s var(--ease-out-expo) 0.9s both;
  z-index: 2;
}

.hd-notif-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(34,197,94,0.6);
}

.hd-notif-text {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(255,255,255,0.80);
  line-height: 1.4;
  white-space: nowrap;
}

.hd-window {
  background: rgba(20, 13, 38, 0.98);
  border: 1px solid rgba(131,77,251,0.30);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(131,77,251,0.06),
    0 8px 32px rgba(131,77,251,0.12),
    0 32px 80px rgba(24,16,43,0.65),
    0 64px 120px rgba(24,16,43,0.30);
  /* no float animation */
}

.hd-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 18px;
  border-bottom: 1px solid rgba(131,77,251,0.12);
  background: linear-gradient(135deg, rgba(131,77,251,0.08) 0%, rgba(131,77,251,0.02) 100%);
}

.hd-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hd-dot:nth-child(1) { background: rgba(255,255,255,0.12); }
.hd-dot:nth-child(2) { background: rgba(255,255,255,0.08); }
.hd-dot:nth-child(3) { background: rgba(131,77,251,0.60); box-shadow: 0 0 5px rgba(131,77,251,0.45); }

.hd-title-text {
  flex: 1;
  text-align: center;
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
}

/* KPI strip */
.hd-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(131,77,251,0.10);
  border-bottom: 1px solid rgba(131,77,251,0.10);
}

.hd-kpi {
  padding: 16px 12px;
  background: rgba(20, 13, 38, 0.95);
  text-align: center;
}

.hd-kpi--hl {
  background: rgba(131,77,251,0.12);
  position: relative;
}

.hd-kpi--hl::after {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple-light), transparent);
}

.hd-kpi-val {
  display: block;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 5px;
}

.hd-kpi--hl .hd-kpi-val {
  color: var(--purple-light);
}

.hd-kpi-lbl {
  display: block;
  font-size: 9px;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.28);
}

.hd-kpi-trend {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  margin-top: 4px;
  padding: 2px 5px;
  border-radius: 20px;
}

.trend-up   { background: rgba(34,197,94,0.15); color: #4ade80; }
.trend-down { background: rgba(131,77,251,0.15); color: var(--purple-light); }

/* App body */
.hd-body {
  display: flex;
  border-bottom: 1px solid rgba(131,77,251,0.10);
}

.hd-sidebar {
  width: 90px;
  background: rgba(10, 6, 22, 0.97);
  border-right: 1px solid rgba(131,77,251,0.10);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 8px 6px;
  gap: 2px;
  flex-shrink: 0;
}

.hd-sitem {
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  color: rgba(255,255,255,0.22);
  transition: background 0.15s ease, color 0.15s ease;
}

.hd-sitem--active {
  background: rgba(131,77,251,0.22);
  color: var(--purple-light);
}

.hd-sitem svg,
.hd-sitem .iconify { width: 12px; height: 12px; flex-shrink: 0; }

.hd-sitem-lbl {
  font-family: var(--font-head);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hd-sidebar-sep {
  height: 1px;
  background: rgba(131,77,251,0.10);
  margin: 4px 2px;
}

.hd-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.hd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(131,77,251,0.08);
}

.hd-page-title {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.80);
}

.hd-btn-new {
  font-family: var(--font-head);
  font-size: 8px;
  font-weight: 700;
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 5px;
  padding: 4px 9px;
}

.hd-tabs {
  display: flex;
  gap: 2px;
  padding: 6px 14px 0;
}

.hd-tab {
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 5px 5px 0 0;
  color: rgba(255,255,255,0.35);
}

.hd-tab--active {
  color: var(--purple-light);
  background: rgba(131,77,251,0.10);
}

.hd-list { padding: 4px 14px 10px; }

.hd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 5px;
  border-bottom: 1px solid rgba(131,77,251,0.05);
  animation: row-in 0.35s var(--ease-out-quart) both;
}

.hd-row:last-child { border-bottom: none; }
.hd-row:nth-child(1) { animation-delay: 0.05s; }
.hd-row:nth-child(2) { animation-delay: 0.10s; }
.hd-row:nth-child(3) { animation-delay: 0.15s; }
.hd-row:nth-child(4) { animation-delay: 0.20s; }

.hd-row-name { flex: 1; font-size: 9px; color: rgba(255,255,255,0.70); }
.hd-row-date { font-size: 8px; color: rgba(255,255,255,0.22); width: 44px; }
.hd-row-val  { font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.60); width: 40px; text-align: right; }

.hd-badge {
  font-family: var(--font-head);
  font-size: 7px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
}

.badge-ok    { background: rgba(34,197,94,0.15);   color: #22c55e; }
.badge-wait  { background: rgba(245,158,11,0.15);  color: #f59e0b; }
.badge-done  { background: rgba(148,144,184,0.15); color: #9590b8; }

.hd-summary {
  display: flex;
  border-top: 1px solid rgba(131,77,251,0.10);
  padding: 7px 14px;
}

.hd-sum-item { flex: 1; text-align: center; }
.hd-sum-val  { font-family: var(--font-head); font-size: 10px; font-weight: 700; color: var(--purple-light); }
.hd-sum-lbl  { font-size: 7px; color: rgba(255,255,255,0.25); margin-top: 1px; }

/* Static in product context */

/* ─── 11. Servizi ────────────────────────────────────────────────────────── */
.servizi-header {
  margin-bottom: 48px;
}

.servizi-header h2 { color: var(--navy); }

.servizi-header p {
  color: var(--grey-600);
  margin-top: 12px;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 680px;
  text-wrap: wrap;
}

/* Fulcro: full-width horizontal card */
.servizio-featured {
  display: flex;
  flex-direction: row;
  gap: 0;
  background: var(--navy);
  border: 1px solid rgba(131,77,251,0.18);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
}

.servizio-featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--purple);
  z-index: 1;
}

.svf-content {
  flex: 0 0 42%;
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(131,77,251,0.06);
  border-right: 1px solid rgba(131,77,251,0.12);
}

.svf-content h3 {
  color: var(--white);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.svf-stats {
  display: flex;
  gap: 20px;
  margin: 20px 0 24px;
  padding: 16px 0;
  border-top: 1px solid rgba(131,77,251,0.10);
  border-bottom: 1px solid rgba(131,77,251,0.10);
}

.svf-stat { flex: 1; }

.svf-stat-val {
  display: block;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.svf-stat-lbl {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.38);
  margin-top: 5px;
  letter-spacing: 0.02em;
}

.svf-content > p {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  margin-bottom: 28px;
  flex: 1;
}

.svf-visual {
  flex: 1;
  background: rgba(10, 6, 22, 0.60);
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.svf-visual .hd-window {
  border-radius: 0;
  border: none;
  box-shadow: none;
  flex: 1;
}

/* ERP module grid panel (homepage service card) */
.erp-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 30px;
  background: rgba(10, 6, 22, 0.60);
  gap: 18px;
}

.erp-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(131,77,251,0.10);
}

.erp-panel-title {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}

.erp-panel-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--purple-light);
  background: rgba(131,77,251,0.14);
  border: 1px solid rgba(131,77,251,0.22);
  padding: 3px 9px;
  border-radius: 20px;
}

.erp-modules {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}

.erp-module {
  background: rgba(131,77,251,0.06);
  border: 1px solid rgba(131,77,251,0.12);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background 0.2s ease;
}

.erp-module-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.erp-module-head .iconify { width: 13px; height: 13px; color: var(--purple-light); flex-shrink: 0; }

.erp-module-name {
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.65);
  flex: 1;
}

.erp-module-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.erp-dot-ok   { background: rgba(74, 222, 128, 0.75); }
.erp-dot-warn { background: var(--purple-light); opacity: 0.7; }

.erp-module-stat {
  font-size: 8.5px;
  color: rgba(255,255,255,0.48);
  line-height: 1.5;
}

.erp-module-stat + .erp-module-stat {
  color: rgba(255,255,255,0.26);
}

/* Secondary services — 2-col on dark */
.servizi-secondary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.servizio-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(131,77,251,0.10);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s var(--ease-out-quart);
}

.servizio-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(131,77,251,0.22);
  transform: translateY(-3px);
}

.servizio-icon {
  width: 44px; height: 44px;
  border-radius: 11px;
  background: rgba(131,77,251,0.14);
  border: 1px solid rgba(131,77,251,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--purple-light);
}

.servizio-icon svg,
.servizio-icon .iconify { width: 22px; height: 22px; }

.servizio-card h3 {
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.servizio-card p {
  font-size: 14px;
  color: rgba(255,255,255,0.50);
  line-height: 1.65;
  max-width: 320px;
}

/* ─── Product label (re-erp / re-voice) ─────────────────────────────────── */
.svf-product-label {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--purple-light);
  margin-bottom: 10px;
}

.svf-product-logo {
  height: 34px;
  width: auto;
  display: block;
  margin-bottom: 18px;
}

.svf-content h3 {
  font-size: 1.2rem;
  text-wrap: balance;
  margin-bottom: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* Reversed card: re-voice (visual left, content right) */
.servizio-featured--rev {
  flex-direction: row-reverse;
}

.servizio-featured--rev .svf-content {
  border-right: none;
  border-left: 1px solid rgba(131,77,251,0.12);
}

/* ─── re-voice visual panel ─────────────────────────────────────────────── */
.rv-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
  background: rgba(10, 6, 22, 0.65);
}

/* Status bar */
.rv-statusbar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(131,77,251,0.12);
  border-radius: 10px;
  padding: 8px 14px;
}

.rv-live {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rv-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
  animation: rv-pulse 2.2s ease-in-out infinite;
}

@keyframes rv-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(34,197,94,0.20); }
  50%       { box-shadow: 0 0 0 5px rgba(34,197,94,0.06); }
}

.rv-live-label {
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.10em;
  color: var(--success);
}

.rv-brand {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.28);
  flex: 1;
  text-align: center;
}

.rv-timer {
  font-size: 10px;
  color: rgba(255,255,255,0.20);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* Caller card */
.rv-caller-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(131,77,251,0.07);
  border: 1px solid rgba(131,77,251,0.14);
  border-radius: 12px;
  padding: 13px 15px;
}

.rv-caller-id {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.rv-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(131,77,251,0.18);
  border: 1px solid rgba(131,77,251,0.26);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-light);
  flex-shrink: 0;
}

.rv-avatar .iconify { width: 16px; height: 16px; }

.rv-caller-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.rv-caller-name {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.82);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.rv-caller-num {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: rgba(255,255,255,0.36);
  font-variant-numeric: tabular-nums;
}

.rv-caller-num .iconify {
  width: 10px;
  height: 10px;
  color: var(--purple-light);
  opacity: 0.65;
  flex-shrink: 0;
}

.rv-call-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: 20px;
  padding: 4px 10px;
  flex-shrink: 0;
}

.rv-call-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  animation: rv-pulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

.rv-call-status-lbl {
  font-family: var(--font-head);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--success);
}

/* Waveform */
.rv-waveform {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 38px;
  padding: 0 2px;
}

.rv-bar {
  flex: 1;
  background: var(--purple-light);
  border-radius: 2px;
  transform-origin: center;
  animation: rv-wave 1.5s ease-in-out infinite;
}

.rv-bar:nth-child(1)  { height: 28%; animation-delay: 0.00s; }
.rv-bar:nth-child(2)  { height: 58%; animation-delay: 0.08s; }
.rv-bar:nth-child(3)  { height: 82%; animation-delay: 0.16s; }
.rv-bar:nth-child(4)  { height: 44%; animation-delay: 0.24s; }
.rv-bar:nth-child(5)  { height: 68%; animation-delay: 0.05s; }
.rv-bar:nth-child(6)  { height: 95%; animation-delay: 0.32s; }
.rv-bar:nth-child(7)  { height: 38%; animation-delay: 0.12s; }
.rv-bar:nth-child(8)  { height: 72%; animation-delay: 0.40s; }
.rv-bar:nth-child(9)  { height: 52%; animation-delay: 0.08s; }
.rv-bar:nth-child(10) { height: 100%; animation-delay: 0.20s; }
.rv-bar:nth-child(11) { height: 62%; animation-delay: 0.16s; }
.rv-bar:nth-child(12) { height: 35%; animation-delay: 0.28s; }
.rv-bar:nth-child(13) { height: 78%; animation-delay: 0.04s; }
.rv-bar:nth-child(14) { height: 88%; animation-delay: 0.36s; }
.rv-bar:nth-child(15) { height: 48%; animation-delay: 0.12s; }
.rv-bar:nth-child(16) { height: 42%; animation-delay: 0.22s; }
.rv-bar:nth-child(17) { height: 65%; animation-delay: 0.06s; }
.rv-bar:nth-child(18) { height: 30%; animation-delay: 0.30s; }
.rv-bar:nth-child(19) { height: 80%; animation-delay: 0.14s; }
.rv-bar:nth-child(20) { height: 55%; animation-delay: 0.38s; }

@keyframes rv-wave {
  0%, 100% { transform: scaleY(0.22); opacity: 0.22; }
  50%       { transform: scaleY(1);    opacity: 0.62; }
}

/* Transcript */
.rv-transcript {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
  overflow: hidden;
}

.rv-line {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rv-line--ai  { align-items: flex-start; }
.rv-line--caller { align-items: flex-end; }

.rv-speaker-tag {
  font-family: var(--font-head);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0 2px;
  text-transform: uppercase;
}

.rv-line--ai .rv-speaker-tag     { color: var(--purple-light); opacity: 0.55; }
.rv-line--caller .rv-speaker-tag { color: rgba(255,255,255,0.25); }

.rv-bubble {
  max-width: 84%;
  padding: 8px 12px;
  border-radius: 11px;
  font-size: 11.5px;
  line-height: 1.5;
}

.rv-line--ai .rv-bubble {
  background: rgba(131,77,251,0.13);
  border: 1px solid rgba(131,77,251,0.20);
  color: rgba(255,255,255,0.72);
  border-top-left-radius: 3px;
}

.rv-line--caller .rv-bubble {
  background: rgba(255,255,255,0.055);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.48);
  border-bottom-right-radius: 3px;
}

.rv-bubble--typing {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 14px;
  padding: 8px 14px;
}

.rv-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--purple-light);
  animation: rv-typing 1.4s ease-in-out infinite;
  opacity: 0.6;
}

.rv-dot:nth-child(2) { animation-delay: 0.18s; }
.rv-dot:nth-child(3) { animation-delay: 0.36s; }

@keyframes rv-typing {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40%            { opacity: 0.90; transform: translateY(-3px); }
}

/* Footer metrics */
.rv-metrics {
  display: flex;
  align-items: center;
  gap: 0;
  padding-top: 11px;
  border-top: 1px solid rgba(131,77,251,0.08);
}

.rv-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  text-align: center;
}

.rv-metric-val {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 800;
  color: var(--purple-light);
  line-height: 1;
}

.rv-metric-lbl {
  font-size: 9px;
  color: rgba(255,255,255,0.26);
  letter-spacing: 0.02em;
}

.rv-metric-sep {
  width: 1px;
  height: 26px;
  background: rgba(131,77,251,0.10);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .rv-live-dot, .rv-call-dot { animation: none; }
  .rv-bar { animation: none; transform: scaleY(0.6); opacity: 0.45; }
  .rv-dot { animation: none; }
}

/* ─── Consulenza IT strip ────────────────────────────────────────────────── */
.consulenza-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px 36px;
  border: 1px solid rgba(131,77,251,0.18);
  border-radius: var(--radius-lg);
  background: var(--navy);
}

.consulenza-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(131,77,251,0.14);
  border: 1px solid rgba(131,77,251,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-light);
  flex-shrink: 0;
}

.consulenza-icon svg,
.consulenza-icon .iconify { width: 22px; height: 22px; }

.consulenza-body { flex: 1; min-width: 0; }

.consulenza-body h3 {
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.consulenza-body p {
  font-size: 13px;
  color: rgba(255,255,255,0.42);
  line-height: 1.6;
}

.consulenza-cta { flex-shrink: 0; }

/* ─── 12. Problemi ───────────────────────────────────────────────────────── */
#problemi {
  background: var(--off-white);
}

.problemi-header {
  margin-bottom: 56px;
}

.problemi-header h2 {
  color: var(--navy);
  max-width: 480px;
}

.problemi-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.problemi-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 40px 0;
  border-bottom: 1px solid rgba(131,77,251,0.10);
}

.problemi-row:last-child {
  border-bottom: none;
}

.problemi-problem {
  position: relative;
}

.problemi-problem p {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--grey-400);
  line-height: 1.4;
  text-wrap: balance;
}

.problemi-arrow {
  position: absolute;
  right: -32px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(131,77,251,0.25);
}

.problemi-answer {
  padding-left: 8px;
}

.problemi-answer p {
  font-size: 1rem;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.6;
  max-width: 400px;
}

.problemi-answer strong {
  color: var(--purple-dark);
  font-weight: 700;
}

/* ─── 12b. Problemi — Variante A (due colonne) ──────────────────────────── */
#problemi-a { background: var(--off-white); }

.pv1-labels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(131,77,251,0.14);
}

.pv1-label {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--grey-400);
}

.pv1-label--problem { padding-right: 48px; }
.pv1-label--solution { color: var(--purple); padding-left: 48px; }

.pv1-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid rgba(131,77,251,0.08);
}

.pv1-row:last-child { border-bottom: none; }

.pv1-problem { padding: 44px 48px 44px 0; }

.pv1-problem p {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  text-wrap: balance;
}

.pv1-solution {
  padding: 44px 0 44px 48px;
  border-left: 1px solid rgba(131,77,251,0.12);
  display: flex;
  align-items: center;
}

.pv1-solution p {
  font-size: 1rem;
  color: var(--navy);
  font-weight: 400;
  line-height: 1.7;
}

.pv1-solution strong {
  color: var(--purple-dark);
  font-weight: 700;
}

/* ─── 12c. Problemi — Variante B (editoriale singola colonna) ───────────── */
#problemi-b { background: var(--navy); }

.pv2-list { max-width: 680px; }

.pv2-item {
  padding: 56px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.pv2-item:last-child { border-bottom: none; }

.pv2-tag {
  display: block;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--purple-light);
  margin-bottom: 14px;
}

.pv2-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-light);
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.pv2-problem {
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  line-height: 1.3;
  margin: 0;
  text-wrap: balance;
}

.pv2-problem::after {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: rgba(131,77,251,0.55);
  margin: 20px 0;
}

.pv2-solution {
  font-size: 1rem;
  color: rgba(255,255,255,0.80);
  line-height: 1.7;
  font-weight: 500;
  margin: 0;
}

.pv2-solution strong {
  color: var(--white);
  font-weight: 700;
}

/* ─── 13. Settori ────────────────────────────────────────────────────────── */
#settori {
  background: var(--white);
}

.settori-header {
  margin-bottom: 48px;
}

.settori-header h2 {
  color: var(--navy);
  margin-bottom: 8px;
}

.settori-header p {
  color: var(--grey-600);
  font-size: 1.05rem;
}

.settori-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.settore-tile {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--navy-mid);
  min-height: 320px;
}

.settore-tile--featured {
  /* no longer spans rows — same as other tiles */
}

.settore-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out-quart);
}

.settore-tile:hover img {
  transform: scale(1.04);
}

/* Overlay gradient */
.settore-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(24,16,43,0.88) 0%, rgba(24,16,43,0.20) 55%, transparent 100%);
}

.settore-body {
  position: relative;
  z-index: 1;
  padding: 28px;
}

.settore-tile--featured .settore-body { padding: 36px; }

.settore-tag {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--purple-light);
  background: rgba(131,77,251,0.18);
  border: 1px solid rgba(131,77,251,0.28);
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.settore-body h3 {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.settore-tile--featured .settore-body h3 {
  font-size: 1.7rem;
}

.settore-body p {
  color: rgba(255,255,255,0.60);
  font-size: 13px;
  line-height: 1.55;
}

/* ─── 14. Contatti ───────────────────────────────────────────────────────── */
#contatti {
  background: var(--navy);
}

.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}

.contatti-grid > * {
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.contatti-info h2 {
  color: var(--white);
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: 20px;
}

.contatti-info > p {
  color: rgba(255,255,255,0.55);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 340px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.60);
}

.contact-detail-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: rgba(131,77,251,0.12);
  border: 1px solid rgba(131,77,251,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-light);
  flex-shrink: 0;
}

.contact-detail-icon svg,
.contact-detail-icon .iconify { width: 18px; height: 18px; }

.contact-detail a {
  color: rgba(255,255,255,0.60);
  transition: color 0.2s ease;
}
.contact-detail a:hover { color: var(--purple-light); }

/* Form */
.contact-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(131,77,251,0.14);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group:last-of-type { margin-bottom: 24px; }

.form-group label {
  display: block;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}

.form-group input:not([type="checkbox"]),
.form-group textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(131,77,251,0.16);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--white);
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  -webkit-appearance: none;
}

.form-group input:not([type="checkbox"])::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

.form-group input:not([type="checkbox"]):focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(131,77,251,0.50);
  background: rgba(131,77,251,0.06);
  box-shadow: 0 0 0 3px rgba(131,77,251,0.12);
}

.cf-turnstile {
  margin-bottom: 16px;
}

@media (max-width: 420px) {
  .cf-turnstile {
    transform-origin: left top;
    transform: scale(0.82);
    margin-bottom: 3px;
  }
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

/* Optional field note */
.form-optional {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
}

.form-submit {
  width: 100%;
  justify-content: center;
}

/* Form success state */
.form-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.form-success.visible {
  display: flex;
}

.form-success-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--success);
}

.form-success h3 {
  color: var(--white);
  font-size: 1.1rem;
}

.form-success p {
  color: rgba(255,255,255,0.50);
  font-size: 14px;
}

/* Field error state */
.form-group.has-error input,
.form-group.has-error textarea {
  border-color: rgba(239,68,68,0.50);
}

.form-error-msg {
  display: none;
  font-size: 11px;
  color: #ef4444;
  margin-top: 5px;
  font-weight: 500;
}

.form-group.has-error .form-error-msg { display: block; }

.form-global-error {
  font-size: 13px;
  color: #ef4444;
  font-weight: 500;
  min-height: 0;
}
.form-global-error:empty { display: none; }

/* ─── 15. Landing Page common ────────────────────────────────────────────── */

/* Active nav link (current page) */
.nav-links a[aria-current="page"],
.drawer-nav a[aria-current="page"] {
  color: var(--white);
}

/* LP hero: 2-col layout (product LPs only) */
.lp-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.lp-hero-copy {
  animation: hero-enter-copy 0.8s var(--ease-out-expo) both;
}

.lp-hero-copy h1 {
  color: var(--white);
  margin-bottom: 28px;
}

.lp-hero-copy h1 em {
  font-style: normal;
  color: var(--purple-light);
}

.lp-hero-visual {
  animation: hero-enter-visual 0.9s var(--ease-out-expo) 0.1s both;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(131,77,251,0.18);
  box-shadow: var(--shadow-xl), var(--glow-sm);
}

.lp-hero-visual .rv-panel {
  min-height: 380px;
}

/* Clay hero illustration — no card/frame, transparent PNG blends straight into the dark hero.
   Grounding comes from a drop-shadow on the alpha shape instead of a box-shadow. */
.lp-hero-visual--clay {
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.lp-hero-visual--clay img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 32px rgba(0,0,0,0.35)) drop-shadow(0 0 40px rgba(131,77,251,0.22));
}

/* Wide desktop: richer scene (picture source above) gets more room to read clearly. */
@media (min-width: 1300px) {
  .lp-hero-inner:has(.lp-hero-visual--clay) {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 48px;
  }
}

/* Moduli cards (off-white background) */
.moduli-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.modulo-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.modulo-card:hover {
  border-color: rgba(131,77,251,0.28);
  box-shadow: var(--shadow-md);
}

.modulo-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--purple-subtle);
  border: 1px solid rgba(131,77,251,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--purple-dark);
}

.modulo-icon svg,
.modulo-icon .iconify { width: 20px; height: 20px; }

.modulo-card h3 {
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.modulo-card p {
  font-size: 13px;
  color: var(--grey-600);
  line-height: 1.65;
}

/* Process steps (dark bg) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(131,77,251,0.25);
  background: rgba(131,77,251,0.10);
  color: var(--purple-light);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.step-body h3 {
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step-body p {
  font-size: 14px;
  color: var(--grey-600);
  line-height: 1.65;
}

/* Section header variants */
.lp-section-header {
  margin-bottom: 48px;
}

.lp-section-header h2 {
  margin-bottom: 10px;
}

.lp-section-header--light h2 { color: var(--navy); }
.lp-section-header--light p  { color: var(--grey-600); font-size: 1.05rem; }

.lp-section-header--dark h2  { color: var(--white); }
.lp-section-header--dark p   { color: rgba(255,255,255,0.55); font-size: 1.05rem; }

/* LP hero responsive */
@media (max-width: 960px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
  .lp-hero-visual { display: none; }
  .moduli-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .moduli-grid { grid-template-columns: 1fr; }
  .steps-grid  { grid-template-columns: 1fr; }
}

/* Reduced motion: LP */
@media (prefers-reduced-motion: reduce) {
  .lp-hero-copy  { animation: none; opacity: 1; transform: none; }
  .lp-hero-visual { animation: none; opacity: 1; transform: none; }
}

/* ─── 16. Progetti ───────────────────────────────────────────────────────── */
#progetti-list { background: var(--off-white); }

/* Grid: auto-fill, 2+ cards → column grid; single card → handled via :only-child */
.progetti-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Card base */
.progetto-card {
  background: var(--white);
  border: 1px solid rgba(131,77,251,0.10);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.progetto-card:hover {
  box-shadow: 0 8px 32px rgba(131,77,251,0.10);
  border-color: rgba(131,77,251,0.22);
}

/* Single card: horizontal layout — logo left, content right */
.progetto-card:only-child {
  flex-direction: row;
  grid-column: 1 / -1;
  max-width: 840px;
  margin: 0 auto;
  width: 100%;
}

.progetto-logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 36px;
  background: var(--off-white);
  min-height: 180px;
  border-bottom: 1px solid rgba(131,77,251,0.07);
}

.progetto-card:only-child .progetto-logo-area {
  width: 260px;
  flex-shrink: 0;
  border-bottom: none;
  border-right: 1px solid rgba(131,77,251,0.07);
  min-height: auto;
}

.progetto-client-logo {
  max-width: 190px;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: invert(1);
}

.progetto-card-body {
  flex: 1;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.progetto-card:only-child .progetto-card-body {
  justify-content: center;
  padding: 36px 40px;
}

.progetto-type-badge {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--purple);
}

.progetto-type-badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
  margin-right: 7px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.progetto-client-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 2px 0 4px;
}

.progetto-card:only-child .progetto-client-name {
  font-size: 1.9rem;
}

.progetto-desc {
  font-size: 0.9rem;
  color: var(--navy);
  opacity: 0.72;
  line-height: 1.65;
  flex: 1;
}

.progetto-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(131,77,251,0.07);
  flex-wrap: wrap;
}

.progetto-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.progetto-tag {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  color: var(--grey-600);
  background: rgba(131,77,251,0.07);
  padding: 4px 10px;
  border-radius: 100px;
}

.progetto-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--purple);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.progetto-ext-link:hover { color: var(--purple-dark); }
.progetto-ext-link svg { width: 12px; height: 12px; }

.progetti-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.progetti-cta-inner > p {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

/* ─── 16b. Footer ─────────────────────────────────────────────────────────── */
#footer {
  background: rgba(14, 9, 26, 0.98);
  border-top: 1px solid rgba(131,77,251,0.10);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-logo img { height: 24px; }

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.footer-links a:hover { color: rgba(255,255,255,0.70); }

.footer-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.22);
}

.footer-legal {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 24px;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-legal p {
  font-size: 11px;
  color: rgba(255,255,255,0.22);
  line-height: 1.6;
}
.footer-legal a {
  color: rgba(255,255,255,0.30);
  text-decoration: none;
}
.footer-legal a:hover { color: rgba(255,255,255,0.55); }
.footer-legal-links {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}
.footer-legal-links a {
  font-size: 11px;
  color: rgba(255,255,255,0.30);
  text-decoration: none;
  white-space: nowrap;
}
.footer-legal-links a:hover,
.footer-legal-links a[aria-current="page"] { color: var(--purple-light); }

/* ─── Cookie banner ──────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy);
  border-top: 1px solid rgba(131,77,251,0.20);
  z-index: 900;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
  padding: 16px 24px;
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cookie-banner-text {
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
  margin: 0;
  line-height: 1.5;
}
.cookie-banner-text a {
  color: var(--purple-light);
  text-decoration: underline;
}
.cookie-banner-btn { flex-shrink: 0; }
@media (max-width: 600px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-banner-btn { justify-content: center; }
}

/* ─── Form consent checkbox ──────────────────────────────────────────────── */
.form-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,0.50);
  line-height: 1.5;
}
.form-consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--purple);
  cursor: pointer;
}
.form-consent-label a { color: var(--purple-light); text-decoration: underline; }
.form-group--consent.has-error .form-consent-label { color: rgba(239,68,68,0.80); }

/* ─── Legal pages ────────────────────────────────────────────────────────── */
.legal-section { background: var(--white); }
.legal-body {
  max-width: 740px;
  margin: 0 auto;
}
.legal-meta {
  font-size: 12px;
  color: var(--grey-600);
  padding: 12px 16px;
  background: var(--off-white);
  border-radius: 8px;
  margin-bottom: 32px;
}
.legal-body > p,
.legal-body li {
  font-size: 15px;
  color: var(--grey-600);
  line-height: 1.75;
  margin-bottom: 16px;
}
.legal-body h2 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--navy);
  margin: 40px 0 12px;
}
.legal-body h3 {
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin: 24px 0 8px;
}
.legal-body ul { list-style: none; padding: 0; margin: 0 0 16px; }
.legal-body ul li {
  padding-left: 20px;
  position: relative;
}
.legal-body ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--purple-light);
}
.legal-body a { color: var(--purple); text-decoration: underline; }
.legal-body a:hover { color: var(--purple-light); }
.legal-infobox {
  background: var(--off-white);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 20px 0;
  border-left: 3px solid var(--purple-light);
}
.legal-infobox strong {
  display: block;
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 10px;
}
.legal-infobox p {
  font-size: 14px;
  color: var(--grey-600);
  line-height: 1.6;
  margin-bottom: 4px;
}
.legal-table {
  border: 1px solid var(--grey-200);
  border-radius: 10px;
  overflow: hidden;
  margin: 20px 0;
}
.legal-table-row {
  display: grid;
  grid-template-columns: 200px 1fr 160px;
  gap: 0;
  border-bottom: 1px solid var(--grey-200);
}
.legal-table-row:last-child { border-bottom: none; }
.legal-table-row span {
  padding: 12px 16px;
  font-size: 13px;
  color: var(--grey-600);
  line-height: 1.5;
  border-right: 1px solid var(--grey-200);
}
.legal-table-row span:last-child { border-right: none; }
.legal-table-head span {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  background: var(--off-white);
}
.legal-body code {
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
  background: var(--grey-100);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--purple);
}
@media (max-width: 600px) {
  .legal-table-row { grid-template-columns: 1fr; }
  .legal-table-row span { border-right: none; border-bottom: 1px solid var(--grey-200); }
  .legal-table-row span:last-child { border-bottom: none; }
}

/* ─── 16. Language toggle (visibility) ──────────────────────────────────── */
[data-lang="it"] [data-en] { display: none; }
[data-lang="en"] [data-it] { display: none; }

/* ─── 17. Responsive ────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .container { padding: 0 32px; }
  .section { padding: 72px 0; }

  .hero-inner { max-width: none; }
  .hero-subhead { max-width: none; }

  /* Product cards stack vertically; hide visuals at this breakpoint */
  .servizio-featured,
  .servizio-featured--rev { flex-direction: column; }
  .svf-visual { display: none; }
  .svf-content { flex: none; border-right: none; border-left: none; border-bottom: 1px solid rgba(131,77,251,0.12); }
  .consulenza-strip { flex-direction: column; align-items: flex-start; gap: 16px; }

  .problemi-row { grid-template-columns: 1fr; gap: 12px; }
  .problemi-arrow { display: none; }
  .problemi-problem p { font-size: 1rem; }
  .problemi-answer { padding-left: 0; }

  .progetto-card:only-child { flex-direction: column; max-width: 100%; }
  .progetto-card:only-child .progetto-logo-area { border-right: none; border-bottom: 1px solid rgba(131,77,251,0.07); width: auto; }
  .progetto-card:only-child .progetto-client-name { font-size: 1.5rem; }
  .progetti-cta-inner { flex-direction: column; align-items: flex-start; }

  .pv1-labels,
  .pv1-row { grid-template-columns: 1fr; }
  .pv1-label--solution { display: none; }
  .pv1-problem { padding: 28px 0 12px; }
  .pv1-solution { padding: 12px 0 28px; border-left: none; border-top: 1px solid rgba(131,77,251,0.10); align-items: flex-start; }

  .settori-grid { grid-template-columns: repeat(2, 1fr); }
  .settore-tile { min-height: 280px; }

  .contatti-grid { grid-template-columns: 1fr; gap: 48px; }
  .contatti-info > p { max-width: none; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  #hero { padding: 140px 0 72px; }

  .nav-links { display: none; }
  .lang-toggle { display: none; }
  .hamburger { display: flex; }
  .nav-cta-btn { display: none; }

  .servizi-secondary { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .settori-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 480px) {
  #header { width: calc(100% - 24px); top: 12px; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .settori-grid { grid-template-columns: 1fr; }
}

/* ─── 17b. 404 / Not Found ──────────────────────────────────────────────── */
.nf {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 150px 0 90px;
  background: radial-gradient(120% 80% at 50% 32%, #f2edff 0%, var(--white) 58%);
}
.nf-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

/* Clay scene — transparent-background illustration, no card/frame, blends straight into the page.
   Mobile: simplified crane scene. Desktop (picture source ≥681px): fuller construction site,
   404 kept dominant and central. Grounding comes from a drop-shadow on the alpha shape, not a card. */
.nf-scene {
  max-width: 300px;
  margin: 0 auto clamp(4px, 1.5vw, 16px);
}
.nf-scene img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 16px 20px rgba(24,16,43,0.20)) drop-shadow(0 4px 8px rgba(24,16,43,0.14));
}

@media (min-width: 681px) {
  .nf-scene {
    max-width: 760px;
    margin-left: calc(50% - 380px);
    margin-right: calc(50% - 380px);
  }
}

.nf-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  color: var(--navy);
  margin: 0 0 14px;
  text-wrap: balance;
}
.nf-subhead {
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.65;
  color: var(--grey-600);
  max-width: 46ch;
  margin: 0 auto 34px;
  text-wrap: pretty;
}
.nf-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

@media (max-width: 480px) {
  .nf { padding: 130px 0 70px; }
  .nf-scene { max-width: 260px; }
  .nf-ctas { flex-direction: column; align-items: stretch; }
  .nf-ctas .btn { width: 100%; justify-content: center; }
}

/* ─── 18. Reduced Motion ────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-inner { animation: none; opacity: 1; transform: none; }
  .hd-row { animation: none; opacity: 1; }
  .rv-bar { animation: none; opacity: 0.55; }
  .rv-live-dot { animation: none; box-shadow: 0 0 0 2px rgba(34,197,94,0.20); }
  .rv-text--typing::after { animation: none; }
  .will-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
