@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

:root {
  --bg: #020712;
  --accent: #00c2ff;
  --accent-soft: rgba(0, 194, 255, 0.3);
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.25);
  --text-main: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.75);
  --radius-xl: 32px;
  --shadow-glass: 0 0 50px rgba(0, 200, 255, 0.18), inset 0 0 30px rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top, #071426 0, #020712 55%);
  color: var(--text-main);
  overflow-x: hidden;
}

a {
  color: inherit;
}

/* Parallax background layers */
#parallax .layer {
  position: fixed;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -20;
  opacity: 0.18;
}

.layer-back {
  background-image: radial-gradient(circle at 10% 10%, #003566, transparent 60%);
}
.layer-mid {
  background-image: radial-gradient(circle at 80% 0%, #00c2ff, transparent 55%);
  opacity: 0.12;
}
.layer-front {
  background-image: radial-gradient(circle at 50% 80%, #ff7b00, transparent 55%);
  opacity: 0.16;
}

/* NAVBAR */
.nav-glass {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 30;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: linear-gradient(
    90deg,
    rgba(2, 7, 18, 0.8),
    rgba(2, 7, 18, 0.92)
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  object-fit: cover;
}

.nav-title {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-soft);
}

nav a {
  margin-left: 18px;
  font-size: 14px;
  text-decoration: none;
  color: var(--text-soft);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #ff7b00);
  transition: width 0.25s ease;
}

nav a:hover {
  color: var(--text-main);
}

nav a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none; /* default: nascosto su desktop */
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  margin-left: 8px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  margin: 4px 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* trasformo le 3 linee in una X quando il menu è aperto */
.nav-glass.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.nav-glass.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}
.nav-glass.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 840px) {
  /* Mostra l'hamburger, nascondi i link in linea */
  .nav-toggle {
    display: block;
  }

  .nav-content {
    padding: 10px 14px;
  }

  .nav-glass nav {
    position: absolute;
    top: 70px;                 /* sotto la navbar */
    right: 14px;
    left: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 24px;
    background: radial-gradient(circle at top, rgba(255,255,255,0.22), rgba(2,7,18,0.94));
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.16);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.23s ease, transform 0.23s ease;
  }

  .nav-glass nav a {
    margin-left: 0;
    font-size: 16px;
    white-space: nowrap;
  }

  /* quando il menu è aperto (classe nav-open sul header) */
  .nav-glass.nav-open nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 60px;
  position: relative;
}

#particles {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-content {
  max-width: 700px;
}

.glass-panel {
  position: relative;
  padding: 40px 32px 36px;
  border-radius: 38px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.06)
  );
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(200%);
  -webkit-backdrop-filter: blur(18px) saturate(200%);
  box-shadow: var(--shadow-glass);
  text-align: center;
  overflow: hidden;
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("noise.png");
  opacity: 0.08;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.glass-panel::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.55), transparent 65%);
  opacity: 0.35;
  transform: translate3d(0, 0, 0);
  animation: glassRipple 18s infinite alternate ease-in-out;
  pointer-events: none;
}

@keyframes glassRipple {
  from {
    transform: translate3d(-12px, -8px, 0) scale(1);
  }
  to {
    transform: translate3d(18px, 16px, 0) scale(1.1);
  }
}

.hero-logo {
  width: 120px;
  height: 120px;
  border-radius: 32px;
  object-fit: cover;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin: 8px 0 10px;
}

.hero p {
  font-size: 15px;
  color: var(--text-soft);
  margin-bottom: 26px;
  line-height: 1.6;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.05)
  );
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.store-button img {
  width: 20px;
  height: 23px;
}

.store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.store-label {
  font-size: 10px;
  opacity: 0.8;
}

.store-name {
  font-size: 14px;
  font-weight: 600;
}

.store-button:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.26),
    rgba(255, 255, 255, 0.12)
  );
  box-shadow: 0 0 40px rgba(0, 194, 255, 0.4);
}

/* SECTIONS */
.section {
  padding: 90px 20px 60px;
}

.section-inner {
  max-width: 980px;
  margin: 0 auto;
}

