/* ============================================================
   Mondo Complesso — Landing pages
   Token allineati a joecasini.com (src/styles/tokens/*.css)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Roboto:wght@400;500;700&family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* Brand */
  --jc-blue: #1F58FF;
  --jc-blue-600: #1544d6;
  --jc-blue-050: #eaefff;
  --jc-ink: #1a1a1a;
  --jc-text: #333333;
  --jc-text-muted: #6b6b6b;
  --jc-text-faint: #9a9a9a;
  --jc-orange: #F26F21;
  --jc-gold: #D88A24;

  /* Superfici */
  --jc-white: #ffffff;
  --jc-gray-050: #f7f7f7;
  --jc-gray-100: #F4F4F4;
  --jc-gray-hero: #E7E7E7;
  --jc-gray-200: #ececec;
  --jc-lavender: #DDE0FE;
  --jc-border: #e2e2e2;
  --jc-dark: #1a1a1a;
  --jc-dark-800: #242424;

  /* Tipografia */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-roboto: 'Roboto', 'Open Sans', -apple-system, sans-serif;
  --font-display: var(--font-serif);
  --font-body: var(--font-sans);
  --font-button: var(--font-roboto);

  --fs-h1: 52px;
  --fs-h2: 34px;
  --fs-h3: 24px;
  --fs-h4: 20px;
  --fs-lead: 19px;
  --fs-body: 16px;
  --fs-sm: 14px;
  --fs-xs: 12px;
  --lh-heading: 1.15;
  --lh-body: 1.7;
  --ls-label: 0.14em;

  /* Spaziature */
  --container-max: 1150px;
  --container-narrow: 760px;
  --gutter: 24px;
  --section-y: 88px;

  /* Effetti */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(20, 20, 20, 0.07);
  --shadow-md: 0 8px 24px rgba(20, 20, 20, 0.10);
  --shadow-card: 0 10px 30px rgba(20, 20, 20, 0.08);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 200ms;
}

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

/* I display espliciti dei componenti vincono su [hidden]: va reso non negoziabile */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--jc-text);
  background: var(--jc-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--jc-ink);
  line-height: var(--lh-heading);
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(32px, 5.2vw, var(--fs-h1)); }
h2 { font-size: clamp(26px, 4vw, var(--fs-h2)); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--jc-blue); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--jc-blue-600); text-decoration: underline; }

img, svg { max-width: 100%; height: auto; display: block; }

