/* =================================================================
   AionPremAI — style.css
   Dark premium, industrial AI. Dependency-free, system fonts only.
   Sezioni:
     1.  Design tokens (:root)
     2.  Reset / normalize minimale
     3.  Tipografia
     4.  Layout: .container, .section, .grid
     5.  Componenti: .btn, .glass, .chip, .dot
     6.  Reveal / animazioni base
     7.  Header / nav sticky + mobile
     8.  Hero (grid tech + orb animati)
     9.  Cos'è (.cap-card)
    10.  Progetto AION (.feature, .archflow)
    11.  Stack (.module-card)
    12.  Per chi è (.persona-card)
    13.  Demo: .configurator / .profile-btn
    14.  Demo: .dashboard / .dash-card / barre
    15.  Demo: .terminal / .term-tabs
    16.  Roadmap (.timeline)
    17.  Proof (.proof-claim / .proof-card)
    18.  CTA finale + form (#contatti)
    19.  Footer
    20.  Accessibilità / focus / reduced-motion
    21.  Responsive (breakpoint)
   ================================================================= */

/* =================================================================
   1. DESIGN TOKENS
   ================================================================= */
:root {
  /* Palette */
  --c-bg: #05060c;
  --c-bg-2: #090d1a;
  --c-bg-3: #0d1326;
  --c-surface: rgba(18, 24, 44, 0.55);
  --c-surface-solid: #11172b;
  --c-border: rgba(120, 140, 200, 0.16);
  --c-border-strong: rgba(120, 160, 220, 0.32);
  --c-cyan: #25e6ff;
  --c-cyan-2: #00b4d8;
  --c-violet: #8b6cff;
  --c-violet-2: #6d4bff;
  --c-white: #f4f2ec;
  --c-text: #e7e9f0;
  --c-muted: #9aa4ba;
  --c-faint: #6b7488;             /* solo elementi non testuali (dot inattivo) */
  --c-faint-text: #828ca6;        /* testo piccolo: >=4.5:1 AA su bg scuri */
  --c-green: #38e08a;
  --c-amber: #ffc24b;

  /* Gradiente accento + glow */
  --grad-accent: linear-gradient(120deg, #25e6ff, #8b6cff);
  --glow-cyan: 0 0 40px rgba(37, 230, 255, .25);

  /* Tipografia */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* Raggi */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 24px;

  /* Ombre */
  --shadow-card: 0 18px 50px -20px rgba(0, 0, 0, .7);

  /* Header */
  --header-h: 72px;
}

/* =================================================================
   2. RESET / NORMALIZE MINIMALE
   ================================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background-color: var(--c-bg);
  background-image:
    radial-gradient(1200px 700px at 80% -10%, rgba(139, 108, 255, .12), transparent 60%),
    radial-gradient(1000px 600px at 0% 10%, rgba(37, 230, 255, .10), transparent 55%);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

input,
select,
textarea {
  font: inherit;
  color: inherit;
}

code,
pre {
  font-family: var(--font-mono);
}

.mono {
  font-family: var(--font-mono);
}

/* =================================================================
   3. TIPOGRAFIA
   ================================================================= */
h1,
h2,
h3 {
  margin: 0;
  line-height: 1.12;
  color: var(--c-white);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.2rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

small,
.small {
  font-size: .85rem;
}

.grad-text {
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  max-width: 70ch;
  font-size: 1.12rem;
  color: var(--c-muted);
  margin-bottom: 2.4rem;
}

.note {
  margin-top: 1.6rem;
  font-size: .9rem;
  color: var(--c-faint-text);
  border-left: 2px solid var(--c-border-strong);
  padding-left: .9rem;
}

/* =================================================================
   4. LAYOUT: .container / .section / .grid
   ================================================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section {
  padding-block: clamp(4rem, 9vw, 7rem);
  scroll-margin-top: calc(var(--header-h) + 12px);
  position: relative;
}

.section-head {
  max-width: 60ch;
  margin-bottom: 2.6rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: var(--glow-cyan);
}

.section-title {
  margin-bottom: .8rem;
}

.section-sub {
  font-size: 1.08rem;
  color: var(--c-muted);
  margin: 0;
}

/* Griglie */
.grid {
  display: grid;
  gap: 1.2rem;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--auto {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* =================================================================
   5. COMPONENTI: .btn / .glass / .chip / .dot
   ================================================================= */

/* Bottoni */
.btn {
  --btn-pad-y: .7rem;
  --btn-pad-x: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--r-md);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease, color .2s ease;
  will-change: transform;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: var(--grad-accent);
  color: #04121b;
  box-shadow: 0 10px 30px -10px rgba(37, 230, 255, .55);
}

.btn--primary:hover {
  box-shadow: 0 16px 40px -12px rgba(37, 230, 255, .7);
}

.btn--ghost {
  background: transparent;
  border-color: var(--c-border-strong);
  color: var(--c-text);
}

.btn--ghost:hover {
  border-color: var(--c-cyan);
  color: var(--c-white);
  box-shadow: var(--glow-cyan);
}

.btn--soft {
  background: rgba(139, 108, 255, .14);
  border-color: rgba(139, 108, 255, .3);
  color: var(--c-white);
}

.btn--soft:hover {
  background: rgba(139, 108, 255, .22);
  border-color: var(--c-violet);
}

.btn--lg {
  --btn-pad-y: .95rem;
  --btn-pad-x: 1.7rem;
  font-size: 1.02rem;
}

.btn--sm {
  --btn-pad-y: .55rem;
  --btn-pad-x: 1rem;
  font-size: .88rem;
  border-radius: var(--r-sm);
}

/* Glass card */
.glass {
  background: var(--c-surface);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}

/* Chip / badge */
.chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-text);
  background: rgba(37, 230, 255, .08);
  border: 1px solid var(--c-border-strong);
  white-space: nowrap;
}

.chip--mini {
  padding: .2rem .6rem;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--c-cyan);
}

