/**
 * Home / porta d'ingresso — portata dal handoff Design (Home.html).
 * Pagina autoconsistente: usa solo i design token + questo foglio.
 * Impostazioni finali scelte dall'utente: accento ORO, hero MARIANO, densità COMPATTA.
 */

/* reset essenziale (la home non carica app.css/site.css) */
* { box-sizing: border-box; }
html, body { margin: 0; }
body.cap-page {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  line-height: var(--lh-normal);
}
.cap-home a { text-decoration: none; color: inherit; }

/* accento/densità baked-in (oro + compatta) */
.cap-home {
  --home-accent:        var(--gold-deep);
  --home-accent-strong: var(--gold-ink);
  --home-accent-ink:    var(--marian-deep);
  --block-py:           var(--space-9);
}

/* skip-link + banner (riprodotti da site.css per autoconsistenza) */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 3000;
  background: var(--marian); color: var(--ink-on-dark);
  padding: 10px 16px; border-radius: 0 0 var(--radius-md) 0; font-weight: var(--fw-semibold);
}
.skip-link:focus { left: 0; outline: none; box-shadow: var(--ring-focus); }
[id="cap-content"]:focus { outline: none; }
.site-banner {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--banner-review-tint); color: var(--banner-review-ink);
  border-bottom: 1px solid oklch(0.760 0.090 84 / 0.4);
  padding: 8px 16px; font-size: var(--fs-sm); text-align: center;
}
.site-banner svg { width: 16px; height: 16px; flex: 0 0 auto; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 var(--space-7); }
@media (max-width: 620px) { .wrap { padding: 0 var(--space-5); } }

/* =========================================================================
   HEADER + HERO (band unica mariana)
   ========================================================================= */
.topband {
  background: var(--surface-marian);
  color: var(--ink-on-dark);
  border-bottom: 2px solid var(--gold-deep);
  position: relative;
  overflow: hidden;
}
.topband::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
}
.topband__mark {
  position: absolute; right: -60px; top: 38%; transform: translateY(-50%);
  width: 420px; height: 420px; opacity: 0.09; pointer-events: none;
}

/* nav */
.site-header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) 0;
}
.brand { display: flex; align-items: center; gap: var(--space-3); }
.brand__mark { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 auto; }
.brand__mark svg { width: 36px; height: 36px; }
.brand__name {
  display: block;
  font-family: var(--font-display); font-size: 1.5rem; line-height: 1;
  font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight);
  font-variation-settings: 'opsz' 40, 'WONK' 1; color: inherit;
}
.brand__sub { display: block; margin: 5px 0 0; font-size: var(--fs-xs); letter-spacing: 0.06em; color: var(--gold); }

.nav { display: flex; gap: 2px; }
.nav__link {
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  padding: 8px 14px; border-radius: var(--radius-pill);
  color: var(--ink-on-dark-soft); transition: all var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: var(--ink-on-dark); background: oklch(1 0 0 / 0.08); }
.nav__link.is-current { color: var(--marian-deep); background: var(--gold); }
@media (max-width: 760px) { .nav { display: none; } }

/* selettore lingua nell'header scuro */
.home-lang { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-on-dark-soft); margin-left: var(--space-3); }
.home-lang svg { width: 16px; height: 16px; flex: 0 0 auto; }
.home-lang select {
  appearance: none; -webkit-appearance: none;
  background: oklch(1 0 0 / 0.08); color: var(--ink-on-dark);
  border: 1px solid oklch(1 0 0 / 0.22); border-radius: var(--radius-pill);
  padding: 5px 12px; font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.home-lang select option { color: var(--ink); }

/* hero */
.hero { position: relative; z-index: 1; padding: var(--space-9) 0 var(--space-11); }
.hero__kicker {
  font-size: var(--fs-xs); letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); font-weight: var(--fw-semibold);
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 6.2vw, 4.6rem);
  font-weight: var(--fw-semibold); line-height: 1.02;
  letter-spacing: -0.02em; margin: var(--space-4) 0 var(--space-5);
  font-variation-settings: 'opsz' 144, 'WONK' 1; max-width: 16ch; text-wrap: balance;
}
.hero__sub {
  font-family: var(--font-display); font-style: italic; font-weight: var(--fw-light);
  font-size: clamp(1.15rem, 2.3vw, 1.55rem); line-height: var(--lh-snug);
  color: var(--ink-on-dark-soft); max-width: 52ch; margin: 0;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: var(--fs-body-lg); font-weight: var(--fw-semibold);
  border: 1px solid transparent; transition: all var(--dur-base) var(--ease-out); cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; transition: transform var(--dur-fast); }
