/* =========================================================
   CRM Talks – stile
   ========================================================= */

/* Font Montserrat ospitato sul sito (licenza SIL Open Font License): niente richieste a Google Fonts,
   quindi nessun dato dei visitatori inviato a Google (GDPR). */
/* Montserrat italic (latin-ext) – font variabile, ospitato sul sito */
@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Montserrat italic (latin) – font variabile, ospitato sul sito */
@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/montserrat-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Montserrat normal (latin-ext) – font variabile, ospitato sul sito */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin-ext-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Montserrat normal (latin) – font variabile, ospitato sul sito */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/montserrat-latin-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #1a365f;
  --navy-deep: #023265;
  --teal: #019cc0;
  --teal-ink: #016f8a;
  --cyan: #14e3e6;
  --cyan-soft: #7ff5f2;
  --magenta: #e62bd8;

  --bg-light: #f2f4f7;
  --white: #ffffff;
  --text: #1f2a37;
  --text-muted: #5b6676;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1160px;
  --gutter: 24px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(26, 54, 95, .08), 0 2px 6px rgba(26, 54, 95, .05);
  --header-h: 92px;

  /* bagliore "neon" riusato da linee e cornici */
  --glow-cyan: drop-shadow(0 0 3px rgba(20, 227, 230, .95)) drop-shadow(0 0 10px rgba(20, 227, 230, .55));
  --glow-magenta: drop-shadow(0 0 3px rgba(230, 43, 216, .9)) drop-shadow(0 0 9px rgba(230, 43, 216, .5));
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
abbr[title] { text-decoration: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: calc(720px + var(--gutter) * 2); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 28px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: 700 15px/1 var(--font);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }

.btn-primary { background: var(--cyan); color: var(--navy); }
.btn-primary:hover { background: var(--cyan-soft); box-shadow: 0 8px 24px rgba(20, 227, 230, .35); }

.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .55); }
.btn-ghost:hover { border-color: var(--white); background: rgba(255, 255, 255, .08); }

.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-deep); }

.btn-sm { min-height: 40px; padding: 0 20px; font-size: 13px; }
.btn-lg { min-height: 56px; padding: 0 40px; font-size: 16px; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  color: var(--white);
  transition: height .3s, background-color .3s, box-shadow .3s;
}
.site-header.is-scrolled {
  height: 68px;
  background: rgba(26, 54, 95, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, .15);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand img { height: 54px; width: auto; transition: height .3s; }
.is-scrolled .brand img { height: 40px; }

.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a:not(.btn) {
  position: relative;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .9;
}
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transition: transform .2s;
}
.main-nav a:not(.btn):hover { opacity: 1; }
.main-nav a:not(.btn):hover::after,
.main-nav a.is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: min(100svh, 960px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: calc(var(--header-h) + 48px) 0 40px;
  color: var(--white);
  /* gradiente ricavato dall'immagine originale, ma vettoriale */
  background:
    radial-gradient(120% 90% at 85% 100%, rgba(1, 156, 192, .55) 0%, rgba(1, 156, 192, 0) 60%),
    linear-gradient(118deg, var(--navy-deep) 0%, #025785 45%, #0285ad 75%, var(--teal) 100%);
}
.hero > .container:first-of-type { flex: 1; display: flex; align-items: center; justify-content: center; }
.hero-arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--navy);
  pointer-events: none;
}

/* griglia: [CRM TALKS] [linea neon] [claim]
                        [linea neon] [data + CTA]            */
.hero-grid {
  --brand-fs: clamp(64px, 9.4vw, 136px);
  --col-gap: clamp(28px, 3.6vw, 56px);
  --arm-y: calc(var(--brand-fs) * .44);   /* centro ottico della riga "CRM" */
  position: relative;
  display: grid;
  grid-template-columns: auto 2px auto;
  grid-template-rows: auto auto;
  column-gap: var(--col-gap);
  row-gap: clamp(36px, 4.5vw, 64px);
  justify-content: center;
  align-items: start;
}

.hero-brand {
  grid-column: 1;
  grid-row: 1;
  font-size: var(--brand-fs);
  font-weight: 800;
  line-height: .88;
  letter-spacing: .02em;
}
.hero-brand-row { display: flex; align-items: center; }