/* -----------------------------------------------------------------
   Hero eyebrow-chip responsive — fix overflow chip lunga (2026-06-08)
   Scope STRETTO: solo la .chip dentro .hero-copy (eyebrow dell'hero).
   Le .chip--mini (in .hero-panel), gli SKU e i badge .chip restano
   pill nowrap invariati. Causa: .chip base ha white-space:nowrap, quindi
   il testo lungo dell'eyebrow non andava a capo e sforava in orizzontale. */
.hero-copy .chip {
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  line-height: 1.35;
  text-wrap: balance;
  text-align: left;
}

@media (max-width: 640px) {
  .hero-copy .chip {
    display: flex;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    padding-inline: clamp(.75rem, 4vw, 1rem);
    font-size: clamp(.72rem, 3.2vw, .86rem);
    line-height: 1.45;
  }
}

@media (max-width: 390px) {
  .hero-copy .chip {
    font-size: .72rem;
    letter-spacing: .01em;
  }
}

/* AION-H1-MOBILE-FIX-20260608
   Riduzione progressiva del font dell'H1 hero su mobile: margine extra,
   leggibilità, nessuna rottura della parola-brand (word-break:normal,
   overflow-wrap:normal, hyphens:manual). Scope hero. Verifica live: il CSS
   pubblicato deve contenere questo marker (grep) e nessun document overflow. */
.hero h1,
.hero-copy h1 {
  max-width: 100%;
  min-width: 0;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: manual;
}

@media (max-width: 480px) {
  .hero h1,
  .hero-copy h1 {
    font-size: clamp(1.9rem, 8.8vw, 2.45rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
  }
}

@media (max-width: 390px) {
  .hero h1,
  .hero-copy h1 {
    font-size: clamp(1.72rem, 8.2vw, 2.08rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
  }
}

@media (max-width: 340px) {
  .hero h1,
  .hero-copy h1 {
    font-size: clamp(1.58rem, 7.8vw, 1.86rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
  }
}

/* Status dot */
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-faint);
  flex: 0 0 auto;
}

.dot--ok {
  background: var(--c-green);
  box-shadow: 0 0 10px rgba(56, 224, 138, .6);
}

.dot--warn {
  background: var(--c-amber);
  box-shadow: 0 0 10px rgba(255, 194, 75, .6);
}

/* =================================================================
   6. REVEAL / ANIMAZIONI BASE
   ================================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}

/* Safety net no-JS: senza scripting il reveal non scatterebbe mai e il
   contenuto resterebbe invisibile. Forziamo lo stato visibile. */
@media (scripting: none) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal-delay="1"] { transition-delay: .08s; }
[data-reveal-delay="2"] { transition-delay: .16s; }
[data-reveal-delay="3"] { transition-delay: .24s; }
[data-reveal-delay="4"] { transition-delay: .32s; }
[data-reveal-delay="5"] { transition-delay: .40s; }
[data-reveal-delay="6"] { transition-delay: .48s; }

/* =================================================================
   7. HEADER / NAV STICKY + MOBILE
   ================================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(5, 6, 12, .55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.site-header.is-scrolled {
  background: rgba(5, 6, 12, .88);
  border-bottom-color: var(--c-border);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .8);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
}

.brand-logo {
  flex: 0 0 auto;
  filter: drop-shadow(0 0 8px rgba(37, 230, 255, .25));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--c-white);
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: .68rem;
  color: var(--c-faint-text);
  letter-spacing: .04em;
}

/* Menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.nav-link {
  position: relative;
  padding: .5rem .7rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--c-muted);
  border-radius: var(--r-sm);
  transition: color .2s ease, background .2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: .7rem;
  right: .7rem;
  bottom: .25rem;
  height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.nav-link:hover {
  color: var(--c-white);
}

.nav-link.is-active {
  color: var(--c-white);
}

.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-cta {
  margin-left: .4rem;
}

.nav-cta-mobile {
  display: none;
}

/* Toggle mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform .3s ease, opacity .25s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =================================================================
   8. HERO
   ================================================================= */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3.5rem, 8vw, 6rem);
  scroll-margin-top: var(--header-h);
  overflow: hidden;
}

