/* =========================================
   MODERN CSS RESET & VARIABLES
========================================= */
:root {
  --bg-base: #030305;
  --bg-surface: #0f0f13;
  --bg-surface-hover: #16161d;
  --text-main: #ffffff;
  --text-muted: #8b8b99;

  --brand-primary: #6366f1;
  --brand-secondary: #a855f7;
  --brand-accent: #ec4899;

  --glass-bg: rgba(14, 18, 28, 0.55);
  --glass-border: rgba(255, 255, 255, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --glass-blur: 18px;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;

  --font-main: 'Plus Jakarta Sans', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: radial-gradient(1200px 800px at 10% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(900px 700px at 90% 0%, rgba(236, 72, 153, 0.14), transparent 55%),
    var(--bg-base);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

li {
  list-style: none;
}

body.modal-open {
  overflow: hidden;
}

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

.text-gradient {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary), var(--brand-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section {
  padding: 120px 0;
  position: relative;
  z-index: 10;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

/* =========================================
   AMBIENT GLOW
========================================= */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(99, 102, 241, 0.15);
  top: -200px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(168, 85, 247, 0.12);
  top: 20%;
  right: -100px;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: rgba(236, 72, 153, 0.1);
  bottom: -100px;
  left: 20%;
}

/* =========================================
   NAVBAR
========================================= */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.4s ease;
  background: rgba(8, 12, 20, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
}

.navbar.scrolled {
  padding: 12px 0;
  background: rgba(8, 12, 20, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(22px) saturate(170%);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-menu {
  display: flex;
  gap: 32px;
}

.nav-menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 28px;
  cursor: pointer;
  z-index: 1100;
  padding: 8px;
  margin-right: -8px;
}

.mobile-only {
  display: none;
}

.desktop-only {
  display: inline-flex;
}

/* =========================================
   HERO
========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  position: relative;
  z-index: 10;
  overflow: hidden;
  /* Evita overflow delle floating cards */
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.badge {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 500px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-bottom: 60px;
}

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

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 24px;
  font-weight: 700;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.divider {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
}

.avatars {
  display: flex;
}

.avatars img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--bg-base);
  margin-left: -12px;
}

.avatars img:first-child {
  margin-left: 0;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  perspective: 1400px;
}

/* MOCKUPS */
.snap-mockups {
  display: flex;
  gap: 2rem;
  justify-content: center;
  perspective: 1000px;
  min-height: 450px;
  align-items: center;
}

.hero-reveal {
  animation: heroReveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}

@keyframes heroReveal {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.mockup-card {
  width: 220px;
  position: relative;
  overflow: hidden;
  border-radius: 40px;
  transition: transform .6s cubic-bezier(.16, 1, .3, 1), box-shadow .6s;
}

.mockup-card img {
  width: 100%;
  display: block;
}

.mockup-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mockup-card.m1 {
  transform: rotateY(-15deg) rotateX(5deg) translateY(20px);
}

.mockup-card.m2 {
  transform: rotateY(15deg) rotateX(5deg) translateY(-20px);
  z-index: 2;
}

.mockup-card:hover {
  transform: translateZ(30px) rotateY(0) rotateX(0);
  z-index: 10;
}

/* Base Phone Mockup (for Features and Rewards sections) */
.phone-mockup {
  position: relative;
  width: 300px;
  border-radius: 40px;
  padding: 10px;
  z-index: 1;
  transition: transform 0.4s ease;
  transform-style: preserve-3d;
}

.mockup-img {
  width: 100%;
  border-radius: 30px;
  display: block;
  position: relative;
  z-index: 1;
  transform: translateZ(0);
}

.floating-card {
  position: absolute;
  z-index: 5;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  min-width: 240px;
  transform: translateZ(1px);
}

.card-1 {
  bottom: 20%;
  left: -80px;
}

.card-2 {
  top: 20%;
  right: -20px;
}

.floating-card h4 {
  font-size: 14px;
  margin-bottom: 2px;
}

.floating-card p {
  font-size: 12px;
  color: var(--text-muted);
}

.icon-box {
  width: 40px;
  height: 40px;
  background: var(--glass-highlight);
  color: var(--brand-primary);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

/* =========================================
   FEATURES BENTO GRID
========================================= */
.section-head {
  text-align: center;
  margin-bottom: 60px;
}

.section-head h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-head p {
  color: var(--text-muted);
  font-size: 18px;
  max-width: 500px;
  margin: 0 auto;
}

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

.bento-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s, background 0.3s, border-color 0.3s;
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: var(--glass-shadow);
}

.bento-card:hover {
  transform: translateY(-4px);
  background: rgba(18, 22, 32, 0.75);
  border-color: rgba(255, 255, 255, 0.2);
}

.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, rgba(99, 102, 241, 0.12), transparent 60%);
  opacity: 0.6;
  pointer-events: none;
}

.bento-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 60%);
  opacity: 0.4;
  pointer-events: none;
}

.bento-large {
  grid-column: span 2;
  grid-row: span 2;
  padding: 0;
}

.bento-large .bento-content {
  padding: 40px;
  max-width: 60%;
  z-index: 2;
}

