/* ═════════════════════════════════════════════════════════════
   NEXT SAFE 2027
   Un fondo, un inchiostro, un accento (il verde del logo).
   Un solo carattere, cinque dimensioni. Angoli dritti, niente ombre,
   niente sfumature, niente linee sottili: le superfici si separano
   con un piccolo salto di tono.
   ═════════════════════════════════════════════════════════════ */

:root {
  --ground: #0c100e;
  --ground-2: #151a17;     /* un tono sopra: blocchi, campi, schede */
  --ground-3: #1e2420;
  --ink: #f1efe8;
  --ink-2: #a3aaa5;        /* solo per note secondarie */
  --accent: #4caf50;       /* verde NEXT SAFE: azioni */
  --accent-hover: #5fbf63;
  --on-accent: #07130a;
  --paper: #eeece5;        /* fondo chiaro di una sezione */
  --paper-2: #e2dfd6;

  --font: "SF Pro Display", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* cinque dimensioni */
  --t-display: clamp(34px, 6vw, 92px);
  --t-statement: clamp(22px, 2.4vw, 34px);
  --t-title: clamp(20px, 1.7vw, 24px);
  --t-body: 18px;
  --t-small: 14px;

  --margin: clamp(16px, 2.4vw, 32px);
  --gap: clamp(16px, 2vw, 32px);
  --section: clamp(104px, 15vh, 200px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
html.modal-open { overflow: hidden; }
body { margin: 0; overflow-x: clip; background: var(--ground); color: var(--ink); font: 400 var(--t-body)/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
b, strong { font-weight: 600; }
em, i { font-style: normal; }
/* parole evidenziate rimaste nei testi salvati dal pannello: stesso stile del resto */
.grad, .gold, .serif { color: inherit; font: inherit; background: none; }

/* ── Griglia ── */
.wrap { padding-inline: var(--margin); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); row-gap: clamp(24px, 4vh, 44px); align-items: start; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }

.section { padding-block: var(--section); }
.section--light { background: var(--paper); color: var(--ground); }
.section--accent { background: var(--accent); color: var(--on-accent); }

/* ── Testo ── */
.display { font-size: var(--t-display); line-height: .98; letter-spacing: -.035em; font-weight: 700; max-width: 16ch; text-wrap: balance; }
.statement { font-size: var(--t-statement); line-height: 1.25; letter-spacing: -.015em; max-width: 30ch; text-wrap: pretty; }
.lead { max-width: 62ch; text-wrap: pretty; }
h3 { font-size: var(--t-title); line-height: 1.2; letter-spacing: -.01em; font-weight: 600; }
.meta, .note { font-size: var(--t-small); color: var(--ink-2); }
.section--light .meta, .section--light .note { color: #4c544f; }
.prose { max-width: 62ch; }
.prose p + p { margin-top: 1em; }
.plain { list-style: none; padding: 0; display: grid; gap: 10px; max-width: 62ch; }
.link { font-weight: 600; }

/* ── Pulsanti: piatti, un colore, angoli dritti ── */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 24px; border: 0; background: var(--accent); color: var(--on-accent); font: 600 var(--t-body)/1 var(--font); text-decoration: none; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.btn:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: var(--t-small); }
.btn--quiet { background: var(--ground-3); color: var(--ink); }
.btn--quiet:hover { background: #29302b; }
.btn--dark { background: var(--ground); color: var(--ink); }
.btn--dark:hover { background: var(--ground-3); }

/* ── Testata ── */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 32px; height: 72px; padding-inline: var(--margin); transition: background .25s; }
.nav.is-solid { background: var(--ground); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
.nav__links { display: flex; gap: 28px; margin-left: auto; font-size: var(--t-small); }
.nav__links li { display: contents; list-style: none; }
.nav__links a { text-decoration: none; }
.nav__links a:hover { text-decoration: underline; }

/* ── Apertura ── */
.hero { padding-top: calc(72px + clamp(48px, 10vh, 120px)); }
.hero__text { display: grid; gap: clamp(20px, 3vh, 32px); max-width: 1180px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 6px 28px; font-size: var(--t-small); }
.hero__facts b { font-weight: 600; }
.hero__media { margin-top: clamp(40px, 7vh, 80px); }
.hero__frame { overflow: hidden; }
.hero__frame img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.motion .hero__frame img { animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.035) translateY(-0.6%); } }

/* ── Mission ── */
.pillars { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-top: clamp(24px, 5vh, 56px); }
.pillars p { margin-top: 6px; }

/* ── Perché partecipare ── */
.why__text { display: grid; gap: 24px; }
.reasons { display: grid; gap: 22px; margin-top: 12px; }
.reasons dd, .amen dd, .arrive__info dd { margin-top: 4px; }
.reasons dt, .amen dt, .arrive__info dt { font-weight: 600; }
.why__photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.why__photos img, .mosaic img, .strip img, .lux img, .loc__photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

figcaption { margin-top: 10px; font-size: var(--t-small); color: var(--ink-2); }

/* ── Programma ── */
.day { display: grid; gap: 6px; }
.day__theme { color: var(--ink-2); font-size: var(--t-small); }
.sessions { list-style: none; padding: 0; margin-top: 18px; display: grid; gap: 2px; }
.session { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 14px 16px; background: var(--ground-2); }
.session time { font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: var(--t-small); padding-top: 3px; }
.session b { display: block; }
.session span { display: block; font-size: var(--t-small); color: var(--ink-2); margin-top: 2px; }
.session--social b, .session--break b { font-weight: 400; }

/* ── Numeri ── */
.facts__list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.facts__list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fact b { display: block; font-size: var(--t-display); line-height: 1; letter-spacing: -.04em; font-weight: 700; font-variant-numeric: tabular-nums; }
.fact span { display: block; margin-top: 8px; }

/* ── Galleria ── */
.mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.mosaic figure { grid-column: span 4; }
.mosaic figure:nth-child(1), .mosaic figure:nth-child(2), .mosaic figure:nth-child(6), .mosaic figure:nth-child(7) { grid-column: span 6; }

/* ── Ospiti ── */
.guests .display { margin-bottom: clamp(32px, 6vh, 72px); }
.guest { align-items: center; }
.guest + .guest { margin-top: clamp(56px, 10vh, 120px); }
.guest__photo { grid-column: 1 / span 5; }
.guest__text { grid-column: 7 / span 6; display: grid; gap: 12px; }
.guest--flip .guest__photo { grid-column: 8 / span 5; grid-row: 1; }
.guest--flip .guest__text { grid-column: 1 / span 6; grid-row: 1; }
.guest__photo img { width: 100%; }

/* ── Video ── */
.player { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--ground-2); }
.player > img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.player:hover > img { transform: scale(1.02); }
.player__btn { position: absolute; left: var(--gap); bottom: var(--gap); display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 26px; border: 0; background: var(--accent); color: var(--on-accent); font: 600 var(--t-body) var(--font); cursor: pointer; transition: background .2s; }
.player__btn:hover { background: var(--accent-hover); }
.player__btn svg { width: 20px; height: 20px; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ── Riassunto 2026 ── */
.recap__text { display: grid; gap: 24px; }
.recap__label { margin-bottom: 16px; }
.voices { list-style: none; padding: 0; display: grid; gap: 2px; }
.voice { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px; padding: 10px 14px; background: var(--ground-2); }
.voice__ph { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.voice b { display: block; }
.voice small { display: block; font-size: var(--t-small); color: var(--ink-2); }
.voice__logo { height: 22px; width: auto; max-width: 96px; object-fit: contain; filter: brightness(0) invert(1); opacity: .85; }

/* ── Persone ── */
.amb { align-items: center; margin-top: clamp(56px, 10vh, 120px); }
.amb__photo { grid-column: 1 / span 4; }
.amb__photo img { width: min(100%, 320px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.amb__text { grid-column: 6 / span 7; display: grid; gap: 10px; }
.amb--flip .amb__photo { grid-column: 9 / span 4; grid-row: 1; justify-self: end; }
.amb--flip .amb__text { grid-column: 1 / span 7; grid-row: 1; }
.speakers { margin-top: clamp(72px, 12vh, 140px); display: grid; gap: 10px; }
.speakers__list { list-style: none; padding: 0; margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--gap); }
.speakers__list img { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.speakers__list b, .speakers__list small { display: block; }
.speakers__list small { font-size: var(--t-small); color: var(--ink-2); }

/* ── Partner ── */
.wall { display: grid; gap: clamp(28px, 5vh, 48px); }
.wall__row { display: grid; grid-template-columns: 160px 1fr; gap: var(--gap); align-items: center; }
.wall__label { font-weight: 600; }
.logos { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 28px 48px; }
.logos img { height: calc(30px * var(--s, 1)); width: auto; max-width: 170px; object-fit: contain; filter: brightness(0) invert(1); opacity: .88; }
.sponsor-cta .statement { max-width: 34ch; }

/* ── Location ── */
.amen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--gap); }
.loc__addr { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; padding: clamp(20px, 3vw, 32px); background: var(--ground-2); }

/* ── Come arrivare ── */
.arrive__info { display: grid; gap: 22px; }
.routes { display: grid; gap: 2px; }
.routes details { background: var(--ground-2); }
.routes summary { padding: 18px 20px; font-weight: 600; cursor: pointer; }
.routes summary:hover { background: var(--ground-3); }
.routes details p { padding: 0 20px 20px; max-width: 70ch; }
.routes .note { margin-top: 16px; }

/* ── Iscrizione e contatti ── */
.register__text { display: grid; gap: 20px; }
.notice { padding: 16px 18px; background: var(--ground-2); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: clamp(20px, 3vw, 36px); background: var(--ground-2); }
.form--closed { display: block; }
.field { display: grid; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label, .plus1 legend { font-size: var(--t-small); font-weight: 600; }
.form input:not([type="checkbox"]), .form select, .form textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #2d342f; border-radius: 0; background: var(--ground); color: var(--ink); font: 400 var(--t-body) var(--font); }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form .invalid { border-color: #e0685e; }
.err { color: #f08a80; font-size: var(--t-small); }
.err:empty { display: none; }
.hint { font-size: var(--t-small); color: var(--ink-2); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: var(--t-small); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.req { color: var(--accent); }
.plus1 { border: 0; margin: 0; padding: 18px; background: var(--ground-3); }
.plus1__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 10px; }
.hp { position: absolute; left: -9999px; }
.notice--form { background: var(--ground-3); font-size: var(--t-small); }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.status { font-size: var(--t-small); }
.status.ok { color: var(--accent); }
.status.ko { color: #f08a80; }

/* ── Pagina sponsor ── */
.proof h3 { margin-top: clamp(24px, 4vh, 40px); }
.lux figure { align-self: center; }
.tiers { display: grid; gap: 2px; }
.tier { display: grid; grid-template-columns: 3fr 6fr 3fr; gap: var(--gap); align-items: start; padding: clamp(20px, 3vw, 32px); background: var(--ground-2); }
.tier__head { display: grid; gap: 4px; }
.tier__body { display: grid; gap: 10px; }
.tier__action { justify-self: end; }

/* ── Chiusura ── */
.footer { padding-top: var(--section); background: var(--ground); overflow: hidden; }
.footer .grid { row-gap: 40px; }
.footer__count { font-size: var(--t-statement); }
.footer__count b { display: block; font-size: var(--t-display); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.footer__actions { justify-content: flex-end; align-self: end; }
.footer p + p { margin-top: 8px; }
.footer__legal { font-size: var(--t-small); color: var(--ink-2); }
.footer__name { margin: clamp(48px, 10vh, 120px) 0 -0.12em; padding-inline: var(--margin); font-size: 19.6vw; line-height: .8; letter-spacing: -.055em; font-weight: 800; color: var(--ground-3); white-space: nowrap; }

/* ── Pagine semplici ── */
.page-plain { padding: calc(72px + var(--section)) 0 var(--section); }
.page-plain .display { margin-bottom: 32px; }
.page-plain .prose { display: grid; gap: 1em; }

/* ── Salva la data (finestra) ── */
.stdpop { position: fixed; inset: 0; z-index: 450; display: grid; place-items: center; padding: 16px; }
.stdpop[hidden] { display: none; }
.stdpop__back { position: absolute; inset: 0; background: rgba(0, 0, 0, .66); opacity: 0; transition: opacity .25s; }
.stdpop__card { position: relative; width: min(460px, 100%); padding: clamp(22px, 3vw, 32px); background: var(--ground-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); opacity: 0; transform: translateY(16px); transition: opacity .25s, transform .3s var(--ease); }
.stdpop.open .stdpop__back, .stdpop.open .stdpop__card { opacity: 1; transform: none; }
.stdpop__x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; background: var(--ground-3); color: var(--ink); font-size: var(--t-title); cursor: pointer; }
.stdpop__x:hover { background: #29302b; }
.stdpop__head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding-right: 40px; }
.stdpop__cal { flex: none; width: 84px; text-align: center; background: var(--paper); color: var(--ground); }
.stdpop__cal small { display: block; padding: 5px 0; background: var(--accent); color: var(--on-accent); font-size: var(--t-small); font-weight: 600; }
.stdpop__cal b { display: block; padding-top: 6px; font-size: var(--t-title); line-height: 1.1; }
.stdpop__cal i { display: block; padding-bottom: 6px; font-size: var(--t-small); }
.stdpop__loc, .stdpop__n { margin-top: 4px; font-size: var(--t-small); color: var(--ink-2); }
.stdpop__q { margin-bottom: 12px; }
.stdpop__opts { display: grid; gap: 8px; }
.stdpop__opts a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--ground-3); text-decoration: none; transition: background .2s; }
.stdpop__opts a:hover { background: #29302b; }
.stdpop__opts a span { display: grid; }
.stdpop__opts small { font-size: var(--t-small); color: var(--ink-2); }
.stdpop__opts .stdpop__alt { background: none; padding: 6px 0; font-size: var(--t-small); text-decoration: underline; }
.stdpop__n { margin-top: 14px; }

/* ── Comparse (solo con il movimento attivo) ── */
.motion .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
.motion .reveal.in { opacity: 1; transform: none; }

/* ── Schermi medi ── */
@media (max-width: 1100px) {
  .pillars, .facts__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .amen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier { grid-template-columns: 1fr 2fr; }
  .tier__action { grid-column: 2; justify-self: start; }
}

/* ── Telefono ── */
@media (max-width: 760px) {
  :root { --t-body: 17px; }
  .grid > *, .grid > .span-4, .grid > .span-5, .grid > .span-6, .grid > .span-7, .grid > .span-8 { grid-column: 1 / -1; }
  .nav { gap: 16px; height: 64px; }
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { padding-top: calc(64px + 40px); }
  .pillars, .amen, .why__photos, .facts__list--3 { grid-template-columns: 1fr; }
  .mosaic { grid-template-columns: 1fr 1fr; }
  .mosaic figure, .mosaic figure:nth-child(n) { grid-column: span 1; }
  .mosaic figure:nth-child(1), .mosaic figure:nth-child(6), .mosaic figure:nth-child(7) { grid-column: 1 / -1; }
  .guest__photo, .guest__text, .guest--flip .guest__photo, .guest--flip .guest__text,
  .amb__photo, .amb__text, .amb--flip .amb__photo, .amb--flip .amb__text { grid-column: 1 / -1; grid-row: auto; justify-self: start; }
  .amb__photo img { width: 200px; }
  .wall__row { grid-template-columns: 1fr; }
  .logos { gap: 22px 32px; }
  .session { grid-template-columns: 64px 1fr; gap: 12px; }
  .tier { grid-template-columns: 1fr; }
  .tier__action { grid-column: auto; }
  .form, .plus1__grid { grid-template-columns: 1fr; }
  .footer__actions { justify-content: flex-start; }
  .player__btn { left: 12px; bottom: 12px; min-height: 48px; padding: 0 18px; }
}

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