/* Grid tech animata */
.hero-grid {
  position: absolute;
  inset: -10% -10% auto -10%;
  height: 130%;
  background-image:
    linear-gradient(rgba(120, 160, 220, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 160, 220, .08) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 25%, #000 0%, transparent 75%);
  mask-image: radial-gradient(80% 60% at 50% 25%, #000 0%, transparent 75%);
  animation: gridDrift 26s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes gridDrift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 54px 54px, 54px 54px; }
}

/* Orb / mesh animati */
.hero-orb {
  position: absolute;
  top: -12%;
  right: -6%;
  width: 48vw;
  max-width: 620px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(37, 230, 255, .55), rgba(37, 230, 255, 0) 62%);
  filter: blur(28px);
  opacity: .55;
  z-index: 0;
  pointer-events: none;
  animation: orbFloat 16s ease-in-out infinite;
}

.hero-orb--2 {
  top: auto;
  right: auto;
  bottom: -18%;
  left: -8%;
  width: 42vw;
  max-width: 520px;
  background: radial-gradient(circle at 60% 40%, rgba(139, 108, 255, .5), rgba(139, 108, 255, 0) 62%);
  opacity: .5;
  animation: orbFloat2 20s ease-in-out infinite;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-3%, 4%) scale(1.08); }
}

@keyframes orbFloat2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(4%, -3%) scale(1.1); }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  width: 100%;
}

.hero-copy {
  max-width: 40ch;
  min-width: 0;
}

.hero h1 {
  margin: 1.2rem 0 1.1rem;
}

.hero-sub {
  font-size: 1.18rem;
  color: var(--c-muted);
  margin-bottom: 1.2rem;
}

.hero-claim {
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--c-white);
  border-left: 3px solid;
  border-image: var(--grad-accent) 1;
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  margin-bottom: 2.6rem;
}

/* Strip mini-stat */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.4rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding-left: .9rem;
  border-left: 2px solid var(--c-border-strong);
}

.stat-num {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-cyan);
}

.stat-label {
  font-size: .85rem;
  color: var(--c-muted);
  line-height: 1.4;
}

/* Pannello console */
.hero-panel {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.hero-panel-head {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.hero-panel-title {
  font-weight: 600;
  color: var(--c-white);
  margin-right: auto;
}

.hero-panel-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.hero-panel-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .92rem;
  color: var(--c-text);
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--c-border);
}

.hero-panel-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.hero-panel-list em {
  margin-left: auto;
  font-style: normal;
  font-size: .8rem;
  color: var(--c-green);
}

.hero-panel-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  padding-top: .8rem;
  border-top: 1px solid var(--c-border);
}

.hero-panel-foot .mono {
  font-size: .82rem;
  color: var(--c-cyan);
  word-break: break-all;
}

/* =================================================================
   9. COS'È — capability card
   ================================================================= */
.cap-grid {
  margin-top: 1.5rem;
}

.cap-card {
  padding: 1.4rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.cap-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

.cap-icon,
.feature-icon,
.persona-icon,
.proof-icon {
  width: 30px;
  height: 30px;
  margin-bottom: .9rem;
  stroke: var(--c-cyan);
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cap-card h3 {
  font-size: 1.08rem;
  margin-bottom: .4rem;
}

.cap-card p {
  margin: 0;
  font-size: .92rem;
  color: var(--c-muted);
}

/* =================================================================
   10. PROGETTO AION — feature + archflow
   ================================================================= */
.feature-grid {
  margin-top: 1.5rem;
}

.feature {
  padding: 1.5rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

.feature h3 {
  font-size: 1.1rem;
  margin-bottom: .4rem;
}

.feature p {
  margin: 0;
  font-size: .94rem;
  color: var(--c-muted);
}

/* Diagramma architetturale */
.archflow {
  margin-top: 3rem;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: .6rem;
  flex-wrap: nowrap;
  /* #diagramma è ancorabile via URL: non finire sotto la nav sticky */
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.arch-node {
  flex: 1 1 0;
  min-width: 0;
  padding: 1.3rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  text-align: left;
  transition: transform .25s ease, border-color .25s ease;
}

.arch-node:hover {
  transform: translateY(-4px);
  border-color: var(--c-border-strong);
}

.arch-node-title {
  font-weight: 700;
  color: var(--c-white);
  font-size: 1.02rem;
}

.arch-node-line {
  font-size: .86rem;
  color: var(--c-muted);
}

.arch-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--c-cyan);
}

/* =================================================================
   11. STACK — module card
   ================================================================= */
.module-grid {
  margin-top: 1.5rem;
}

.module-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

.module-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
}

.module-index {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.module-name {
  font-size: 1.12rem;
  margin-right: auto;
}

.module-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.module-list li {
  position: relative;
  padding-left: 1.2rem;
  font-size: .92rem;
  color: var(--c-muted);
}

.module-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-cyan);
  opacity: .8;
}

/* =================================================================
   12. PER CHI È — persona card
   ================================================================= */
