/* ═══════════════════════════════════════════════════════════════
   Famcash — Landing
   Filosofia: "Carezza Geometrica" — calore attraverso geometria precisa.
   Palette estratta dall'app (coerenza prodotto↔marketing = fiducia gratis).
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --viola:        #6C3CE1;
  --viola-scuro:  #5A2FC2;
  --viola-chiaro: #9B6DFF;
  --lavanda:      #F3F0FF;
  --lavanda-2:    #EEF2FF;
  /* Accenti (ritmo, non decorazione) */
  --verde:        #20B486;
  --blu:          #3B82F6;
  --ambra:        #F59E0B;
  /* Neutri */
  --linea:        #E5E7EB;
  --testo:        #241B3A;   /* near-black tinto viola = caldo, non freddo */
  --testo-soft:   #6B647E;
  --bianco:       #FFFFFF;

  /* Tipografia */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body:    "Instrument Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Forma */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 28px;
  --r-pill: 999px;

  /* Ombre quasi impercettibili, tinte viola */
  --sh-sm: 0 2px 10px -4px rgba(36, 27, 58, .12);
  --sh-md: 0 14px 40px -16px rgba(108, 60, 225, .28);
  --sh-lg: 0 30px 70px -24px rgba(108, 60, 225, .35);

  --maxw: 1120px;
}

/* ───────── Reset ───────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--testo);
  background: var(--bianco);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--viola-chiaro); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ───────── Tipografia condivisa ───────── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--viola);
  margin-bottom: 14px;
}
.section__title { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.section__lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--testo-soft); max-width: 56ch; margin-top: 16px; }

/* ───────── Bottoni ───────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  padding: 15px 26px;
  border: 0; border-radius: var(--r-md);
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.btn--sm { padding: 10px 18px; font-size: .95rem; border-radius: 14px; }
.btn--primary { background: var(--viola); color: #fff; box-shadow: var(--sh-md); }
.btn--primary:hover { background: var(--viola-scuro); transform: translateY(-2px); box-shadow: var(--sh-lg); }
.btn--light { background: #fff; color: var(--viola); box-shadow: var(--sh-md); }
.btn--light:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }

/* ───────── Pill ───────── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .9rem;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: var(--lavanda); color: var(--viola);
  border: 1px solid #E4DAFF;
}
.pill--light { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.3); }

/* ═══════════════════════ NAV ═══════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--linea);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { border-radius: 9px; box-shadow: var(--sh-sm); }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) { font-weight: 500; color: var(--testo-soft); transition: color .15s; }
.nav__links a:not(.btn):hover { color: var(--testo); }

/* ═══════════════════════ HERO ═══════════════════════ */
.hero {
  position: relative;
  padding: clamp(48px, 7vw, 96px) 0 64px;
  background:
    radial-gradient(120% 90% at 85% -10%, rgba(155,109,255,.20), transparent 60%),
    linear-gradient(180deg, var(--lavanda) 0%, #fff 78%);
}
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero__title { font-size: clamp(2.3rem, 5.4vw, 4rem); font-weight: 800; margin: 22px 0 0; }
.hero__sub { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--testo-soft); margin-top: 20px; max-width: 40ch; }

/* Waitlist form */
.waitlist {
  display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap;
}
.waitlist__input {
  flex: 1 1 240px; min-width: 0;
  font: inherit; color: var(--testo);
  padding: 15px 18px;
  background: #fff;
  border: 1.5px solid var(--linea);
  border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
}
.waitlist__input::placeholder { color: #A29DB0; }
.waitlist__input:focus { outline: none; border-color: var(--viola-chiaro); box-shadow: 0 0 0 4px rgba(155,109,255,.18); }
.waitlist .btn { flex: 0 0 auto; }
.waitlist__micro { font-size: .9rem; color: var(--testo-soft); margin-top: 14px; }
/* Wrapper bottone (sostituisce il form) */
.cta-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; margin-top: 28px; }
.cta-wrap--center { align-items: center; margin-inline: auto; }