/* braccio orizzontale: parte dopo "CRM" e arriva fino alla linea verticale */
.neon-arm {
  flex: 1;
  min-width: 24px;
  height: 2px;
  margin-left: .2em;
  /* arriva fin sopra la linea verticale (larga 2px), così l'angolo è chiuso */
  margin-right: calc(-1 * var(--col-gap) - 2px);
  background: var(--cyan);
  filter: var(--glow-cyan);
  transform-origin: left center;
}

.hero-divider {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  position: relative;
}
.neon-v {
  position: absolute;
  left: 0;
  top: calc(var(--arm-y) - 1px); /* parte dal bordo superiore del braccio orizzontale */
  bottom: calc(-1 * var(--neon-tail, 2000px)); /* arriva al bordo dell'hero: prosegue nell'agenda */
  width: 2px;
  background: var(--cyan);
  filter: var(--glow-cyan);
  transform-origin: top center;
}
/* angolo magenta: due tratti separati, così si disegna come quello azzurro.
   Sfalsato di 12px sia in alto che a destra rispetto all'angolo azzurro
   (il braccio azzurro ha il bordo superiore a --arm-y - 1px, la verticale occupa x 0–2px) */
.neon-m {
  position: absolute;
  top: calc(var(--arm-y) - 13px);
  left: -30px;
  width: 44px;
  height: 44px;
}
.neon-m::before,
.neon-m::after {
  content: "";
  position: absolute;
  background: var(--magenta);
  filter: var(--glow-magenta);
}
.neon-m::before { top: 0; left: 0; right: 0; height: 2px; transform-origin: left center; }
.neon-m::after { top: 0; right: 0; bottom: 0; width: 2px; transform-origin: top center; }

.hero-claim {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  font-size: clamp(32px, 5vw, 74px);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: .01em;
  text-transform: uppercase;
  white-space: nowrap;
}

.hero-meta {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.hero-date { font-size: clamp(22px, 2.4vw, 32px); font-weight: 600; letter-spacing: .01em; }
.hero-date strong { color: var(--cyan); font-weight: 600; }
.hero-date .sep { opacity: .5; margin: 0 4px; }
.hero-place { font-size: 15px; font-style: italic; opacity: .85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }

/* organizzatore + partner: la colonna di sinistra finisce esattamente sulla linea neon (--neon-x, calcolata in JS) */
.partners {
  position: relative;
  display: grid;
  grid-template-columns: var(--neon-x, 50%) minmax(0, 1fr);
  align-items: center;
  margin-top: 64px;
}
.partners-group { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.partners-host-group { justify-self: end; padding-right: 48px; }
.partners-guest-group { justify-self: start; padding-left: 48px; }
.partners-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .7;
}
.partners-host { height: 44px; width: auto; }
.partners-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 40px;
  min-height: 44px;
}
.partners-list img { width: auto; opacity: .92; }

/* ---------- Sezioni ---------- */
.section { padding: 112px 0; }
.section-light { background: var(--bg-light); }
.section-dark { background: var(--navy); color: var(--white); }

.section-head { text-align: center; margin-bottom: 56px; }
.section-title {
  display: inline-block;
  position: relative;
  padding-bottom: 22px;
  /* letter-spacing aggiunge spazio dopo l'ultima lettera: stesso spazio a sinistra per centrare davvero */
  padding-left: .22em;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: .22em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--navy);
}
.section-title::before,
.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 4px;
  border-radius: 2px;
}
.section-title::before { left: 50%; width: 48px; transform: translateX(-50%); background: var(--cyan); }
.section-title::after { left: calc(50% + 30px); width: 12px; background: var(--magenta); }
.section-dark .section-title { color: var(--white); }
.section-sub { margin-top: 16px; color: var(--text-muted); }
.section-dark .section-sub { color: rgba(255, 255, 255, .75); }

.eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--cyan);
}

