/* ═══════════════════════════════════════════════════
   OFFICINA DIGITALE — style.css
   Cyber Purple Team Theme
   ═══════════════════════════════════════════════════ */

/* ── CSS VARIABLES ── */
:root {
  /* ─────────────────────────────────────────────────
     SE VUOI IL VERDE, modifica qui:
     Sostituisci i valori --accent-* e --accent-glow
     con quelli commentati sotto.
     ───────────────────────────────────────────────── */

  --accent-primary:   #a855f7;      /* viola principale         */
  /* --accent-primary: #39ff14; */  

  --accent-light:     #c084fc;      /* viola chiaro             */
  /* --accent-light:  #7fff00; */   

  --accent-dark:      #7c3aed;      /* viola scuro              */
  /* --accent-dark:   #00cc10; */   

  --accent-glow:      rgba(168, 85, 247, 0.35);   /* glow viola */
  /* --accent-glow: rgba(57, 255, 20, 0.35); */   

  --accent-subtle:    rgba(168, 85, 247, 0.08);
  /* --accent-subtle: rgba(57, 255, 20, 0.08); */ 

  --red-team:  #ef4444;
  --blue-team: #3b82f6;

  --bg-base:    #050508;
  --bg-surface: #0a0a12;
  --bg-card:    #0d0d1a;
  --bg-card-h:  #12122a;

  --text-primary:   #f0eeff;
  --text-secondary: #9990bb;
  --text-muted:     #4d4a6d;

  --border:      rgba(168, 85, 247, 0.15);
  /* --border: rgba(57, 255, 20, 0.15); */ 

  --border-bright: rgba(168, 85, 247, 0.45);
  /* --border-bright: rgba(57, 255, 20, 0.45); */ 

  --font-mono:    'Share Tech Mono', monospace;
  --font-heading: 'Orbitron', monospace;
  --font-body:    'Rajdhani', sans-serif;

  --radius: 4px;
  --radius-lg: 8px;

  /* Opacità del video di sfondo — valori consigliati:
     0.10 = appena percettibile   |   0.20 = default tenue   |   0.35 = più visibile
     Non superare 0.40 con la Matrix attiva. */
  --video-bg-opacity: 0.45;
}

/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 17.5px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  overflow-x: hidden;
  cursor: none;
}

call-us-selector { cursor: auto; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection {
  background: var(--accent-primary);
  color: #fff;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--accent-dark); border-radius: 2px; }

/* ══════════════════════════════════════
   BACKGROUND
══════════════════════════════════════ */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ── Layer 1: il video vero e proprio ── */
.bg-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: var(--video-bg-opacity);
  /* Decommentare la riga seguente per ammorbidire ulteriormente il video: */
  /* filter: blur(2px); */
}

/* ── Layer 2: overlay scuro sul video (attivare insieme al video) ──
   Aumenta rgba(..., 0.55) per schiarire/scurire il risultato finale.
   0.40 = overlay leggero   |   0.55 = default   |   0.70 = molto scuro  */
.bg-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 8, 0.55);
  pointer-events: none;
}

#matrixCanvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0.18;
  /* se vuoi il verde, modifica qui — cambia opacity a 0.30 per verde più visibile */
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 70% at 50% 50%, transparent 30%, var(--bg-base) 100%);
}

/* ══════════════════════════════════════
   CUSTOM CURSOR
══════════════════════════════════════ */
.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.05s;
  box-shadow: 0 0 8px var(--accent-primary);
}

.cursor-ring {
  position: fixed;
  width: 32px; height: 32px;
  border: 1.5px solid var(--accent-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: transform 0.12s ease, width 0.2s, height 0.2s, opacity 0.2s;
  opacity: 0.6;
}

.cursor-ring.hover {
  width: 48px; height: 48px;
  opacity: 1;
  background: var(--accent-subtle);
}

/* ══════════════════════════════════════
   NAV
══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.4s, backdrop-filter 0.4s;
}

.nav.scrolled {
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 114px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.logo-bracket { color: var(--accent-primary); font-size: 1.2rem; }
.logo-text { font-weight: 700; font-size: 1.05rem; color: var(--text-primary); }
.logo-sub {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  display: none;
}

@media (min-width: 640px) { .logo-sub { display: inline; } }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

@media (max-width: 768px) { .nav-links { display: none; } }

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent-primary);
  transition: width 0.3s;
}

.nav-link:hover { color: var(--accent-light); }
.nav-link:hover::after { width: 100%; }

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--accent-primary);
  color: var(--accent-light);
  border-radius: var(--radius);
  transition: background 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  background: var(--accent-subtle);
  box-shadow: 0 0 16px var(--accent-glow);
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 4px;
}

.nav-burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--accent-primary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

@media (max-width: 768px) { .nav-burger { display: flex; } }

/* ── MOBILE OVERLAY MENU ── */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 98;
  background: #050508;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 8rem 2rem 2rem;
  gap: 0;
  counter-reset: menu-item;
  overflow: hidden;
}

