/* =================================================================
   OSM Partner Perugia — Landing Page Phase 1
   Sales & Marketing Revolution event
   -----------------------------------------------------------------
   Stylesheet organisation:
     1. Design tokens (CSS variables — Brand Book Oct 2025)
     2. Reset & base
     3. Typography
     4. Layout helpers (container, sections)
     5. Components (buttons, cards, forms)
     6. Sections (hero, evento, relatori, servizi, form, mappa, contatti)
     7. Site header / nav
     8. Footer
     9. Cookie banner
    10. Utilities
    11. Responsive breakpoints
    12. Reduced motion / print
   ================================================================= */

/* =================================================================
   1. DESIGN TOKENS
   ================================================================= */
:root {
  /* Brand colours — Brand Book OSM, October 2025 */
  --color-magenta:        #AD2579;   /* Magenta Equilibrato — primary */
  --color-magenta-dark:   #8A1D60;
  --color-magenta-light:  #C84A95;
  --color-blue:           #1C3455;   /* Blu Oltremare — primary */
  --color-blue-dark:      #142540;
  --color-blue-light:     #2C4A78;
  --color-pink:           #F8D4E6;   /* Rosa Cipria — accent */
  --color-pink-soft:      #FCEAF3;
  --color-azure:          #6E8ECE;   /* Azzurro Sereno — accent */
  --color-azure-soft:     #B0C5E5;

  /* Neutrals (WCAG AA compliant against light/dark backgrounds) */
  --color-white:          #FFFFFF;
  --color-bg:             #FFFFFF;
  --color-surface:        #FAFAFA;
  --color-surface-2:      #F4F4F4;
  --color-text:           #1C3455;
  --color-text-muted:     #4A5A75;
  --color-text-inverse:   #FFFFFF;
  --color-border:         #E5E5E5;
  --color-border-strong:  #D0D0D0;
  --color-error:          #C81D3A;
  --color-success:        #1F8C4F;

  /* Semantic mapping */
  --color-primary:        var(--color-magenta);
  --color-primary-fg:     var(--color-white);
  --color-secondary:      var(--color-blue);

  /* Typography
     Brand-prescribed: Agenda (Adobe Fonts).
     Web-safe substitute: Barlow (geometric, similar metrics).
     To switch to Agenda, replace Barlow ref below with the Adobe project family. */
  --font-primary: 'Barlow', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Barlow', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Type scale (fluid via clamp for responsive typography) */
  --fs-h1:   clamp(2.5rem, 1.6rem + 4vw, 4rem);     /* 40 → 64px */
  --fs-h2:   clamp(2rem, 1.4rem + 2.5vw, 2.75rem);  /* 32 → 44px */
  --fs-h3:   clamp(1.25rem, 1rem + 1vw, 1.5rem);    /* 20 → 24px */
  --fs-lead: clamp(1.05rem, 0.95rem + 0.5vw, 1.25rem);
  --fs-body: 1rem;                                   /* 16px */
  --fs-sm:   0.875rem;                               /* 14px */
  --fs-xs:   0.75rem;                                /* 12px */

  --lh-tight: 1.15;
  --lh-base:  1.55;
  --lh-loose: 1.7;

  --fw-light:  300;
  --fw-regular:400;
  --fw-medium: 500;
  --fw-semi:   600;
  --fw-bold:   700;
  --fw-black:  800;

  /* Spacing scale (8px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 720px;
  --header-height: 84px;

  /* Radius (Brand Book: spigoli arrotondati / curve morbide) */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(28, 52, 85, 0.06), 0 1px 3px rgba(28, 52, 85, 0.08);
  --shadow-md: 0 4px 12px rgba(28, 52, 85, 0.08), 0 2px 4px rgba(28, 52, 85, 0.06);
  --shadow-lg: 0 12px 32px rgba(28, 52, 85, 0.12), 0 4px 12px rgba(28, 52, 85, 0.08);
  --shadow-magenta: 0 8px 24px rgba(173, 37, 121, 0.25);

  /* Transitions */
  --t-fast:  150ms ease;
  --t-base:  220ms ease;
  --t-slow:  400ms ease;

  /* Z-index */
  --z-header: 100;
  --z-cookie: 200;
  --z-modal:  300;
}