/* ---------- Agenda ---------- */
/* il titolo finisce 32px prima della linea neon che scende dall'hero */
.agenda-head {
  position: relative;
  margin-bottom: 72px;
  padding-right: calc(100% - var(--neon-x, 50%) + 32px);
  text-align: right;
}
.agenda-head::before {
  content: "";
  position: absolute;
  left: var(--neon-x, 50%);
  top: -112px; /* = padding superiore della sezione: si attacca alla linea dell'hero */
  bottom: 0;
  width: 2px;
  background: var(--cyan);
  filter: var(--glow-cyan);
  transform-origin: top center;
}
.agenda-title {
  display: inline-block;
  position: relative;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: .22em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--navy);
}
/* linea magenta verticale con un piccolo uncino in alto, tra il titolo e la linea azzurra */
.agenda-title::before,
.agenda-title::after {
  content: "";
  position: absolute;
  top: -12px;
  right: -18px;
  background: var(--magenta);
  filter: var(--glow-magenta);
}
.agenda-title::before { width: 32px; height: 2px; transform-origin: right center; }
.agenda-title::after { width: 2px; height: 32px; transform-origin: top center; }

/* desktop: timeline a sinistra, testo a destra; sotto i 1180px il testo va sopra */
.agenda-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 48px;
  align-items: center;
}
.timeline-wrap { grid-column: 1; grid-row: 1; }

.intro-panel {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  padding: 58px 60px 40px 36px;
  background: var(--white);
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.75;
}
/* angolo azzurro (in alto e lungo il lato destro) e angolo magenta sfalsato, come nel sito originale */
.intro-panel::before {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 34px;
  right: 28px;
  width: 64px;
  border-top: 2px solid var(--cyan);
  border-right: 2px solid var(--cyan);
  filter: var(--glow-cyan);
}
.intro-panel::after {
  content: "";
  position: absolute;
  top: 22px;   /* 12px sopra l'angolo azzurro (top 34px) */
  right: 16px; /* 12px a destra dell'angolo azzurro (right 28px) */
  width: 40px;
  height: 40px;
  border-top: 2px solid var(--magenta);
  border-right: 2px solid var(--magenta);
  filter: var(--glow-magenta);
}
.intro-strong {
  margin-bottom: 14px;
  color: var(--navy);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

/* colonne: orario | pallino | contenuto.
   Pallino e linea stanno nella stessa colonna e sono centrati sulla prima riga di testo. */
.timeline {
  --time-w: 60px;
  --dot-col: 20px;
  --gap: 18px;
  --row-lh: 28px;
  --dot: 14px;
  --ring: var(--bg-light);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: var(--time-w) var(--dot-col) minmax(0, 1fr);
  column-gap: var(--gap);
  align-items: start;
  padding-bottom: 34px;
}
.timeline li:last-child { padding-bottom: 0; }

.timeline time {
  grid-column: 1;
  font-size: 17px;
  font-weight: 600;
  line-height: var(--row-lh);
  letter-spacing: .02em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}

/* pallino */
.timeline li::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  position: relative;
  z-index: 1;
  width: var(--dot);
  height: var(--dot);
  margin-top: calc((var(--row-lh) - var(--dot)) / 2);
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px var(--ring), 0 0 0 5px rgba(20, 227, 230, .35);
}
/* linea: dal centro del pallino al centro del pallino successivo */
.timeline li::after {
  content: "";
  position: absolute;
  left: calc(var(--time-w) + var(--gap) + var(--dot-col) / 2 - 1px);
  top: calc(var(--row-lh) / 2);
  bottom: calc(var(--row-lh) / -2);
  width: 2px;
  background: var(--cyan);
}
.timeline li:last-child::after { display: none; }

.timeline li > div {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;          /* solo su schermi stretti l'azienda scende sotto */
  align-items: baseline;
  column-gap: 14px;
}
.timeline h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: var(--row-lh);
  color: var(--navy);
}
/* azienda: stessa riga del titolo, separata da un filo verticale */
.timeline .who {
  padding-left: 14px;
  border-left: 1px solid rgba(1, 156, 192, .45);
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--teal);
}

/* pause (welcome coffee, aperitivo): stesso stile, pallino magenta */
.timeline .is-break::before { background: var(--magenta); box-shadow: 0 0 0 4px var(--ring), 0 0 0 5px rgba(230, 43, 216, .35); }

/* ---------- Speaker (spotlight) ---------- */
.spotlight { display: grid; gap: 56px; }

.spot-tabs {
  display: none; /* senza JS si vedono tutti i pannelli, uno sotto l'altro */
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 6 speaker: 3 colonne × 2 righe */
  gap: 16px;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
}
.js .spot-tabs { display: grid; }

