/* Finance for Schools — una pagina pensata per essere capita da studenti e docenti. */

.ffs-page {
  --ffs-green-dark: #16866d;
  --ffs-green-soft: #dff7f0;
  --ffs-red-dark: #d94156;
  background: var(--paper);
}

.ffs {
  overflow: hidden;
}

.ffs-shell {
  width: min(calc(100% - 64px), var(--wrap));
  margin-inline: auto;
}

.ffs h1,
.ffs h2,
.ffs h3,
.ffs p {
  margin-top: 0;
}

.ffs h1,
.ffs h2,
.ffs h3 {
  font-family: var(--display);
  font-weight: 900;
  letter-spacing: -.045em;
}

.ffs-eyebrow {
  margin-bottom: 14px;
  color: var(--ffs-green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.ffs-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(42px, 6vw, 72px);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: gap .2s ease;
}

.ffs-back:hover { gap: 13px; }
.ffs-back svg { width: 16px; height: 16px; }

.ffs-back:focus-visible,
.ffs a:focus-visible,
.ffs button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

/* Hero: promessa a sinistra, prova visiva a destra. */

.ffs-hero {
  position: relative;
  padding: clamp(42px, 5vw, 68px) 0 clamp(70px, 8vw, 112px);
  background:
    radial-gradient(circle at 83% 18%, rgba(47, 198, 160, .14), transparent 28%),
    /* era una sfumatura dal bianco alla carta: faceva partire la pagina da un
       grigio diverso da tutte le altre. Resta l'alone di colore, che e'
       identita' della pagina, su carta piatta come il resto del sito. */
    var(--paper);
}

.ffs-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, .92fr);
  gap: clamp(56px, 8vw, 112px);
  align-items: center;
}

.ffs-hero__copy h1 {
  max-width: 12.5ch;
  margin-bottom: 24px;
  font-size: clamp(46px, 5.4vw, 76px);
  line-height: .98;
}

.ffs-hero__lead {
  max-width: 57ch;
  margin-bottom: 25px;
  color: var(--muted);
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.62;
}

.ffs-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ffs-hero__meta li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.ffs-hero__meta li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .37em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.ffs-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.ffs-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 52px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}

.ffs-button span {
  font-size: 21px;
  font-weight: 500;
  line-height: 0;
  transition: transform .2s ease;
}