.btn--primary { background: var(--home-accent); color: var(--home-accent-ink); box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--home-accent-strong); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.btn--primary:hover svg { transform: translateX(4px); }
.btn--ghost { background: transparent; color: var(--ink-on-dark); border-color: oklch(1 0 0 / 0.28); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }

/* dots comunità sotto l'hero */
.hero__dots { display: flex; align-items: center; gap: 9px; margin-top: var(--space-8); flex-wrap: wrap; }
.hero__dots-label { font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-on-dark-soft); margin-right: 6px; }
.hero__dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1.5px oklch(1 0 0 / 0.25); }

/* =========================================================================
   FASCE A 2 COLONNE — testo / immagine alternati
   ========================================================================= */
.section { padding: var(--block-py) 0; }

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-10);
  align-items: center;
}
.split__text { max-width: 48ch; }
.split--reverse .split__text { grid-column: 2; grid-row: 1; }
.split--reverse .split__media { grid-column: 1; grid-row: 1; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: var(--space-6); }
  .split__text, .split--reverse .split__text { grid-column: 1; grid-row: auto; }
  .split__media, .split--reverse .split__media { grid-column: 1; grid-row: auto; }
}

/* occhiello */
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: var(--space-4); }
.eyebrow__num {
  font-family: var(--font-display); font-size: var(--fs-sm); font-weight: var(--fw-semibold);
  color: var(--gold-ink); letter-spacing: 0.1em; font-variant-numeric: tabular-nums;
}
.eyebrow__rule { width: 30px; height: 1.5px; background: var(--gold); }
.eyebrow__label {
  font-size: var(--fs-xs); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: var(--fw-semibold);
}
.s-title {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--fs-display-lg); line-height: var(--lh-tight); color: var(--ink);
  letter-spacing: var(--tracking-display); font-variation-settings: 'opsz' 72, 'WONK' 1;
  margin: 0 0 var(--space-5); max-width: 18ch; text-wrap: balance;
}
.s-body { font-size: var(--fs-body-lg); line-height: var(--lh-relax); color: var(--ink-soft); }
.s-body p { margin: 0 0 var(--space-4); text-wrap: pretty; }
.s-body p:last-child { margin-bottom: 0; }
.s-body strong { color: var(--ink); font-weight: var(--fw-semibold); }
.inline-link {
  color: var(--home-accent); font-weight: var(--fw-medium);
  border-bottom: 1px solid var(--gold-line); transition: border-color var(--dur-fast);
}
.inline-link:hover { border-bottom-color: var(--home-accent); }

/* media */
.split__media { position: relative; }
.home-media {
  display: block; width: 100%; height: clamp(300px, 38vw, 470px);
  border-radius: 16px; overflow: hidden;
  background: var(--paper-sunk); box-shadow: var(--shadow-lg);
}
.home-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-media--empty {
  display: grid; place-items: center;
  border: 1.5px dashed var(--gold-line); color: var(--ink-mute);
}
.home-media--empty svg { width: 46px; height: 46px; opacity: 0.5; }
.media-cap {
  display: flex; align-items: center; gap: 8px; margin-top: var(--space-3);
  font-size: var(--fs-sm); color: var(--ink-mute); font-style: italic;
}
.media-cap::before { content: ''; width: 22px; height: 1.5px; background: var(--gold-line); flex: 0 0 auto; }

/* lista province */
.prov-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-6); }
.prov-chip {
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--ink-soft);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-pill);
  padding: 6px 14px;
}

/* seal Migrantes */
.seal { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); border: 1px solid var(--gold-line); margin-bottom: var(--space-4); }
.seal svg { width: 28px; height: 28px; color: var(--gold-ink); }

/* =========================================================================
   ELENCO RITI
   ========================================================================= */
.riti { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.riti__item {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-3) var(--space-4);
  align-items: baseline; padding: var(--space-4) 0; border-top: 1px solid var(--border);
}
.riti__item:first-child { border-top: none; padding-top: 0; }
.riti__dot { width: 12px; height: 12px; border-radius: 50%; transform: translateY(2px); box-shadow: 0 0 0 1.5px oklch(1 0 0 / 0.6); }
.riti__text { display: flex; flex-direction: column; gap: 3px; }
.riti__name {
  font-family: var(--font-display); font-size: var(--fs-h2); font-weight: var(--fw-semibold);
  color: var(--ink); letter-spacing: var(--tracking-tight); font-variation-settings: 'opsz' 32, 'WONK' 0;
}
.riti__desc { font-size: var(--fs-body); line-height: var(--lh-snug); color: var(--ink-soft); }