.persona-grid {
  margin-top: 1.5rem;
}

.persona-card {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.persona-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

.persona-card h3 {
  font-size: 1.08rem;
  margin-bottom: .3rem;
}

.persona-card p {
  margin: 0;
  font-size: .92rem;
  color: var(--c-muted);
}

.persona-card strong {
  color: var(--c-text);
  font-weight: 600;
}

.persona-value strong {
  color: var(--c-cyan);
}

/* =================================================================
   13. DEMO — configuratore
   ================================================================= */
.configurator {
  padding: clamp(1.5rem, 4vw, 2.4rem);
  margin-top: 1.5rem;
}

.configurator-title {
  font-size: 1.4rem;
  margin-bottom: 1.4rem;
}

.profile-picker {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 1.8rem;
}

.profile-btn {
  padding: .6rem 1.05rem;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-muted);
  background: rgba(18, 24, 44, .5);
  border: 1px solid var(--c-border);
  transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .15s ease;
}

.profile-btn:hover {
  color: var(--c-white);
  border-color: var(--c-border-strong);
}

.profile-btn.is-active,
.profile-btn[aria-selected="true"] {
  color: #04121b;
  background: var(--grad-accent);
  border-color: transparent;
  box-shadow: 0 8px 24px -10px rgba(37, 230, 255, .55);
}

.config-output {
  display: grid;
  gap: 1.1rem;
}

.config-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 1rem;
  align-items: start;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--c-border);
}

.config-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.config-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-faint-text);
  padding-top: .15rem;
}

.config-aion {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-white);
}

.config-sku {
  font-size: 1rem;
  color: var(--c-cyan);
}

.config-need {
  color: var(--c-text);
}

.config-stack {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

/* =================================================================
   14. DEMO — dashboard
   ================================================================= */
.dashboard {
  padding: clamp(1.5rem, 4vw, 2.2rem);
  margin-top: 1.6rem;
}

.dash-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--c-border);
}

.dash-title {
  font-size: 1.15rem;
  margin-right: auto;
}

.dash-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.dash-card {
  background: rgba(9, 13, 26, .6);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

.dash-card-head {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.dash-card-title {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--c-faint-text);
  margin-right: auto;
}

/* Barra util */
.dash-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(120, 140, 200, .14);
  overflow: hidden;
}

.dash-bar-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--grad-accent);
  box-shadow: var(--glow-cyan);
  transition: width 1.2s cubic-bezier(.2, .7, .2, 1);
}

.dash-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1.1rem;
  font-size: .85rem;
  color: var(--c-muted);
}

.dash-metrics strong {
  color: var(--c-white);
  font-weight: 700;
}

.dash-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  font-size: .88rem;
  color: var(--c-text);
}

.dash-list.mono {
  font-size: .82rem;
  color: var(--c-cyan);
}

.dash-list--svc li {
  display: flex;
  align-items: center;
  gap: .55rem;
}

.dash-endpoint {
  font-size: .82rem;
  color: var(--c-cyan);
  word-break: break-all;
}

.dash-line {
  margin: 0;
  font-size: .88rem;
  color: var(--c-muted);
}

/* =================================================================
   15. DEMO — terminale
   ================================================================= */
.terminal {
  margin-top: 1.6rem;
  overflow: hidden;
  padding: 0;
}

.term-bar {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1.1rem;
  background: rgba(9, 13, 26, .8);
  border-bottom: 1px solid var(--c-border);
}

.term-dots {
  display: inline-flex;
  gap: .4rem;
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--c-faint);
}

.term-dot:nth-child(1) { background: #ff5f57; }
.term-dot:nth-child(2) { background: #febc2e; }
.term-dot:nth-child(3) { background: #28c840; }

.term-title {
  font-size: .82rem;
  color: var(--c-muted);
}

.term-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--c-border);
}

.term-tab {
  padding: .42rem .8rem;
  border-radius: var(--r-sm);
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-muted);
  border: 1px solid var(--c-border);
  background: rgba(18, 24, 44, .4);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.term-tab:hover {
  color: var(--c-white);
  border-color: var(--c-border-strong);
}

.term-tab.is-active,
.term-tab[aria-selected="true"] {
  color: var(--c-cyan);
  border-color: var(--c-cyan);
  background: rgba(37, 230, 255, .1);
}

.term-screen {
  margin: 0;
  padding: 1.4rem 1.3rem;
  min-height: 180px;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--c-green);
  white-space: pre-wrap;
  word-break: break-word;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(37, 230, 255, .05), transparent 60%),
    rgba(5, 6, 12, .55);
}

.term-screen code {
  display: block;
  font-family: var(--font-mono);
  color: inherit;
}

/* Cursore (utilizzabile dal JS typewriter) */
.term-screen .term-cursor {
  display: inline-block;
  width: .55em;
  height: 1.1em;
  vertical-align: -0.18em;
  background: var(--c-cyan);
  margin-left: 2px;
  animation: termBlink 1s steps(1) infinite;
}

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

/* =================================================================
   16. ROADMAP — timeline
   ================================================================= */