/* =================================================================
   2. RESET & BASE
   ================================================================= */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
  /* Disable user-scalable=no but keep accessibility — better via CSS */
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: var(--fs-body);
  line-height: var(--lh-base);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* iOS: tap-highlight color matches brand */
  -webkit-tap-highlight-color: rgba(173, 37, 121, 0.2);
  /* Prevent horizontal scrollbars from accidental overflow */
  overflow-x: hidden;
  /* Respect iOS safe areas (notch / home indicator) */
  padding: 0 env(safe-area-inset-left) env(safe-area-inset-bottom) env(safe-area-inset-right);
}

/* Lock scroll when nav drawer or dialog is open */
body.nav-open, body.dialog-open { overflow: hidden; }

/* Touch optimisations:
   - manipulation removes the 300ms double-tap zoom delay on legacy Safari
   - applied to interactive elements only (preserve text selection elsewhere) */
a, button, input[type="checkbox"], input[type="submit"], .btn, .info-card, .speaker-card, .service-card, .contact-tile, .speaker-mini, .course-item {
  touch-action: manipulation;
}

/* All interactive controls meet WCAG 2.5.5 (44×44 CSS px target). The .btn class
   already does this; ensure form checkbox label hit-area is large enough. */
.form-checkbox { min-height: 44px; padding: var(--space-2) 0; }

img, svg, video { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

a { color: var(--color-magenta); text-decoration: none; transition: color var(--t-fast); }
a:hover, a:focus-visible { color: var(--color-magenta-dark); text-decoration: underline; text-underline-offset: 3px; }

:focus-visible {
  outline: 3px solid var(--color-azure);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip link / SR-only */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =================================================================
   3. TYPOGRAPHY
   ================================================================= */
h1, h2, h3, h4 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  line-height: var(--lh-tight);
  color: var(--color-blue);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }
h4 { font-size: 1rem; font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 0.08em; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

strong { font-weight: var(--fw-bold); }

.link-inline {
  color: var(--color-magenta);
  font-weight: var(--fw-semi);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =================================================================
   4. LAYOUT HELPERS
   ================================================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}
.container--narrow { max-width: var(--container-narrow); }

.section {
  padding: var(--space-9) 0;
  position: relative;
}
.section--light { background: var(--color-surface); }
.section--accent {
  background: linear-gradient(180deg, var(--color-pink-soft) 0%, var(--color-white) 100%);
}
.section--dark {
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
  color: var(--color-text-inverse);
}
.section--form {
  background: var(--color-pink);
  background: linear-gradient(180deg, var(--color-pink) 0%, var(--color-pink-soft) 100%);
}
.section--map { background: var(--color-white); padding-bottom: var(--space-8); }

.section__header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-7);
}
.section__header--inverse h2,
.section__header--inverse .section__lead { color: var(--color-white); }
.section__header--inverse .section__eyebrow { color: var(--color-pink); }

.section__eyebrow {
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-magenta);
  margin-bottom: var(--space-3);
}

.section__title {
  margin-bottom: var(--space-4);
}

.section__lead {
  font-size: var(--fs-lead);
  color: var(--color-text-muted);
  line-height: var(--lh-loose);
}

.section__cta {
  text-align: center;
  margin-top: var(--space-7);
}

/* Inverse CTA banner (used on dark sections — Servizi)
   Visually distinct: pink-soft surface inside the dark section. */
.section__cta--inverse {
  margin-top: var(--space-8);
  padding: var(--space-6) var(--space-5);
  background: linear-gradient(135deg, rgba(248, 212, 230, 0.08) 0%, rgba(173, 37, 121, 0.15) 100%);
  border: 1px solid rgba(248, 212, 230, 0.25);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}
.section__cta-text {
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  margin: 0;
  text-align: center;
  line-height: 1.3;
}

/* =================================================================
   5. COMPONENTS
   ================================================================= */
/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-weight: var(--fw-bold);
  font-size: var(--fs-body);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform var(--t-base), background var(--t-base), box-shadow var(--t-base), color var(--t-base);
  text-decoration: none !important;
  white-space: normal;
  text-align: center;
  height: auto;
  user-select: none;
  line-height: 1.25;
}
.btn:focus-visible { outline-offset: 4px; }

