/* ==========================================================================
   M.A.R.E. Enterprise — Landing Page Design System
   Design System Neurale & Glassmorphism con Tema Onde del Mare (Digital Ocean)
   Temi: "Deep Vault" (default) & "Ice Atmosphere"
   ========================================================================== */

:root,
:root[data-theme="deep"] {
  --bg: #020b18;
  --bg-atmo: radial-gradient(circle at 50% 20%, #073359 0%, #041f38 35%, #021020 70%, #01060e 100%);
  --glass: rgba(6, 24, 46, 0.65);
  --glass-2: rgba(9, 32, 60, 0.72);
  --glass-hover: rgba(14, 46, 84, 0.85);
  --edge: rgba(0, 210, 255, 0.24);
  --edge-inset: rgba(0, 210, 255, 0.12);
  --shadow: rgba(0, 0, 0, 0.65);
  --ink: #ffffff;
  --muted: #94a3b8;
  --faint: #475569;
  --accent: #0284c7;
  --accent-glow: rgba(0, 210, 255, 0.45);
  --cyan: #00e5ff;
  --wave-azure: #0ea5e9;
  --indigo: #6366f1;
  --purple: #a855f7;
  --ok: #10b981;
  --warn: #f59e0b;
  --btn: #0284c7;
  --btn-fg: #ffffff;
  --core-2: #00e5ff;
  --grad-text: linear-gradient(135deg, #00e5ff 0%, #38bdf8 50%, #818cf8 100%);
  --grad-hero: linear-gradient(180deg, rgba(0, 210, 255, 0.18) 0%, transparent 60%);
  --code-bg: #030d1a;
  --hero-glass: rgba(2, 14, 30, 0.58);
}

:root[data-theme="ice"] {
  --bg: #e0f2fe;
  --bg-atmo: radial-gradient(circle at 50% 20%, #bae6fd 0%, #d5eefa 35%, #e0f2fe 70%, #f0f9ff 100%);
  --glass: rgba(255, 255, 255, 0.72);
  --glass-2: rgba(255, 255, 255, 0.88);
  --glass-hover: rgba(255, 255, 255, 0.98);
  --edge: rgba(2, 132, 199, 0.28);
  --edge-inset: rgba(255, 255, 255, 0.75);
  --shadow: rgba(14, 60, 105, 0.15);
  --ink: #032b50;
  --muted: #334155;
  --faint: #64748b;
  --accent: #0284c7;
  --accent-glow: rgba(2, 132, 199, 0.3);
  --cyan: #0284c7;
  --wave-azure: #0369a1;
  --indigo: #4f46e5;
  --purple: #9333ea;
  --ok: #059669;
  --warn: #d97706;
  --btn: #0284c7;
  --btn-fg: #ffffff;
  --core-2: #0284c7;
  --grad-text: linear-gradient(135deg, #0284c7 0%, #0369a1 50%, #4338ca 100%);
  --grad-hero: linear-gradient(180deg, rgba(2, 132, 199, 0.12) 0%, transparent 60%);
  --code-bg: #f8fafc;
  --hero-glass: rgba(255, 255, 255, 0.75);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  transition: background-color 0.4s ease, color 0.4s ease;
}

.mono {
  font-family: "JetBrains Mono", monospace;
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* Background Atmosphere Grid */
.bg-atmo {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--bg-atmo);
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.bg-atmo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 210, 255, 0.1) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* ---------- Typography & Utility ---------- */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 24px;
}

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-weight: 850;
}

.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.sec-head {
  margin-bottom: 50px;
}
.sec-head.center { text-align: center; }
.sec-head h2 {
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.sec-head p.lead {
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--muted);
  max-width: 760px;
  margin-top: 14px;
}
.sec-head.center p.lead { margin-inline: auto; }

/* ---------- Glass Primitives ---------- */
.glass-panel {
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(190%);
  -webkit-backdrop-filter: blur(24px) saturate(190%);
  border: 1px solid var(--edge);
  box-shadow: 0 16px 36px -12px var(--shadow), inset 0 1px 0 0 var(--edge-inset);
  border-radius: 24px;
}

.glass-card {
  background: var(--glass-2);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid var(--edge);
  box-shadow: 0 8px 24px -8px var(--shadow), inset 0 1px 0 0 var(--edge-inset);
  border-radius: 20px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 16px 32px -8px var(--shadow), 0 0 24px var(--accent-glow);
}

/* ---------- Floating Header Dock ---------- */
.dock-wrap {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding-inline: 16px;
  pointer-events: none;
}
.dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 14px 8px 18px;
  width: 100%;
  max-width: 1220px;
  border-radius: 999px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0284c7 0%, #00e5ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 15px;
  box-shadow: 0 0 14px var(--accent-glow);
}
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.brand-name b { font-size: 18px; letter-spacing: 0.04em; }
.brand-name span { font-size: 9.5px; color: var(--cyan); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }

.dock-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.dock-nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 11px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.dock-nav a:hover { color: var(--ink); background: var(--glass-hover); }
.dock-nav a.active { color: var(--ink); background: var(--glass-2); border: 1px solid var(--edge); }

.dock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  transition: all 0.2s ease;
}
.theme-toggle:hover { background: var(--glass-hover); transform: translateY(-1px); }
.theme-toggle .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
  border: 1.5px solid var(--ink);
  transition: transform 0.3s;
}