.timeline {
  position: relative;
  margin-top: 2rem;
  padding-left: 1.6rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--c-cyan), var(--c-violet));
  opacity: .5;
}

.tl-item {
  position: relative;
  margin-bottom: 1.6rem;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1.6rem + 0px);
  top: 1.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 2px solid var(--c-cyan);
  box-shadow: var(--glow-cyan);
  transform: translateX(-5px);
}

.tl-content {
  padding: 1.4rem 1.5rem;
}

.tl-range {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-cyan);
  margin-bottom: .4rem;
}

.tl-title {
  font-size: 1.15rem;
  margin-bottom: .7rem;
}

.tl-content ul {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem .6rem;
}

.tl-content li {
  font-size: .86rem;
  color: var(--c-muted);
  padding: .25rem .65rem;
  border-radius: 999px;
  background: rgba(18, 24, 44, .5);
  border: 1px solid var(--c-border);
}

/* =================================================================
   17. PROOF
   ================================================================= */
.proof-claim {
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--c-white);
  max-width: 24ch;
  margin: 0 0 2.4rem;
}

.proof-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.proof-card {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1.1rem 1.2rem;
  font-weight: 600;
  color: var(--c-text);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.proof-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

.proof-card .proof-icon {
  margin: 0;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
}

/* =================================================================
   18. CTA FINALE + FORM
   ================================================================= */
.section--cta {
  position: relative;
  overflow: hidden;
}

.section--cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 80% at 80% 0%, rgba(139, 108, 255, .2), transparent 60%),
    radial-gradient(60% 80% at 10% 100%, rgba(37, 230, 255, .16), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.section--cta > .container {
  position: relative;
  z-index: 1;
}

.cta-head {
  max-width: 60ch;
  margin-bottom: 2.6rem;
}

.cta-title {
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  margin-bottom: .9rem;
}

.cta-sub {
  font-size: 1.12rem;
  color: var(--c-muted);
  margin-bottom: 1.8rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

/* Form */
.demo-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
  padding: clamp(1.5rem, 4vw, 2.4rem);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--c-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: .8rem .9rem;
  border-radius: var(--r-sm);
  background: rgba(5, 6, 12, .5);
  border: 1px solid var(--c-border);
  color: var(--c-text);
  transition: border-color .2s ease, box-shadow .2s ease;
}

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

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--c-faint);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--c-cyan);
  box-shadow: 0 0 0 3px rgba(37, 230, 255, .15);
}

/* Stato invalido (impostato da JS, no alert nativo) */
.form-field.is-invalid input,
.form-field.is-invalid select,
.form-field.is-invalid textarea {
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, .15);
}

.form-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: .82rem;
  color: var(--c-faint-text);
}

.form-actions {
  grid-column: 1 / -1;
}

.form-confirm {
  grid-column: 1 / -1;
  padding: .9rem 1.1rem;
  border-radius: var(--r-sm);
  background: rgba(56, 224, 138, .12);
  border: 1px solid rgba(56, 224, 138, .35);
  color: var(--c-green);
  font-weight: 600;
}

.form-confirm[hidden] {
  display: none;
}

/* =================================================================
   19. FOOTER
   ================================================================= */
.site-footer {
  border-top: 1px solid var(--c-border);
  background: var(--c-bg-2);
  padding-block: 3rem 1.6rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--c-border);
}

.footer-brand {
  max-width: 46ch;
}

.footer-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-white);
}

.footer-line {
  margin: .6rem 0 0;
  font-size: .92rem;
  color: var(--c-muted);
}

.footer-line--pos {
  color: var(--c-faint-text);
  font-size: .85rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.2rem;
  align-content: flex-start;
}

.footer-nav a {
  font-size: .9rem;
  color: var(--c-muted);
  transition: color .2s ease;
}

.footer-nav a:hover {
  color: var(--c-cyan);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .6rem;
  padding-top: 1.4rem;
}

.footer-disclaimer,
.footer-copy {
  margin: 0;
  font-size: .82rem;
  color: var(--c-faint-text);
}

/* =================================================================
   20. ACCESSIBILITÀ / FOCUS / REDUCED-MOTION
   ================================================================= */
:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero-grid,
  .hero-orb,
  .hero-orb--2 {
    animation: none;
  }
}

/* =================================================================
   21. RESPONSIVE
   ================================================================= */