.spot-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--bg-light);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background-color .3s, color .3s, transform .2s;
}
.spot-tab:hover { transform: translateY(-2px); }
.spot-tab:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.spot-tab img {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  filter: grayscale(1);
  opacity: .75;
  transition: filter .3s, opacity .3s, box-shadow .3s;
}
.spot-tab-text { min-width: 0; }
.spot-tab strong { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; }
.spot-tab small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .65; }

.spot-tab[aria-selected="true"] { background: var(--navy); color: var(--white); }
.spot-tab[aria-selected="true"] img { filter: none; opacity: 1; box-shadow: 0 0 0 2px var(--navy), 0 0 0 4px var(--cyan); }

.spot-progress {
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
}
.spotlight.is-playing .spot-tab[aria-selected="true"] .spot-progress { animation: spot-progress var(--spot-dur, 8s) linear forwards; }
.spotlight.is-paused .spot-progress { animation-play-state: paused !important; }
@keyframes spot-progress { to { transform: scaleX(1); } }

.spot-panels { display: grid; gap: 64px; }
.spot-panel {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.spot-photo {
  position: relative;
  isolation: isolate;
  max-width: 300px; /* riquadro foto speaker: era 360px */
  width: 100%;
  justify-self: center;
}
.spot-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: var(--radius);
}
/* cornice neon sfalsata + angolo magenta, come le linee dell'hero */
.spot-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 2px solid var(--cyan);
  border-radius: var(--radius);
  transform: translate(18px, 18px);
  filter: var(--glow-cyan);
}
.spot-photo::after {
  content: "";
  position: absolute;
  top: -16px;
  left: -16px;
  width: 72px;
  height: 72px;
  border-top: 2px solid var(--magenta);
  border-left: 2px solid var(--magenta);
  filter: var(--glow-magenta);
}

.spot-index { font-size: 14px; font-weight: 700; letter-spacing: .2em; color: var(--teal); }
.spot-index i { font-style: normal; color: #9aa5b4; }
.spot-name {
  margin-top: 14px;
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--navy);
}
.spot-role {
  position: relative;
  margin-top: 10px;
  padding-bottom: 22px;
  font-size: 18px;
  font-weight: 600;
  color: var(--teal);
}
.spot-role::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 3px;
  border-radius: 2px;
  background: var(--cyan);
}
.spot-bio { margin-top: 22px; max-width: 58ch; font-size: 17px; line-height: 1.8; color: var(--text-muted); }

/* con JS: pannelli sovrapposti nella stessa cella, solo l'attivo è visibile */
.js .spot-panels { gap: 0; }
.js .spot-panel {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity .35s ease, visibility 0s linear .35s;
}
.js .spot-panel.is-active {
  visibility: visible;
  opacity: 1;
  transition: opacity .35s ease, visibility 0s;
}

/* ---------- Location ---------- */
/* foto originale verticale (3000×4000): su desktop si vede una fascia centrata su murale e vetrate.
   Due versioni: 1920px per quasi tutti, 3000px solo per schermi larghi (2K+) o desktop retina. */
.location {
  --loc-overlay: linear-gradient(100deg, rgba(26, 54, 95, .94) 0%, rgba(26, 54, 95, .82) 50%, rgba(2, 87, 133, .6) 100%);
  position: relative;
  padding: 128px 0;
  color: var(--white);
  background-color: var(--navy);
  background-image: var(--loc-overlay), url("../img/la-cattedrale-1920.jpg");
  background-position: center, center 42%;
  background-size: cover, cover;
  background-repeat: no-repeat;
}
@media (min-width: 1601px), (min-width: 1025px) and (min-resolution: 1.5dppx) {
  .location { background-image: var(--loc-overlay), url("../img/la-cattedrale-3000.jpg"); }
}
/* la foto è pesante: con JS si scarica solo quando la sezione si avvicina (main.js aggiunge .bg-ready) */
.js .location:not(.bg-ready) { background-image: var(--loc-overlay); }
.location-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 64px;
  align-items: center;
}
.location-quote {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 700;
  line-height: 1.3;
}
.location-lead { margin-top: 20px; font-size: 18px; opacity: .85; max-width: 52ch; }

