/* ============================================================
   BEBOND — VERSIONE DEFINITIVA
   Fusione:
   - Scheletro, hero text e form: Sito 1
   - Top bar, palette cromatica e contenuti inferiori: Sito 2
   ============================================================ */

/* ============================================================
   1. VARIABILI GLOBALI — palette del Sito 2
   ============================================================ */
:root {
  --magenta: #d4178c;
  --purple: #7b3fb5;
  --blue: #2f6bcc;
  --teal: #12b89a;
  --orange: #f07b1a;
  --yellow: #f0c41a;

  --dark: #0d0d12;
  --dark-2: #14141e;
  --card: #1a1a28;
  --card-soft: rgba(255, 255, 255, 0.055);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f0eef8;
  --muted: rgba(240, 238, 248, 0.58);
  --faint: rgba(240, 238, 248, 0.28);
  --danger: #ff4d6d;

  --grad-main: linear-gradient(135deg, var(--magenta), var(--purple), var(--blue), var(--teal));
  --grad-btn: linear-gradient(90deg, var(--magenta) 0%, var(--purple) 50%, var(--teal) 100%);
  --grad-warm: linear-gradient(135deg, var(--orange), var(--magenta));
  --grad-size: 300% 300%;

  --font-head: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;

  --radius: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-card: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --shadow-glow: 0 14px 42px rgba(212, 23, 140, 0.35);
}

/* ============================================================
   2. RESET E BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--dark);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(212, 23, 140, 0.11), transparent 34%),
    radial-gradient(circle at bottom right, rgba(18, 184, 154, 0.1), transparent 32%);
}

img,
svg {
  display: block;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

/* ============================================================
   3. SFONDO DECORATIVO — blob del Sito 2
   ============================================================ */
.blob {
  position: fixed;
  z-index: 0;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  pointer-events: none;
  animation: floatBlob 8s ease-in-out infinite alternate;
}

.blob-1 {
  width: 520px;
  height: 520px;
  top: -120px;
  left: -160px;
  background: var(--magenta);
}

.blob-2 {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: -90px;
  background: var(--teal);
  animation-delay: -3s;
}

.blob-3 {
  width: 300px;
  height: 300px;
  top: 40%;
  left: 55%;
  background: var(--blue);
  animation-delay: -6s;
}

@keyframes floatBlob {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(20px, 30px) scale(1.05); }
}

/* ============================================================
   4. LAYOUT
   ============================================================ */
.wrapper {
  position: relative;
  z-index: 1;
  width: min(100% - 40px, 1100px);
  margin: 0 auto;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* ============================================================
   5. TOP BAR — struttura e stile del Sito 2
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 18, 0.7);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.scrolled {
  background: rgba(13, 13, 18, 0.88);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.header-inner {
  width: min(100% - 40px, 1100px);
  margin: 0 auto;
  padding: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
}

.logo-wrap img {
  width: auto;
  height: 44px;
  object-fit: contain;
}

.logo-fallback {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: var(--grad-main);
  background-size: var(--grad-size);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 7s ease infinite;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 30px;
}

.lang-btn {
  padding: 5px 14px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.lang-btn.active {
  background: var(--grad-main);
  background-size: var(--grad-size);
  color: #fff;
  animation: gradientShift 7s ease infinite;
}

.lang-btn:hover:not(.active) {
  color: var(--text);
  transform: translateY(-1px);
}

/* ============================================================
   6. HERO + FORM — struttura Sito 1 con cromia Sito 2
   ============================================================ */
.hero-split {
  min-height: calc(100svh - 72px);
  padding: 80px 0 70px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-content-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.hero-text-col {
  max-width: 610px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid rgba(212, 23, 140, 0.4);
  border-radius: 30px;
  background: rgba(212, 23, 140, 0.15);
  color: #f67ecf;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-title {
  margin-bottom: 22px;
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.grad-text {
  background: var(--grad-main);
  background-size: var(--grad-size);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 7s ease infinite;
}

.hero-sub {
  max-width: 500px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
}

.hero-form-col {
  width: 100%;
}

.form-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 36px 32px 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.form-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--grad-main);
  background-size: var(--grad-size);
  animation: gradientShift 6s ease infinite;
}

.premium-badge {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(212, 23, 140, 0.4);
  border-radius: 999px;
  background: rgba(212, 23, 140, 0.14);
  color: #f67ecf;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--magenta);
  box-shadow: 0 0 0 rgba(212, 23, 140, 0.6);
  animation: pulseDot 1.8s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.45); }
}