.btn--primary {
  background: var(--color-magenta);
  color: var(--color-white);
  box-shadow: var(--shadow-magenta);
}
.btn--primary:hover, .btn--primary:focus-visible {
  background: var(--color-magenta-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(173, 37, 121, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--color-magenta);
  border-color: var(--color-magenta);
}
.btn--outline:hover, .btn--outline:focus-visible {
  background: var(--color-magenta);
  color: var(--color-white);
}

.btn--ghost {
  background: transparent;
  color: var(--color-blue);
  border-color: transparent;
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  background: rgba(28, 52, 85, 0.08);
  color: var(--color-blue);
}

.btn--lg { padding: var(--space-5) var(--space-7); font-size: 1.125rem; }
.btn--sm { padding: var(--space-3) var(--space-5); font-size: var(--fs-sm); }
.btn--block { width: 100%; }

.btn[disabled], .btn.is-loading { opacity: 0.7; cursor: not-allowed; transform: none !important; }
.btn .btn__loader {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 700ms linear infinite;
}
.btn.is-loading .btn__loader { display: inline-block; }
.btn.is-loading .btn__label { opacity: 0.7; }
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ---- Badges ---- */
.badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge--accent {
  background: rgba(173, 37, 121, 0.12);
  color: var(--color-magenta);
  border: 1px solid rgba(173, 37, 121, 0.25);
}

/* =================================================================
   6. SECTIONS
   ================================================================= */
/* =================================================================
   EVENT-STATE TOGGLES — show/hide pre vs post content
   The <html> element gets .is-pre-event or .is-post-event applied
   by an inline script in <head> (zero FOUC).
   ================================================================= */
.is-pre-event .post-only { display: none !important; }
.is-post-event .pre-only { display: none !important; }

/* =================================================================
   COUNTDOWN — pre-event live timer
   ================================================================= */
.countdown {
  margin: 0 0 var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(248, 212, 230, 0.3);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: inline-block;
  max-width: 100%;
  animation: cd-fade-in 500ms ease 100ms both;
}
@keyframes cd-fade-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.countdown__label {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-pink);
  text-align: center;
}

.countdown__grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  align-items: center;
  text-align: center;
}

.countdown__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  min-width: 56px;
}

.countdown__cell + .countdown__cell::before {
  content: ":";
  position: absolute;
  top: 0;
  left: calc(-1 * var(--space-3) / 2);
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: rgba(248, 212, 230, 0.4);
  line-height: 1;
}

.countdown__num {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--color-white);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  /* Prevent layout shift while seconds tick */
  min-width: 1.6em;
  text-align: center;
  display: inline-block;
}

.countdown__unit {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 480px) {
  .countdown { padding: var(--space-3) var(--space-4); }
  .countdown__grid { gap: var(--space-2); }
  .countdown__cell { min-width: 44px; }
  .countdown__num { font-size: 1.75rem; }
  .countdown__unit { font-size: 0.625rem; }
  .countdown__cell + .countdown__cell::before { font-size: 1.5rem; }
}

/* ---- HERO — full background image variant ---- */
.hero {
  position: relative;
  padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-9);
  overflow: hidden;
  background: var(--color-blue-dark);
  color: var(--color-text-inverse);
  isolation: isolate;
  min-height: clamp(520px, 70vh, 720px);
}

/* Image as background <picture> — better than CSS bg for srcset/AVIF/WebP */
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  display: block;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Multiply overlay for text contrast (matches selected variant C) */
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(15,31,56,0.55) 0%, rgba(74,18,82,0.85) 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative; z-index: 2;
  max-width: 820px;
}

.hero__eyebrow { margin-bottom: var(--space-5); }
.hero__eyebrow .badge--accent {
  background: rgba(248, 212, 230, 0.15);
  color: var(--color-pink);
  border-color: rgba(248, 212, 230, 0.4);
}

.hero__title {
  /* Hero title is bigger than the standard --fs-h1 used elsewhere on the page */
  font-size: clamp(3.25rem, 2rem + 5vw, 5.25rem); /* 52 → 84 px */
  color: var(--color-white);
  margin-bottom: var(--space-4);
  line-height: 1;
  font-weight: var(--fw-black);
  letter-spacing: -0.025em;
}
.hero__title--highlight {
  background: linear-gradient(90deg, var(--color-magenta-light) 0%, var(--color-pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.hero__subtitle {
  font-size: var(--fs-lead);
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--space-6);
  max-width: 640px;
}

.hero__meta {
  list-style: none; padding: 0; margin: 0 0 var(--space-7);
  display: flex; flex-wrap: wrap; gap: var(--space-5);
}
.hero__meta li {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-body); color: rgba(255, 255, 255, 0.92);
}
.hero__meta svg { color: var(--color-pink); flex-shrink: 0; }

.hero__cta {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  margin-bottom: var(--space-7);
}
.hero__cta .btn--ghost {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.25);
}
.hero__cta .btn--ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--color-white); }