.location-card {
  padding: 36px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.location-card dl { display: grid; gap: 24px; margin-bottom: 32px; }
.location-card dt {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
}
.location-card dd { font-size: 18px; font-weight: 500; line-height: 1.5; }

.map {
  grid-column: 1 / -1;
  position: relative;
  height: 400px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  /* reticolo stradale stilizzato finché la mappa vera non è caricata */
  background:
    radial-gradient(circle at 50% 46%, rgba(20, 227, 230, .22) 0, rgba(20, 227, 230, 0) 38%),
    repeating-linear-gradient(28deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 64px),
    repeating-linear-gradient(-62deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 88px),
    rgba(26, 54, 95, .78);
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-consent {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}
.map-pin { width: 44px; height: 44px; fill: var(--cyan); filter: var(--glow-cyan); }
.map-address { font-size: 17px; }
.map-note { max-width: 44ch; font-size: 12px; opacity: .65; }
.map.is-loaded .map-consent { display: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Form ---------- */
.rsvp {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 24px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field abbr, .consent abbr { color: var(--cyan); }
.field input {
  height: 50px;
  padding: 0 16px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font: 500 16px var(--font);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(20, 227, 230, .25); }
.field.is-invalid input { border-color: #ff6b81; }
.field-error { font-size: 13px; color: #ffb3c0; }

/* blocco consensi: separato dai campi da un filo, le due caselle una sotto l'altra */
.consents {
  display: grid;
  gap: 16px;
  margin-top: 6px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.consent {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
}
.consent input {
  width: 22px; height: 22px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}
.consent strong { color: var(--white); font-weight: 600; }
.consent-optional {
  display: inline-block;
  margin-left: 6px;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .5);
}
.consent.is-invalid span { color: #ffb3c0; }

/* dettagli legali del consenso marketing: chiusi di default, allineati al testo delle caselle */
.legal { margin-left: 36px; font-size: 12px; line-height: 1.6; color: rgba(255, 255, 255, .6); }
.legal summary {
  width: fit-content;
  cursor: pointer;
  color: rgba(255, 255, 255, .75);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, .3);
}
.legal summary:hover { color: var(--white); }
.legal p { margin-top: 10px; }
.legal a { color: var(--cyan); }

.form-actions { display: flex; justify-content: center; margin-top: 12px; }
.form-status { text-align: center; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-ok { color: var(--cyan); }
.form-status.is-err { color: #ffb3c0; }

/* form e conferma si alternano: [hidden] deve vincere sul display della classe */
.rsvp[hidden], .rsvp-success[hidden] { display: none; }
.rsvp { transition: opacity .3s ease, transform .3s ease; }
.rsvp.is-leaving { opacity: 0; transform: translateY(-12px); }

/* ---------- Conferma registrazione ---------- */
.rsvp-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 32px 40px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .14);
  text-align: center;
}
.success-check { width: 96px; height: 96px; margin-bottom: 24px; overflow: visible; }
.success-circle,
.success-tick {
  fill: none;
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: var(--glow-cyan);
}
/* stato finale già disegnato: con movimento ridotto si vede subito, senza animazione */
.success-circle { stroke-width: 3; stroke-dasharray: 227; stroke-dashoffset: 0; }
.success-tick { stroke-width: 5; stroke-dasharray: 46; stroke-dashoffset: 0; }

.success-title { font-size: clamp(26px, 3vw, 34px); font-weight: 800; letter-spacing: .02em; }
.success-title:focus { outline: none; }
.success-text { margin-top: 10px; font-size: 18px; color: rgba(255, 255, 255, .85); }
.success-when {
  margin-top: 24px;
  padding: 16px 24px;
  border-left: 3px solid var(--magenta);
  background: rgba(255, 255, 255, .06);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .85);
  text-align: left;
}
.success-when strong { color: var(--white); }
.success-note { margin-top: 18px; max-width: 46ch; font-size: 14px; color: rgba(255, 255, 255, .7); }
.success-actions { margin-top: 28px; }
.success-actions .btn { white-space: nowrap; }
@media (max-width: 640px) {
  .rsvp-success { padding: 40px 20px 32px; }
  .success-actions .btn { padding-inline: 20px; font-size: 13px; letter-spacing: .05em; }
}
.success-again {
  margin-top: 20px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .75);
  font: 600 14px var(--font);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255, 255, 255, .35);
  cursor: pointer;
}
.success-again:hover { color: var(--white); }
.success-again:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: no-preference) {
  /* cerchio che si disegna, poi la spunta, poi il testo che sale */
  .success-circle { animation: draw-stroke-circle .7s ease-out .1s backwards; }
  .success-tick { animation: draw-stroke-tick .35s ease-out .7s backwards; }
  .rsvp-success > :not(.success-check) { animation: fade-up .6s cubic-bezier(.2, .7, .2, 1) .9s backwards; }
}
@keyframes draw-stroke-circle { from { stroke-dashoffset: 227; } }
@keyframes draw-stroke-tick { from { stroke-dashoffset: 46; } }

/* ---------- Pulsante "Registrati" flottante (solo mobile) ---------- */
.fab-register { display: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, .12); /* stesso blu della sezione registrazione: serve un filo di separazione */
  color: rgba(255, 255, 255, .7);
  padding: 40px 0;
  font-size: 14px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 24px; }
.footer-brand img { height: 40px; width: auto; }
/* loghi ufficiali LinkedIn e Instagram: hanno già la loro forma, quindi niente cerchi intorno;
   bianchi su fondo scuro come previsto dalle linee guida dei due brand */
.social { display: flex; align-items: center; gap: 20px; }
.social a {
  display: grid;
  place-items: center;
  width: 44px; height: 44px; /* area cliccabile comoda anche al tocco */
  color: var(--white);
  opacity: .8;
  transition: opacity .2s;
}
.social a:hover,
.social a:focus-visible { opacity: 1; }
.social a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
.social svg { width: 26px; height: 26px; fill: currentColor; }

/* =========================================================
   Animazioni (solo se l'utente non ha chiesto movimento ridotto)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  /* hero: testo che sale, poi le linee neon si "disegnano" */
  .hero-brand-row, .hero-claim, .hero-meta, .partners { animation: fade-up .8s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-brand-row:nth-child(2) { animation-delay: .08s; }
  .hero-claim { animation-delay: .25s; }
  .hero-meta { animation-delay: .45s; }
  .partners { animation-delay: .65s; }
  .neon-arm { animation: draw-x .5s ease-out .5s both; }
  .neon-v { animation: draw-y 1s ease-in 1s both; }
  .agenda-head::before { animation: draw-y .35s ease-out 2s both; }
  .agenda-title::before { animation: draw-x .2s ease-out 2.3s both; }
  .agenda-title::after { animation: draw-y .35s ease-out 2.45s both; }
  .neon-m::before { animation: draw-x .35s ease-out .8s both; }
  .neon-m::after { animation: draw-y .5s ease-in-out 1.15s both; }

  /* speaker: la foto entra, il testo segue a cascata */
  .js .spot-panel .spot-photo { opacity: 0; transform: translateX(-28px); transition: opacity .6s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
  .js .spot-panel .spot-photo img { transform: scale(1.06); transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
  .js .spot-panel .spot-photo::before { transform: translate(0, 0); opacity: 0; transition: transform .8s cubic-bezier(.2, .7, .2, 1) .2s, opacity .4s .2s; }
  .js .spot-panel .spot-body > * { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }

  .js .spot-panel.is-active .spot-photo { opacity: 1; transform: none; }
  .js .spot-panel.is-active .spot-photo img { transform: none; }
  .js .spot-panel.is-active .spot-photo::before { transform: translate(18px, 18px); opacity: 1; }
  .js .spot-panel.is-active .spot-body > * { opacity: 1; transform: none; }
  .js .spot-panel.is-active .spot-body > :nth-child(1) { transition-delay: .15s; }
  .js .spot-panel.is-active .spot-body > :nth-child(2) { transition-delay: .25s; }
  .js .spot-panel.is-active .spot-body > :nth-child(3) { transition-delay: .35s; }
  .js .spot-panel.is-active .spot-body > :nth-child(4) { transition-delay: .45s; }

  /* comparsa delle sezioni allo scroll */
  .js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@keyframes fade-up { from { opacity: 0; transform: translateY(22px); } }
@keyframes draw-x { from { transform: scaleX(0); } }
@keyframes draw-y { from { transform: scaleY(0); } }

/* =========================================================
   Responsive
   ========================================================= */
/* sotto questa larghezza la timeline affiancata andrebbe a capo: il testo passa sopra */
@media (max-width: 1240px) {
  .agenda-grid { grid-template-columns: 1fr; gap: 48px; max-width: 900px; margin-inline: auto; }
  .timeline-wrap, .intro-panel { grid-column: 1; grid-row: auto; }
}

@media (max-width: 1024px) {
  .location-inner { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  :root { --header-h: 76px; }
  .brand img { height: 44px; }

  /* sul mobile il pulsante dell'header finisce nel menu: lo sostituisce questo, sempre in basso a destra */
  .fab-register {
    display: inline-flex;
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 45;
    min-height: 52px;
    padding: 0 24px;
    box-shadow: 0 10px 28px rgba(26, 54, 95, .35), 0 0 18px rgba(20, 227, 230, .45);
    transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s;
  }
  .fab-register.is-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(.96);
    pointer-events: none;
  }

  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: rgba(26, 54, 95, .97);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .2);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
  .main-nav a:not(.btn)::after { display: none; }
  .main-nav .btn { margin-top: 20px; }
  .site-header:has(.main-nav.is-open) { background: rgba(26, 54, 95, .97); }

  /* hero impilato e centrato */
  .hero { min-height: auto; padding-top: calc(var(--header-h) + 48px); }
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    justify-items: center;
    row-gap: 22px;
    text-align: center;
    --brand-fs: clamp(60px, 17vw, 110px);
  }
  .hero-brand, .hero-divider, .hero-claim, .hero-meta { grid-column: 1; grid-row: auto; }
  .hero-brand-row { justify-content: center; }
  .neon-arm { display: none; }
  .hero-divider { align-self: auto; width: 110px; height: 2px; }
  .neon-v { top: 0; bottom: auto; left: 0; width: 100%; height: 2px; background: var(--cyan); transform-origin: left center; animation-name: draw-x !important; }
  .neon-m { top: 8px; left: auto; right: -18px; width: 40px; height: 2px; }
  .neon-m::after { display: none; }
  .hero-claim { white-space: normal; font-size: clamp(28px, 7vw, 48px); }
  .hero-meta { align-items: center; margin-top: 18px; }
  .hero-actions { justify-content: center; }

  .partners { display: flex; flex-direction: column; gap: 26px; margin-top: 48px; padding-inline: var(--gutter); }
  .partners-host-group, .partners-guest-group { padding: 0; }

  /* hero impilato: la linea verticale non c'è più, il titolo agenda torna centrato */
  .agenda-head { padding-right: 0; text-align: center; margin-bottom: 48px; }
  .agenda-head::before { display: none; }

  /* speaker: tab compatte con foto sopra il nome */
  .spot-tab { flex-direction: column; justify-content: center; gap: 8px; padding: 14px 8px 16px; text-align: center; }
  .spot-tab small { display: none; }
  .spot-tab strong { font-size: 13px; }
  .spot-panel { grid-template-columns: 1fr; gap: 40px; }
  .spot-photo { max-width: 270px; }
}

@media (max-width: 640px) {
  :root { --gutter: 16px; --header-h: 68px; }
  .brand img { height: 40px; }

  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }

  .hero-actions { flex-direction: column; align-self: stretch; }
  .hero-actions .btn { width: 100%; }
  .partners-list { gap: 16px 28px; }
  .partners-host { height: 38px; }

  .intro-panel { padding: 52px 52px 28px 22px; }
  .timeline { --time-w: 46px; --gap: 12px; --dot-col: 18px; --dot: 12px; }
  .timeline time { font-size: 15px; }
  .timeline h3 { font-size: 15px; }
  /* su mobile il titolo va spesso a capo: azienda sempre sotto, senza filo */
  .timeline .who { flex-basis: 100%; padding-left: 0; border-left: 0; }
  .timeline li { padding-bottom: 28px; }

  .spotlight { gap: 40px; }
  .spot-tabs { gap: 8px; }
  .spot-tab img { width: 44px; height: 44px; }
  .spot-tab strong { font-size: 12px; }
  .spot-photo { max-width: 240px; }
  .spot-photo::before { transform: translate(12px, 12px); }
  .spot-bio { font-size: 16px; }

  .location { padding: 80px 0; }
  .location-card { padding: 28px 24px; }
  .map { height: 320px; }

  .rsvp { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-brand { flex-direction: column; gap: 12px; }
}
@media (max-width: 640px) and (prefers-reduced-motion: no-preference) {
  .js .spot-panel.is-active .spot-photo::before { transform: translate(12px, 12px); }
}