/* Tablet e sotto: nav collassa, hero su una colonna */
@media (max-width: 1024px) {
  :root {
    --container-pad: 20px;
  }

  /* Nav mobile */
  .nav-toggle {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .nav-cta-mobile {
    display: inline-flex;
    margin-top: .5rem;
  }

  .nav-menu {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: .2rem;
    padding: 1rem var(--container-pad) 1.4rem;
    background: rgba(5, 6, 12, .97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .8);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
  }

  .nav-menu.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-link {
    padding: .8rem .6rem;
    font-size: 1rem;
    border-bottom: 1px solid var(--c-border);
  }

  .nav-link::after {
    display: none;
  }

  /* Hero una colonna */
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-panel {
    max-width: 460px;
  }

  /* Griglie 3 -> 2 */
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: timeline alternata (allineata al breakpoint di collasso a 1024px) */
@media (min-width: 1025px) {
  /* Timeline alternata su desktop */
  .timeline {
    padding-left: 0;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-1px);
  }

  .tl-item {
    width: 50%;
    padding-right: 2.4rem;
    margin-bottom: 2rem;
  }

  .tl-item:nth-child(even) {
    margin-left: 50%;
    padding-right: 0;
    padding-left: 2.4rem;
  }

  .tl-item::before {
    left: auto;
    right: -6px;
    top: 1.6rem;
    transform: none;
  }

  .tl-item:nth-child(even)::before {
    left: -6px;
    right: auto;
  }
}

/* Mobile: <=640px */
@media (max-width: 640px) {
  :root {
    --container-pad: 16px;
  }

  /* Hero stats una colonna */
  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-cta .btn,
  .cta-actions .btn {
    width: 100%;
  }

  /* Griglie tutte a colonna singola */
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .grid--auto {
    grid-template-columns: 1fr;
  }

  .dash-grid {
    grid-template-columns: 1fr;
  }

  /* Target touch adeguati su mobile per i controlli pill */
  .profile-btn,
  .term-tab {
    min-height: 40px;
    padding-block: .6rem;
  }

  .proof-grid {
    grid-template-columns: 1fr;
  }

  /* Archflow a colonna con frecce verso il basso */
  .archflow {
    flex-direction: column;
    align-items: stretch;
  }

  .arch-arrow {
    transform: rotate(90deg);
    font-size: 1.5rem;
    padding-block: .2rem;
  }

  /* Configuratore: label sopra valore */
  .config-row {
    grid-template-columns: 1fr;
    gap: .4rem;
  }

  /* Form una colonna */
  .demo-form {
    grid-template-columns: 1fr;
  }

  /* Footer impilato */
  .footer-bottom {
    flex-direction: column;
  }
}

/* Tablet: archflow a colonna su tutta la fascia collassata (<=1024px) */
@media (max-width: 1024px) {
  .archflow {
    flex-direction: column;
    align-items: stretch;
  }

  .arch-arrow {
    transform: rotate(90deg);
    padding-block: .2rem;
  }
}

/* =================================================================
   22. GRUPPO — branch map (struttura AlmaRe Group S.r.l.)
   ================================================================= */
.branch-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

/* Card madre evidenziata con bordo accento gradiente */
.branch-parent {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  width: 100%;
  max-width: 480px;
  padding: 1.4rem 1.6rem;
  text-align: center;
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

.branch-parent::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-accent);
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* Etichette piccole uppercase (madre, nodi, cliente) */
.branch-tag,
.branch-kicker {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-cyan);
}

.branch-name {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: -0.01em;
}

/* Riga dei 3 nodi branch */
.branch-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
}