.section h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.section-subtitle,
.section-inner p {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.glass-soft {
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  padding: 32px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  position: relative;
  overflow: hidden;
}

.glass-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("noise.png");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.glass-card {
  border-radius: 26px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.04)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  /*box-shadow: var(--shadow-glass);*/
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("noise.png");
  opacity: 0.06;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.screens-carousel {
  margin-top: 30px;
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  padding: 6px 4px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE / vecchi Edge */
}

/* ⬇ nasconde la barra su Safari/Chrome/WebKit ⬇ */
.screens-carousel::-webkit-scrollbar {
  display: none;
}

/* ogni card è un "frame" del carosello */
.screen-card {
  flex: 0 0 auto;              /* 🔸 non si restringe, non va a capo */
  width: 200px;                /* puoi salire a 220–240 su desktop */
  scroll-snap-align: center;
  padding: 4px;
  display: flex;
  justify-content: center;
}

.screen-card img {
  width: 100%;
  display: block;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

@media (min-width: 900px) {
  .screens-carousel {
    justify-content: center;
  }
}

.team-card {
  max-width: 230px;
  max-height: 300px;
  padding: 10px;
  scroll-snap-align: none;      /* non serve più */
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.team-card h3 {
  margin-bottom: 10px;
  font-size: 15px;
  text-align: center;
}

.team-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.team-card img {
  width: 100%;
  display: block;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

/* Sponsor grid */
.sponsor-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.sponsor-card {
  padding: 20px 18px 18px;
  text-align: left;
  font-size: 14px;
}

.sponsor-card h3 {
  margin-top: 4px;
  margin-bottom: 6px;
  font-size: 15px;
}

.sponsor-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.sponsor-card img {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  object-fit: cover;
  margin-bottom: 10px;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.contact-text p {
  margin-top: 8px;
  color: var(--text-soft);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.glass-form {
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
  padding: 22px 18px 18px;
  border: 1px solid rgba(255,255,255,0.16);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
}

.glass-form::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("noise.png");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.glass-form input,
.glass-form textarea {
  border-radius: 14px;
  border: none;
  padding: 11px 12px;
  background: rgba(6, 10, 20, 0.7);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.glass-form textarea {
  resize: vertical;
  min-height: 90px;
}

.glass-form button {
  margin-top: 6px;
  border-radius: 999px;
  border: none;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-main);
  background: linear-gradient(120deg, #ff7b00, #ff3b30, #ff7b00);
  background-size: 200% 200%;
  box-shadow: 0 16px 40px rgba(255, 123, 0, 0.4);
  transition: background-position 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
}

.glass-form button:hover {
  background-position: 100% 0;
  box-shadow: 0 18px 40px rgba(255, 123, 0, 0.55);
  transform: translateY(-1px);
}

.glass-form button:active {
  transform: translateY(0);
  box-shadow: 0 12px 30px rgba(255, 123, 0, 0.5);
}

/* Footer */
.footer {
  padding: 20px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

/* Tilt base */
.tilt,
.tilt-small {
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
}

/* Scroll fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Responsive */
@media (max-width: 840px) {
  .nav-content {
    padding: 10px 14px;
  }

  nav a {
    margin-left: 10px;
    font-size: 12px;
  }

  .glass-panel {
    padding: 32px 20px 26px;
    border-radius: 32px;
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .section {
    padding-top: 70px;
  }
}

@media (max-width: 540px) {
  .download-row {
    flex-direction: column;
    align-items: stretch;
  }

  .screen-card {
    min-width: 150px;
    max-width: 180px;
  }

  .team-card {
    max-width: 150px;
    max-height: 150px;
  }

  .glass-soft {
    padding: 24px 18px;
  }
}

/* Popup overlay */
.popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.popup.hidden {
  display: none;
}

.popup-content {
  max-width: 320px;
  width: 90%;
  text-align: center;
  padding: 22px 18px 16px;
}

.popup-content p {
  margin: 0 0 14px;
  font-size: 14px;
}

#popup-close {
  border-radius: 999px;
  border: none;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: #ffffff;
  background: linear-gradient(120deg, #00c2ff, #007aff);
  box-shadow: 0 10px 25px rgba(0, 122, 255, 0.45);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#popup-close:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0, 122, 255, 0.6);
}