/* Variante chiara (sezione beta viola) */
.waitlist--light { justify-content: center; }
.waitlist--light .waitlist__input { border-color: transparent; }
.waitlist__micro--light { color: rgba(255,255,255,.85); }

/* Trust strip */
.trust {
  list-style: none; padding: 0; margin: clamp(36px,5vw,56px) 0 0;
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: center;
  border-top: 1px solid var(--linea); padding-top: 28px;
}
.trust li { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--testo-soft); font-size: .98rem; }
.trust li::before { content: "✓"; color: var(--verde); font-weight: 800; }

/* ───────── iPhone mockup ───────── */
.hero__phone { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative;
  width: min(300px, 80vw);
  aspect-ratio: 300 / 620;
  background: #0E0A1A;
  border-radius: 46px;
  padding: 12px;
  box-shadow: var(--sh-lg), inset 0 0 0 2px rgba(255,255,255,.06);
}
.phone__island {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 26px; background: #000; border-radius: var(--r-pill); z-index: 3;
}
.phone__screen {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, var(--lavanda) 0%, #fff 40%);
  border-radius: 36px; overflow: hidden;
}
.app { padding: 46px 16px 18px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.app__top { display: flex; align-items: center; justify-content: space-between; }
.app__hi { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.app__pig { font-size: 1.3rem; }

/* Balance card (gradiente come nell'app) */
.balance {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--viola) 0%, var(--viola-chiaro) 100%);
  border-radius: var(--r-lg);
  padding: 18px 18px 20px;
  color: #fff; box-shadow: var(--sh-md);
  display: flex; flex-direction: column;
}
.balance__label { font-size: .8rem; opacity: .85; font-weight: 500; }
.balance__amount { font-family: var(--font-display); font-weight: 800; font-size: 2.5rem; letter-spacing: -0.03em; line-height: 1.05; margin-top: 2px; }
.balance__sub {
  align-self: flex-start; margin-top: 8px;
  font-size: .76rem; font-weight: 600;
  background: rgba(255,255,255,.22); padding: 4px 10px; border-radius: var(--r-pill);
}
.balance__pig {
  position: absolute; right: -6px; bottom: -10px; font-size: 4.2rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.2)); opacity: .9; transform: rotate(-8deg);
}