.branch-node {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1.2rem 1.3rem;
  text-align: center;
  align-items: center;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.branch-node:hover {
  transform: translateY(-4px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

.branch-node-name {
  font-size: 1.12rem;
  font-weight: 700;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.branch-node-line {
  font-size: .86rem;
  color: var(--c-muted);
  line-height: 1.45;
}

/* Card cliente, centrata, larghezza limitata */
.branch-client {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  width: 100%;
  max-width: 480px;
  padding: 1.2rem 1.4rem;
  text-align: center;
}

/* Connettore verticale decorativo tra i livelli (cyan -> violet) */
.branch-connector {
  flex: 0 0 auto;
  width: 2px;
  height: 36px;
  border-radius: 2px;
  background: linear-gradient(var(--c-cyan), var(--c-violet));
  opacity: .7;
}

.branch-connector::after {
  content: "";
  display: block;
  position: relative;
  left: -4px;
  bottom: -2px;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--c-violet);
  opacity: .85;
}

/* Legenda: riusa .grid--auto + .cap-card, solo spaziatura top */
.branch-legend {
  margin-top: 2.4rem;
}

/* =================================================================
   23. SOVRANITÀ & PRIVACY — sov-grid / sov-card
   ================================================================= */
.sov-grid {
  margin-top: .4rem;
  margin-bottom: 2rem;
}

.sov-card {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .95rem 1.15rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.45;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.sov-card:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

/* Puntino accent verde/cyan con glow */
.sov-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 10px rgba(56, 224, 138, .6);
}

/* Lead enfatizzato dopo la griglia */
.sov-statement {
  color: var(--c-text);
  font-weight: 500;
}

/* =================================================================
   24. SOFTWARE — software-grid / software-card
   ================================================================= */
.software-grid {
  margin-top: 1.5rem;
}

.software-card {
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: 1.5rem;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.software-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-border-strong);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

/* Header: nome a sinistra, chip allineato a destra */
.software-head {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
}

.software-name {
  font-size: 1.12rem;
  margin-right: auto;
}

.software-card p {
  margin: 0;
  font-size: .92rem;
  color: var(--c-muted);
}

/* =================================================================
   25. AION SKU — riga chip + variante roadmap
   ================================================================= */
.aion-sku {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin: 0 0 2.4rem;
}

/* Variante chip "roadmap/futuro": accento ambra, bordo tratteggiato */
.chip--roadmap {
  color: var(--c-amber);
  background: rgba(255, 194, 75, .08);
  border-style: dashed;
  border-color: rgba(255, 194, 75, .45);
  white-space: normal;
}

/* =================================================================
   26. DASH ROADMAP — nota roadmap dentro la dash-card GPU
   ================================================================= */
.dash-roadmap {
  margin: .2rem 0 0;
  font-size: .8rem;
  color: var(--c-faint-text);
}

.dash-roadmap::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: .5rem;
  border-radius: 50%;
  background: var(--c-amber);
  box-shadow: 0 0 8px rgba(255, 194, 75, .5);
  vertical-align: middle;
}

/* =================================================================
   27. NAV — anti-overflow desktop con 9 link
   ================================================================= */
/* Su desktop largo (>=1025px, prima del collasso hamburger) i 9 nav-link
   possono saturare la barra: riduciamo leggermente gap, padding e font
   senza intaccare il menu mobile (<=1024px, già verticale). */
@media (min-width: 1025px) and (max-width: 1500px) {
  .nav-menu {
    gap: .15rem;
  }

  .nav-link {
    padding-inline: .55rem;
    font-size: .88rem;
  }

  .nav-link::after {
    left: .55rem;
    right: .55rem;
  }
}

/* =================================================================
   28. RESPONSIVE NUOVE SEZIONI (<=1024px / <=640px)
   ================================================================= */
@media (max-width: 1024px) {
  /* Nodi branch da 3 a 2 colonne in fascia tablet */
  .branch-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  /* Branch map: nodi a colonna singola, connettore più corto */
  .branch-row {
    grid-template-columns: 1fr;
  }

  .branch-connector {
    height: 28px;
  }
}

/* =================================================================
   29. STATO HIDDEN GLOBALE
   Banner/modale cookie partono nascosti via attributo [hidden] e
   vengono mostrati dal JS rimuovendolo. Forziamo display:none così
   che eventuali display:flex/grid sui contenitori non lo annullino.
   ================================================================= */
[hidden] {
  display: none !important;
}

/* =================================================================
   30. FOOTER 4 COLONNE — .footer-grid e figlie
   (additivo: il vecchio .footer-inner resta valido se ancora in uso)
   ================================================================= */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4rem 2rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--c-border);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  min-width: 0;
}

.footer-col-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-white);
  margin: 0;
}

.footer-col-text {
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--c-muted);
  /* testo multi-riga della col Società senza overflow */
  overflow-wrap: anywhere;
}

.footer-col-text + .footer-col-text {
  margin-top: -.3rem;
}

/* email mailto: niente overflow su mobile */
.footer-col-text a {
  color: var(--c-muted);
  transition: color .2s ease;
  overflow-wrap: anywhere;
}

.footer-col-text a:hover {
  color: var(--c-cyan);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  align-items: flex-start;
}

.footer-links li {
  width: 100%;
}

.footer-links a {
  display: inline-block;
  font-size: .9rem;
  color: var(--c-muted);
  transition: color .2s ease;
}

.footer-links a:hover {
  color: var(--c-cyan);
}

/* Bottone "Gestisci cookie": aspetto di link, non bottone grezzo */
.footer-link-btn,
.cookie-manage-link {
  display: inline-block;
  padding: 0;
  margin: 0;
  font-size: .9rem;
  font-weight: 500;
  text-align: left;
  color: var(--c-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .2s ease;
}

.footer-link-btn:hover,
.cookie-manage-link:hover {
  color: var(--c-cyan);
}

/* =================================================================
   31. COOKIE BANNER — .cookie-banner (fixed bottom, glass, slide-in)
   ================================================================= */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 1000;
  width: min(100%, calc(var(--container-max) - 2 * var(--container-pad)));
  margin-inline: auto;
  transform: translateX(-50%);
  padding: 0 var(--container-pad) max(var(--container-pad), 16px);
  pointer-events: none;
  animation: cookieBannerIn .4s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes cookieBannerIn {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.cookie-banner-inner {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: 1.2rem 1.3rem;
  background: var(--c-surface);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card), var(--glow-cyan);
}

.cookie-banner-title {
  font-size: 1.05rem;
  margin: 0;
  color: var(--c-white);
}

.cookie-banner-desc {
  margin: 0;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--c-muted);
}

.cookie-banner-links {
  margin: 0;
  font-size: .85rem;
  color: var(--c-faint-text);
}

.cookie-banner-links a {
  color: var(--c-muted);
  transition: color .2s ease;
}

.cookie-banner-links a:hover {
  color: var(--c-cyan);
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

/* =================================================================
   32. COOKIE MODALE — overlay + pannello centrato + categorie
   ================================================================= */
.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--container-pad);
}

.cookie-overlay {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 9, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: cookieFade .25s ease both;
}

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