.form-title {
  margin-bottom: 6px;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  font-weight: 800;
  line-height: 1.2;
}

.form-sub {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.form-sub strong {
  color: var(--text);
  font-weight: 700;
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bb-input {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.bb-input::placeholder {
  color: rgba(240, 238, 248, 0.3);
}

.bb-input:focus {
  border-color: rgba(212, 23, 140, 0.62);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(212, 23, 140, 0.12);
}

.bb-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.12);
}

.bb-input[type='number']::-webkit-inner-spin-button,
.bb-input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.bb-input[type='number'] {
  -moz-appearance: textfield;
}

.form-error {
  display: none;
  margin: 2px 0 8px;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 700;
}

.form-error.visible {
  display: block;
}

.cta-btn {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  padding: 16px 24px;
  border: 0;
  border-radius: 14px;
  background: var(--grad-btn);
  background-size: var(--grad-size);
  animation: gradientShift 5s ease infinite;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(212, 23, 140, 0.35);
  transition: background-position 0.4s ease, transform 0.2s ease, box-shadow 0.3s ease, opacity 0.2s ease;
}

.cta-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.cta-btn:active:not(:disabled) {
  transform: translateY(0);
}

.cta-btn:disabled {
  cursor: not-allowed;
  opacity: 0.75;
}

.form-privacy {
  margin-top: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.6;
}

.success-state {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 0 12px;
  text-align: center;
}

.success-state.show {
  display: flex;
  animation: popIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-emoji {
  font-size: 3.5rem;
}

.success-title {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 600;
}

.success-sub {
  max-width: 330px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.92) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -3px;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   7. CONTENUTO INFERIORE — sezioni Sito 2
   ============================================================ */
.features {
  padding: 82px 0 76px;
}

.section-label {
  margin-bottom: 14px;
  color: var(--teal);
  text-align: center;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.section-title {
  max-width: 760px;
  margin: 0 auto 50px;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.feat-card {
  min-height: 230px;
  padding: 28px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.feat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 23, 140, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.feat-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.5rem;
}

.feat-icon.m { background: rgba(212, 23, 140, 0.15); }
.feat-icon.p { background: rgba(123, 63, 181, 0.15); }
.feat-icon.b { background: rgba(47, 107, 204, 0.15); }
.feat-icon.t { background: rgba(18, 184, 154, 0.15); }

.feat-card h3 {
  margin-bottom: 8px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
}

.feat-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.how {
  padding: 60px 0 90px;
}

.steps {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 32px;
}

.step:last-child {
  padding-bottom: 0;
}

.step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 50px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--purple), transparent);
}

.step-num {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--grad-main);
  background-size: var(--grad-size);
  animation: gradientShift 7s ease infinite;
  box-shadow: 0 4px 20px rgba(212, 23, 140, 0.4);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
}

.step-content h3 {
  margin-bottom: 5px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
}

.step-content p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

/* ============================================================
   8. FOOTER — Sito 2
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  width: min(100% - 40px, 1100px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.82rem;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  text-decoration: none;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.social-link:hover {
  transform: translateY(-2px);
  background: rgba(212, 23, 140, 0.2);
  border-color: rgba(212, 23, 140, 0.4);
  color: #fff;
}

/* ============================================================
   9. ANIMAZIONI JS-FRIENDLY
   ============================================================ */
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fallback: se JS è disabilitato, mostra comunque il contenuto */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   10. RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .hero-content-wrapper {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-text-col,
  .hero-sub {
    margin-inline: auto;
  }

  .premium-badge {
    margin-inline: auto;
  }

  .features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wrapper,
  .header-inner,
  .footer-inner {
    width: min(100% - 32px, 1100px);
  }

  .header-inner {
    padding: 12px 0;
  }

  .logo-wrap img {
    height: 36px;
  }

  .hero-split {
    min-height: auto;
    padding: 56px 0 58px;
  }

  .hero-title {
    font-size: clamp(2rem, 11vw, 2.75rem);
  }  .form-card {
    padding: 30px 20px 24px;
  }

  .features {
    padding: 64px 0 58px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feat-card {
    min-height: auto;
  }

  .footer-inner {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}