/* ===== BASE GLOBALE ====================================== */

body {
  background: radial-gradient(circle at top, #111827 0, #020617 40%, #000 100%);
  color: #e5e7eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

a {
  color: #38bdf8;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header / navbar generica (se esiste) */
header, .navbar {
  background: linear-gradient(90deg, rgba(15,23,42,0.9), rgba(8,47,73,0.95));
  box-shadow: 0 0 18px rgba(56,189,248,0.4);
  border-bottom: 1px solid rgba(148,163,184,0.4);
}

/* ===== HERO HOME ========================================= */

.hero {
  position: relative;
  padding: 4.5rem 1.5rem 3rem;
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  text-align: left;
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.8);
  background: linear-gradient(90deg, rgba(15,23,42,0.9), rgba(8,47,73,0.95));
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a5f3fc;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.8);
}

.hero-title {
  margin-top: 1.5rem;
  font-size: clamp(2.2rem, 3vw + 1rem, 3.4rem);
  line-height: 1.1;
  font-weight: 800;
  color: #f9fafb;
  text-shadow: 0 0 18px rgba(129, 230, 217, 0.5);
}

.hero-title span {
  color: #38bdf8;
  text-shadow:
    0 0 20px rgba(56, 189, 248, 0.9),
    0 0 32px rgba(8, 47, 73, 1);
}

.hero-subtitle {
  margin-top: 1.25rem;
  max-width: 680px;
  font-size: 0.98rem;
  color: #cbd5f5;
}

.hero-tags {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  font-size: 0.78rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(129, 230, 217, 0.7);
  background: linear-gradient(120deg, rgba(15,23,42,0.85), rgba(8,47,73,0.95));
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.6);
}

.hero-cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* Glow dietro il hero */
.hero-glow {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 700px;
  height: 420px;
  filter: blur(70px);
  background: radial-gradient(circle, rgba(56,189,248,0.35), rgba(34,197,94,0.25), transparent 70%);
  opacity: 0.9;
  z-index: 1;
}

/* ===== BUTTONS =========================================== */

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s ease-out;
  cursor: pointer;
}

.btn-primary {
  background: radial-gradient(circle at top, #22c55e, #16a34a, #0f766e);
  color: #0b1120;
  box-shadow:
    0 0 10px rgba(74, 222, 128, 0.9),
    0 0 26px rgba(34, 197, 94, 0.8);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 0 20px rgba(74, 222, 128, 1),
    0 0 40px rgba(45, 212, 191, 0.9);
}

.btn-ghost {
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #e5e7eb;
  background: rgba(15,23,42,0.6);
}

.btn-ghost:hover {
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.8);
}

.btn-large {
  padding: 0.85rem 2.1rem;
  font-size: 0.95rem;
}

.btn-full {
  width: 100%;
}

/* ===== SEZIONI & CARDS =================================== */

.section {
  padding: 2.5rem 1.5rem;
}

.section-alt {
  background: radial-gradient(circle at top, rgba(15,23,42,0.85), rgba(8,15,35,1));
}

.section-bottom {
  padding-bottom: 3.5rem;
}

.section-title {
  max-width: 1120px;
  margin: 0 auto 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
}

.section-subtitle {
  max-width: 1120px;
  margin: 0 auto 2rem;
  font-size: 0.95rem;
  color: #cbd5f5;
}

.cards-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 1.4rem;
}

.cards-3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  padding: 1.4rem 1.5rem;
  border-radius: 1.2rem;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.95), rgba(2,6,23,0.98));
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 0 14px rgba(15, 23, 42, 0.9),
    0 0 26px rgba(15, 118, 110, 0.6);
}

.card-outline {
  border-color: rgba(56, 189, 248, 0.5);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.9rem;
  color: #d1d5db;
  margin-bottom: 0.7rem;
}

.card ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
  color: #9ca3af;
}

.card-link {
  display: inline-flex;
  margin-top: 0.8rem;
  font-size: 0.85rem;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: underline;
}

/* ===== CTA FINALE ======================================== */

.bottom-cta {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.bottom-cta h2 {
  font-size: 1.4rem;
  margin-bottom: 0.6rem;
}

/* ===== AUTH / AREA PERSONALE ============================= */

.section-centered {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 160px);
}

.auth-box {
  width: 100%;
  max-width: 420px;
  padding: 2rem 2.2rem;
  border-radius: 1.6rem;
  background: radial-gradient(circle at top, rgba(15,23,42,0.98), rgba(2,6,23,1));
  border: 1px solid rgba(56,189,248,0.65);
  box-shadow:
    0 0 20px rgba(56,189,248,0.8),
    0 0 40px rgba(15,23,42,1);
}

.auth-box h1 {
  font-size: 1.3rem;
  margin-bottom: 0.3rem;
}

.auth-box p {
  font-size: 0.9rem;
  color: #cbd5f5;
}

.form-row {
  margin-top: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
}

.form-row label {
  color: #e5e7eb;
}

.form-row input {
  background: rgba(15,23,42,0.9);
  border-radius: 0.75rem;
  border: 1px solid rgba(148,163,184,0.7);
  padding: 0.55rem 0.75rem;
  color: #e5e7eb;
}