/* Buttons */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s, background-color 0.25s;
  white-space: nowrap;
}
.btn-pill.primary {
  background: linear-gradient(135deg, #0284c7 0%, #00b4d8 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-pill.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}
.btn-pill.ghost {
  background: var(--glass);
  color: var(--ink);
  border-color: var(--edge);
}
.btn-pill.ghost:hover {
  background: var(--glass-hover);
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.btn-pill.full { width: 100%; }
.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.pill-icon svg { width: 13px; height: 13px; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--edge);
  background: var(--glass);
  cursor: pointer;
  position: relative;
}
.burger span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s, top 0.3s;
}
.burger span:first-child { top: 15px; }
.burger span:last-child { top: 23px; }
.burger[aria-expanded="true"] span:first-child { top: 19px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 19px; transform: rotate(-45deg); }

/* ---------- Hero Section (Tema Onde del Mare / Digital Ocean) ---------- */
.hero {
  position: relative;
  min-height: 98vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 140px;
  padding-bottom: 90px;
  overflow: hidden;
}
.brain-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.95;
  transition: opacity 0.4s ease;
}

section {
  position: relative;
  z-index: 2;
}

/* Hero Glass Content Box: rende il testo nitido e staccato dallo sfondo */
.hero-content-glass {
  background: var(--hero-glass);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid var(--edge);
  border-radius: 32px;
  padding: 50px 44px;
  box-shadow: 0 24px 60px -15px var(--shadow), 0 0 35px var(--accent-glow);
  max-width: 1020px;
  margin-inline: auto;
  position: relative;
  z-index: 2;
  text-align: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--glass-2);
  border: 1px solid var(--edge);
  color: var(--cyan);
  backdrop-filter: blur(14px);
  margin-bottom: 24px;
  box-shadow: 0 0 16px var(--accent-glow);
}
.chip .led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }

.hero h1 {
  font-size: clamp(38px, 5.8vw, 66px);
  font-weight: 850;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  color: var(--ink);
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.9), 0 0 35px rgba(0, 229, 255, 0.35);
}

.hero p.lead {
  font-size: clamp(18px, 2.1vw, 22px);
  color: var(--ink);
  opacity: 0.92;
  font-weight: 500;
  max-width: 820px;
  margin-inline: auto;
  margin-bottom: 36px;
  line-height: 1.55;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.hero-badges span {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--glass);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  box-shadow: 0 4px 12px var(--shadow);
}
.hero-badges svg { width: 16px; height: 16px; color: var(--cyan); }

/* Bottom wave silhouette divider */
.ocean-wave-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  color: var(--bg);
  z-index: 3;
  pointer-events: none;
}
.ocean-wave-bottom svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ---------- Manifesto Section ---------- */
.manifesto {
  padding: 60px 0 90px;
  position: relative;
}
.manifesto-panel {
  padding: 50px 44px;
  text-align: center;
  max-width: 1020px;
  margin-inline: auto;
  position: relative;
  overflow: hidden;
}
.manifesto-panel::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--wave-azure), var(--indigo), transparent);
}
.manifesto-text {
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink);
}