.hero__patrocinio {
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.02em;
}

/* ---- EVENTO INFO GRID ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-5);
}

.info-card {
  background: var(--color-white);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-pink);
}

.info-card__icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-pink);
  color: var(--color-magenta);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
}

.info-card__title { font-size: 1.125rem; margin-bottom: var(--space-2); color: var(--color-blue); }
.info-card p { color: var(--color-text-muted); font-size: var(--fs-body); }

/* ---- RELATORI ---- */
.speakers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.speaker-card {
  background: var(--color-white);
  padding: var(--space-7) var(--space-5);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base);
  border: 1px solid var(--color-border);
}
.speaker-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.speaker-card--featured {
  border-color: var(--color-magenta);
  box-shadow: 0 8px 24px rgba(173, 37, 121, 0.12);
}

.speaker-card__avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: var(--avatar-bg, var(--color-blue));
  margin: 0 auto var(--space-5);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
  /* decorative gradient overlay */
  background-image: linear-gradient(135deg, var(--avatar-bg, var(--color-blue)) 0%, var(--color-magenta) 100%);
}
.speaker-card__photo {
  width: 140px; height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-5);
  display: block;
  border: 3px solid var(--color-pink);
}
.speaker-card__initials {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: var(--fw-black);
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.speaker-card__name {
  font-size: 1.375rem;
  margin-bottom: var(--space-2);
  color: var(--color-blue);
}
.speaker-card__role {
  color: var(--color-magenta);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-4);
}
.speaker-card__bio {
  color: var(--color-text-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
}

/* ---- Tier titles & divider (relatori a due livelli) ---- */
.speakers-tier-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-magenta);
  text-align: center;
  margin: 0 0 var(--space-5);
}

.speakers-tier-intro {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-6);
  font-size: var(--fs-body);
}

.speakers-tier-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--color-magenta) 50%, transparent 100%);
  margin: var(--space-8) auto var(--space-7);
  border-radius: var(--radius-pill);
}

/* ---- Mini speaker cards (tier 2) ---- */
.speakers-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}

.speaker-mini {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.speaker-mini:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-pink);
}

.speaker-mini__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--avatar-bg, var(--color-blue));
  background-image: linear-gradient(135deg, var(--avatar-bg, var(--color-blue)) 0%, var(--color-magenta) 100%);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.speaker-mini__photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--color-pink);
}
.speaker-mini__initials {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--fw-black);
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.speaker-mini__body { flex: 1; min-width: 0; }
.speaker-mini__name {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--color-blue);
  margin: 0 0 var(--space-1);
  line-height: 1.25;
}
.speaker-mini__role {
  font-size: var(--fs-sm);
  color: var(--color-magenta);
  font-weight: var(--fw-semi);
  margin: 0 0 var(--space-2);
  line-height: 1.35;
}
.speaker-mini__note {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.45;
}

/* ---- SERVIZI ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-5);
}

.service-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  color: var(--color-text-inverse);
  transition: transform var(--t-base), background var(--t-base), border-color var(--t-base);
  backdrop-filter: blur(4px);
}
.service-card:hover, .service-card:focus-within {
  transform: translateY(-4px);
  background: rgba(173, 37, 121, 0.18);
  border-color: var(--color-magenta-light);
}

.service-card__icon {
  width: 64px; height: 64px;
  border-radius: var(--radius-md);
  background: rgba(248, 212, 230, 0.15);
  color: var(--color-pink);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-4);
  transition: background var(--t-base), color var(--t-base);
}
.service-card__icon svg {
  width: 36px; height: 36px;
  display: block;
  /* Brand SVGs use currentColor — colour controlled by parent */
  color: inherit;
}
.service-card:hover .service-card__icon,
.service-card:focus-within .service-card__icon {
  background: var(--color-magenta);
  color: var(--color-white);
}

.service-card__title {
  font-size: 1.25rem;
  color: var(--color-white);
  margin-bottom: var(--space-3);
}
.service-card__desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
}

/* Card with action button (e.g. "Scopri i corsi" on Formazione card) */
.service-card--has-action { display: flex; flex-direction: column; }
.service-card--has-action .service-card__desc { margin-bottom: var(--space-5); }