/* griglia tecnica di sfondo */
.nav-mobile::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image:
    linear-gradient(rgba(168,85,247,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168,85,247,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: -1;
}

/* scanline overlay */
.nav-mobile::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0,0,0,0.18) 3px,
    rgba(0,0,0,0.18) 4px
  );
  pointer-events: none;
  z-index: -1;
}

.nav-mobile.open {
  display: flex;
  animation: mobileMenuIn 0.3s ease forwards;
}

@keyframes mobileMenuIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* navbar opaca quando overlay è aperto */
.nav:has(.nav-mobile.open) {
  background: rgba(5, 5, 8, 0.98);
  backdrop-filter: blur(20px);
}

/* ── pulsante chiudi overlay ── */
.nav-mobile-close {
  position: absolute;
  top: 5.5rem;
  right: 1.5rem;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(168,85,247,0.4);
  border-radius: 50%;
  background: rgba(168,85,247,0.08);
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.nav-mobile-close:hover,
.nav-mobile-close:active {
  border-color: var(--accent-primary);
  background: rgba(168,85,247,0.2);
  color: var(--accent-light);
  box-shadow: 0 0 14px rgba(168,85,247,0.35);
}

/* ── link voci ── */
.nav-mobile-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  padding: 0 0.5rem;
  min-height: 62px;
  border-bottom: 1px solid rgba(168,85,247,0.12);
  transition: color 0.2s ease, background 0.2s ease;
  counter-increment: menu-item;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}

/* numero stile terminale */
.nav-mobile-link::before {
  content: '0' counter(menu-item);
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  min-width: 2.2rem;
  flex-shrink: 0;
  padding-top: 2px;
}

/* freccia destra */
.nav-mobile-link::after {
  content: '›';
  margin-left: auto;
  font-size: 1rem;
  line-height: 1;
  color: var(--accent-primary);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-mobile-link:hover,
.nav-mobile-link:active {
  color: #fff;
  background: rgba(168,85,247,0.06);
}

.nav-mobile-link:hover::after,
.nav-mobile-link:active::after {
  opacity: 1;
  transform: translateX(0);
}

/* stagger: usa nth-of-type perché il pulsante X è il primo figlio */
.nav-mobile.open a.nav-mobile-link:nth-of-type(1) { animation: linkSlideIn 0.3s 0.07s both ease; }
.nav-mobile.open a.nav-mobile-link:nth-of-type(2) { animation: linkSlideIn 0.3s 0.13s both ease; }
.nav-mobile.open a.nav-mobile-link:nth-of-type(3) { animation: linkSlideIn 0.3s 0.19s both ease; }
.nav-mobile.open a.nav-mobile-link:nth-of-type(4) { animation: linkSlideIn 0.3s 0.25s both ease; }

@keyframes linkSlideIn {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* CTA Contattaci — last-of-type esclude il button close */
a.nav-mobile-link:last-of-type {
  margin-top: auto;
  min-height: 52px;
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius);
  justify-content: center;
  color: var(--accent-light);
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  background: rgba(168,85,247,0.04);
  box-shadow: 0 0 12px rgba(168,85,247,0.15), inset 0 0 12px rgba(168,85,247,0.04);
  text-shadow: 0 0 8px rgba(168,85,247,0.5);
  animation: ctaPulse 3s ease-in-out infinite !important;
}

@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(168,85,247,0.15), inset 0 0 10px rgba(168,85,247,0.04); }
  50%       { box-shadow: 0 0 22px rgba(168,85,247,0.40), inset 0 0 18px rgba(168,85,247,0.08); }
}

a.nav-mobile-link:last-of-type::before { display: none; }
a.nav-mobile-link:last-of-type::after  { display: none; }

a.nav-mobile-link:last-of-type:hover,
a.nav-mobile-link:last-of-type:active {
  background: rgba(168,85,247,0.14);
  box-shadow: 0 0 28px rgba(168,85,247,0.45), inset 0 0 20px rgba(168,85,247,0.1);
  color: #fff;
  border-color: var(--accent-light);
  animation: none !important;
}

/* ══════════════════════════════════════
   HERO
══════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 2rem 80px;
  max-width: 1300px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  min-width: 0;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--accent-primary);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.2s;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

.hero-title-line {
  display: block;
  overflow: hidden;
}

.reveal-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: revealWord 0.7s cubic-bezier(.16,1,.3,1) forwards;
}

.hero-title-line:nth-child(1) .reveal-word { animation-delay: 0.4s; }
.hero-title-line:nth-child(2) .reveal-word:nth-child(1) { animation-delay: 0.55s; }
.hero-title-line:nth-child(2) .reveal-word:nth-child(2) { animation-delay: 0.7s; }

.accent-purple {
  color: var(--accent-primary);
  text-shadow: 0 0 30px var(--accent-glow);
  /* se vuoi il verde, modifica qui — la variabile --accent-primary gestisce tutto */
}

