:root {
  --bg: #0b1020;
  --bg-alt: #0d1428;
  --surface: #121a33;
  --surface-2: #0f172a;
  --card: #141e3a;
  --text: #e6eefc;
  --muted: #b7c3e0;
  --primary: #17d1a7;
  --primary-2: #0fc4c9;
  --accent: #7c4dff;
  --ring: rgba(23, 209, 167, 0.35);
  --shadow: rgba(0, 0, 0, 0.35);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --container: 1200px;

  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  padding: 0;
  margin: 0;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(15, 196, 201, 0.12), transparent 60%) no-repeat, var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { color: var(--muted); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 30, 0.55);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand.small span { font-weight: 600; }
.nav {
  display: flex;
  gap: 18px;
}
.nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease;
}
.nav a:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* Hero */
.hero {
  padding: 80px 0 40px;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 32px;
}
.hero-text h1 {
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: 0.3px;
}
.hero-text p {
  margin: 0 0 22px;
  font-size: clamp(16px, 1.5vw, 18px);
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 24px -6px var(--shadow);
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #041215;
}
.btn.ghost {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border-color: rgba(255,255,255,0.08);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Floating Orbs */
.hero-art {
  position: relative;
  min-height: 300px;
  border-radius: var(--radius-lg);
  background: radial-gradient(400px 300px at 20% 20%, rgba(124,77,255,0.15), transparent 60%) no-repeat,
              radial-gradient(500px 350px at 90% 40%, rgba(23,209,167,0.13), transparent 65%) no-repeat,
              var(--surface);
  outline: 1px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 20px 60px -25px var(--shadow);
}
.orb {
  position: absolute;
  filter: blur(16px) saturate(120%);
  opacity: 0.8;
}
.orb-1 { width: 140px; height: 140px; left: 10%; top: 14%; background: radial-gradient(circle at 30% 30%, #9ad6ff, transparent 70%); animation: float 9s ease-in-out infinite; }
.orb-2 { width: 220px; height: 220px; right: 14%; top: 24%; background: radial-gradient(circle at 50% 50%, #7c4dff, transparent 70%); animation: float 11s ease-in-out infinite reverse; }
.orb-3 { width: 110px; height: 110px; left: 36%; bottom: 12%; background: radial-gradient(circle at 50% 50%, #17d1a7, transparent 70%); animation: float 10s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-12px) translateX(6px); }
}

/* Sections */
.section {
  padding: 70px 0;
}
.section.alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)) no-repeat, var(--bg-alt);
}
.section-title {
  font-size: clamp(24px, 3vw, 34px);
  margin: 0 0 8px;
}
.section-subtitle {
  margin: 0 0 28px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start; /* Permette altezze indipendenti per le card */
}
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)) no-repeat, var(--card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 32px -18px var(--shadow);
  position: relative;
  /* Rimuovi overflow: hidden; era un tentativo precedente, ma non è la causa. */
  /* overflow: hidden; */

  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Distribuisce lo spazio tra gli elementi */

  /* Imposta un'altezza minima per evitare che le card si adattino alle variazioni di altezza di PayPal */
  min-height: 280px; /* Altezza minima basata sul contenuto normale */
  /* Rimuovi z-index e transform che potrebbero interferire con il popup PayPal. */
  /* z-index: 1; */
  /* transform: translateZ(0); */
}
.card.featured {
  border-color: rgba(124,77,255,0.4);
  box-shadow: 0 18px 42px -18px rgba(124,77,255,0.35);
}
.card .badge {
  /* Rimuovi il posizionamento assoluto per farlo fluire con il testo */
  position: static; /* Cambia da 'absolute' a 'static' */
  right: initial; /* Rimuovi la proprietà right */
  top: initial;   /* Rimuovi la proprietà top */
  margin: 0; /* Rimuovi tutti i margini extra */
  background: linear-gradient(135deg, #7c4dff, #a487ff);
  color: #0b0820;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 6px; /* Riduci il padding orizzontale come richiesto precedentemente */
  border-radius: 999px;
  letter-spacing: 0.3px;
}
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between; /* Allinea il titolo/prezzo a sinistra e il badge a destra */
  flex-wrap: nowrap; /* Forza gli elementi a stare su una riga */
  gap: 10px; /* Spazio tra gli elementi se necessario, ma space-between prevarrà per gli estremi */
  margin-bottom: 12px;
}
.card h3 {
  margin: 0;
  font-size: 20px;
}
.price {
  margin: 0;
  font-weight: 800;
  font-size: 24px;
  color: var(--primary);
}

/* La regola per il badge nella card featured: spingilo a destra */
.card.featured .card-head .badge {
  margin-left: auto; /* Questo spinge il badge il più a destra possibile */
}

.features {
  list-style: none;
  padding: 0;
  margin: 12px 0 16px;
  color: var(--muted);
}
.features li {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}
.features li:last-child { border-bottom: 0; }
.paypal-wrapper {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px;
  /* Rimuovi z-index che potrebbe interferire con il popup PayPal. */
  /* z-index: 2; */
}

/* Feature grid */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.06);
}