.cookie-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 2 * var(--container-pad));
  max-height: calc(100dvh - 2 * var(--container-pad));
  overflow-y: auto;
  padding: 1.8rem;
  background: var(--c-surface-solid);
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  animation: cookiePanelIn .3s cubic-bezier(.2, .7, .2, 1) both;
  -webkit-overflow-scrolling: touch;
}

@keyframes cookiePanelIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.cookie-modal-title {
  font-size: 1.35rem;
  margin: 0 2.4rem .4rem 0;
  color: var(--c-white);
}

.cookie-modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--c-muted);
  background: rgba(18, 24, 44, .5);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.cookie-modal-close:hover {
  color: var(--c-white);
  border-color: var(--c-border-strong);
  background: rgba(18, 24, 44, .8);
}

.cookie-cat {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--c-border);
}

.cookie-cat:first-of-type {
  padding-top: .8rem;
}

.cookie-cat:last-of-type {
  border-bottom: none;
}

.cookie-cat-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .8rem;
  margin-bottom: .4rem;
}

.cookie-cat-head strong {
  font-size: 1rem;
  color: var(--c-white);
  margin-right: auto;
}

.cookie-cat-state {
  flex: 0 0 auto;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--c-cyan);
  background: rgba(37, 230, 255, .1);
  border: 1px solid var(--c-border-strong);
}

.cookie-cat p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--c-muted);
}

.cookie-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .6rem;
  margin-top: 1.4rem;
}

/* =================================================================
   33. PAGINE POLICY — .legal-page / .legal-wrap
   ================================================================= */
.legal-page {
  padding-block: clamp(2.4rem, 6vw, 4.5rem);
}

.legal-wrap {
  max-width: 820px;
  margin-inline: auto;
}

.legal-wrap h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  margin-bottom: 1.2rem;
}

.legal-wrap h2 {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  margin: 2.4rem 0 .8rem;
  scroll-margin-top: calc(var(--header-h) + 12px);
}

.legal-wrap h3 {
  font-size: 1.1rem;
  margin: 1.6rem 0 .5rem;
  color: var(--c-text);
}

.legal-wrap p {
  margin: 0 0 1rem;
  color: var(--c-muted);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.legal-wrap a {
  color: var(--c-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.legal-wrap a:hover {
  color: var(--c-white);
}

.legal-wrap ul,
.legal-wrap ol {
  margin: 0 0 1.2rem;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.legal-wrap ul li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--c-muted);
  line-height: 1.65;
}

.legal-wrap ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-cyan);
  opacity: .85;
}

.legal-wrap ol {
  counter-reset: legal-ol;
}

.legal-wrap ol li {
  counter-increment: legal-ol;
  position: relative;
  padding-left: 1.7rem;
  color: var(--c-muted);
  line-height: 1.65;
}

.legal-wrap ol li::before {
  content: counter(legal-ol) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--c-cyan);
}

.legal-wrap li strong,
.legal-wrap p strong {
  color: var(--c-text);
  font-weight: 600;
}

/* Nota/disclaimer dentro le pagine policy: riusa il pattern .note */
.legal-wrap .note {
  color: var(--c-muted);
}

/* Link "← Torna al sito" */
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1.6rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-muted);
  transition: color .2s ease;
}

.legal-back:hover {
  color: var(--c-cyan);
}

/* =================================================================
   34. FOCUS-VISIBLE SPECIFICI sui nuovi controlli
   (la regola globale :focus-visible è già definita sopra; qui solo
   offset coerente dove il default a 3px potrebbe tagliarsi)
   ================================================================= */
.cookie-modal-close:focus-visible,
.cookie-cat-state:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 2px;
}

.footer-link-btn:focus-visible,
.cookie-manage-link:focus-visible,
.legal-back:focus-visible {
  outline: 2px solid var(--c-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* =================================================================
   35. REDUCED-MOTION per i nuovi componenti
   (la regola globale sopra azzera già animazioni/transizioni; qui
   disattiviamo esplicitamente le keyframe di banner/modale)
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  .cookie-banner,
  .cookie-overlay,
  .cookie-modal-panel {
    animation: none;
  }

  .cookie-banner {
    transform: translateX(-50%);
  }
}

/* =================================================================
   36. RESPONSIVE — footer/banner/modale (mobile a colonna, no overflow)
   ================================================================= */
@media (max-width: 1024px) {
  /* Footer 4 -> 2 colonne in fascia tablet */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  /* Footer a colonna singola su mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  /* Banner: azioni a tutta larghezza, niente margine residuo */
  .cookie-banner {
    padding-inline: var(--container-pad);
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

  .cookie-banner-actions .btn {
    width: 100%;
  }

  /* Modale: padding ridotto, azioni a tutta larghezza */
  .cookie-modal {
    padding: 12px;
  }

  .cookie-modal-panel {
    padding: 1.4rem 1.2rem;
  }

  .cookie-modal-actions {
    justify-content: stretch;
  }

  .cookie-modal-actions .btn {
    width: 100%;
  }
}