.hero-motto {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 0.85s;
}

.hero-motto .motto-sep {
  color: var(--accent-primary);
  margin: 0 0.6em;
  text-shadow: 0 0 10px var(--accent-glow);
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1.05s;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1.25s;
}

/* BUTTONS */
.btn-primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  padding: 0.85rem 2rem;
  background: var(--accent-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: var(--radius);
  border: none;
  cursor: none;
  transition: transform 0.2s, box-shadow 0.3s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--accent-glow), 0 8px 24px rgba(0,0,0,0.4);
}

.btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  transition: opacity 0.3s;
}

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.btn-ghost:hover { color: var(--accent-light); }

/* HERO STATS */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 2rem;
  opacity: 0;
  animation: fadeUp 0.6s ease forwards 1.3s;
}

.stat { text-align: left; }

.stat-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-primary);
}

.stat-plus {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--accent-light);
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  text-transform: uppercase;
  margin-top: 0.1rem;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* HERO VISUAL */
.hero-visual {
  flex: 0 0 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 1.2s ease forwards 0.8s;
}

@media (max-width: 900px) { .hero-visual { display: none; } }

.shield-container {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-svg {
  width: 180px;
  height: 220px;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 0 20px var(--accent-glow));
}

.shield-path {
  stroke: var(--accent-primary);
  stroke-width: 2;
  fill: rgba(168, 85, 247, 0.04);
}

.shield-inner {
  stroke: var(--accent-light);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: 4 4;
  animation: dashAnim 12s linear infinite;
}

.shield-icon {
  fill: var(--accent-primary);
  opacity: 0.15;
  font-size: 52px;
}

.shield-dot {
  fill: var(--accent-primary);
  animation: pulse 2s ease infinite;
}

.shield-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--border-bright);
  animation: ringPulse 3s ease infinite;
}

.ring-1 { width: 220px; height: 220px; animation-delay: 0s; opacity: 0.3; }
.ring-2 { width: 260px; height: 260px; animation-delay: 1s; opacity: 0.2; }
.ring-3 { width: 300px; height: 300px; animation-delay: 2s; opacity: 0.1; }

.orbit-particle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary);
}

.p1 { animation: orbit 6s linear infinite; }
.p2 { animation: orbit 9s linear infinite reverse; animation-delay: -3s; }
.p3 { animation: orbit 14s linear infinite; animation-delay: -7s; }

/* SCROLL HINT */
.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  animation: fadeIn 1s ease forwards 2s;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent-primary), transparent);
  animation: scrollLine 2s ease infinite;
}

.scroll-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* ══════════════════════════════════════
   TICKER
══════════════════════════════════════ */
.ticker-wrap {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 1rem 0;
  background: rgba(168, 85, 247, 0.06);
  /* se vuoi il verde, modifica qui — cambia il rgba */
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 2rem;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
}

.ticker-dot {
  color: var(--accent-primary);
  font-size: 0.5rem;
}

/* ══════════════════════════════════════
   SECTION COMMON
══════════════════════════════════════ */
section {
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header.left { text-align: left; }

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  display: block;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  max-width: 600px;
  margin: 0 auto;
}

.section-header.left .section-desc { margin: 0; }

/* ══════════════════════════════════════
   SERVIZI
══════════════════════════════════════ */
.servizi {
  padding: 8rem 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: none;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-subtle), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.service-card:hover { background: var(--bg-card-h); }
.service-card:hover::before { opacity: 1; }

.service-card.featured {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), var(--bg-card));
}

.card-badge {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-icon {
  width: 44px; height: 44px;
  color: var(--accent-primary);
}

.card-icon svg { width: 100%; height: 100%; }

.card-num {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.card-body {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.card-tags span {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

.card-arrow {
  font-size: 1.1rem;
  color: var(--accent-primary);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.3s, transform 0.3s;
}

.service-card:hover .card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════
   STRATEGIA
══════════════════════════════════════ */
.strategia {
  padding: 8rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.03) 50%, transparent);
}

.strategia-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .strategia-inner { grid-template-columns: 1fr; gap: 3rem; }
}

.strategia-inner .section-header { grid-column: 1 / -1; }

/* PURPLE DIAGRAM */
.purple-diagram {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-ring {
  position: relative;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-center {
  position: relative;
  z-index: 3;
  width: 110px; height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6d28d9, #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.5);
  
}

.pd-center-label {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  text-align: center;
  line-height: 1.4;
}

.pd-segment {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-segment.red {
  top: 12px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(239,68,68,0.12), transparent);
  border: 1px solid rgba(239,68,68,0.2);
}

.pd-segment.blue {
  bottom: 12px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(59,130,246,0.12), transparent);
  border: 1px solid rgba(59,130,246,0.2);
}

.pd-seg-inner {
  text-align: center;
  padding: 1rem;
}

.pd-seg-icon { font-size: 1.3rem; display: block; margin-bottom: 0.3rem; }

.pd-seg-title {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  display: block;
  margin-bottom: 0.4rem;
}

.pd-segment.red .pd-seg-title { color: var(--red-team); }
.pd-segment.blue .pd-seg-title { color: var(--blue-team); }

.pd-seg-inner ul { display: none; }

/* TIMELINE */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tl-step {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-left: 2px solid var(--border);
  padding-left: 2rem;
  position: relative;
  transition: border-color 0.3s;
}

.tl-step:hover { border-color: var(--accent-primary); }
/* se vuoi il verde, modifica qui — border-color */

.tl-num {
  position: absolute;
  left: -1.1rem;
  top: 1.5rem;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1.5px solid var(--accent-primary);
  
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--accent-primary);
  
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.tl-step:hover .tl-num {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-glow);
}

.tl-content h4 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
}