/* Righe lista */
.row {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1px solid var(--linea);
  border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--sh-sm);
}
.row__dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.row__dot--amber { background: var(--ambra); }
.row__dot--blue { background: var(--blu); }
.row__text { font-size: .86rem; font-weight: 500; flex: 1; }
.row__val { font-weight: 700; font-size: .86rem; }
.row__val--green { color: var(--verde); }
.row--badge { background: var(--lavanda-2); border-color: #E0E7FF; }
.row__trophy { font-size: 1.1rem; }
.row--badge .row__text { font-size: .8rem; }

/* Obiettivo */
.goal { background: #fff; border: 1px solid var(--linea); border-radius: var(--r-md); padding: 12px 14px; box-shadow: var(--sh-sm); }
.goal__head { display: flex; align-items: center; gap: 10px; }
.goal__pct { font-weight: 700; font-size: .82rem; color: var(--blu); }
.goal__bar { margin-top: 10px; height: 8px; border-radius: var(--r-pill); background: var(--lavanda-2); overflow: hidden; }
.goal__bar span { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--blu), #60A5FA); }

/* Chip galleggianti */
.float-chip {
  position: absolute; z-index: 4;
  font-size: .82rem; font-weight: 600;
  background: #fff; color: var(--testo);
  padding: 9px 14px; border-radius: var(--r-pill);
  box-shadow: var(--sh-md); white-space: nowrap;
}
.float-chip--approve { top: 14%; left: -8%; }
.float-chip--goal { bottom: 16%; right: -6%; }

/* ═══════════════════════ SEZIONI ═══════════════════════ */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--lav { background: linear-gradient(180deg, var(--lavanda-2), var(--lavanda)); }

/* Benefici */
.benefits .section__title { max-width: 18ch; }
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(36px, 5vw, 56px); }
.bcard {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--r-lg);
  padding: 32px 28px; box-shadow: var(--sh-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.bcard:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.bcard__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: var(--r-md); margin-bottom: 20px;
}
.bcard__icon svg { width: 28px; height: 28px; }
.bcard__icon--amber  { background: #FEF3D7; color: var(--ambra); }
.bcard__icon--violet { background: var(--lavanda); color: var(--viola); }
.bcard__icon--green  { background: #D8F3E9; color: var(--verde); }
.bcard__title { font-size: 1.35rem; margin-bottom: 10px; }
.bcard__text { color: var(--testo-soft); }

/* Come funziona */
.steps {
  list-style: none; padding: 0; margin: clamp(40px,5vw,64px) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  counter-reset: step;
}
.step {
  position: relative; background: #fff; border: 1px solid var(--linea);
  border-radius: var(--r-lg); padding: 36px 28px 30px; box-shadow: var(--sh-sm);
}
.step__n {
  display: block;
  font-family: var(--font-display); font-weight: 800;
  font-size: 3.4rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--viola-chiaro);
  margin-bottom: 14px;
}
.step__title { font-size: 1.3rem; margin-bottom: 8px; }
.step__text { color: var(--testo-soft); }

/* Fiducia */
.trustsec__inner { text-align: center; max-width: 760px; margin-inline: auto; }
.trustsec .section__lead { margin-inline: auto; }
.partners { display: flex; gap: 28px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 40px; }
.partners--soon .partner-slot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 168px; height: 64px; border-radius: var(--r-md);
  border: 1.5px dashed var(--linea); color: #B7B2C4;
  font-size: .85rem; font-weight: 600;
}

/* Beta CTA */
.beta {
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(155,109,255,.5), transparent 55%),
    linear-gradient(135deg, var(--viola) 0%, var(--viola-scuro) 100%);
  color: #fff;
}
.beta__inner { text-align: center; max-width: 720px; margin-inline: auto; }
.beta__title { font-size: clamp(2rem, 4.6vw, 3.2rem); font-weight: 800; margin: 18px 0 16px; }
.beta__text { font-size: clamp(1.05rem, 2vw, 1.25rem); color: rgba(255,255,255,.9); max-width: 52ch; margin-inline: auto; }
.beta__text strong { color: #fff; }
.beta .waitlist { max-width: 540px; margin-inline: auto; margin-top: 32px; }

/* FAQ */
.faq__inner { max-width: 760px; margin-inline: auto; }
.qa {
  border-bottom: 1px solid var(--linea);
  padding: 6px 0;
}
.qa summary {
  list-style: none; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 1.18rem;
  padding: 20px 44px 20px 0; position: relative;
  transition: color .15s;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--font-body); font-weight: 400; font-size: 1.8rem; color: var(--viola);
  transition: transform .2s ease;
}
.qa[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.qa summary:hover { color: var(--viola); }
.qa p { color: var(--testo-soft); padding: 0 44px 22px 0; }

/* ═══════════════════════ FOOTER ═══════════════════════ */
.footer { background: #1A1330; color: #C9C2DE; padding: 56px 0 36px; }
.footer__inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer .brand__name { color: #fff; }
.footer__tag { margin-top: 12px; font-size: .95rem; color: #9089A8; max-width: 32ch; }
.footer__links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__links a { color: #C9C2DE; font-weight: 500; transition: color .15s; }
.footer__links a:hover { color: #fff; }
.footer__legal { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; color: #7E7796; }

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__sub, .waitlist { margin-inline: auto; }
  .hero__sub { max-width: 46ch; }
  .waitlist { justify-content: center; }
  .hero__phone { order: -1; margin-bottom: 8px; }
  .cards-3, .steps { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .nav__links a:not(.btn) { display: none; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .container { padding-inline: 18px; }
  .waitlist .btn { width: 100%; }
  .float-chip--approve { left: 0; }
  .float-chip--goal { right: 0; }
}

/* Rispetta chi preferisce meno movimento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