/* ---------- Stats Grid ---------- */
.stats {
  padding: 10px 0 100px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.stat-card {
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.stat-card .num {
  font-size: clamp(34px, 3.8vw, 48px);
  font-weight: 850;
  color: var(--cyan);
  line-height: 1;
  margin-bottom: 10px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-shadow: 0 0 18px var(--accent-glow);
}
.stat-card .num small {
  font-size: 18px;
  font-weight: 600;
  color: var(--muted);
}
.stat-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Modes Section ---------- */
.modes {
  padding: 60px 0 100px;
}
.modes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.mode-card {
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.mode-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--cyan);
  margin-bottom: 18px;
}
.mode-card h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.2;
}
.mode-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 24px;
}
.mode-specs {
  list-style: none;
  margin-top: auto;
  border-top: 1px solid var(--edge);
  padding-top: 18px;
  display: grid;
  gap: 10px;
}
.mode-specs li {
  font-size: 13.5px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 9px;
}
.mode-specs li svg { width: 15px; height: 15px; color: var(--ok); flex-shrink: 0; }

/* ---------- Interactive Graph & Target Progress Section ---------- */
.graph-section {
  padding: 60px 0 110px;
}
.graph-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 36px;
  align-items: center;
}
.graph-showcase {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--edge);
  box-shadow: 0 20px 45px -12px var(--shadow);
  position: relative;
}
.graph-showcase img {
  width: 100%;
  height: auto;
  display: block;
}
.graph-badge-overlay {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: var(--glass-2);
  backdrop-filter: blur(16px);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.progress-pills {
  display: flex;
  gap: 8px;
}
.p-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.p-pill.done { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid var(--ok); }
.p-pill.wip { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid var(--warn); }
.p-pill.todo { background: rgba(148, 163, 184, 0.2); color: #94a3b8; border: 1px solid var(--muted); }

/* ---------- Brainstorming Multi-Agente Section ---------- */
.brainstorming-section {
  padding: 60px 0 110px;
}
.squad-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.agent-card {
  padding: 24px 18px;
  text-align: center;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.agent-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--edge);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 14px;
  box-shadow: 0 4px 12px var(--shadow);
}
.agent-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.agent-card p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- RAG, CRAG & AI Engine Section ---------- */
.rag-section {
  padding: 60px 0 110px;
}
.rag-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.rag-card {
  padding: 38px 32px;
  display: flex;
  flex-direction: column;
}
.rag-tag {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--purple);
  margin-bottom: 16px;
}
.rag-card h3 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 12px;
}
.rag-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.crag-steps {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: auto;
  border-top: 1px solid var(--edge);
  padding-top: 18px;
}
.crag-steps li {
  font-size: 13.5px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.crag-steps .dot-step {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--glass-hover);
  border: 1px solid var(--edge);
  color: var(--cyan);
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* AI Bridge & BYO Key */
.ai-bridge-box {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  padding: 40px;
  align-items: center;
}
.ai-bridge-preview img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--edge);
  box-shadow: 0 16px 36px -10px var(--shadow);
}
.model-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.m-badge {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Features Grid ---------- */
.features {
  padding: 60px 0 100px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--edge);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  margin-bottom: 18px;
  box-shadow: 0 4px 14px var(--shadow);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 10px;
}
.feature-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

/* Spotlight Wide */
.spotlight-card {
  grid-column: span 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 44px 40px;
  align-items: center;
}
.spotlight-text h3 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.spotlight-text p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.spotlight-preview img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--edge);
  box-shadow: 0 16px 36px -10px var(--shadow);
}

/* ---------- Gallery Section ---------- */
.gallery {
  padding: 60px 0 110px;
}
.gallery-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.gallery-tab {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: var(--glass);
  color: var(--muted);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gallery-tab:hover { color: var(--ink); background: var(--glass-hover); }
.gallery-tab.active { background: var(--btn); color: var(--btn-fg); border-color: transparent; }

.gallery-stage {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  padding: 24px;
}
.gallery-slide {
  display: none;
  flex-direction: column;
  gap: 18px;
}
.gallery-slide.active { display: flex; }
.gallery-img-wrap {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--edge);
  box-shadow: 0 20px 45px -12px var(--shadow);
  background: var(--code-bg);
}
.gallery-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
}
.gallery-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--muted);
}
.gallery-caption b { color: var(--ink); margin-right: 8px; }

