/* Il gioco prende vita — baseline S5
   Mobile-first, accessibile, senza dipendenze esterne.
*/

:root {
  --blue: #163F63;
  --teal: #176B68;
  --terracotta: #C76532;
  --graphite: #202A32;
  --paper: #F4F0E7;
  --white: #FFFFFF;
  --line: #D5D9D8;
  --muted: #5F6A72;
  --surface: #FAFBFB;
  --focus: #8A4B08;

  --radius: 0.8rem;
  --shadow: 0 0.5rem 1.5rem rgb(22 63 99 / 0.08);
  --max-width: 72rem;
  --text-width: 46rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--graphite);
  background: var(--white);
  line-height: 1.6;
}

img,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.2rem;
}

h1,
h2,
h3 {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-stretch: normal;
  letter-spacing: 0;
  line-height: 1.12;
  margin-top: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(3rem, 12vw, 5.8rem);
  color: var(--blue);
  margin-bottom: 0.3em;
}

h2 {
  font-size: clamp(2.1rem, 8vw, 3.5rem);
  color: var(--blue);
  margin-bottom: 0.65em;
}

h3 {
  font-size: 1.55rem;
  margin-bottom: 0.45em;
}

p {
  margin-top: 0;
}

blockquote {
  margin: 1.5rem 0 0;
  padding: 1rem 1.25rem;
  border-left: 0.3rem solid var(--terracotta);
  background: var(--white);
  font-size: 1.15rem;
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin-inline: auto;
}

.narrow {
  max-width: var(--text-width);
}

.section {
  padding: clamp(4rem, 10vw, 7rem) 0;
  scroll-margin-top: 5rem;
}

.section--paper {
  background: var(--paper);
}

.section--blueprint {
  background:
    linear-gradient(rgb(22 63 99 / 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgb(22 63 99 / 0.045) 1px, transparent 1px),
    var(--surface);
  background-size: 24px 24px;
}

.section--dark {
  background: var(--blue);
  color: var(--white);
}

.section--dark h2,
.section--dark h3,
.section--dark a {
  color: var(--white);
}

.section--dark .eyebrow {
  color: #D7E7F4;
}

.eyebrow,
.label {
  margin-bottom: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--teal);
}

.lead {
  font-size: clamp(1.2rem, 4vw, 1.45rem);
  line-height: 1.45;
}

.hero-subtitle {
  max-width: 44rem;
  font-size: clamp(1.25rem, 4.6vw, 1.8rem);
  font-weight: 700;
  line-height: 1.3;
}

.hero-lead {
  font-size: 1.15rem;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

.section--dark .small {
  color: #D9E1E6;
}

.microcopy {
  font-weight: 700;
  color: var(--teal);
}

.section--dark .microcopy {
  color: #D7E7F4;
}

.center {
  text-align: center;
}

.statement {
  margin: 2rem auto 0;
  max-width: 48rem;
  text-align: center;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-weight: 800;
  color: var(--blue);
}

.statement--small {
  font-size: clamp(1.1rem, 4vw, 1.45rem);
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 0.3rem solid var(--teal);
  background: rgb(23 107 104 / 0.08);
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 0.75rem;
  left: 0.75rem;
  transform: translateY(-180%);
  padding: 0.7rem 1rem;
  background: var(--white);
  border: 2px solid var(--blue);
  border-radius: 0.4rem;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(255 255 255 / 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-stretch: normal;
  letter-spacing: 0;
  font-size: 1.25rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--blue);
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--graphite);
  font: inherit;
  font-weight: 700;
}

.main-nav {
  position: absolute;
  inset: 4rem 0 auto 0;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.main-nav.is-open {
  display: flex;
}

.main-nav a:not(.button) {
  padding: 0.8rem 0.5rem;
  text-decoration: none;
  font-weight: 700;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--blue);
  border-radius: 0.55rem;
  background: var(--blue);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.2;
}

.button:hover {
  filter: brightness(0.96);
}

.button--secondary {
  background: transparent;
  color: var(--blue);
}

.button--small {
  min-height: 2.4rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
}

.cta-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.75rem 0;
}

.hero-grid,
.two-col {
  display: grid;
  gap: 2rem;
}

.hero-media {
  align-self: center;
}

.placeholder {
  min-height: 15rem;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.6rem;
  padding: 1.5rem;
  border: 2px dashed var(--blue);
  border-radius: var(--radius);
  background:
    linear-gradient(rgb(22 63 99 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgb(22 63 99 / 0.04) 1px, transparent 1px),
    #fff;
  background-size: 20px 20px;
  text-align: center;
  color: var(--muted);
}

.placeholder--hero {
  min-height: 24rem;
  aspect-ratio: 3 / 2;
}

.placeholder--video {
  min-height: 18rem;
  aspect-ratio: 16 / 9;
}

.placeholder--photo {
  min-height: 20rem;
  aspect-ratio: 4 / 3;
}

.placeholder--compact {
  min-height: 8rem;
}

.placeholder--dark {
  background: rgb(255 255 255 / 0.06);
  border-color: rgb(255 255 255 / 0.7);
  color: var(--white);
}

.placeholder__id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 800;
  color: var(--terracotta);
}