/* Contact form */
.contact-form {
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 32px -18px var(--shadow);
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field label {
  font-size: 14px;
  color: var(--muted);
}
.field input,
.field textarea {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 6px var(--ring);
  background: rgba(255,255,255,0.05);
}
.consent {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 14px;
}
.form-status {
  min-height: 24px;
  font-size: 14px;
  color: var(--muted);
  padding: 6px 0;
}
.actions {
  margin-top: 8px;
}

/* FAQ */
.faq details {
  background: var(--surface-2);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 12px 14px;
  border-radius: 12px;
}
.faq details + details { margin-top: 10px; }
.faq summary {
  cursor: pointer;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: linear-gradient(0deg, rgba(255,255,255,0.04), rgba(255,255,255,0)) no-repeat, #0a0f20;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 40px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 20px;
  padding: 28px 0 18px;
}
.footer-inner h4 {
  margin: 0 0 10px;
}
.footer-inner ul {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--muted);
}
.footer-inner li + li { margin-top: 8px; }
.muted { color: var(--muted); }
.brand.small {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.brand.small img { opacity: 0.9; }
.brand.small span { color: var(--text); }
.copyright {
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 0 18px;
  font-size: 14px;
}

/* Utilities */
.note {
  color: var(--muted);
  font-size: 14px;
  margin-top: 10px;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}
.menu-toggle:hover {
  background: rgba(255,255,255,0.06);
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }
  
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-art {
    min-height: 250px;
  }
  
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 20px;
  }
  
  /* Header Mobile */
  .header-inner {
    height: 60px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 30, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-direction: column;
    gap: 0;
    padding: 12px 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 10px 30px -10px var(--shadow);
  }
  
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav a {
    padding: 14px 20px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }
  
  .nav a:last-child {
    border-bottom: none;
  }
  
  /* Hero Mobile */
  .hero {
    padding: 48px 0 32px;
  }
  
  .hero-text h1 {
    font-size: clamp(28px, 7vw, 42px);
    margin-bottom: 12px;
  }
  
  .hero-text p {
    font-size: 16px;
    margin-bottom: 20px;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn {
    width: 100%;
    height: 48px;
  }
  
  .hero-art {
    min-height: 200px;
  }
  
  /* Sections Mobile */
  .section {
    padding: 48px 0;
  }
  
  .section-title {
    font-size: clamp(22px, 5vw, 28px);
    margin-bottom: 10px;
  }
  
  .section-subtitle {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  /* Cards Mobile */
  .cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .card {
    padding: 16px;
  }
  
  .card h3 {
    font-size: 18px;
  }
  
  .price {
    font-size: 22px;
  }
  
  /* Grid Mobile */
  .grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .feature {
    padding: 16px;
  }
  
  .feature h3 {
    font-size: 18px;
  }
  
  /* Form Mobile */
  .row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .contact-form {
    padding: 16px;
  }
  
  .field input,
  .field textarea {
    padding: 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Footer Mobile */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 0 16px;
  }
  
  .footer-inner .col:first-child {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  .copyright {
    font-size: 13px;
    padding: 12px 0 16px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero {
    padding: 40px 0 28px;
  }
  
  .hero-text h1 {
    font-size: 26px;
    line-height: 1.15;
  }
  
  .hero-text p {
    font-size: 15px;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  .card {
    padding: 14px;
  }
  
  .feature {
    padding: 14px;
  }
  
  .contact-form {
    padding: 14px;
  }
  
  .btn {
    height: 46px;
    font-size: 15px;
  }
  
  /* Orbs smaller on very small screens */
  .orb-1 { width: 100px; height: 100px; }
  .orb-2 { width: 160px; height: 160px; }
  .orb-3 { width: 80px; height: 80px; }
}

/* Landscape phones */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    padding: 32px 0 24px;
  }
  
  .hero-art {
    min-height: 180px;
  }
  
  .section {
    padding: 40px 0;
  }
}

/* Tablet specific */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero-text h1 {
    font-size: 40px;
  }
  
  .cards {
    gap: 18px;
  }
  
  .card {
    padding: 18px;
  }
}