.tl-content p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* ══════════════════════════════════════
   ABOUT
══════════════════════════════════════ */
.about {
  padding: 8rem 2rem;
}

.about-inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
}

/* TERMINAL */
.terminal {
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  background: rgba(5, 5, 8, 0.9);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.1), 0 20px 60px rgba(0,0,0,0.5);
  
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}

.tb-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}

.tb-dot.red    { background: #ff5f57; }
.tb-dot.yellow { background: #febc2e; }
.tb-dot.green  { background: #28c840; }

.tb-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-left: auto;
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 2;
  min-height: 280px;
}

.t-line { display: flex; }
.t-prompt { color: var(--accent-primary); margin-right: 0.5rem; }

.t-cmd { color: var(--text-secondary); }
.t-out { color: var(--text-primary); padding-left: 1rem; }
.t-success { color: #4ade80; }
.t-highlight { color: var(--accent-light); }


/* ABOUT CONTENT */
.about-content .section-tag { margin-bottom: 0.75rem; }

.about-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.about-text strong { color: var(--text-primary); }

.about-certifications {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.cert-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--accent-light);
  
  border: 1px solid var(--border-bright);
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  background: var(--accent-subtle);
  transition: box-shadow 0.2s;
}

.cert-badge:hover {
  box-shadow: 0 0 12px var(--accent-glow);
}

/* ══════════════════════════════════════
   CONTATTI
══════════════════════════════════════ */
/* ══════════════════════════════════════
   SUPPORTO
══════════════════════════════════════ */
.supporto {
  padding: 8rem 2rem;
  position: relative;
  z-index: 1;
}

.supporto-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.support-card {
  background: var(--bg-card);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  transition: background 0.3s;
}
.support-card:hover { background: var(--bg-card-h); }

.support-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-primary);
  text-transform: uppercase;
  margin: 0;
}

.support-card-content {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex: 1;
}

.support-card-visual {
  flex-shrink: 0;
  width: 110px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.75rem;
}

.support-tv-logo,
.support-card-logo {
  height: 44px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
}


.support-card-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.support-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.75rem 1.6rem;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s, color 0.2s;
  align-self: flex-start;
}
.support-btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  box-shadow: 0 0 22px var(--accent-glow);
  color: var(--accent-light);
}
.support-btn .btn-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.support-btn:hover .btn-glow { opacity: 1; }

/* ━━ SOS Card (full-width alert) ━━ */
.support-card--sos {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  background: rgba(220, 38, 38, 0.04);
  border-top: 1px solid rgba(220, 38, 38, 0.22);
}
.support-card--sos:hover { background: rgba(220, 38, 38, 0.09); }

.support-sos-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc2626;
  animation: sos-pulse 2.5s ease-in-out infinite;
}
.support-sos-icon svg { width: 24px; height: 24px; }

.support-sos-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.support-sos-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: #dc2626;
}
.support-card-title--sos { color: #f87171; }

.support-btn--sos {
  flex-shrink: 0;
  border-color: rgba(220, 38, 38, 0.45);
  color: #f87171;
}
.support-btn--sos:hover {
  border-color: #dc2626;
  box-shadow: 0 0 22px rgba(220, 38, 38, 0.40);
  color: #fff;
}
.support-btn--sos .btn-glow {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.14), transparent);
}

@media (max-width: 768px) {
  .supporto { padding: 5rem 1.5rem; }
  .support-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .supporto { padding: 4rem 1.25rem; }
  .support-card-content { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .support-card-visual { width: 80px; height: 56px; padding: 0.5rem; }
  .support-tv-logo, .support-card-logo { height: 34px; max-width: 70px; }
  .support-card--sos { flex-direction: column; align-items: flex-start; }
  .support-btn--sos { align-self: stretch; justify-content: center; }
}


.contatti {
  padding: 8rem 2rem;
  background: linear-gradient(180deg, transparent, rgba(168, 85, 247, 0.03) 50%, transparent);

}

.contatti-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
}