/* ---------- Downloads Section ---------- */
.downloads {
  padding: 60px 0 110px;
}
.dl-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
}
.dl-main {
  padding: 40px;
  display: flex;
  gap: 32px;
  align-items: center;
}
.dl-cover-card {
  width: 180px;
  min-width: 180px;
  height: 250px;
  border-radius: 14px;
  background: linear-gradient(135deg, #020b18 0%, #073359 50%, #00b4d8 100%);
  border: 1px solid var(--edge);
  box-shadow: 0 16px 32px -8px var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.dl-cover-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--wave-azure));
}
.dl-cover-card .badge-brochure {
  font-size: 10px;
  font-weight: 800;
  color: var(--cyan);
  letter-spacing: 0.1em;
}
.dl-cover-card h4 {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.dl-cover-card .foot {
  font-size: 9px;
  color: #bae6fd;
}

.dl-details h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 12px;
}
.dl-details p {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 24px;
}
.dl-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dl-side {
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dl-side h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.dl-side p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 22px;
}
.lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--glass);
  border: 1px solid var(--edge);
  color: var(--warn);
  font-size: 12.5px;
  font-weight: 600;
}

/* ---------- FAQ Section ---------- */
.faq {
  padding: 60px 0 110px;
}
.faq-list {
  display: grid;
  gap: 14px;
  max-width: 880px;
  margin-inline: auto;
}
.faq-card {
  border-radius: 18px;
  overflow: hidden;
}
.faq-card summary {
  padding: 22px 26px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: color 0.2s;
}
.faq-card summary::-webkit-details-marker { display: none; }
.faq-card summary::after {
  content: "+";
  font-size: 22px;
  font-weight: 400;
  color: var(--cyan);
  transition: transform 0.25s ease;
}
.faq-card[open] summary::after {
  transform: rotate(45deg);
}
.faq-card p {
  padding: 0 26px 24px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- Contact Section (Solo richiesta info) ---------- */
.contact {
  padding: 60px 0 120px;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 40px;
  align-items: start;
}
.contact-copy {
  display: flex;
  flex-direction: column;
}
.contact-copy h2 {
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
}
.contact-copy p.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
}
.contact-points {
  list-style: none;
  display: grid;
  gap: 16px;
}
.contact-points li {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 15px;
}
.contact-points .badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
  background: var(--glass);
  border: 1px solid var(--edge);
  padding: 4px 10px;
  border-radius: 6px;
  min-width: 85px;
  text-align: center;
}

.contact-form {
  padding: 40px;
  display: grid;
  gap: 20px;
}
.form-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
.form-group input,
.form-group select,
.form-group textarea {
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--glass-2);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea {
  resize: vertical;
  min-height: 110px;
}
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
}
.form-consent input {
  margin-top: 3px;
}

.form-status {
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 14px;
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid var(--ok);
  color: #34d399;
}
.form-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #f87171;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--edge);
  padding: 48px 0 60px;
  color: var(--muted);
  font-size: 14px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--ink); }

/* ---------- Scroll Reveal Animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive Styles ---------- */
@media (max-width: 1024px) {
  .features-grid, .modes-grid { grid-template-columns: repeat(2, 1fr); }
  .spotlight-card { grid-column: span 2; grid-template-columns: 1fr; }
  .ai-bridge-box { grid-column: span 2; grid-template-columns: 1fr; }
  .graph-grid { grid-template-columns: 1fr; }
  .squad-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .dock-nav {
    display: none;
  }
  .dock.open .dock-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 16px;
    right: 16px;
    background: var(--glass-2);
    backdrop-filter: blur(24px);
    border: 1px solid var(--edge);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px var(--shadow);
  }
  .burger { display: block; }
  .features-grid, .modes-grid, .rag-cards-grid { grid-template-columns: 1fr; }
  .spotlight-card, .ai-bridge-box { grid-column: span 1; padding: 26px 20px; }
  .squad-grid { grid-template-columns: 1fr 1fr; }
  .form-row2 { grid-template-columns: 1fr; }
  .hero-content-glass { padding: 36px 20px; }
  .dl-main { flex-direction: column; text-align: center; }
  .dl-cover-card { margin-inline: auto; }
  .contact-form { padding: 26px 20px; }
}

@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr; }
  .squad-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; width: 100%; }
  .btn-pill { width: 100%; }
}