/* =========================================================================
   FASCIA CONTATTI
   ========================================================================= */
.contacts__head { max-width: 56ch; margin: 0 auto; text-align: center; }
.eyebrow--center { justify-content: center; }
.contacts__head .s-title { max-width: none; margin-left: auto; margin-right: auto; }
.contacts__intro {
  font-size: var(--fs-body-lg); line-height: var(--lh-relax);
  color: var(--ink-soft); margin: 0; text-wrap: pretty;
}
.contacts__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4); margin-top: var(--space-8);
}
.contact-card {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.contact-card:hover { border-color: var(--gold); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.contact-card__ico {
  flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; background: var(--gold-tint); color: var(--gold-ink);
}
.contact-card__ico svg { width: 21px; height: 21px; }
.contact-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.contact-card__label {
  font-size: var(--fs-xs); letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: var(--fw-semibold);
}
.contact-card__value {
  font-size: var(--fs-body); font-weight: var(--fw-medium); color: var(--ink);
  overflow-wrap: anywhere;
}

/* =========================================================================
   FASCIA MISSIONE
   ========================================================================= */
.mission {
  background: var(--surface-marian); color: var(--ink-on-dark);
  border-top: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep);
  position: relative; overflow: hidden;
}
.mission::before, .mission::after {
  content: ''; position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
}
.mission::before { top: -2px; } .mission::after { bottom: -2px; }
.mission__inner {
  text-align: center; max-width: 940px; margin: 0 auto;
  padding: calc(var(--block-py) + var(--space-2)) var(--space-4);
}
.mission__label {
  font-size: var(--fs-xs); letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--gold); font-weight: var(--fw-semibold);
}
.mission__statement {
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: clamp(1.9rem, 3.8vw, 3.05rem); line-height: 1.12;
  letter-spacing: -0.018em; font-variation-settings: 'opsz' 110, 'WONK' 1;
  color: var(--ink-on-dark); margin: var(--space-5) auto var(--space-6); max-width: 22ch; text-wrap: balance;
}
.mission__statement em { font-style: italic; color: var(--gold); font-weight: var(--fw-light); }
.mission__rule { display: flex; align-items: center; justify-content: center; margin: var(--space-6) 0; }
.mission__rule span { width: 70px; height: 1px; background: var(--gold-line); opacity: 0.6; }
.mission__rule::before, .mission__rule::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); margin: 0 9px; }
.mission__support {
  font-family: var(--font-body); font-size: var(--fs-body-lg); line-height: var(--lh-relax);
  color: var(--ink-on-dark-soft); max-width: 58ch; margin: 0 auto; text-wrap: pretty;
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.foot {
  background: var(--surface-marian); color: var(--ink-on-dark-soft);
  border-top: 2px solid var(--gold-deep); position: relative;
}
.foot::before { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep)); }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-8) 0; }
.foot__brand { display: flex; align-items: center; gap: var(--space-3); }
.foot__brand svg { width: 30px; height: 30px; }
.foot__name { font-family: var(--font-display); font-size: 1.2rem; font-weight: var(--fw-semibold); color: var(--ink-on-dark); }
.foot__links { display: flex; flex-wrap: wrap; gap: var(--space-5); font-size: var(--fs-sm); }
.foot__links a { color: var(--ink-on-dark-soft); }
.foot__links a:hover { color: var(--gold); }
.foot__meta { width: 100%; padding-bottom: var(--space-7); font-size: var(--fs-xs); color: var(--ink-on-dark-soft); opacity: 0.72; }

/* entrata morbida */
@media (prefers-reduced-motion: no-preference) {
  .anim { opacity: 0; transform: translateY(14px); animation: capt-rise var(--dur-slow) var(--ease-out) forwards; }
  .anim-1 { animation-delay: 0.05s; } .anim-2 { animation-delay: 0.13s; }
  .anim-3 { animation-delay: 0.21s; } .anim-4 { animation-delay: 0.29s; }
  @keyframes capt-rise { to { opacity: 1; transform: none; } }
}