.contact-item {
  margin-bottom: 2rem;
}

.ci-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  
  margin-bottom: 0.4rem;
}

.ci-value {
  font-size: 1rem;
  color: var(--text-primary);
  font-family: var(--font-body);
}

.ci-live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #4ade80;
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse 1.5s ease infinite;
}

/* FORM */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-primary);
  
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-group select option {
  background: var(--bg-surface);
}

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

.form-submit {
  align-self: flex-start;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
  overflow: hidden;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  margin-bottom: 0.75rem;
}

.footer-logo-img {
  display: block;
  height: 160px;
  width: auto;
  margin: 0 auto 2rem;
  object-fit: contain;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.footer-logo-img:hover {
  opacity: 1;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent-light); }


.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.footer-scan {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  
  animation: scanLine 4s linear infinite;
}

/* ══════════════════════════════════════
   ANIMATIONS
══════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes revealWord {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.85); }
}

@keyframes ringPulse {
  0%        { transform: scale(1); opacity: 0.3; }
  50%       { transform: scale(1.03); opacity: 0.15; }
  100%      { transform: scale(1); opacity: 0.3; }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(140px) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(140px) rotate(-360deg); }
}

@keyframes dashAnim {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: -100; }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes scanLine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes shake {
  0%,100%{ transform: translateX(0); }
  20%    { transform: translateX(-6px); }
  40%    { transform: translateX(6px); }
  60%    { transform: translateX(-4px); }
  80%    { transform: translateX(4px); }
}

@keyframes terminalBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* GLITCH */
.glitch-text {
  position: relative;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  color: var(--accent-primary);
  
}

.glitch-text::before {
  animation: glitch1 4s infinite;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  transform: translate(-2px, 0);
  opacity: 0.7;
  color: var(--blue-team);
}

.glitch-text::after {
  animation: glitch2 4s infinite;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  transform: translate(2px, 0);
  opacity: 0.7;
  color: var(--red-team);
}

@keyframes glitch1 {
  0%,90%,100% { transform: translate(-2px, 0); opacity: 0; }
  92%          { transform: translate(-4px, 1px); opacity: 0.6; }
  94%          { transform: translate(0, 0); opacity: 0; }
  96%          { transform: translate(-3px, -1px); opacity: 0.6; }
  98%          { transform: translate(-2px, 0); opacity: 0; }
}

@keyframes glitch2 {
  0%,90%,100% { transform: translate(2px, 0); opacity: 0; }
  93%          { transform: translate(4px, -1px); opacity: 0.6; }
  95%          { transform: translate(0, 0); opacity: 0; }
  97%          { transform: translate(3px, 1px); opacity: 0.6; }
  99%          { transform: translate(2px, 0); opacity: 0; }
}

/* FADE-IN ON SCROLL */
.fade-in-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ══════════════════════════════════════
   CERTIFICAZIONI & PARTNER
══════════════════════════════════════ */
.partner-section {
  padding: 8rem 2rem;
}

/* divisore tra la sezione certificazioni e quella partner */
/* ── NIS2 Banner ── */
.nis2-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.75rem;
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-left: 3px solid rgba(59, 130, 246, 0.7);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.nis2-banner-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  color: #60a5fa;
}

.nis2-banner-content {
  flex: 1;
  min-width: 0;
}

.nis2-banner-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: #60a5fa;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.nis2-banner-text {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-primary);
}

.nis2-banner-text strong {
  color: #93c5fd;
  font-weight: 700;
}

.nis2-banner-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--radius);
  gap: 2px;
}

.nis2-badge-label {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.2em;
  color: rgba(147, 197, 253, 0.7);
  text-transform: uppercase;
}

.nis2-badge-value {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #60a5fa;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .nis2-banner { flex-wrap: wrap; gap: 1rem; }
  .nis2-banner-badge { width: 100%; flex-direction: row; justify-content: center; gap: 0.5rem; }
}

.inner-section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-primary) 50%, transparent 100%);
  opacity: 0.3;
  margin: 6rem 0;
}

