/* ========================================
   Moonez Product Website — Style
   ======================================== */

:root {
  --bg: #0F1923;
  --surface: #1A2634;
  --primary: #00E676;
  --secondary: #FFD600;
  --text: #E0E6ED;
  --text-dim: #8899AA;
  --error: #FF5252;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --transition: 0.3s ease;
}

/* ---- Reset ---- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity var(--transition);
}

a:hover { opacity: 0.8; }

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

ul { list-style: none; }

/* ---- Utilities ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow { max-width: 800px; }

.text-center { text-align: center; }

.section {
  padding: 100px 0;
}

.section__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section__subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 1.125rem;
  margin-bottom: 60px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.02em;
  transition: all var(--transition);
  border: none;
  cursor: pointer;
}

.btn--primary {
  background: var(--primary);
  color: var(--bg);
  box-shadow: 0 0 30px rgba(0, 230, 118, 0.25);
}

.btn--primary:hover {
  opacity: 1;
  box-shadow: 0 0 50px rgba(0, 230, 118, 0.4);
  transform: translateY(-2px);
}

.btn--large {
  padding: 20px 56px;
  font-size: 1.1875rem;
}

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

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

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(15, 25, 35, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.03em;
}

.nav__logo:hover { opacity: 1; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__links a {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav__cta {
  background: var(--primary);
  color: var(--bg) !important;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 700;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(0, 230, 118, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(255, 214, 0, 0.04) 0%, transparent 50%),
    var(--bg);
  animation: heroGlow 8s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  0%   { opacity: 1; }
  50%  { opacity: 0.7; }
  100% { opacity: 1; }
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
  max-width: 900px;
}

.hero__title {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.hero__scroll span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid var(--text-dim);
  border-radius: 12px;
  position: relative;
}

.hero__scroll span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--primary);
  border-radius: 2px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { top: 6px; opacity: 1; }
  50%      { top: 18px; opacity: 0.3; }
}

/* ---- Counter Section ---- */
.numeri { background: var(--bg); }

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.counter-card {
  background: var(--surface);
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.counter-card:hover {
  border-color: rgba(0, 230, 118, 0.4);
  box-shadow: 0 0 30px rgba(0, 230, 118, 0.08);
}

.counter {
  display: block;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.counter-card__label {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 12px;
}

.counter-card__source {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-style: normal;
}

/* ---- Conseguenze Section ---- */
.conseguenze { background: linear-gradient(180deg, var(--bg) 0%, #0D151E 100%); }

.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.impact-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 28px;
  border-top: 3px solid;
}

.impact-card--health  { border-color: var(--error); }
.impact-card--economy { border-color: var(--secondary); }
.impact-card--environment { border-color: var(--primary); }

.impact-card__icon {
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
}

.impact-card--health .impact-card__icon  { color: var(--error); }
.impact-card--economy .impact-card__icon { color: var(--secondary); }
.impact-card--environment .impact-card__icon { color: var(--primary); }

.impact-card h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.impact-card--health h3  { color: var(--error); }
.impact-card--economy h3 { color: var(--secondary); }
.impact-card--environment h3 { color: var(--primary); }

.impact-card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.impact-card li {
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.5;
}

.impact-card li strong {
  color: inherit;
}

.impact-card--health li strong  { color: var(--error); }
.impact-card--economy li strong { color: var(--secondary); }
.impact-card--environment li strong { color: var(--primary); }

/* ECHR callout */
.echr-callout {
  background: var(--surface);
  border-left: 4px solid var(--secondary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 32px 36px;
  max-width: 800px;
  margin: 0 auto;
}

.echr-callout blockquote {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text);
  font-style: italic;
  margin-bottom: 12px;
}

.echr-callout cite {
  font-size: 0.875rem;
  color: var(--secondary);
  font-style: normal;
  font-weight: 600;
}

/* ---- Come Funziona Section ---- */
.come-funziona { background: var(--bg); }

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 64px;
}

.step {
  text-align: center;
  max-width: 260px;
  position: relative;
  padding: 0 20px;
}

.step__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--bg);
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  color: var(--primary);
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.step__connector {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  margin-top: 24px;
  flex-shrink: 0;
}

/* ---- Phone Mockup ---- */
.phone-mockup {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}

.phone-frame {
  width: 280px;
  height: 560px;
  background: #111;
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 2px solid #333;
  position: relative;
}

.phone-frame::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #000;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--bg);
}

.phone-app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.phone-app__header {
  padding: 36px 16px 12px;
  text-align: center;
}

.phone-app__logo {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--primary);
}

.phone-app__map {
  flex: 1;
  background: #0D151E;
  position: relative;
  overflow: hidden;
}

.phone-app__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 230, 118, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 230, 118, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.phone-app__pin {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(0, 230, 118, 0.5);
}

.phone-app__pin--1 { top: 30%; left: 40%; }
.phone-app__pin--2 { top: 50%; left: 60%; }
.phone-app__pin--3 { top: 65%; left: 35%; }

.phone-app__bar {
  padding: 12px 16px;
  text-align: center;
}

.phone-app__btn-report {
  display: inline-block;
  background: var(--primary);
  color: var(--bg);
  padding: 10px 32px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.875rem;
}

/* ---- Missione Section ---- */
.missione {
  background: linear-gradient(180deg, #0D151E 0%, var(--bg) 100%);
}

.missione__content {
  text-align: center;
}

.missione__lead {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  line-height: 1.7;
  margin-bottom: 48px;
  color: var(--text);
}

.missione__points {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: left;
  margin-bottom: 48px;
}

.missione__point h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.missione__point p {
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.7;
}

.missione__coda {
  font-size: 1rem;
  color: var(--text-dim);
  line-height: 1.7;
  border-top: 1px solid rgba(136, 153, 170, 0.2);
  padding-top: 32px;
}

/* ---- Partecipa Section ---- */
.partecipa { background: var(--bg); }

.roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.role-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: center;
  border: 1px solid rgba(136, 153, 170, 0.1);
  transition: border-color var(--transition), transform var(--transition);
}

.role-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.role-card__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  color: var(--primary);
}

.role-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.role-card p {
  font-size: 0.9375rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ---- Footer ---- */
.footer {
  padding: 48px 0 24px;
  border-top: 1px solid rgba(136, 153, 170, 0.1);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer__logo {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
}

.footer__brand p {
  color: var(--text-dim);
  font-size: 0.9375rem;
  margin-top: 4px;
}

.footer__links {
  display: flex;
  gap: 24px;
}

.footer__links a {
  color: var(--text-dim);
  font-size: 0.9375rem;
}

.footer__links a:hover { color: var(--primary); }

.footer__bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(136, 153, 170, 0.08);
}

.footer__bottom p {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ========================================
   Responsive
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
  .section { padding: 80px 0; }

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

  .impact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .step__connector {
    width: 2px;
    height: 32px;
    background: linear-gradient(180deg, var(--primary), transparent);
    margin: 0;
  }

  .missione__points {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .roles-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
  }

  /* Nav mobile */
  .nav__toggle { display: flex; }

  .nav__links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(15, 25, 35, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right var(--transition);
  }

  .nav__links.open { right: 0; }

  .nav__toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav__toggle.open span:nth-child(2) { opacity: 0; }
  .nav__toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .counter-grid {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: 2.25rem;
  }

  .counter-card { padding: 28px 20px; }

  .phone-frame {
    width: 240px;
    height: 480px;
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  .fade-in {
    opacity: 1;
    transform: none;
  }
}