.placeholder--dark .placeholder__id {
  color: #FFD4BC;
}

.placeholder__play {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
}

.media-inline {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.media-inline__title {
  margin-bottom: 0.2rem;
  font-weight: 800;
}

.card-stack,
.question-list,
.kit-grid {
  display: grid;
  gap: 1rem;
}

.card,
.method-card,
.question-list article,
.progression article,
.info-grid article {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.card--large {
  padding: 1.5rem;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
  font-weight: 800;
  color: var(--blue);
}

.comparison {
  display: grid;
  gap: 1rem;
}

.comparison-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
}

.comparison-card--gen {
  border-top: 0.35rem solid var(--teal);
}

.comparison-card--ml {
  border-top: 0.35rem solid var(--terracotta);
}

.dual-learning {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

.dual-learning__join {
  align-self: center;
  text-align: center;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--terracotta);
}

.method-grid {
  display: grid;
  gap: 1rem;
}

.method-card {
  position: relative;
  overflow: hidden;
}

.method-number {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 2rem;
  font-weight: 900;
  color: var(--terracotta);
}

.method-card ol,
.steps {
  padding-left: 1.3rem;
}

.progression {
  display: grid;
  gap: 1rem;
}

.progression article {
  position: relative;
}

.discipline-grid {
  display: grid;
  gap: 1rem;
}

.placeholder-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--terracotta);
  word-break: break-word;
}

.question-list article {
  background: rgb(255 255 255 / 0.08);
  border-color: rgb(255 255 255 / 0.25);
  box-shadow: none;
}

.details-dark summary {
  color: var(--white);
}

.info-grid {
  display: grid;
  gap: 1rem;
}

.info-grid article p {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--terracotta);
}

details {
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--blue);
}

details[open] summary {
  margin-bottom: 0.75rem;
}

.faq-list {
  display: grid;
  gap: 0.75rem;
}

.faq-list details {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
}

.site-footer {
  padding: 2rem 0;
  background: var(--graphite);
  color: var(--white);
}

.site-footer a {
  color: var(--white);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

@media (min-width: 44rem) {
  .cta-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .comparison,
  .discipline-grid,
  .info-grid,
  .progression {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dual-learning {
    grid-template-columns: 1fr auto 1fr;
  }
}

@media (min-width: 60rem) {
  .menu-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .main-nav a:not(.button) {
    padding: 0.55rem 0.7rem;
  }

  .hero-grid,
  .two-col {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: start;
    gap: clamp(2rem, 5vw, 4rem);
  }

  .two-col--media {
    align-items: center;
  }

  .comparison {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .progression {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .discipline-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* Spazio tra il blocco informazioni organizzative e la CTA finale */
.info-grid + .center {
  margin-top: 1.75rem;
}


.location-school {
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}


.info-email {
  display: inline-block;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}


/* Media reali — integrazione rev8 */
.media-photo,
.media-video {
  display: block;
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.media-photo {
  object-fit: cover;
}

.hero-image,
.kit-image {
  aspect-ratio: 4 / 3;
}

.media-figure {
  margin: 0;
}

.media-video {
  aspect-ratio: 16 / 9;
  background: #000;
  object-fit: contain;
}

.media-figure figcaption {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
}

.media-figure--dark figcaption {
  color: rgb(255 255 255 / 0.82);
}

.audio-player {
  display: block;
  width: 100%;
  margin: 0.75rem 0 1rem;
}

/* Card immagini — Trasferibilità rev9 */
.discipline-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.discipline-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.discipline-card__body {
  padding: 1.1rem 1.1rem 1.25rem;
}

.discipline-card__body .label {
  margin-bottom: 0.5rem;
}

.discipline-card__body h3 {
  margin-bottom: 0.55rem;
}

/* Presentazione del corso — rev12 */
.presentation-preview {
  margin: 2rem auto 0;
}

.presentation-preview__link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.presentation-preview__link:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

.presentation-preview__image {
  display: block;
  width: 100%;
  height: auto;
}

.presentation-preview figcaption {
  margin-top: 0.7rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.presentation-actions {
  margin-top: 1.25rem;
}

/* Informazioni corso e iscrizione — rev14 */
.course-dates {
  display: grid;
  gap: 0.28rem;
}

.course-dates span {
  display: block;
}

.schedule-note {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--muted);
}

.registration-options {
  margin-top: 1.9rem;
  text-align: center;
}

.registration-options__title {
  margin-bottom: 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--blue);
}

.registration-options__intro {
  margin: 0 auto;
  max-width: 42rem;
}

.registration-options__actions {
  justify-content: center;
  margin-bottom: 0;
}

/* Modalità di iscrizione — rev15 */
.registration-channel {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
}

.course-code {
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--blue);
  border-radius: 0.5rem;
  background: var(--white);
  color: var(--blue);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
}

.course-code strong {
  font-size: 1.08em;
}