.service-card__action {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  color: var(--color-pink);
  border: 0;
  border-bottom: 2px solid rgba(248, 212, 230, 0.3);
  padding: var(--space-2) 0;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: auto;
  align-self: flex-start;
  transition: color var(--t-base), border-color var(--t-base), gap var(--t-base);
}
.service-card__action:hover,
.service-card__action:focus-visible {
  color: var(--color-white);
  border-bottom-color: var(--color-white);
  gap: var(--space-3);
}

/* =================================================================
   DIALOG (Catalogo corsi)
   Native <dialog> element — modern browsers handle backdrop & focus trap.
   ================================================================= */
.dialog {
  /* Reset native styles */
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(720px, calc(100vw - 2rem));
  width: 100%;
  max-height: min(90vh, 800px);
  margin: auto;
  color: var(--color-text);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  /* Default hidden state */
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: opacity var(--t-base), transform var(--t-base);
}
.dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Backdrop */
.dialog::backdrop {
  background: rgba(28, 52, 85, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.dialog__inner {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  max-height: inherit;
}

.dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-pink-soft) 0%, var(--color-white) 100%);
}
.dialog__title {
  margin: var(--space-2) 0 var(--space-2);
  font-size: clamp(1.5rem, 1rem + 1.5vw, 2rem);
  color: var(--color-blue);
}
.dialog__desc {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--fs-body);
  line-height: var(--lh-loose);
}

.dialog__close {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: var(--color-white);
  color: var(--color-blue);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-base), color var(--t-base), transform var(--t-base);
  box-shadow: var(--shadow-sm);
}
.dialog__close:hover,
.dialog__close:focus-visible {
  background: var(--color-magenta);
  color: var(--color-white);
  transform: rotate(90deg);
}

.dialog__body {
  padding: var(--space-5) var(--space-6);
  overflow-y: auto;
  flex: 1;
  /* nice scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--color-pink) transparent;
}
.dialog__body::-webkit-scrollbar { width: 8px; }
.dialog__body::-webkit-scrollbar-thumb { background: var(--color-pink); border-radius: 999px; }
.dialog__body::-webkit-scrollbar-track { background: transparent; }

.dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-wrap: wrap;
}

.dialog__note {
  margin-top: var(--space-5);
  padding: var(--space-4);
  background: var(--color-pink-soft);
  border-left: 3px solid var(--color-magenta);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--color-blue);
  line-height: var(--lh-loose);
}

/* Course list */
.course-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.course-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  transition: border-color var(--t-base), background var(--t-base);
}
.course-item:hover {
  border-color: var(--color-magenta);
  background: var(--color-pink-soft);
}

.course-item__num {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-magenta) 0%, var(--color-magenta-dark) 100%);
  color: var(--color-white);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: 0.875rem;
  letter-spacing: -0.02em;
}

.course-item__body { flex: 1; min-width: 0; }
.course-item__title {
  margin: 0 0 var(--space-2);
  font-size: 1.0625rem;
  color: var(--color-blue);
  font-weight: var(--fw-bold);
  line-height: 1.3;
}
.course-item__desc {
  margin: 0 0 var(--space-2);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-loose);
}
.course-item__tag {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background: var(--color-pink);
  color: var(--color-magenta-dark);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  letter-spacing: 0.02em;
}

/* Prevent body scroll when dialog is open (handled by JS class) */
body.dialog-open { overflow: hidden; }

/* Mobile dialog */
@media (max-width: 640px) {
  .dialog { max-width: 100vw; max-height: 100vh; border-radius: 0; margin: 0; }
  .dialog__header,
  .dialog__body,
  .dialog__footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .dialog__title { font-size: 1.5rem; }
  .course-item { flex-direction: column; gap: var(--space-2); }
  .dialog__footer .btn { width: 100%; justify-content: center; }
}

/* ---- FORM ---- */
.signup-form {
  background: var(--color-white);
  padding: var(--space-7);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin-top: var(--space-6);
}

.form-row { margin-bottom: var(--space-5); }
.form-row:last-of-type { margin-bottom: var(--space-6); }