/* logo immagine nella navbar */
.nav-logo-img {
  height: 90px;
  width: auto;
  display: block;
  animation: logoGlow 4s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* luce che orbita: posizione dell'ombra cambia ad ogni keyframe */
@keyframes logoGlow {
  0% {
    filter: drop-shadow(-3px -2px 6px rgba(168, 85, 247, 0.30))
            drop-shadow(0 0 4px rgba(168, 85, 247, 0.25));
  }
  25% {
    filter: drop-shadow(4px -3px 12px rgba(168, 85, 247, 0.60))
            drop-shadow(0 0 20px rgba(168, 85, 247, 0.18));
  }
  50% {
    filter: drop-shadow(0 0 16px rgba(168, 85, 247, 0.85))
            drop-shadow(0 0 34px rgba(168, 85, 247, 0.28));
  }
  75% {
    filter: drop-shadow(-4px 3px 12px rgba(168, 85, 247, 0.60))
            drop-shadow(0 0 20px rgba(168, 85, 247, 0.18));
  }
  100% {
    filter: drop-shadow(3px 2px 6px rgba(168, 85, 247, 0.30))
            drop-shadow(0 0 4px rgba(168, 85, 247, 0.25));
  }
}

/* hover: flash cyber con split cromatico orizzontale → glow sostenuto */
.nav-logo-img:hover {
  animation: logoHoverFlash 0.55s ease-out,
             logoGlow 4s ease-in-out 0.55s infinite;
  transform: scale(1.07);
}

@keyframes logoHoverFlash {
  0%  {
    filter: drop-shadow(0 0 6px rgba(168, 85, 247, 0.50));
  }
  18% {
    filter: drop-shadow( 4px 0 20px rgba(168, 85, 247, 1.00))
            drop-shadow(-4px 0 20px rgba(192, 132, 252, 0.85))
            brightness(1.55);
  }
  42% {
    filter: drop-shadow(0 0 30px rgba(168, 85, 247, 1.00))
            drop-shadow(0 0 56px rgba(168, 85, 247, 0.40))
            brightness(1.30);
  }
  70% {
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.88))
            drop-shadow(0 0 38px rgba(168, 85, 247, 0.28));
  }
  100% {
    filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.72))
            drop-shadow(0 0 26px rgba(168, 85, 247, 0.22));
  }
}

@media (max-width: 768px) {
  .nav-logo-img { height: 60px; }
}

@media (max-width: 768px) {
  call-us {
    right: auto !important;
    bottom: 24px !important;
    left: 24px !important;
  }
}

.nav-mobile-chat {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: var(--accent-light) !important;
}

.nav-mobile.open a.nav-mobile-link:nth-of-type(5) { animation: linkSlideIn 0.3s 0.31s both ease; }
.nav-mobile.open a.nav-mobile-link:nth-of-type(6) { animation: linkSlideIn 0.3s 0.37s both ease; }

.nav-mobile-sos {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: #f87171 !important;
  border-bottom-color: rgba(220, 38, 38, 0.20) !important;
}
.nav-mobile-sos::before {
  content: '!!' !important;
  color: #dc2626 !important;
  letter-spacing: 0.05em;
}
.nav-mobile-sos::after { color: #dc2626 !important; }
.nav-mobile-sos:hover,
.nav-mobile-sos:active {
  color: #fff !important;
  background: rgba(220, 38, 38, 0.08) !important;
}

/* iubenda floating preferences button */
#iubenda-cs-preferences-link,
.iubenda-tp-btn,
.iubenda-cs-preferences-link {
  background-color: #a855f7 !important;
  border-color: #7c3aed !important;
  box-shadow: 0 0 12px rgba(168,85,247,0.4) !important;
}


.partner-inner {
  max-width: 1300px;
  margin: 0 auto;
}

/* ── CERT CARDS ── */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 0;
}

.cert-card {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  transition: background 0.3s;
}

.cert-card:hover {
  background: var(--bg-card-h);
}

.cert-logo-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  background: var(--accent-subtle);
  overflow: hidden;
}

/* quando inserisci img o svg reale */
.cert-logo-wrap img,
.cert-logo-wrap svg {
  width: 70px;
  height: 70px;
  object-fit: contain;
  /* se vuoi il verde, modifica qui — filter per colorare SVG monocromatici */
  filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(240deg);
  /* ↑ tinge il logo in viola; rimuovi filter se il logo è già colorato */
}

.cert-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--accent-primary);
  
}

.cert-placeholder-icon {
  font-size: 2.5rem;
  opacity: 0.4;
}

.cert-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.cert-body {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.cert-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.cert-scope-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid var(--border);
  padding: 0.2rem 0.5rem;
  border-radius: 2px;
}

/* ── PARTNER GRID ── */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.partner-card {
  background: var(--bg-card);
  padding: 2.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
  transition: background 0.3s;
  cursor: default;
}

.partner-card:hover {
  background: var(--bg-card-h);
}

.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* SVG o IMG reali — dimensioni e filtro tono viola */
.partner-logo img,
.partner-logo svg {
  max-width: 155px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.55;
  transition: opacity 0.3s, filter 0.3s;
  /* se vuoi il verde, modifica qui — cambia hue-rotate(240deg) con hue-rotate(100deg) */
  filter: brightness(0) invert(1) sepia(1) saturate(2) hue-rotate(240deg) opacity(0.55);
  /* ↑ usa questo filter per loghi monocromatici tinti in viola
     oppure rimuovi filter se vuoi i loghi a colori originali */
}