.form-row input:focus {
  outline: none;
  border-color: rgba(56,189,248,0.95);
  box-shadow: 0 0 10px rgba(56,189,248,0.7);
}

.auth-note {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ===== SUITE / DASHBOARD CARDS =========================== */

.suite-grid {
  max-width: 1120px;
  margin: 2rem auto 0;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.suite-title {
  max-width: 1120px;
  margin: 0 auto;
}

/* ===== MOBILE FIX: AUTH / REGISTRAZIONE =================== */

@media (max-width: 640px) {
  .section-centered {
    min-height: auto;                 /* niente altezza forzata */
    align-items: flex-start;          /* BOX DALL'ALTO, non in mezzo allo schermo */
    padding: 1.5rem 1.25rem 2.5rem;   /* leggermente più compatto in alto */
  }

  .auth-box {
    max-width: 100%;
    padding: 1.6rem 1.5rem;
    border-radius: 1.3rem;
  }

  .auth-box h1 {
    font-size: 1.15rem;
  }

  .auth-box p {
    font-size: 0.85rem;
  }
}
/* ======================================================================
   DMQLABS – STILE NEON PREMIUM HOMEPAGE
   (usa le classi di home.html: neon-bg, neon-title, btn-neon, neon-card...)
   ====================================================================== */

/* Palette base */
:root {
  --dmq-bg-deep: #020617;
  --dmq-bg-soft: #0b1120;
  --dmq-cyan: #38bdf8;
  --dmq-cyan-soft: rgba(56,189,248,0.6);
  --dmq-violet: #6366f1;
  --dmq-emerald: #22c55e;
}

/* ---------------------------------------------
   HERO HOME – sfondo e layout
--------------------------------------------- */

.hero.neon-bg {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 1.5rem 3.2rem;
  background: transparent;
}

.hero.neon-bg::before {
  content: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
}

/* ---------------------------------------------
   TITOLI HERO
--------------------------------------------- */

.neon-title {
  font-size: clamp(2.4rem, 4vw + 1rem, 3.8rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f9fafb;
  text-shadow:
    0 0 18px rgba(15,23,42,0.9),
    0 0 30px rgba(15,23,42,0.9);
}

.neon-gradient {
  background: linear-gradient(120deg, #38bdf8, #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 0 20px rgba(56,189,248,0.9),
    0 0 32px rgba(15,23,42,1);
}

.neon-subtitle {
  margin-top: 1.3rem;
  max-width: 640px;
  font-size: 0.98rem;
  color: #cbd5f5;
  line-height: 1.6;
}

/* ---------------------------------------------
   BOTTONI HERO / CTA
--------------------------------------------- */

.hero-buttons {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn-neon,
.btn-ghost-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2.1rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out;
}

/* primario */
.btn-neon {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8, #6366f1);
  color: #0b1120;
  box-shadow:
    0 0 18px rgba(56,189,248,0.9),
    0 0 40px rgba(37,99,235,0.7);
}

.btn-neon:hover {
  transform: translateY(-1px) scale(1.02);
  box-shadow:
    0 0 22px rgba(56,189,248,1),
    0 0 50px rgba(59,130,246,0.9);
}

/* secondario */
.btn-ghost-neon {
  color: #e5e7eb;
  border: 1px solid rgba(148,163,184,0.7);
  background: radial-gradient(circle at top, rgba(15,23,42,0.9), rgba(8,15,35,0.95));
  box-shadow: 0 0 14px rgba(15,23,42,0.9);
}

.btn-ghost-neon:hover {
  border-color: rgba(56,189,248,0.9);
  box-shadow:
    0 0 20px rgba(56,189,248,0.85),
    0 0 32px rgba(15,23,42,1);
}

/* ---------------------------------------------
   SEZIONI NEON
--------------------------------------------- */

.neon-section {
  padding: 3rem 1.5rem 2.5rem;
  background: radial-gradient(circle at 0% 0%, rgba(56,189,248,0.18), transparent 55%),
              radial-gradient(circle at 100% 100%, rgba(129,140,248,0.16), transparent 55%),
              linear-gradient(to bottom, #020617, #020617);
}

.neon-section-alt {
  padding: 3rem 1.5rem 2.8rem;
  background: radial-gradient(circle at 0% 20%, rgba(45,212,191,0.15), transparent 55%),
              radial-gradient(circle at 100% 80%, rgba(129,140,248,0.18), transparent 55%),
              radial-gradient(circle at top, #020617 0, #020617 40%, #000 100%);
}

.neon-section-title {
  max-width: 1120px;
  margin: 0 auto 1.4rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
}

/* card principali (cosa creiamo) */
.neon-card {
  padding: 1.4rem 1.5rem;
  border-radius: 1.2rem;
  background: radial-gradient(circle at 0% 0%, rgba(15,23,42,0.98), rgba(2,6,23,0.98));
  border: 1px solid rgba(148,163,184,0.5);
  box-shadow:
    0 0 18px rgba(15,23,42,0.9),
    0 0 26px rgba(6,78,59,0.65);
  position: relative;
  overflow: hidden;
}

.neon-card::before {
  content: "";
  position: absolute;
  inset: -40%;
  opacity: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(56,189,248,0.32), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(45,212,191,0.24), transparent 60%);
  transition: opacity 0.22s ease-out;
  pointer-events: none;
}

.neon-card:hover::before {
  opacity: 1;
}

.neon-card .card-title {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.neon-card .card-text {
  font-size: 0.9rem;
  color: #d1d5db;
  line-height: 1.6;
}

/* manifesto / perché DMQLabs */
.manifesto-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.manifesto-item {
  padding: 1.3rem 1.4rem;
  border-radius: 1.2rem;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.96), rgba(2,6,23,1));
  border: 1px solid rgba(51,65,85,0.9);
  box-shadow: 0 0 18px rgba(15,23,42,0.9);
}

.manifesto-title {
  font-size: 0.98rem;
  margin-bottom: 0.45rem;
}

.manifesto-item p {
  font-size: 0.9rem;
  color: #cbd5f5;
}

/* CTA finale */
.neon-bottom-cta {
  padding: 3rem 1.5rem 3.4rem;
  text-align: center;
  background: radial-gradient(circle at 50% -20%, rgba(56,189,248,0.28), transparent 60%),
              radial-gradient(circle at 0% 100%, rgba(34,197,94,0.18), transparent 60%),
              linear-gradient(to bottom, #020617, #000);
}

.neon-bottom-cta .cta-title {
  font-size: 1.5rem;
  margin-bottom: 0.7rem;
}

.neon-bottom-cta .cta-text {
  font-size: 0.96rem;
  color: #cbd5f5;
  margin-bottom: 1.5rem;
}

/* ---------------------------------------------
   ANIMAZIONI SOFT
--------------------------------------------- */

@keyframes dmqGlowShift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate3d(0, 12px, 0) scale(1.05);
    opacity: 1;
  }
}

/* ---------------------------------------------
   RESPONSIVE – MOBILE FIRST
--------------------------------------------- */

@media (max-width: 768px) {

  .hero.neon-bg {
    padding: 3.2rem 1.1rem 2.4rem;
    text-align: left;
    background: transparent;
  }

  .neon-title {
    font-size: 2rem;
  }

  .neon-subtitle {
    font-size: 0.92rem;
    max-width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-neon,
  .btn-ghost-neon {
    width: 100%;
  }

  .neon-section,
  .neon-section-alt {
    padding: 2.3rem 1.1rem 2.1rem;
  }

  .neon-section-title {
    font-size: 1.15rem;
    margin-bottom: 1.1rem;
  }

  .cards-grid {
    gap: 1.1rem;
  }

  .manifesto-grid {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .neon-bottom-cta {
    padding: 2.6rem 1.1rem 2.6rem;
  }

  .neon-bottom-cta .cta-title {
    font-size: 1.3rem;
  }

  .neon-bottom-cta .cta-text {
    font-size: 0.9rem;
  }
}
/* ======================================================================
   DMQLABS – UTILITÀ NEON AVANZATE (link, dot pulse, card lift)
   ====================================================================== */

/* Link con sottolineatura neon animata */
.link-neon {
  position: relative;
  color: #e5e7eb;
  text-decoration: none;
}

.link-neon::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.18rem;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8, #6366f1);
  opacity: 0.6;
  transform: scaleX(0.4);
  transform-origin: left;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
  box-shadow: 0 0 8px rgba(56,189,248,0.8);
}

.link-neon:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Puntino “online” che pulsa (per badge o stato laboratorio) */
.dot-pulse {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #bbf7d0, #22c55e 60%);
  box-shadow: 0 0 12px rgba(34,197,94,0.9);
}

.dot-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(34,197,94,0.9);
  opacity: 0;
  animation: dotPulse 1.6s ease-out infinite;
}

@keyframes dotPulse {
  0% {
    transform: scale(0.7);
    opacity: 0.9;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* Card che si sollevano leggermente all’hover */
.neon-card--lift {
  transition: transform 0.22s ease-out, box-shadow 0.22s ease-out;
}

.neon-card--lift:hover {
  transform: translateY(-6px);
  box-shadow:
    0 16px 40px rgba(15,23,42,0.96),
    0 0 30px rgba(56,189,248,0.55);
}

/* Indicatore di scroll nella hero (lo useremo se aggiungiamo l’HTML) */
.hero-scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #64748b;
}

.hero-scroll-indicator-icon {
  width: 18px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.9);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(15,23,42,0.9);
}

.hero-scroll-indicator-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  width: 4px;
  height: 6px;
  border-radius: 999px;
  background: #38bdf8;
  transform: translateX(-50%);
  animation: heroScroll 1.6s ease-in-out infinite;
}

@keyframes heroScroll {
  0% {
    top: 4px;
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    top: 16px;
    opacity: 1;
  }
  100% {
    top: 20px;
    opacity: 0;
  }
}

/* Riduci le animazioni per chi ha prefers-reduced-motion attivo */
@media (prefers-reduced-motion: reduce) {
  .dot-pulse::after,
  .hero-scroll-indicator-icon::after {
    animation: none;
  }
}