.form-field {
  display: flex; flex-direction: column;
  gap: var(--space-2);
}
.form-field label {
  font-weight: var(--fw-semi);
  color: var(--color-blue);
  font-size: var(--fs-sm);
}
.form-field__hint {
  font-weight: var(--fw-regular);
  color: var(--color-text-muted);
  font-size: var(--fs-xs);
}
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"] {
  padding: var(--space-4);
  border: 2px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-size: var(--fs-body);
  color: var(--color-text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-field input:focus {
  outline: none;
  border-color: var(--color-magenta);
  box-shadow: 0 0 0 4px rgba(173, 37, 121, 0.12);
}
.form-field.is-invalid input {
  border-color: var(--color-error);
  background: #FFF5F7;
}
.form-field__error {
  display: block;
  min-height: 1.25rem;
  font-size: var(--fs-xs);
  color: var(--color-error);
  font-weight: var(--fw-semi);
}

.required { color: var(--color-error); margin-left: 2px; }

.form-checkbox {
  display: flex; align-items: flex-start; gap: var(--space-3);
  cursor: pointer;
  font-size: var(--fs-sm);
  color: var(--color-text);
  line-height: var(--lh-base);
}
.form-checkbox input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 2px;
  accent-color: var(--color-magenta);
  cursor: pointer;
}
.form-checkbox a { color: var(--color-magenta); text-decoration: underline; }

.form-honeypot {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.form-status {
  margin-top: var(--space-4);
  text-align: center;
  font-weight: var(--fw-semi);
  min-height: 1.5rem;
}
.form-status.is-success { color: var(--color-success); }
.form-status.is-error { color: var(--color-error); }

/* ---- MAPPA (con click-to-load placeholder) ---- */
.map-wrapper {
  width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border);
  height: 450px;
  position: relative;
}
.map-wrapper iframe { display: block; width: 100%; height: 100%; border: 0; }
.map-wrapper--placeholder {
  background:
    linear-gradient(135deg, rgba(173,37,121,0.06) 0%, rgba(110,142,206,0.10) 100%),
    repeating-linear-gradient(45deg, transparent 0 20px, rgba(28,52,85,0.04) 20px 21px),
    var(--color-pink-soft);
}
.map-loader {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--space-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  color: var(--color-blue);
  text-align: center;
  padding: var(--space-5);
  transition: background var(--t-base);
}
.map-loader:hover, .map-loader:focus-visible { background: rgba(255,255,255,0.5); }
.map-loader svg { color: var(--color-magenta); margin-bottom: var(--space-2); }
.map-loader > span:first-of-type {
  font-weight: var(--fw-bold);
  font-size: 1.0625rem;
}
.map-loader__hint { font-size: var(--fs-sm); color: var(--color-text-muted); }

/* ---- CONTATTI ---- */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
}
.contact-tile {
  display: flex; flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.contact-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-magenta);
  color: var(--color-text);
  text-decoration: none;
}
.contact-tile__icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-pink);
  color: var(--color-magenta);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-2);
}
.contact-tile__title {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  margin-bottom: var(--space-1);
  color: var(--color-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contact-tile__value {
  font-size: var(--fs-body);
  color: var(--color-text);
  margin: 0;
  font-weight: var(--fw-semi);
}
.contact-tile__hint {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: var(--space-2);
}

/* =================================================================
   7. SITE HEADER / NAV
   ================================================================= */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background var(--t-base), border-color var(--t-base), box-shadow var(--t-base);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  height: var(--header-height);
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 60px;
  width: auto;
  display: block;
  /* preserve crispness on HiDPI displays */
  image-rendering: -webkit-optimize-contrast;
}
.logo-img--light { height: 88px; }

.site-header__nav { display: block; }
.nav-list {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0; padding: 0;
  align-items: center;
}
.nav-list a {
  color: var(--color-blue);
  font-weight: var(--fw-semi);
  font-size: var(--fs-sm);
  padding: var(--space-2) 0;
  position: relative;
}
.nav-list a:hover, .nav-list a:focus-visible {
  color: var(--color-magenta);
  text-decoration: none;
}
.nav-list a:not(.nav-cta)::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--color-magenta);
  transition: width var(--t-base);
}
.nav-list a:not(.nav-cta):hover::after,
.nav-list a:not(.nav-cta):focus-visible::after { width: 100%; }

.nav-cta {
  background: var(--color-magenta);
  color: var(--color-white) !important;
  padding: var(--space-3) var(--space-5) !important;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background var(--t-base);
}
.nav-cta:hover, .nav-cta:focus-visible {
  background: var(--color-magenta-dark);
  color: var(--color-white) !important;
}

.site-header__toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px; height: 44px;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.site-header__toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--color-blue);
  margin: 5px auto;
  border-radius: 2px;
  transition: transform var(--t-base), opacity var(--t-base);
}
.site-header__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-header__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =================================================================
   8. FOOTER
   ================================================================= */
.site-footer {
  background: var(--color-blue-dark);
  color: var(--color-text-inverse);
  padding: var(--space-8) 0 var(--space-5);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-7);
  margin-bottom: var(--space-7);
}