.bento-large .bento-img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 60%;
  height: 100%;
  background: url('https://images.unsplash.com/photo-1524661135-423995f22d0b?q=80&w=800&auto=format&fit=crop') center/cover;
  mask-image: linear-gradient(to left, black 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, black 50%, transparent 100%);
  opacity: 0.6;
}

.bento-wide {
  grid-column: span 2;
}

.bento-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(16, 185, 129, 0.2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-main);
  margin-bottom: 24px;
}

.bento-card h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.bento-card p {
  color: var(--text-muted);
  font-size: 14px;
}

.bento-content {
  position: relative;
  z-index: 1;
}

.bento-stats {
  display: flex;
  gap: 24px;
  margin: 20px 0 18px;
}

.bento-stat .stat-num {
  font-size: 20px;
  font-weight: 700;
}

.bento-stat .stat-label {
  font-size: 11px;
}

.bento-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-tag {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--glass-highlight);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
}

.bento-pulse {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.2);
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.9);
    opacity: 0.6;
  }

  50% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(0.9);
    opacity: 0.6;
  }
}

.bento-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(236, 72, 153, 0.2);
  color: #f9a8d4;
  font-size: 11px;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.bento-activity {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.activity-item {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--glass-highlight);
  padding: 8px 10px;
  border-radius: 10px;
}

.bento-accent::before {
  background: radial-gradient(120% 120% at 100% 0%, rgba(16, 185, 129, 0.18), transparent 60%);
}

.bento-rewards::before {
  background: radial-gradient(120% 120% at 0% 100%, rgba(236, 72, 153, 0.2), transparent 60%);
}

.row-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.users-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 140px;
  justify-content: flex-end;
}

.user-bubble {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-secondary), var(--brand-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* =========================================
   FEATURES SECTION & ACCORDION
========================================= */
.features-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: flex-start;
}

.features-left {
  position: relative;
}

.features-right {
  position: sticky;
  top: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1400px;
  /* Aggiunto per ripristinare l'effetto 3D su desktop */
}

.features-visual-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.visual-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
}

.features-mockup {
  width: 320px;
  margin: 0 auto;
}

/* La rotazione viene definita globalmente sotto .phone-mockup */

.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.1);
}

.accordion-item.active {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.accordion-header {
  width: 100%;
  padding: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-main);
  color: var(--text-main);
}

.accordion-title {
  display: flex;
  align-items: center;
  gap: 20px;
}

.accordion-title .icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--glass-highlight);
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: all 0.3s ease;
}

.accordion-item.active .accordion-title .icon-box {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.accordion-item.active .accordion-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.accordion-title h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.accordion-icon {
  font-size: 20px;
  color: var(--text-muted);
  transition: all 0.3s ease;
}

.accordion-content {
  height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 24px 0 92px;
  /* Allineato perfettamente con l'inizio del titolo */
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

.accordion-content.active {
  opacity: 1;
  padding: 0 24px 24px 92px;
}

.accordion-content p {
  margin-top: 20px;
  margin-bottom: 20px;
  font-weight: 400;
}

.accordion-stats {
  display: flex;
  gap: 24px;
  margin-top: 16px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  flex: 1;
}

.stat-item .stat-num {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--brand-primary);
}

.stat-item .stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.notification-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  font-size: 14px;
  color: var(--text-main);
  margin: 20px 0;
}

.accordion-chips {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.2);
  color: #f9a8d4;
  font-size: 12px;
  font-weight: 600;
}

.community-avatars {
  display: flex;
  margin-top: 12px;
}

.community-avatars .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
  background: var(--brand-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  margin-left: -8px;
}

.community-avatars .avatar:first-child {
  margin-left: 0;
}

/* =========================================
   REWARDS SECTION
========================================= */
.rewards-section {
  background: rgba(12, 16, 24, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
}

.rewards-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.rewards-content h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.rewards-content>p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 40px;
  max-width: 500px;
}

.rewards-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rewards-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--glass-bg);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  transition: transform 0.3s, border-color 0.3s;
}

.rewards-list li:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.1);
}

.reward-icon {
  width: 48px;
  height: 48px;
  background: var(--glass-highlight);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.reward-text strong {
  display: block;
  font-size: 18px;
  margin-bottom: 4px;
}

.reward-text span {
  color: var(--text-muted);
  font-size: 14px;
}

.rewards-visual {
  position: relative;
  display: flex;
  justify-content: center;
  perspective: 1400px;
}

.rewards-mockup {
  transform: rotateY(8deg) rotateX(4deg);
}

.rewards-mockup:hover {
  transform: rotateY(3deg) rotateX(2deg);
}

.highlight-card {
  top: 50%;
  left: -40px;
  transform: translateY(-50%);
  border-color: var(--brand-accent);
}

/* =========================================
   CTA SECTION
========================================= */
.cta-box {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  box-shadow: var(--glass-shadow);
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: var(--brand-primary);
  filter: blur(150px);
  opacity: 0.3;
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.cta-box p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--glass-bg);
  padding: 12px 24px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  transition: transform 0.2s, border-color 0.2s;
}

