/* =========================================================
   Yo.Co. — foglio di stile
   Principio: le illustrazioni portano il gioco,
   tipografia e spazi portano la credibilità.
   ========================================================= */

:root {
  /* Palette campionata dal logo */
  --ink: #28363f;
  --teal: #3f9fa3;
  --teal-dark: #2c777a;
  --petrol: #4e7c92;
  --orange: #e8923f;
  --orange-dark: #c9762a;
  --leaf: #7bb23e;
  --periwinkle: #aec5e6;
  --periwinkle-band: #bcd0ea;
  --periwinkle-ink: #27466c;
  --paper: #faf7f2;
  --line: #e4ddd0;

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --container: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }

p { margin: 0 0 1em; }
a { color: var(--teal-dark); }
a:hover { color: var(--orange-dark); }
img { max-width: 100%; height: auto; display: block; }

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

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8em 1.5em;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--orange); color: #fff; }
.btn--primary:hover { background: var(--orange-dark); color: #fff; }
.btn--ghost { border-color: var(--petrol); color: var(--petrol); background: transparent; }
.btn--ghost:hover { background: var(--petrol); color: #fff; }
.btn--ink { background: var(--periwinkle-ink); color: #fff; }
.btn--ink:hover { background: var(--ink); color: #fff; }
.btn--disabled { background: var(--line); color: #8a8577; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 68px;
}
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; letter-spacing: 0.01em; }
.brand__period { color: var(--ink); }
.dot--ink { color: var(--ink); }
.dot--orange { color: var(--orange); }
.dot--teal { color: var(--teal); }
.dot--leaf { color: var(--leaf); }
.brand__tagline {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--teal-dark); font-weight: 600;
}

.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem;
}
.site-nav a:hover { background: #f0e9dd; color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--orange-dark); font-weight: 600; }

.nav-toggle { display: none; }
.nav-toggle__btn { display: none; }

@media (max-width: 860px) {
  .brand__tagline { display: none; }
  .nav-toggle__btn {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px;
  }
  .nav-toggle__btn span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; }
  .site-nav { display: none; width: 100%; }
  .nav-toggle:checked ~ .site-nav { display: block; }
  .site-header__inner { flex-wrap: wrap; }
  .site-nav ul { flex-direction: column; padding-bottom: 12px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 7vw, 92px); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero__inner { max-width: 620px; }
.hero h1 { color: var(--ink); }
.hero__sub { font-size: 1.2rem; max-width: 56ch; color: #3d4c56; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* Card immagine Ospiti nell'hero (cornice periwinkle con didascalia) */
.hero__figure {
  margin: 0;
  background: var(--periwinkle);
  border-radius: 26px;
  padding: 14px;
  position: relative;
  box-shadow: 0 18px 40px -22px rgba(39, 70, 108, .5);
}
.hero__figure img {
  width: 100%; border-radius: 16px; display: block;
}
.hero__figure figcaption {
  position: absolute; left: 26px; bottom: 26px;
  background: rgba(255,255,255,.92);
  color: var(--periwinkle-ink);
  font-size: 0.82rem; font-weight: 600;
  padding: 7px 12px; border-radius: 999px;
  backdrop-filter: blur(2px);
}
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__figure { max-width: 460px; }
}

/* ---------- Box team (in "Come nasce il metodo") ---------- */
.team-boxes {
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 40px;
}
@media (max-width: 820px) { .team-boxes { grid-template-columns: 1fr; } }
.team-box {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.team-box__photo {
  width: 64px; height: 64px; border-radius: 50%; margin-bottom: 14px;
  background:
    radial-gradient(circle at 32% 30%, rgba(63,159,163,.5), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(232,146,63,.5), transparent 60%),
    var(--periwinkle);
  /* placeholder foto: sostituire con <img> quando disponibili */
}
.team-box h4 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.08rem;
  margin: 0 0 6px; color: var(--ink);
}
.team-box p { margin: 0; font-size: 0.96rem; }

/* ---------- Sezioni ---------- */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section--tint { background: #f3eee4; }

/* Sezione con un Ospite come accento (personaggio che "sbircia") */
.section--accent { position: relative; overflow: hidden; }
/* riservo una fascia a sinistra per il personaggio, così testo e figura non si sovrappongono */
.section--accent .cols-2 { padding-left: 170px; }
@media (max-width: 1024px) {
  .section--accent .cols-2 { padding-left: 0; }
}
.section-accent {
  position: absolute;
  pointer-events: none;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(40, 54, 63, .14));
}
.section-accent--confrontino {
  width: 128px;
  left: max(24px, calc((100% - var(--container)) / 2 + 8px));
  top: clamp(48px, 7vw, 88px);
  transform: scaleX(-1);
}
@media (max-width: 1024px) {
  /* sotto i 1024px la colonna testo si avvicina al bordo: nascondo l'accento decorativo */
  .section-accent { display: none; }
}
.section__eyebrow {
  font-family: var(--font-display); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--teal-dark);
  margin-bottom: 10px;
}
.section h2 { max-width: 24ch; }
.prose { max-width: 68ch; }
.prose--center { margin-inline: auto; }

.cols-2 { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 820px) { .cols-2 { grid-template-columns: 1fr; } }

/* ---------- Le due porte (Edu / Therapy) ---------- */
.doors { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .doors { grid-template-columns: 1fr; } }
.door {
  border-radius: var(--radius);
  padding: 36px 32px;
  color: #fff;
  display: flex; flex-direction: column; gap: 6px;
}
.door--edu { background: linear-gradient(160deg, var(--leaf), #5f9027); }
.door--therapy { background: linear-gradient(160deg, var(--petrol), #38596a); }
.door h3 { font-size: 1.6rem; color: #fff; }
.door__target {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
  font-weight: 600; opacity: .92;
}
.door p { color: rgba(255,255,255,.94); }
.door .btn { align-self: flex-start; margin-top: auto; background: #fff; }
.door--edu .btn { color: #4c7420; }
.door--therapy .btn { color: #38596a; }
.door .btn:hover { background: var(--paper); }

/* ---------- Fascia periwinkle: Gli Ospiti della Mente ---------- */
.band {
  background: var(--periwinkle-band);
  color: var(--periwinkle-ink);
  padding-block: clamp(48px, 7vw, 80px);
}
.band__head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.band h2 { color: var(--periwinkle-ink); margin-bottom: 4px; }
.band__subtitle { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; }
.band__cards {
  list-style: none; margin: 26px 0 0; padding: 4px 4px 18px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 236px;
  gap: 18px; overflow-x: auto; scroll-snap-type: x proximity;
}
.band__cta { margin-top: 10px; }

.ospite-card {
  background: var(--periwinkle);
  border: 2px solid var(--periwinkle-ink);
  border-radius: 16px;
  padding: 16px;
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  box-shadow: 4px 4px 0 rgba(39, 70, 108, .28);
  transition: transform .15s ease;
}
.ospite-card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.ospite-card__voce {
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  background: #fff; border-radius: 12px; padding: 10px 12px; margin: 0 0 12px;
  position: relative;
}
.ospite-card__voce::after {
  content: ""; position: absolute; left: 22px; bottom: -8px;
  border: 8px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.ospite-card__art { aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: #fff; }
.ospite-card__art img { width: 100%; height: 100%; object-fit: contain; }
.ospite-card__art.is-placeholder {
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(63,159,163,.35), transparent 55%),
    radial-gradient(circle at 70% 65%, rgba(232,146,63,.35), transparent 55%),
    #fff;
}
.ospite-card__art.is-placeholder::before {
  content: "illustrazione in arrivo";
  font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--periwinkle-ink);
}
.ospite-card__nome { margin: 0; font-size: 1.05rem; color: var(--periwinkle-ink); }
.ospite-card__distorsione {
  margin: 2px 0 0; font-size: 0.78rem; text-transform: uppercase;
  letter-spacing: 0.1em; font-weight: 600; color: #3a5c86;
}

/* varianti colore card (bordo del fumetto) */
.ospite-card--teal .ospite-card__voce { color: var(--teal-dark); }
.ospite-card--orange .ospite-card__voce { color: var(--orange-dark); }
.ospite-card--leaf .ospite-card__voce { color: #55801f; }
.ospite-card--petrol .ospite-card__voce { color: var(--petrol); }
.ospite-card--ink .ospite-card__voce { color: var(--ink); }

/* griglia (pagina Ospiti) al posto dello scroll orizzontale */
.band--grid .band__cards {
  grid-auto-flow: row; grid-auto-columns: unset;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  overflow: visible;
}

/* ---------- CTA workshop ---------- */
.cta-box {
  background: linear-gradient(140deg, var(--teal), var(--teal-dark));
  color: #fff; border-radius: var(--radius);
  padding: clamp(32px, 5vw, 56px);
  display: grid; gap: 20px; grid-template-columns: 1.6fr 1fr; align-items: center;
}
@media (max-width: 820px) { .cta-box { grid-template-columns: 1fr; } }
.cta-box h2 { color: #fff; }
.cta-box p { color: rgba(255,255,255,.94); max-width: 55ch; }
.cta-box .btn { justify-self: start; }
@media (min-width: 821px) { .cta-box .btn { justify-self: end; } }
.cta-box__actions { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 821px) { .cta-box__actions { align-items: flex-end; } }

/* ---------- Testimonianze ---------- */
.quotes { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .quotes { grid-template-columns: 1fr; } }
.quote {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin: 0;
}
.quote p { font-size: 1.02rem; }
.quote footer { font-weight: 600; color: var(--petrol); font-size: 0.95rem; }

/* ---------- Toolkit / card strumenti ---------- */
.tools { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.tool {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.tool h3 { display: flex; align-items: center; gap: 10px; }
.tool__num {
  font-family: var(--font-display); font-weight: 800; color: #fff;
  background: var(--orange); width: 30px; height: 30px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 0.95rem; flex: none;
}
.tool p { margin-bottom: 0; font-size: 0.98rem; }
.tool ul { margin: 10px 0 0; padding-left: 20px; font-size: 0.96rem; }
.tool li { margin-bottom: 4px; }

/* immagine del fronte mazzo nelle card strumento */
.tool--card { display: flex; flex-direction: column; }
.tool__img {
  aspect-ratio: 3 / 2;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #f3eee4;
}
.tool__img img { width: 100%; height: 100%; object-fit: cover; }
.tool__img.is-placeholder {
  display: grid; place-items: center;
  border: 1px dashed var(--line);
  background:
    radial-gradient(circle at 30% 30%, rgba(63,159,163,.18), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(232,146,63,.18), transparent 55%),
    #faf7f2;
}
.tool__img.is-placeholder::before {
  content: "fronte mazzo in arrivo";
  font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: #8a8577;
}

/* ---------- Toolkit: elenco verticale in sequenza (1→5) ---------- */
.toolkit { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 20px; }
.toolkit__item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: grid;
  grid-template-columns: 260px 1fr; gap: 30px; align-items: center;
}
/* righe alternate: immagine a destra, per dare ritmo al percorso */
.toolkit__item:nth-child(even) { grid-template-columns: 1fr 260px; }
.toolkit__item:nth-child(even) .toolkit__img { order: 2; }
.toolkit__item:nth-child(even) .toolkit__body { order: 1; }

.toolkit__img {
  border-radius: 12px; overflow: hidden;
  background: #f3eee4; align-self: center;
}
.toolkit__img img { width: 100%; height: auto; display: block; }
.toolkit__img.is-placeholder {
  aspect-ratio: 3 / 4;
  display: grid; place-items: center; border: 1px dashed var(--line);
  background:
    radial-gradient(circle at 30% 30%, rgba(63,159,163,.18), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(232,146,63,.18), transparent 55%),
    #faf7f2;
}
.toolkit__img.is-placeholder::before {
  content: "fronte mazzo in arrivo";
  font-size: 0.72rem; letter-spacing: .06em; text-transform: uppercase; color: #8a8577;
  text-align: center; padding: 0 8px;
}
.toolkit__body h3 { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.toolkit__num {
  font-family: var(--font-display); font-weight: 800; color: #fff;
  background: var(--orange); width: 34px; height: 34px; border-radius: 50%;
  display: inline-grid; place-items: center; font-size: 1rem; flex: none;
}
.toolkit__body p { margin-bottom: 0; font-size: 0.98rem; }
.toolkit__body ul { margin: 10px 0 0; padding-left: 20px; font-size: 0.96rem; }
.toolkit__body li { margin-bottom: 4px; }

@media (max-width: 720px) {
  .toolkit__item,
  .toolkit__item:nth-child(even) { grid-template-columns: 1fr; gap: 16px; justify-items: center; }
  .toolkit__item:nth-child(even) .toolkit__img { order: 0; }
  .toolkit__item:nth-child(even) .toolkit__body { order: 0; }
  .toolkit__img { max-width: 240px; }
  .toolkit__img.is-placeholder { width: 240px; }
  .toolkit__body { justify-self: stretch; }
}

/* ---------- Fasi protocollo ---------- */
.phases { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: fase; }
.phase {
  background: #fff; border-left: 6px solid var(--petrol);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
}
.phase h3 { margin-bottom: 4px; color: var(--petrol); }
.phase p { margin: 0; font-size: 0.98rem; }
.phases--edu .phase { border-left-color: var(--leaf); }
.phases--edu .phase h3 { color: #55801f; }

/* ---------- Confine dei ruoli ---------- */
.roles { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .roles { grid-template-columns: 1fr; } }
.role { border-radius: var(--radius); padding: 26px; }
.role--edu { background: #eef4e4; border: 1px solid #cfe0b3; }
.role--therapy { background: #e8eef2; border: 1px solid #c3d2dc; }
.role ul { margin: 0; padding-left: 20px; }
.role li { margin-bottom: 6px; }

/* ---------- Embed / placeholder ---------- */
.embed-placeholder {
  border: 2px dashed var(--petrol); border-radius: var(--radius);
  padding: 32px; text-align: center; color: var(--petrol); background: #fff;
}
.embed-placeholder p { margin-bottom: 6px; }
.luma-embed { display: block; }

/* ---------- Prose pagine interne ---------- */
.page-head { padding-block: clamp(40px, 6vw, 72px) 0; }
.page-head h1 { max-width: 20ch; }
.page-head .hero__sub { margin-top: 6px; }

/* Variante con immagine a destra, per le pagine interne (Il metodo, Per psicologi, Per insegnanti...) */
.page-head--split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}
.page-head--split .page-head__text { padding-block: 0; }
.page-head--split .hero__figure { margin: 0; max-width: 420px; justify-self: end; }
@media (max-width: 860px) {
  .page-head--split { grid-template-columns: 1fr; }
  .page-head--split .hero__figure { max-width: 340px; justify-self: start; margin-top: 8px; }
}
/* placeholder quando l'illustrazione definitiva non è ancora disponibile */
.hero__figure.is-placeholder {
  aspect-ratio: 1 / 1;
  display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(63,159,163,.18), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(232,146,63,.18), transparent 55%),
    var(--periwinkle);
}
.hero__figure.is-placeholder::before {
  content: "illustrazione in arrivo";
  font-size: 0.78rem; letter-spacing: .06em; text-transform: uppercase;
  color: var(--periwinkle-ink); opacity: .75;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: #cfd8dd;
  padding-block: 48px; margin-top: clamp(48px, 7vw, 80px);
  font-size: 0.95rem;
}
.site-footer__inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.site-footer__brand { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; color: #fff; }
.site-footer__brand span { font-weight: 500; font-size: 0.8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--periwinkle); margin-left: 8px; }
.site-footer a { color: var(--periwinkle); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* ---------- Form contatti ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-form { display: grid; gap: 18px; max-width: 560px; }
.form-field { display: grid; gap: 6px; }
.form-field label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
}
.form-field .req { color: var(--orange-dark); }
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
}
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--teal);
  outline: 3px solid var(--orange);
  outline-offset: 1px;
}
.contact-form .btn { border: none; cursor: pointer; justify-self: start; }
.contact-form__hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 4px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
}
.form-status[hidden] { display: none; }
.form-status--ok { background: #e5f1ec; color: var(--teal-dark); }
.form-status--err { background: #fbeadb; color: var(--orange-dark); }

.contact-aside {
  background: #f3eee4;
  border-radius: var(--radius);
  padding: 24px 26px;
}
.contact-aside h2 { font-size: 1.25rem; margin-bottom: 10px; }
.contact-aside p { margin-bottom: 0.7em; font-size: 0.98rem; }