.site-footer__brand .logo-img { height: 88px; margin-bottom: var(--space-4); }
.site-footer__tagline {
  font-style: italic;
  color: var(--color-pink);
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  margin-bottom: var(--space-3);
}
.site-footer__company {
  font-size: var(--fs-sm);
  color: rgba(255,255,255,0.7);
}

.site-footer h4 {
  color: var(--color-pink);
  font-size: var(--fs-sm);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-4);
}

.site-footer__nav ul,
.site-footer__legal ul,
.social-list {
  list-style: none;
  padding: 0; margin: 0;
}
.site-footer__nav li,
.site-footer__legal li { margin-bottom: var(--space-2); }
.site-footer__nav a,
.site-footer__legal a,
.site-footer__legal button {
  color: rgba(255,255,255,0.85);
  font-size: var(--fs-sm);
  text-decoration: none;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.site-footer__nav a:hover,
.site-footer__legal a:hover,
.site-footer__legal button:hover {
  color: var(--color-pink);
  text-decoration: underline;
}

.social-list { display: flex; gap: var(--space-3); }
.social-list a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--color-white);
  transition: background var(--t-base), color var(--t-base);
}
.social-list a:hover {
  background: var(--color-magenta);
  color: var(--color-white);
  text-decoration: none;
}

.site-footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--space-5);
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* =================================================================
   STICKY CTA — floating button (always-visible lead-capture nudge)
   ================================================================= */
.sticky-cta {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  z-index: calc(var(--z-cookie) - 1);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  background: var(--color-magenta);
  color: var(--color-white);
  border-radius: var(--radius-pill);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none !important;
  box-shadow: 0 12px 32px rgba(173, 37, 121, 0.4);
  transition: opacity var(--t-base), transform var(--t-base), background var(--t-base);
  /* Hidden by default — JS toggles .is-visible */
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}
.sticky-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-cta:hover,
.sticky-cta:focus-visible {
  background: var(--color-magenta-dark);
  color: var(--color-white) !important;
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(173, 37, 121, 0.5);
}
.sticky-cta__icon { flex-shrink: 0; }