.store-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

.store-btn i {
  font-size: 32px;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-text {
  text-align: left;
}

.store-text span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.store-text strong {
  font-size: 16px;
  font-weight: 600;
}

/* =========================================
   DOWNLOAD MODAL
========================================= */
.download-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 200;
}

.download-modal.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.65);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  width: min(520px, 92vw);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(var(--glass-blur)) saturate(170%);
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-header {
  text-align: center;
  margin-bottom: 24px;
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.2);
  color: var(--brand-primary);
  font-size: 24px;
}

.modal-header h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.modal-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.modal-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modal-btn i {
  font-size: 32px;
}

.modal-btn .btn-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.modal-btn .btn-content span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.modal-btn .btn-content strong {
  font-size: 16px;
  font-weight: 700;
}

.modal-btn:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.btn-ios:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.btn-android:hover {
  border-color: #3DDC84;
  background: rgba(61, 220, 132, 0.1);
}

.modal-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-note {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* =========================================
   FOOTER
========================================= */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 40px 0;
  background: rgba(8, 12, 20, 0.35);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-main);
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 992px) {
  .section {
    padding: 100px 0;
  }

  .hero {
    padding-top: 80px;
  }

  .hero-container,
  .rewards-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .rewards-list li {
    text-align: left;
  }

  .hero-cta,
  .hero-stats {
    justify-content: center;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
  }

  .hero-stats {
    display: none;
  }

  .hero-visual {
    perspective: 1400px;
  }

  .snap-mockups {
    gap: 1rem;
    min-height: 320px;
  }

  .mockup-card {
    width: 160px;
  }

  .rewards-visual {
    perspective: 1400px;
  }

  .rewards-mockup {
    transform: none !important;
    margin: 0 auto !important;
    display: block;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .accordion-header {
    padding: 24px;
  }

  .accordion-title h3 {
    font-size: 16px;
  }

  .bento-large,
  .bento-wide {
    grid-column: span 1;
  }

  .bento-large {
    grid-row: span 1;
  }

  .bento-large .bento-content {
    max-width: 100%;
    padding: 32px;
  }

  .bento-large .bento-img {
    opacity: 0.2;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .row-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .floating-card {
    display: none;
  }
}

/* =========================================
   MOBILE OPTIMIZATION (Up to 768px)
========================================= */
@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .container {
    padding: 0 24px;
  }

  /* Typography */
  .hero-title {
    font-size: clamp(40px, 12vw, 56px);
    line-height: 1.1;
    margin-bottom: 20px;
  }

  .hero-subtitle {
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 32px;
  }

  h2 {
    font-size: 32px !important;
    line-height: 1.2;
  }

  /* Buttons */
  .hero-cta {
    flex-direction: column;
    gap: 12px;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 18px 24px;
    font-size: 16px;
  }

  /* Navbar Mobile */
  .menu-toggle {
    display: block;
  }

  .mobile-only {
    display: block;
  }

  .desktop-only {
    display: none;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(8, 12, 20, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1050;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-menu li a {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
  }

  .nav-container {
    justify-content: space-between;
  }

  /* Hero */
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    order: 1;
  }

  .hero-visual {
    order: 2;
    margin-top: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
  }

  /* Features Section */
  .features-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .section-head {
    margin: 0 0 32px 0 !important;
    text-align: center !important;
  }

  .features-right {
    order: 2;
    /* Mockup sotto il titolo ma sopra l'accordion o viceversa? */
    /* Mettiamo: Titolo -> Mockup -> Accordion */
  }

  .features-mockup {
    width: 100% !important;
    max-width: 280px !important;
    margin: 0 auto !important;
  }

  /* Accordion Mobile */
  .accordion-header {
    padding: 18px;
  }

  .accordion-title {
    gap: 12px;
  }

  .accordion-title .icon-box {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .accordion-title h3 {
    font-size: 16px;
  }

  .accordion-content {
    padding: 0 18px 0 18px;
    /* Rimuoviamo l'indentazione su mobile per spazio */
  }

  .accordion-content.active {
    padding: 0 18px 18px 18px;
  }

  .accordion-content p {
    margin-top: 12px;
    font-size: 15px;
  }

  .accordion-stats,
  .notification-preview {
    flex-direction: column;
    gap: 12px;
  }

  /* Rewards Section */
  .rewards-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .rewards-content {
    order: 1;
  }

  .rewards-visual {
    order: 2;
  }

  .rewards-list li {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }

  /* CTA Section */
  .cta-box {
    padding: 48px 24px;
    text-align: center;
  }

  .cta-buttons {
    flex-direction: column;
    width: 100%;
  }

  .store-btn {
    width: 100%;
    justify-content: center;
  }

  /* Footer */
  .footer-container {
    flex-direction: column;
    gap: 32px;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 520px) {
  .phone-mockup {
    width: 240px;
  }

  .mockup-card {
    width: 140px;
  }

  .bento-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .user-bubble {
    width: 40px;
    height: 40px;
  }

  .modal-card {
    padding: 24px 20px;
  }
}