.partner-card:hover .partner-logo img,
.partner-card:hover .partner-logo svg {
  opacity: 1;
  filter: none; /* a colori originali su hover */
}

/* placeholder testuale (da rimuovere quando inserisci i loghi) */
.partner-svg-placeholder {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-align: center;
  transition: color 0.3s;
  text-transform: uppercase;
}

.partner-card:hover .partner-svg-placeholder {
  color: var(--accent-light);
  
}

/* card "+more" */
.partner-card--more {
  background: var(--accent-subtle);
  border: 1px solid var(--border-bright);
}

.partner-more-label {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  
}

/* ── RESPONSIVE cert & partner ── */
@media (max-width: 900px) {
  .cert-grid { grid-template-columns: 1fr; }
  .partners-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .cert-card { flex-direction: column; gap: 1.25rem; }
  .cert-logo-wrap { width: 70px; height: 70px; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
  .partner-card { min-height: 110px; padding: 1.5rem 1.25rem; }
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-inner { padding: 0 1.25rem; height: 80px; }
  .hero { padding: 116px 1.5rem 60px; }
  .servizi, .strategia, .about, .supporto, .contatti { padding: 5rem 1.5rem; }
  .services-grid { grid-template-columns: 1fr; }
  .strategia-inner, .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .hero {
    padding: 100px 1.25rem 60px;
    flex-direction: column;
    min-height: auto;
  }
  .hero-title { font-size: 2.4rem; }
  .hero-motto { font-size: 0.75rem; letter-spacing: 0.2em; }
  .hero-desc { font-size: 0.95rem; }
  .hero-stats {
    gap: 1rem;
    flex-wrap: wrap;
  }
  .stat-num { font-size: 1.5rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .btn-primary { width: 100%; justify-content: center; }

  .servizi, .strategia, .about, .supporto, .contatti { padding: 4rem 1.25rem; }
  .services-grid { grid-template-columns: 1fr; }

  .strategia-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .pd-ring { width: 240px; height: 240px; }
  .pd-segment { width: 100px; height: 100px; }
  .pd-center { width: 80px; height: 80px; }
  .pd-center-label { font-size: 0.55rem; }

  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .terminal { font-size: 0.7rem; }
  .terminal-body { padding: 1rem; min-height: 200px; }

  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .form-row { grid-template-columns: 1fr; }

  .hero-stats .stat-divider { display: none; }
  .section-title { font-size: 1.8rem; }

  .footer { padding: 3rem 1.25rem 1.5rem; }
  .footer-links { gap: 1rem; }
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
  body { cursor: auto; }
  a, button, input, select, textarea { cursor: pointer; }
}

/* ── SOS EMERGENCY BUTTON ── */
.sos-btn {
  position: fixed;
  bottom: 88px;
  right: 0;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #dc2626;
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: sos-pulse 2.5s ease-in-out infinite;
}

@keyframes sos-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(220, 38, 38, 0.5); }
  50%       { box-shadow: 0 0 24px rgba(220, 38, 38, 0.85); }
}

.sos-btn:hover {
  transform: scale(1.12);
  animation: none;
  box-shadow: 0 0 28px rgba(220, 38, 38, 0.95);
}

.sos-label {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1;
  pointer-events: none;
}

.sos-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 10, 10, 0.94);
  color: #f0f0f0;
  font-size: 12px;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.sos-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(10, 10, 10, 0.94);
}

.sos-btn:hover .sos-tooltip {
  opacity: 1;
}

/* vecchio pulsante rotondo non più usato */
.sos-btn { display: none !important; }

/* ── SOS DRAWER TAB (desktop + mobile) ── */
@keyframes sos-tab-pulse {
  0%, 100% {
    background: rgba(220, 38, 38, 0.12);
    box-shadow: -3px 0 14px rgba(220, 38, 38, 0.30);
  }
  50% {
    background: rgba(220, 38, 38, 0.48);
    box-shadow: -5px 0 22px rgba(220, 38, 38, 0.42);
  }
}

.sos-tab {
  display: flex;
  align-items: center;
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 1001;
  width: 140px;
  height: 46px;
  border-radius: 23px 0 0 23px;
  transform: translateY(-50%) translateX(104px);
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  animation: sos-tab-pulse 10s ease-in-out infinite;
  backdrop-filter: blur(6px);
  -webkit-tap-highlight-color: transparent;
  will-change: transform;
  cursor: pointer;
}

.sos-tab.open {
  transform: translateY(-50%) translateX(0);
  animation: none;
  background: rgba(220, 38, 38, 0.96);
  box-shadow: -6px 0 32px rgba(220, 38, 38, 0.6);
}

.sos-tab-handle {
  width: 36px;
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  padding-left: 6px;
}