/* On mobile: full-width bar at the bottom, respecting safe-area (iPhone home indicator) */
@media (max-width: 640px) {
  .sticky-cta {
    bottom: 0; right: 0; left: 0;
    border-radius: 0;
    justify-content: center;
    padding: var(--space-4) var(--space-5) calc(var(--space-4) + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(28, 52, 85, 0.18);
    transform: translateY(100%);
    font-size: 1.0625rem;
    min-height: calc(56px + env(safe-area-inset-bottom));
  }
  .sticky-cta.is-visible { transform: translateY(0); }
  .sticky-cta__icon { width: 24px; height: 24px; }


/* =================================================================
   10. UTILITIES
   ================================================================= */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }

/* =================================================================
   11. RESPONSIVE BREAKPOINTS
   ================================================================= */
/* Tablet & smaller */
@media (max-width: 1024px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile */
@media (max-width: 768px) {
  :root { --header-height: 72px; }

  .section { padding: var(--space-7) 0; }

  /* Logo big enough to read on phones — Brand Book recommends ≥48px tall */
  .site-header__logo .logo-img { height: 52px; }

  /* Auto-hide header on scroll-down (gives back vertical space). JS toggles .is-hidden */
  .site-header { transition: background var(--t-base), box-shadow var(--t-base), transform var(--t-base); }
  .site-header.is-hidden { transform: translateY(-100%); }

  /* Hamburger toggle — bigger tap target */
  .site-header__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    z-index: 11;
    position: relative;
  }
  .site-header__toggle:hover { background: rgba(28, 52, 85, 0.06); }

  /* Mobile nav drawer — slide-in from right, full-height, backdrop */
  .site-header__nav {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(320px, 85vw);
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    padding: calc(var(--header-height) + var(--space-5)) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
    box-shadow: -16px 0 48px rgba(28, 52, 85, 0.18);
    transform: translateX(100%);
    transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
    visibility: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 10;
  }
  .site-header__nav.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  /* Backdrop behind drawer */
  body.nav-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(28, 52, 85, 0.55);
    backdrop-filter: blur(2px);
    z-index: 9;
    animation: fade-in 200ms ease;
  }
  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list li { width: 100%; }
  .nav-list a {
    display: block;
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1.0625rem;
    font-weight: var(--fw-bold);
    min-height: 56px;
    line-height: 1.5;
  }
  .nav-list a:not(.nav-cta)::after { display: none; }
  .nav-cta {
    margin-top: var(--space-5);
    text-align: center;
    border-bottom: 0 !important;
    padding: var(--space-4) var(--space-5) !important;
    font-size: 1rem !important;
  }

  /* Hero su mobile — l'immagine diventa un banner orizzontale in cima
     (non più background, così tutti e 3 i relatori restano visibili).
     Il testo va sotto su sfondo gradient brand. */
  .hero {
    padding-top: 0;
    padding-bottom: var(--space-7);
    min-height: 0;
    background: linear-gradient(135deg, #0F1F38 0%, var(--color-blue) 50%, #4A1252 100%);
  }
  /* L'immagine ora è un block element, non più position:absolute */
  .hero__bg {
    position: relative;
    inset: auto;
    margin-top: var(--header-height); /* sotto il sticky header */
    width: 100%;
    aspect-ratio: 583 / 268; /* mantiene proporzioni originali, nessun crop */
  }
  .hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  /* Overlay non serve più (l'immagine non è più sotto il testo) */
  .hero__overlay { display: none; }
  /* Testo */
  .hero__inner {
    padding-top: var(--space-6);
  }
  .hero__title { font-size: clamp(2.75rem, 11vw, 4rem); line-height: 0.98; }
  .hero__subtitle { margin-bottom: var(--space-5); }
  .hero__meta { margin-bottom: var(--space-5); gap: var(--space-3); flex-direction: column; }
  .hero__cta { gap: var(--space-3); margin-bottom: var(--space-5); }
  .hero__cta .btn { width: 100%; justify-content: center; min-height: 56px; font-size: 1.0625rem; }
  .hero__patrocinio { font-size: var(--fs-xs); }

  /* Sezioni successive */
  .info-card, .speaker-card, .service-card, .contact-tile { padding: var(--space-5); }
  .info-card__icon, .contact-tile__icon { width: 48px; height: 48px; }

  .speakers-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .speaker-card { padding: var(--space-6) var(--space-5); }
  .speaker-card__avatar, .speaker-card__photo { width: 100px; height: 100px; }
  .speaker-card__initials { font-size: 2rem; }
  .speaker-card__name { font-size: 1.125rem; }
  .speaker-card__bio { font-size: var(--fs-sm); }

  /* Signup form: input più alti per tap, font 16px (no zoom su iOS) */
  .signup-form { padding: var(--space-5); border-radius: var(--radius-lg); }
  .form-field input[type="text"],
  .form-field input[type="email"],
  .form-field input[type="tel"] {
    font-size: 16px; /* CRITICO: <16px causa zoom auto su iOS Safari */
    padding: var(--space-4) var(--space-4);
    min-height: 52px;
  }
  .form-field label { font-size: var(--fs-sm); }
  .form-row { margin-bottom: var(--space-4); }
  .signup-form .btn { min-height: 56px; font-size: 1.0625rem; }

  /* Section headers ridimensionati */
  .section__header { margin-bottom: var(--space-5); }
  .section__title { font-size: clamp(1.625rem, 6vw, 2.25rem); }
  .section__lead { font-size: 1rem; }

  /* Footer */
  .site-footer { padding: var(--space-7) 0 calc(var(--space-4) + env(safe-area-inset-bottom)); }
  .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .site-footer__bottom { flex-direction: column; text-align: center; }



  /* Sticky CTA: respect home indicator on iPhones */
  .sticky-cta {
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
  }

  /* Body deve compensare lo spazio della sticky CTA quando visibile, così il footer non finisce dietro */
  body.sticky-cta-visible { padding-bottom: 64px; }
}

/* Compensazione per iPhone con notch in landscape (raro ma succede) */
@supports (padding: max(0px)) {
  .site-header__inner {
    padding-left: max(var(--space-5), env(safe-area-inset-left));
    padding-right: max(var(--space-5), env(safe-area-inset-right));
  }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
  .container { padding: 0 var(--space-4); }
  .info-grid, .services-grid, .contacts-grid { grid-template-columns: 1fr; }
}

/* =================================================================
   12. REDUCED MOTION & PRINT
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .site-header, .site-footer, .hero__pattern { display: none !important; }
  body { color: #000; background: #FFF; }
  .section { padding: var(--space-5) 0; page-break-inside: avoid; }
  a { text-decoration: underline; color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