:focus-visible {
  outline: 3px solid var(--jc-blue);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Layout ---------- */
.wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--narrow { max-width: var(--container-narrow); }

.band { padding-block: var(--section-y); }
.band--tight { padding-block: 56px; }
.band--gray { background: var(--jc-gray-100); }
.band--hero { background: var(--jc-gray-hero); }
.band--lavender { background: var(--jc-lavender); }
.band--dark { background: var(--jc-dark); color: rgba(255, 255, 255, 0.78); }
.band--dark h2, .band--dark h3 { color: #fff; }

.eyebrow {
  font-family: var(--font-roboto);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--jc-blue);
  margin: 0 0 var(--gutter);
}

.lead { font-size: var(--fs-lead); line-height: 1.6; color: var(--jc-text); }
.muted { color: var(--jc-text-muted); }
.small { font-size: var(--fs-sm); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---------- Topbar ---------- */
.topbar {
  border-bottom: 1px solid var(--jc-border);
  background: var(--jc-white);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  min-height: 68px;
}
.topbar__logo img { height: 34px; width: auto; }
.topbar__proof {
  font-family: var(--font-roboto);
  font-size: var(--fs-sm);
  color: var(--jc-text-muted);
}
.topbar__proof b { color: var(--jc-ink); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-button);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  padding: 15px 26px;
  border: 2px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: center;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--jc-blue); color: #fff; }
.btn--primary:hover { background: var(--jc-blue-600); color: #fff; }
.btn--ghost { background: transparent; color: var(--jc-ink); border-color: var(--jc-ink); }
.btn--ghost:hover { background: var(--jc-ink); color: #fff; }
.btn--onDark { background: #fff; color: var(--jc-ink); }
.btn--onDark:hover { background: var(--jc-blue); color: #fff; }
.btn--block { width: 100%; }
.btn--sm { padding: 11px 18px; font-size: 14px; }

/* ---------- Form iscrizione ---------- */
.signup { max-width: 520px; }
.signup__row { display: flex; gap: 12px; flex-wrap: wrap; }
.signup__row + .signup__row { margin-top: 12px; }
.signup__field { flex: 1 1 240px; min-width: 0; }

.signup input[type="email"],
.signup input[type="text"] {
  width: 100%;
  font-family: var(--font-body);
  font-size: 16px; /* 16px evita lo zoom automatico su iOS */
  color: var(--jc-ink);
  padding: 15px 16px;
  background: #fff;
  border: 1px solid var(--jc-border);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.signup input[type="email"]::placeholder,
.signup input[type="text"]::placeholder { color: var(--jc-text-faint); }
.signup input[type="email"]:focus,
.signup input[type="text"]:focus {
  border-color: var(--jc-blue);
  box-shadow: 0 0 0 3px var(--jc-blue-050);
  outline: none;
}
.signup .btn { flex: 0 0 auto; }
/* placeholder piu piccolo solo qui: il font-size dell'input resta 16px,
   altrimenti iOS zooma al focus */
.signup__row--names input::placeholder { font-size: 14px; }
.signup__note {
  margin: 12px 0 0;
  font-size: var(--fs-sm);
  color: var(--jc-text-muted);
}
.signup__note a { color: var(--jc-text-muted); text-decoration: underline; }
.signup__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.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;
}

/* ---------- Hero ---------- */
.hero { background: var(--jc-gray-hero); padding-block: 72px 0; overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 56px;
  align-items: end;
}
/* il ritratto arriva al bordo della sezione, il testo mantiene il suo respiro */
.hero__copy { padding-bottom: 64px; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-bottom: 28px; max-width: 34ch; }
.hero__figure { justify-self: center; align-self: end; width: 100%; max-width: 380px; }

/* Ritratto: stesso taglio della prima riga di joecasini.com, a filo col fondo.
   Nessuna ombra: verrebbe tagliata dall'overflow della sezione. */
.hero__portrait {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Striscia press ---------- */
.press__logos {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.press__logos img { max-height: 44px; width: auto; }

/* ---------- Griglia contenuti ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  color: var(--jc-blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card h3 { font-family: var(--font-body); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.card p { color: var(--jc-text); font-size: 15px; }

/* ---------- Testimonianze ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.quote {
  background: #fff;
  border: 1px solid var(--jc-border);
  border-radius: var(--r-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
}
.quote__text {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.5;
  color: var(--jc-ink);
  margin: 0 0 22px;
}
.quote__by { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote__by img { width: 44px; height: 44px; border-radius: var(--r-pill); object-fit: cover; }
.quote__name { font-size: var(--fs-sm); font-weight: 700; color: var(--jc-ink); line-height: 1.3; }
.quote__role { font-size: var(--fs-xs); color: var(--jc-text-muted); line-height: 1.3; }

/* ---------- Bio autore ---------- */
.bio { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: start; }
.bio__photo { border-radius: var(--r-lg); overflow: hidden; }
.bio__book {
  margin-top: 28px;
  padding: 20px 22px;
  background: var(--jc-blue-050);
  border-left: 3px solid var(--jc-blue);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 15px;
}
.bio__book p { margin: 0; }

/* ---------- CTA finale ---------- */
.finalcta { text-align: center; }
.finalcta .signup { margin-inline: auto; }
.finalcta .signup__row { justify-content: center; }
.finalcta h2 { margin-bottom: 12px; }
.finalcta .lead { margin-bottom: 28px; }

/* ---------- Pagina grazie: passi ---------- */
.steps { display: grid; gap: 20px; }
.step {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 20px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--jc-border);
  border-radius: var(--r-lg);
}
.step--primary {
  border: 2px solid var(--jc-blue);
  box-shadow: var(--shadow-md);
}
.step__num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--jc-blue);
  line-height: 1;
  padding-top: 2px;
}
.step h2 { font-size: 22px; margin-bottom: 10px; }
.step h3 { font-family: var(--font-body); font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.step ul { margin: 0 0 18px; padding-left: 20px; }
.step li { margin-bottom: 8px; }
.step__actions { display: flex; gap: 10px; flex-wrap: wrap; }

.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  font-family: var(--font-roboto);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 16px;
  background: var(--jc-gray-100);
  color: var(--jc-ink);
  border: 1px solid var(--jc-border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { background: var(--jc-blue); border-color: var(--jc-blue); color: #fff; }
.chip[aria-pressed="true"] { background: var(--jc-blue); border-color: var(--jc-blue); color: #fff; }
.chips__done { font-size: var(--fs-sm); color: var(--jc-blue); font-weight: 600; }

.mailhint {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.mailhint a {
  font-family: var(--font-roboto);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--jc-border);
  border-radius: var(--r-pill);
  color: var(--jc-ink);
  background: #fff;
}
.mailhint a:hover { border-color: var(--jc-blue); color: var(--jc-blue); text-decoration: none; }

/* ---------- Social compatti ---------- */
.social { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.social a {
  display: block;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r-md);
  color: #fff;
  font-family: var(--font-roboto);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all var(--dur) var(--ease);
}
.social a:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); text-decoration: none; }
.social span { display: block; font-size: var(--fs-xs); opacity: 0.6; margin-top: 4px; }

/* ---------- Footer ---------- */
.foot { background: var(--jc-dark); color: rgba(255, 255, 255, 0.6); padding-block: 44px; }
.foot__inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot a { color: rgba(255, 255, 255, 0.85); }
.foot__links { display: flex; gap: 20px; flex-wrap: wrap; font-size: var(--fs-sm); }
.foot__copy { font-size: var(--fs-xs); }

/* ---------- Banner consensi ---------- */
.cookie {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 50;
  max-width: 620px;
  margin-inline: auto;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--jc-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  font-size: var(--fs-sm);
}
.cookie[hidden] { display: none; }
.cookie p { margin: 0 0 16px; }
.cookie__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  :root { --section-y: 64px; }
  .hero__grid, .bio { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hero__figure { max-width: 300px; order: 2; }
  .hero__copy { order: 1; padding-bottom: 0; }
  .hero .lead { max-width: none; }
  .cards, .quotes { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .bio__photo { max-width: 240px; }
  .social { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .hero { padding-block: 44px 0; }
  .signup__row { flex-direction: column; }
  /* nome e cognome restano affiancati: impilarli spingerebbe il form sotto la piega */
  .signup__row--names { flex-direction: row; }
  .signup__row--names .signup__field { flex: 1 1 0; }
  /* In colonna il flex-basis vale in altezza: va azzerato o il campo diventa alto 240px */
  .signup__field { flex: 0 0 auto; }
  .signup .btn { width: 100%; }
  .press__logos { gap: 18px; justify-content: center; }
  .press__logos img { max-height: 30px; }
  .step { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 22px; }
  .topbar__proof { display: none; }
  .foot__inner { flex-direction: column; align-items: flex-start; }
}
