:root {
  --accent:       #20768c;
  --glass-bg:     rgba(255,255,255,0.08);
  --blur:         12px;
  --shadow:       0 6px 16px rgba(0,0,0,0.4);
  --header-h:     70px;
  --footer-h:     50px;
  --transition:   .3s ease;
}

/* RESET & BASE */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  height: 100%;
}
body {
  min-height: 100vh;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: url('/images/home.jpg') center/cover fixed;
  color: #fff;
  overflow-x: hidden;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}
.btn {
  position: relative;
  display: inline-block;
  padding: .7rem 1.5rem;
  border: none;
  border-radius: .4rem;
  cursor: pointer;
  transition: var(--transition);
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2), transparent 70%);
  transform: scale(0);
  transition: transform .5s ease;
  z-index: -1;
}
.btn:hover::before {
  transform: scale(2);
}

/* HEADER & FOOTER */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(var(--blur));
  transition: background var(--transition), height var(--transition);
  z-index: 100;
}
.header.scrolled {
  height: 60px;
  background: #000;
  box-shadow: var(--shadow);
}
.footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: #aaa;
  z-index: 100;
}
main {
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
}

/* NAV & MENU */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: .8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.4rem;
  font-weight: 600;
}
nav {
  position: relative;
}
.toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
}
.menu {
  display: flex;
  gap: 1rem;
}
.menu a {
  padding: .3rem .6rem;
  border-radius: .3rem;
  transition: var(--transition);
}
.menu a.active,
.menu a:hover {
  background: var(--accent);
  color: #000;
}

/* LOGIN FORMS */
.login-form {
  display: flex;
  gap: .5rem;
}
.login-form input {
  padding: .4rem .6rem;
  background: #222;
  color: #fff;
  border: none;
  border-radius: .3rem;
}
.login-form button {
  background: var(--accent);
  color: #000;
  padding: .5rem 1rem;
  border: none;
  border-radius: .3rem;
}

/* SEZIONI FULL-SCREEN */
main section {
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start;
  padding: 0 1.2rem;
  position: relative;
  overflow: hidden;
  scroll-margin-top: var(--header-h);
}

/* HERO & BLOB */
.hero {
  background-attachment: fixed;
  background-position: center;
  background-size: cover;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(92,37,255,0.6), rgba(0,0,0,0.4));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle at 30% 30%, rgba(92,37,255,0.5), transparent 70%);
  border-radius: 50%;
  top: 20%;
  left: 70%;
  filter: blur(60px);
  animation: float 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes float {
  0%,100% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(-40px) scale(1.1); }
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: .8rem;
  text-shadow: 0 0 8px var(--accent), 0 0 16px var(--accent);
}
.hero h1 span {
  color: var(--accent);
}
.subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 1.2rem;
  color: #ddd;
}
.hero-btn {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 8px var(--accent);
}
.hero-btn:hover {
  transform: translateY(-2px);
}

/* NEWS-SECTION */
.news-section h2 {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-shadow: 1px 1px 3px #000, 0 0 10px var(--accent);
}
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin-top: 3rem;
}
.stats-column,
.updates-column {
  display: flex;
  flex-direction: column;
}
.stats-column h3,
.updates-column h3 {
  margin-bottom: 1rem;
  color: #eee;
}
.updates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* GLASS & REVEAL */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  border-radius: 1rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .6s, transform .6s;
}
.glass.visible {
  opacity: 1;
  transform: translateY(0);
}

/* CARDS */
.cards-grid {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.updates-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  padding: 1rem;
  border-radius: .75rem;
  box-shadow: var(--shadow);
  transition: transform .3s;
}
.card:hover {
  transform: rotateX(6deg) rotateY(-6deg);
}
.card h4 {
  margin-bottom: .6rem;
  color: var(--accent);
}
.card li {
  padding: .3rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

/* SEZIONE REGISTRAZIONE */
.register-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
}
.register-card {
  width: 90%;
  max-width: 800px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 1.5rem;
}
.register-card h2 {
  color: #fff;
  text-shadow: 1px 1px 3px #000, 0 0 10px var(--accent);
}
.progress-bar {
  display: flex;
  justify-content: space-between;
}
.register-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.register-content {
  display: flex;
  flex-direction: column;
}
.descr-col {
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.register-card.has-selection .descr-col {
  display: flex;
}
.step-content {
  display: none;
}
.step-content.active {
  display: block;
}
.bullet {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
  text-align: left;
}
.bullet li {
  margin: .5rem 0;
}
.form-group {
  margin-bottom: 1.2rem;
}
.descr {
  background: rgba(0,0,0,0.4);
  padding: .8rem;
  border-radius: .5rem;
  color: #ccc;
  font-size: .9rem;
}
.register-content input,
.register-content select {
  width: 100%;
  padding: .6rem .8rem;
  background: #1a1a1a;
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: .4rem;
  margin-top: .4rem;
  font-size: 1rem;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='white' viewBox='0 0 20 20'%3E%3Cpath d='M5 7l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .8rem center;
  background-size: 1rem;
}
.btn.ghost {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
}
.form-flex {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
}

/* —————————————————————————————————————————————————————————————— */
/* MODALE ERRORE / SUCCESSO */
/* —————————————————————————————————————————————————————————————— */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.modal.hidden {
  display: none;
}
.modal-content {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  padding: 2rem;
  border-radius: 1rem;
  max-width: 400px;
  width: 90%;
  text-align: center;
  color: #fff;
}
.modal-close {
  position: absolute;
  top: .5rem; right: .5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}
#modalMessage {
  margin-top: 1rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* —————————————————————————————————————————————————————————————— */
/* NAVIGATION WRAPPER & RESPONSIVE LOGIN */
/* —————————————————————————————————————————————————————————————— */
nav .nav-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Desktop: show desktop-login, hide mobile-login */
@media (min-width: 861px) {
  .desktop-login {
    display: flex;
    gap: .5rem;
  }
  .mobile-login {
    display: none;
  }
}

/* Mobile: hide desktop-login, toggle nav-content */
@media (max-width: 860px) {
  .desktop-login {
    display: none;
  }
  /* hide the nav-content panel by default */
  nav .nav-content {
    display: none;
    flex-direction: column;
    background: rgba(0,0,0,0.9);
    padding: 2rem 1rem;
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: 240px;
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transition: var(--transition);
  }
  nav.open .nav-content {
    display: flex;
  }
  /* menu inside the nav-content */
  nav .menu {
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
    transition: none;
  }
  .toggle {
    display: block;
  }
  /* show the mobile-login form */
  .mobile-login {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: 1.5rem;
  }
}