.ffs-button:hover { transform: translateY(-2px); }
.ffs-button:hover span { transform: translateX(3px); }
.ffs-button--primary { background: var(--ink); color: #fff; }
.ffs-button--primary:hover { background: #1a2c42; }

.ffs-button--quiet {
  border-color: var(--border-forte);
  color: var(--ink);
  background: rgba(255, 255, 255, .45);
}

.ffs-button--quiet:hover { border-color: var(--ink); background: #fff; }
.ffs-button--ink { background: var(--ink); color: #fff; }
.ffs-button--light { background: #fff; color: var(--ffs-green-dark); }

.ffs-chart {
  position: relative;
  margin: 58px 0 0;
  padding: 0 0 4px clamp(28px, 4vw, 54px);
  border-left: 1px solid var(--border-forte);
}

.ffs-chart__k {
  margin-bottom: 8px;
  color: var(--ffs-red-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.ffs-chart h2 {
  max-width: 16ch;
  margin-bottom: 39px;
  font-size: clamp(27px, 3vw, 39px);
  line-height: 1.06;
}

.ffs-chart__plot { width: 100%; }

.ffs-chart__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 29px;
  gap: 12px;
  align-items: center;
  margin-bottom: 17px;
  font-size: 13px;
}

.ffs-chart__country { font-weight: 750; }

.ffs-chart__track {
  position: relative;
  height: 12px;
  background: var(--grigio-vuoto-forte);
  overflow: hidden;
}

.ffs-chart__bar {
  display: block;
  width: calc(var(--score) * 1%);
  height: 100%;
  background: #aeb8c1;
  transform-origin: left;
  animation: ffs-grow .85s cubic-bezier(.2, .75, .3, 1) both;
}

.ffs-chart__row:nth-child(2) .ffs-chart__bar { animation-delay: .1s; }
.ffs-chart__row:nth-child(3) .ffs-chart__bar { animation-delay: .2s; }
.ffs-chart__bar--average { background: var(--green); }
.ffs-chart__bar--italy { background: var(--red); }

.ffs-chart__row b {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.ffs-chart__axis {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 29px;
  gap: 12px;
  margin-top: -4px;
}

.ffs-chart__axis div {
  display: flex;
  justify-content: space-between;
  padding-top: 7px;
  border-top: 1px solid var(--border-forte);
}

.ffs-chart__axis i {
  color: #8794a2;
  font-size: 10px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.ffs-chart figcaption {
  max-width: 46ch;
  margin-top: 25px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.ffs-chart figcaption a { color: inherit; text-underline-offset: 3px; }

@keyframes ffs-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Banda di sintesi: una sola riga operativa, non cinque card. */

.ffs-brief { position: relative; z-index: 2; background: var(--ink); color: #fff; }

.ffs-brief ul {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ffs-brief li {
  min-width: 0;
  padding: 28px clamp(15px, 2.2vw, 27px);
  border-left: 1px solid rgba(255, 255, 255, .14);
}

.ffs-brief li:first-child { padding-left: 0; border-left: 0; }
.ffs-brief li:last-child { padding-right: 0; }
.ffs-brief b, .ffs-brief span { display: block; }

.ffs-brief b {
  margin-bottom: 5px;
  font-size: 17px;
  letter-spacing: -.02em;
}

.ffs-brief span {
  color: rgba(255, 255, 255, .62);
  font-size: 12px;
  line-height: 1.4;
}

/* Corpo del racconto. */

.ffs-section { padding: clamp(76px, 9vw, 126px) 0; }

.ffs-heading {
  max-width: 760px;
  margin-bottom: clamp(54px, 7vw, 86px);
}

.ffs-heading h2,
.ffs-organise h2,
.ffs-lab h2,
.ffs-cta h2 {
  margin-bottom: 21px;
  font-size: clamp(36px, 4.8vw, 64px);
  line-height: 1.02;
}

.ffs-heading > p:last-child,
.ffs-organise__pitch > p,
.ffs-lab__intro > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.45vw, 19px);
  line-height: 1.65;
}

.ffs-journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 4vw, 54px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ffs-journey::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 4px;
  right: 4px;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--green) 76%, var(--border-forte));
}

.ffs-journey li { position: relative; padding-top: 41px; }

.ffs-journey li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 16px;
  height: 16px;
  border: 4px solid var(--paper);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.ffs-journey__time {
  display: block;
  margin-bottom: 17px;
  color: var(--ffs-green-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .1em;
}

.ffs-journey b {
  display: block;
  min-height: 46px;
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.28;
}

.ffs-journey p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.62;
}

/* Il mini laboratorio fa percepire il metodo prima di descriverlo. */

.ffs-lab { padding: clamp(76px, 9vw, 120px) 0; background: var(--ink); color: #fff; }

.ffs-lab__grid {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(420px, 1.18fr);
  gap: clamp(60px, 9vw, 132px);
  align-items: start;
}

.ffs-lab .ffs-eyebrow { color: var(--green); }
.ffs-lab h2 { max-width: 12ch; }

.ffs-lab__intro > p:last-child {
  max-width: 46ch;
  color: rgba(255, 255, 255, .65);
}

.ffs-choice { padding-top: 5px; }

.ffs-choice__question {
  margin-bottom: 17px;
  color: rgba(255, 255, 255, .62);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.ffs-choice__options { display: grid; gap: 10px; }

.ffs-choice button {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 15px 54px 15px 19px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 13px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.ffs-choice button::after {
  content: "→";
  position: absolute;
  right: 20px;
  top: 50%;
  color: rgba(255, 255, 255, .42);
  font-size: 20px;
  transform: translateY(-50%);
}

.ffs-choice button:hover {
  border-color: rgba(255, 255, 255, .58);
  background: rgba(255, 255, 255, .055);
}

.ffs-choice button[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: var(--ink);
}

.ffs-choice button[aria-pressed="true"]::after {
  content: "✓";
  color: var(--ink);
  font-weight: 900;
}

.ffs-choice__result {
  min-height: 76px;
  margin: 22px 0 0;
  padding: 18px 0 0 20px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  border-left: 3px solid rgba(255, 255, 255, .28);
  color: rgba(255, 255, 255, .65);
  font-size: 14px;
  line-height: 1.6;
  transition: color .2s ease, border-color .2s ease;
}

.ffs-choice__result.is-visible { border-left-color: var(--green); color: #fff; }

/* Risultati: numeri aperti, niente griglia di card. */

/* stessa carta del resto del sito: era l'unica fascia bianca della pagina,
   e faceva sembrare Finance for Schools piu' chiara delle altre */
.ffs-proof { background: var(--paper); }

.ffs-heading--row {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(42px, 8vw, 112px);
  align-items: end;
  max-width: none;
}

.ffs-heading--row h2 { max-width: 13ch; margin-bottom: 0; }
.ffs-heading--row > p { margin-bottom: 5px; }

.ffs-numbers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ffs-numbers div {
  padding: clamp(27px, 4vw, 47px) clamp(18px, 3vw, 36px);
  border-left: 1px solid var(--border);
}

.ffs-numbers div:first-child { padding-left: 0; border-left: 0; }

.ffs-numbers dt {
  color: var(--green);
  font-family: var(--display);
  font-size: clamp(42px, 5vw, 67px);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1;
}

.ffs-numbers dt small { font-size: .42em; letter-spacing: -.02em; }

.ffs-numbers dd {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* Informazioni operative distinte per professori e studenti. */

.ffs-organise {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: clamp(64px, 10vw, 148px);
  align-items: start;
}

.ffs-organise h2 { max-width: 14ch; }
.ffs-organise__pitch > p { max-width: 56ch; }

.ffs-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin: 31px 0 34px;
  padding: 0;
  list-style: none;
}

.ffs-checks li {
  position: relative;
  padding-left: 24px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.ffs-checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--ffs-green-dark);
  font-weight: 900;
}

.ffs-steps {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-forte);
}

.ffs-steps li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 22px;
  padding: 23px 0;
  border-bottom: 1px solid var(--border-forte);
}

.ffs-steps > li > span {
  color: var(--green);
  font-family: var(--display);
  font-size: 27px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  line-height: 1;
}

.ffs-steps b { display: block; margin-bottom: 6px; font-size: 16px; }

.ffs-steps p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* Chiusura. */

.ffs-cta {
  padding: clamp(72px, 9vw, 120px) 0 clamp(82px, 10vw, 132px);
  background: var(--green);
  color: #fff;
  text-align: center;
}

.ffs-cta .ffs-eyebrow { color: rgba(255, 255, 255, .75); }

.ffs-cta h2 {
  margin-bottom: 16px;
  font-size: clamp(44px, 6vw, 78px);
}

.ffs-cta p:not(.ffs-eyebrow) {
  max-width: 52ch;
  margin: 0 auto 31px;
  color: rgba(255, 255, 255, .88);
  font-size: 17px;
  line-height: 1.6;
}

/* La CTA e il footer sono un'unica chiusura: niente spicchi chiari tra le due fasce. */

.ffs-page .ffs-cta { position: relative; z-index: 1; }
.ffs-page .foot { margin-top: -1px; border-radius: 0; }

@media (max-width: 1020px) {
  .ffs-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(330px, .8fr);
    gap: 44px;
  }

  .ffs-hero__copy h1 { font-size: clamp(43px, 6vw, 62px); }

  .ffs-lab__grid { grid-template-columns: 1fr 1fr; gap: 54px; }

  .ffs-brief ul { grid-template-columns: repeat(3, 1fr); }

  .ffs-brief li:nth-child(4) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, .14);
  }

  .ffs-brief li:nth-child(5) { border-top: 1px solid rgba(255, 255, 255, .14); }
}

@media (max-width: 820px) {
  .ffs-hero__grid,
  .ffs-lab__grid,
  .ffs-heading--row,
  .ffs-organise {
    grid-template-columns: 1fr;
  }

  .ffs-hero__grid { gap: 62px; }

  .ffs-chart {
    width: min(100%, 610px);
    margin-top: 0;
    padding: 34px 0 0;
    border-top: 1px solid var(--border-forte);
    border-left: 0;
  }

  .ffs-chart h2 { max-width: 22ch; }

  .ffs-journey { grid-template-columns: repeat(2, 1fr); gap: 46px 50px; }
  .ffs-journey::before { display: none; }

  .ffs-journey li {
    padding: 0 0 0 28px;
    border-left: 2px solid var(--green);
  }

  .ffs-journey li::before { top: 0; left: -9px; }
  .ffs-journey b { min-height: 0; }
  .ffs-lab__grid { gap: 44px; }
  .ffs-heading--row { gap: 25px; }
  .ffs-heading--row > p { max-width: 62ch; }
  .ffs-numbers { grid-template-columns: repeat(2, 1fr); }

  .ffs-numbers div:nth-child(3) {
    padding-left: 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .ffs-numbers div:nth-child(4) { border-top: 1px solid var(--border); }
  .ffs-organise { gap: 60px; }
}

@media (max-width: 600px) {
  .ffs-shell { width: min(calc(100% - 44px), var(--wrap)); }
  .ffs-hero { padding-top: 28px; }
  .ffs-back { margin-bottom: 40px; }
  .ffs-hero__copy h1 { font-size: clamp(40px, 12vw, 55px); }

  .ffs-actions,
  .ffs-actions .ffs-button,
  .ffs-cta .ffs-button { width: 100%; }

  .ffs-chart { padding-top: 29px; }
  .ffs-chart h2 { margin-bottom: 31px; }

  .ffs-chart__row,
  .ffs-chart__axis {
    grid-template-columns: 78px minmax(0, 1fr) 25px;
    gap: 9px;
  }

  .ffs-chart__country { font-size: 11px; }
  .ffs-brief ul { grid-template-columns: repeat(2, 1fr); }

  .ffs-brief li,
  .ffs-brief li:first-child,
  .ffs-brief li:nth-child(4) {
    padding: 22px 14px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    border-left: 1px solid rgba(255, 255, 255, .14);
  }

  .ffs-brief li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .ffs-brief li:nth-child(-n + 2) { border-top: 0; }
  .ffs-brief li:last-child { grid-column: 1 / -1; }
  .ffs-journey { grid-template-columns: 1fr; gap: 35px; }
  .ffs-checks { grid-template-columns: 1fr; }
  .ffs-numbers { grid-template-columns: 1fr; }

  .ffs-numbers div,
  .ffs-numbers div:first-child,
  .ffs-numbers div:nth-child(3) {
    padding: 26px 0;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .ffs-numbers div:first-child { border-top: 0; }
}


@media (prefers-reduced-motion: reduce) {
  .ffs-chart__bar { animation: none; }

  .ffs-back,
  .ffs-button,
  .ffs-button span,
  .ffs-choice button,
  .ffs-choice__result { transition: none; }

  .ffs-button:hover { transform: none; }
}