.sos-tab-ch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 10px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  flex-shrink: 0;
  transition: opacity 0.2s ease;
  line-height: 1;
  user-select: none;
}
.sos-tab-ch.letter {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.95);
}

.sos-tab.open .sos-tab-handle { display: none; }

.sos-tab-label {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity 0.28s ease 0.18s, transform 0.28s ease 0.18s;
  pointer-events: none;
}

.sos-tab.open .sos-tab-label {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.sos-tab-label strong {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
}

.sos-tab-label > span {
  color: rgba(255, 255, 255, 0.80);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sos-tab-tooltip {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 220px;
  background: rgba(10, 10, 10, 0.94);
  border: 1px solid rgba(220, 38, 38, 0.4);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: none;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  white-space: normal;
  text-align: left;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55);
  z-index: 10;
}
.sos-tab-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 18px;
  width: 10px;
  height: 10px;
  background: rgba(10, 10, 10, 0.94);
  border-right: 1px solid rgba(220, 38, 38, 0.4);
  border-bottom: 1px solid rgba(220, 38, 38, 0.4);
  transform: rotate(45deg);
}
.sos-tab-tooltip-q {
  font-style: italic;
  color: #f87171;
}
.sos-tab.open .sos-tab-label:hover .sos-tab-tooltip {
  opacity: 1;
  transform: translateY(0);
}
@media (pointer: coarse) {
  .sos-tab-tooltip { display: none; }
}

@media (min-width: 769px) {
  @keyframes sos-tab-pulse-desktop {
    0%, 100% {
      background: rgba(220, 38, 38, 0.14);
      box-shadow: -3px 0 18px rgba(220, 38, 38, 0.35);
    }
    50% {
      background: rgba(220, 38, 38, 0.82);
      box-shadow: -8px 0 36px rgba(220, 38, 38, 0.68);
    }
  }

  .sos-tab {
    width: 180px;
    height: 66px;
    border-radius: 33px 0 0 33px;
    transform: translateY(-50%) translateX(114px);
    animation: sos-tab-pulse-desktop 2.4s ease-in-out infinite;
  }

  .sos-tab.open {
    transform: translateY(-50%) translateX(0);
  }

  .sos-tab-handle {
    width: 44px;
    gap: 4px;
    padding-left: 8px;
  }

  .sos-tab-ch {
    width: 13px;
    font-size: 18px;
  }

  .sos-tab-ch.letter {
    font-size: 13px;
  }
}


/* ══════════════════════════════════════
   COOKIE CONSENT BANNER
══════════════════════════════════════ */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  padding: 0 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.cookie-consent.visible {
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-consent-inner {
  max-width: 1300px;
  margin: 0 auto;
  background: rgba(10, 10, 18, 0.97);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-bottom: none;
  border-radius: 12px 12px 0 0;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  backdrop-filter: blur(16px);
  box-shadow: 0 -4px 40px rgba(168, 85, 247, 0.12);
}

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

.cookie-consent-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  color: var(--accent-primary);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.cookie-consent-text {
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.cookie-consent-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.cookie-consent-link {
  color: var(--accent-light);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
  cursor: auto;
}

.cookie-consent-link:hover {
  color: #fff;
}

.cookie-consent-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid;
  cursor: auto;
  transition: background 0.2s, box-shadow 0.2s, color 0.2s;
  white-space: nowrap;
}

.cookie-btn--accept {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}

.cookie-btn--accept:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  box-shadow: 0 0 16px var(--accent-glow);
}

.cookie-btn--reject {
  background: transparent;
  border-color: rgba(168, 85, 247, 0.25);
  color: var(--text-secondary);
}

.cookie-btn--reject:hover {
  border-color: rgba(168, 85, 247, 0.5);
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .cookie-consent-actions {
    flex-direction: row;
    justify-content: flex-end;
  }
}


/* ══════════════════════════════════════
   ACCESSIBILITÀ
══════════════════════════════════════ */

/* 1. Skip link — invisibile finché non si preme Tab */
.skip-link {
  position: fixed;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  padding: 0.7rem 1.6rem;
  background: var(--accent-primary);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.5);
  transition: top 0.18s ease;
  cursor: auto;
  white-space: nowrap;
}
.skip-link:focus {
  top: 0;
  outline: none;
}

/* 2. Focus visibile da tastiera — solo :focus-visible, mai su click/touch */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 2px;
}
/* Elementi con forma propria: outline segue il bordo */
button:focus-visible,
.nav-burger:focus-visible {
  border-radius: var(--radius);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 0;
  border-radius: var(--radius);
}
/* Rimuove outline ridondante dove già c'è un bordo di focus custom */
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
.nav-cta:focus-visible {
  outline-offset: 4px;
}

/* 3. prefers-reduced-motion — attivo solo se l'utente lo richiede dal SO */
@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;
  }
  /* Mantieni le transizioni minime per usabilità (focus, hover) */
  :focus-visible {
    transition: none;
  }
}