/* =====================================================================
   fosforo: — foglio di stile unico del sito
   Head, header e footer delle pagine sono generati da tools/sito.py;
   i contenuti sono fatti di componenti .f-* (sezioni sotto).
   ===================================================================== */

/* ---------- Font -------------------------------------------------- */
/* Figtree (SIL Open Font License, fonts/OFL-figtree.txt): variabile, pesi 300–900 */
@font-face { font-family: "Figtree"; src: url("fonts/figtree-normal.woff2") format("woff2-variations"), url("fonts/figtree-normal.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("fonts/figtree-italic.woff2") format("woff2-variations"), url("fonts/figtree-italic.woff2") format("woff2"); font-weight: 300 900; font-style: italic; font-display: swap; }

/* ---------- Token ------------------------------------------------- */
:root {
  --f-font: "Figtree", "Helvetica Neue", Arial, sans-serif;

  --f-cyan: #00aeef;        /* ciano del logo */
  --f-accent: #0095d9;      /* ciano scurito: titoli, linee, icone (unico accento della pagina) */
  --f-button: #0077b6;      /* stesso ciano, più profondo: pulsanti con testo bianco leggibile (4,9:1) */
  --f-cyan-soft: #e2f5fd;
  --f-blue: #0072bc;        /* ciano scurito: link e testo accento (AA su bianco) */
  --f-ink: #0b2233;         /* blu notte: footer, fasce, testo dei pulsanti */
  --f-title: var(--f-accent); /* colore dei titoli */
  --f-text: #3b4a57;        /* testo corrente */
  --f-mute: #6b7884;
  --f-paper: #f3f7f9;       /* fondo sezioni alternate */
  --f-line: rgba(11, 34, 51, .10);

  --f-shadow: 0 1px 2px rgba(11, 34, 51, .06), 0 8px 20px -6px rgba(11, 34, 51, .16), 0 28px 56px -24px rgba(11, 34, 51, .28);
  --f-shadow-hover: 0 2px 4px rgba(11, 34, 51, .08), 0 14px 30px -8px rgba(11, 34, 51, .22), 0 40px 70px -28px rgba(11, 34, 51, .34);

  --f-radius: 20px;
  --f-radius-s: 12px;
  --f-ease: cubic-bezier(.22, 1, .36, 1);

  --f-top-h: 76px;          /* altezza dell'header */
  --f-top-h-fixed: 70px;    /* header fisso (scorrendo) */
  --f-top-h-mobile: 60px;
}

/* ---------- Base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: #fff;
  color: var(--f-text);
  font-family: var(--f-font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga";
  overflow-x: clip;
}

p, li, td, dd, dt { font-size: 1.0625rem; line-height: 1.65; text-wrap: pretty; }
p { margin: 0 0 10px; }
p:empty { display: none; }
ul, ol { margin: 0 0 10px; padding-left: 1.3em; }
figure, blockquote, address { margin: 0; }
address { font-style: normal; }
img, video, iframe, svg { max-width: 100%; }
img { height: auto; border: 0; vertical-align: middle; }
iframe { border: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--f-blue); transition: color .2s var(--f-ease); }
a:hover { color: var(--f-ink); }

strong, b { font-weight: 700; }
em, i:not([class]) { font-style: italic; }

::selection { background: var(--f-accent); color: #fff; }

:focus-visible {
  outline: 3px solid var(--f-accent) !important;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Testo per screen reader e motori di ricerca, invisibile a schermo */
.f-sr, .f-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* "Vai al contenuto": compare solo con la tastiera */
.f-skip {
  position: fixed; left: 12px; top: -80px; z-index: 100;
  padding: 12px 18px; border-radius: 12px;
  background: var(--f-ink); color: #fff !important; font-weight: 700; text-decoration: none;
  transition: top .2s var(--f-ease);
}
.f-skip:focus { top: 12px; }

/* ---------- Titoli -------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 10px;
  font-family: var(--f-font);
  color: var(--f-title);
  text-wrap: balance;
  font-feature-settings: "kern", "liga", "case";
}

/* Scala contenuta (rapporto ~1.25): la gerarchia la fanno peso e colore, non la taglia */
h1 {
  font-weight: 800;
  font-size: clamp(2rem, 1.55rem + 1.5vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
}
h2 {
  font-weight: 800;
  font-size: clamp(1.625rem, 1.35rem + 1vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
}
h3 {
  font-weight: 700;
  font-size: clamp(1.15rem, 1.06rem + .3vw, 1.3rem);
  line-height: 1.25;
  letter-spacing: -0.008em;
}
h4 { font-weight: 700; font-size: 1.075rem; line-height: 1.3; }
h5, h6 { font-weight: 600; font-size: 1rem; line-height: 1.35; }

/* ---------- Titoli in maiuscolo (nomi di spettacoli, laboratori…) ------ */
/* Assegnata da tools/titles.py: stampati come etichetta, non come urlo. */
.f-caps,
h1.f-caps, h2.f-caps, h3.f-caps, h4.f-caps, h5.f-caps, h6.f-caps {
  font-weight: 800 !important;
  letter-spacing: .04em !important;
  line-height: 1.15 !important;
}
h1.f-caps { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem) !important; }
h2.f-caps { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.75rem) !important; }
h3.f-caps { font-size: clamp(1rem, .96rem + .2vw, 1.125rem) !important; }
h4.f-caps, h5.f-caps, h6.f-caps { font-size: .95rem !important; }

/* ---------- Pulsanti -------------------------------------------------- */
.f-btn,
.f-form button[type="submit"] {
  display: inline-block;
  font-family: var(--f-font);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: .005em;
  line-height: 1.2;
  color: #fff !important;
  background: var(--f-button);
  border: 0;
  border-radius: var(--f-radius-s);
  padding: 15px 26px;
  box-shadow: 0 6px 16px -6px rgba(0, 90, 140, .5);
  text-decoration: none !important;
  text-align: center;
  transition: background-color .25s var(--f-ease), color .25s var(--f-ease), transform .25s var(--f-ease), box-shadow .25s var(--f-ease);
}
.f-btn:hover,
.f-btn:focus-visible,
.f-form button[type="submit"]:hover {
  color: #fff !important;
  background: var(--f-ink);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -8px rgba(11, 34, 51, .5);
}
.f-btn:active { transform: translateY(0) scale(.98); }

/* =====================================================================
   HEADER E MENU (tools/sito.py)
   Desktop: trasparente sopra la testata scura della pagina, poi fisso e
   chiaro scorrendo. Mobile (≤ 960 px): barra bianca e cassetto a destra.
   ===================================================================== */
.f-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(5, 18, 28, .55), rgba(5, 18, 28, 0));
}
.f-top__bar {
  display: flex; align-items: center; gap: 24px;
  height: var(--f-top-h);
  padding: 0 clamp(16px, 3vw, 40px);
}
.f-top__brand { display: inline-flex; align-items: center; line-height: 0; padding: 6px 0; flex: none; }
.f-nav { flex: 1 1 auto; }
.f-top__logo { width: 132px; height: auto; display: block; }
.f-top__logo--ink { display: none; }
.f-top__toggle { display: none; }

.f-nav__list, .f-nav__sub { list-style: none; margin: 0; padding: 0; }
.f-nav__list { display: flex; align-items: center; justify-content: space-evenly; gap: 12px; }
.f-nav__item { position: relative; margin: 0; padding: 0; }
.f-nav__list > .f-nav__item > a {
  position: relative; display: block; padding: 12px 2px;
  font-weight: 600; font-size: 16px; line-height: 1.2; letter-spacing: .005em;
  color: #fff; text-decoration: none; white-space: nowrap;
}
/* sottolineatura voce attiva/hover: ciano */
.f-nav__list > .f-nav__item > a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 3px; border-radius: 3px;
  background: var(--f-cyan); transform: scaleX(0); transform-origin: left center;
  transition: transform .3s var(--f-ease);
}
.f-nav__list > .f-nav__item > a:hover::after,
.f-nav__list > .f-nav__item.is-active > a::after { transform: scaleX(1); }
.f-nav__list > .f-nav__item > a:hover { color: #fff; }

/* pulsante del sottomenu: freccia accanto alla voce */
.f-nav__more {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; margin-left: 2px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: inherit;
  vertical-align: middle;
}
.f-nav__more::before {
  content: ""; width: 6px; height: 6px; margin-top: -3px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .25s var(--f-ease);
}
.f-nav__list > .has-sub { display: flex; align-items: center; color: #fff; }

/* sottomenu (desktop) */
.f-nav__sub {
  position: absolute; top: 100%; left: -12px; z-index: 5;
  min-width: 250px; padding: 10px;
  background: #fff; border-radius: var(--f-radius-s);
  box-shadow: 0 18px 50px -12px rgba(11, 34, 51, .28), 0 0 0 1px var(--f-line);
  display: none;
}
.f-nav__sub .f-nav__sub { top: -10px; left: 100%; }
.f-nav__item:hover > .f-nav__sub,
.f-nav__item:focus-within > .f-nav__sub,
.f-nav__item.is-open > .f-nav__sub { display: block; animation: f-pop .2s var(--f-ease); }
@keyframes f-pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.f-nav__sub .f-nav__item > a {
  display: block; padding: 9px 30px 9px 12px; border-radius: 8px;
  color: var(--f-ink); font-weight: 500; font-size: 15px; line-height: 1.3; text-decoration: none;
  transition: background-color .2s var(--f-ease);
}
.f-nav__sub .f-nav__item > a:hover,
.f-nav__sub .f-nav__item > a[aria-current] { background: var(--f-cyan-soft); color: var(--f-ink); }
.f-nav__sub .f-nav__item.is-active > a { color: var(--f-blue); }
.f-nav__sub .f-nav__more { position: absolute; right: 6px; top: 8px; color: var(--f-mute); }
.f-nav__sub .f-nav__more::before { transform: rotate(-45deg); margin: 0 0 0 -3px; }

/* scelta della lingua (IT · EN · ES), in fondo al menu */
.f-nav { display: flex; align-items: center; gap: 18px; }
.f-nav__list { flex: 1 1 auto; }
.f-lang { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; flex: none; }
.f-lang a {
  display: block; padding: 6px 7px; border-radius: 6px;
  font-weight: 700; font-size: 13px; line-height: 1; letter-spacing: .06em;
  color: rgba(255, 255, 255, .62); text-decoration: none;
  transition: color .2s var(--f-ease), box-shadow .2s var(--f-ease);
}
.f-lang a:hover { color: #fff; }
.f-lang a[aria-current] { color: #fff; box-shadow: inset 0 -2px 0 var(--f-cyan); border-radius: 0; }

/* header fisso, chiaro, quando si scorre */
@media (min-width: 961px) {
  .f-scrolled .f-top {
    position: fixed;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 var(--f-line);
    animation: f-drop .35s var(--f-ease);
  }
  .f-scrolled .f-top__bar { height: var(--f-top-h-fixed); }
  .f-scrolled .f-top__logo { width: 112px; }
  .f-scrolled .f-top__logo--white { display: none; }
  .f-scrolled .f-top__logo--ink { display: block; }
  .f-scrolled .f-nav__list > .f-nav__item > a,
  .f-scrolled .f-nav__list > .has-sub { color: var(--f-ink); }
  .f-scrolled .f-nav__list > .f-nav__item > a:hover,
  .f-scrolled .f-nav__list > .f-nav__item.is-active > a { color: var(--f-blue); }
  .f-scrolled .f-lang a { color: var(--f-mute); }
  .f-scrolled .f-lang a:hover, .f-scrolled .f-lang a[aria-current] { color: var(--f-ink); }
}
@keyframes f-drop { from { transform: translateY(-100%); } to { transform: none; } }

/* mobile: barra bianca e cassetto */
@media (max-width: 960px) {
  .f-top {
    position: sticky; top: 0;
    background: #fff;
    box-shadow: 0 1px 0 var(--f-line), 0 6px 18px -12px rgba(11, 34, 51, .35);
  }
  .f-top__bar { height: var(--f-top-h-mobile); }
  .f-top__logo { width: 112px; }
  .f-top__logo--white { display: none; }
  .f-top__logo--ink { display: block; }

  .f-nav { flex: 0 0 auto; }
  .f-top__bar { justify-content: space-between; }
  .f-top__toggle {
    position: relative; z-index: 3;
    display: grid; place-items: center;
    width: 44px; height: 44px; margin-right: -8px; padding: 0;
    border: 0; border-radius: 999px; background: none; color: var(--f-ink);
    transition: background-color .25s var(--f-ease), color .25s var(--f-ease);
  }
  .f-burger, .f-burger::before, .f-burger::after {
    display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor;
    transition: transform .3s var(--f-ease), background-color .2s;
  }
  .f-burger { position: relative; }
  .f-burger::before, .f-burger::after { content: ""; position: absolute; left: 0; }
  .f-burger::before { top: -7px; }
  .f-burger::after { top: 7px; }
  .f-menu-open .f-top__toggle { background: var(--f-ink); color: #fff; }
  .f-menu-open .f-burger { background: transparent; }
  .f-menu-open .f-burger::before { transform: translateY(7px) rotate(45deg); }
  .f-menu-open .f-burger::after { transform: translateY(-7px) rotate(-45deg); }

  /* velatura scura dietro il cassetto (clic = chiudi) */
  .f-top::before {
    content: ""; position: fixed; inset: 0; z-index: 1;
    background: rgba(11, 34, 51, .45);
    opacity: 0; visibility: hidden; transition: opacity .3s var(--f-ease), visibility .3s;
  }
  .f-menu-open .f-top::before { opacity: 1; visibility: visible; }
  .f-menu-open, .f-menu-open body { overflow: hidden; }

  .f-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 2;
    width: min(88vw, 400px);
    padding: 76px 28px 40px;
    background: #fff;
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(100%); visibility: hidden;
    transition: transform .35s var(--f-ease), visibility .35s;
    box-shadow: -20px 0 60px -20px rgba(11, 34, 51, .35);
  }
  .f-menu-open .f-nav { transform: none; visibility: visible; }

  .f-nav__list { display: block; }
  .f-nav { display: block; }
  .f-lang { gap: 8px; margin-top: 28px; }
  .f-lang a {
    padding: 10px 16px; border-radius: 999px; font-size: 14px;
    color: var(--f-ink); box-shadow: inset 0 0 0 1px var(--f-line);
  }
  .f-lang a:hover { color: var(--f-blue); }
  .f-lang a[aria-current] { color: #fff; background: var(--f-ink); box-shadow: none; border-radius: 999px; }
  .f-nav__list > .f-nav__item,
  .f-nav__list > .has-sub { display: block; border-bottom: 1px solid var(--f-line); color: var(--f-ink); }
  .f-nav__list > .f-nav__item > a { padding: 16px 48px 16px 0; font-size: 18px; color: var(--f-ink); }
  .f-nav__list > .f-nav__item > a::after { display: none; }
  .f-nav__list > .f-nav__item > a[aria-current] { color: var(--f-blue); }
  .f-nav__more {
    position: absolute; right: -10px; top: 6px;
    width: 44px; height: 44px; margin: 0; color: var(--f-mute);
  }
  .f-nav__sub .f-nav__more { right: -10px; top: 0; }
  .f-nav__more::before {
    width: 14px; height: 2px; margin: 0; border: 0; background: currentColor; transform: none;
    box-shadow: none;
  }
  .f-nav__more::after {
    content: ""; position: absolute; width: 2px; height: 14px; background: currentColor;
    transition: transform .25s var(--f-ease);
  }
  .f-nav__sub .f-nav__more::before { transform: none; margin: 0; }
  .is-open > .f-nav__more::after { transform: rotate(90deg); }

  .f-nav__sub {
    position: static; display: none; min-width: 0;
    padding: 0 0 12px 14px; margin: 0;
    background: none; border-radius: 0; box-shadow: none;
    animation: none !important;
  }
  .f-nav__item:hover > .f-nav__sub, .f-nav__item:focus-within > .f-nav__sub { display: none; }
  .f-nav__item.is-open > .f-nav__sub { display: block; }
  .f-nav__sub .f-nav__item > a { padding: 10px 44px 10px 0; font-size: 16px; font-weight: 500; background: none; }
  .f-nav__sub .f-nav__item > a:hover { background: none; color: var(--f-blue); }
}

/* =====================================================================
   HERO DELLA HOME (foto subito, video di sfondo dopo il caricamento)
   ===================================================================== */
.f-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center;
  min-height: 100vh; min-height: 100svh;
  background: #071a29; color: #fff; text-align: center;
}
.f-hero__media { position: absolute; inset: 0; z-index: -2; }
.f-hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.05) brightness(1.05) saturate(1.1);
}
.f-hero__media iframe {
  position: absolute; top: 50%; left: 50%;
  width: max(100%, 177.78vh); height: max(100%, 56.25vw);
  transform: translate(-50%, -50%) scale(1.02);
  border: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.2s var(--f-ease);
  filter: contrast(1.05) brightness(1.05) saturate(1.1);
}
.f-hero__media.is-playing iframe { opacity: 1; }
.f-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(7, 26, 41, .55);
}
.f-hero__inner { width: 100%; max-width: 1040px; padding: 120px clamp(16px, 4vw, 40px) 130px; }
.f-hero-date {
  display: block;
  margin: 0 0 clamp(14px, 2vw, 24px) !important;
  font-size: clamp(13px, 1.5vw, 22px) !important;
  line-height: 1.2 !important;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #fff;
}
.f-hero__title { margin: 0; line-height: 0; }
.f-hero-logo {
  display: block;
  width: min(600px, 80vw);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 6px 30px rgba(0, 0, 0, .25));
}
.f-hero-ed {
  display: block;
  margin: clamp(14px, 2vw, 22px) 0 0 !important;
  font-size: clamp(13px, 1.1vw, 16px) !important;
  line-height: 1.2 !important;
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}
.f-hero__text {
  max-width: 62ch;
  margin: clamp(36px, 6vw, 72px) auto 0 !important;
  font-size: clamp(14px, .9rem + .2vw, 17px) !important;
  line-height: 1.6 !important;
  font-weight: 400;
  color: rgba(255, 255, 255, .88);
}
.f-hero__down {
  position: absolute; left: 50%; bottom: clamp(18px, 4vh, 36px);
  display: grid; place-items: center; width: 48px; height: 48px; margin-left: -24px;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: 50%;
  color: #fff !important;
  transition: background-color .25s var(--f-ease), border-color .25s var(--f-ease);
}
.f-hero__down:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
@media (prefers-reduced-motion: no-preference) {
  .f-hero__down svg { animation: f-nudge 2.4s var(--f-ease) infinite; }
}
@keyframes f-nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(4px); } }
@media (max-width: 960px) {
  .f-hero { min-height: calc(100svh - var(--f-top-h-mobile)); }
  .f-hero__inner { padding: 64px 20px 110px; }
  .f-hero__text br { display: none; }
}

/* =====================================================================
   TESTATA DELLE PAGINE INTERNE (foto + titolo)
   ===================================================================== */
.f-hero-page {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-height: clamp(320px, 42vw, 560px);
  padding: calc(var(--f-top-h) + 24px) 0 56px;
  background: #222; color: #fff; text-align: center;
}
.f-hero-page__img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.f-hero-page::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(7, 26, 41, .30) 0%, rgba(7, 26, 41, .62) 100%);
}
.f-hero-page h1 { color: #fff; margin: 0; letter-spacing: -0.025em; }
.f-hero-page__sub { margin: 12px 0 0 !important; font-size: clamp(1.05rem, 1rem + .4vw, 1.35rem) !important; font-weight: 500; color: rgba(255, 255, 255, .9); }
/* grafiche con la scritta già nell'immagine: niente velatura */
.f-hero-page--banner::after { display: none; }
.f-hero-page--banner .f-crumbs { display: none; }
@media (max-width: 960px) {
  .f-hero-page { min-height: 220px; padding: 40px 0; }
}

/* Briciole di pane (sopra il titolo) */
.f-crumbs ol {
  list-style: none; margin: 0 0 14px; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0;
}
.f-crumbs li { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.4; color: rgba(255, 255, 255, .78); }
.f-crumbs li + li::before { content: "/"; margin: 0 8px; opacity: .55; }
.f-crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.f-crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.f-pagehead .f-crumbs ol { justify-content: flex-start; }

/* =====================================================================
   FOOTER (tools/sito.py)
   ===================================================================== */
.f-foot {
  background: var(--f-ink);
  color: rgba(255, 255, 255, .72);
  padding-top: clamp(48px, 7vw, 80px);
}
.f-foot__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.15fr 1fr; gap: clamp(28px, 4vw, 48px); }
.f-foot p, .f-foot li, .f-foot address { font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, .72); }
.f-foot a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.f-foot a:hover { color: #fff; }
.f-foot strong { color: #fff; }
.f-foot ul { list-style: none; margin: 0; padding: 0; }
.f-foot__brand img { width: 132px; height: auto; margin-bottom: 18px; }
.f-foot__brand p { max-width: 38ch; }
.f-foot__title {
  margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; line-height: 1.3;
  letter-spacing: 0; color: #fff;
}
.f-foot__col li { margin: 0 0 6px; }
.f-foot__social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important; }
.f-foot__social li { margin: 0; }
.f-foot__social a {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); color: #fff;
  transition: background-color .25s var(--f-ease), color .25s var(--f-ease), transform .25s var(--f-ease);
}
.f-foot__social a:hover { background: var(--f-cyan); color: var(--f-ink); transform: translateY(-2px); }
.f-foot__social svg, .socicon svg { fill: currentColor; }
.f-foot__small { margin: -10px 0 0 !important; font-size: 13px !important; }
.f-foot__badges img { display: block; width: 150px; height: auto; margin-top: 14px; }
.f-foot__badges img + img { width: 210px; margin-top: 18px; }
/* .f-foot davanti: .f-wrap (più sotto) azzererebbe margine e padding verticali */
.f-foot .f-foot__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  margin-top: clamp(36px, 5vw, 56px); padding-top: 20px; padding-bottom: 24px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.f-foot__bottom p, .f-foot__bottom li { margin: 0; font-size: 14px; }
.f-foot__bottom ul { display: flex; flex-wrap: wrap; gap: 4px 18px; }
@media (max-width: 900px) {
  .f-foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .f-foot__grid { grid-template-columns: 1fr; }
}

/* Pulsante "torna su" */
.f-totop {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px;
  background: var(--f-ink); color: #fff !important;
  box-shadow: 0 8px 20px -8px rgba(11, 34, 51, .5);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .3s var(--f-ease), transform .3s var(--f-ease), visibility .3s, background-color .25s;
}
.f-scrolled .f-totop { opacity: 1; visibility: visible; transform: none; }
.f-totop:hover { background: var(--f-cyan); color: var(--f-ink) !important; }

/* =====================================================================
   VIDEO YOUTUBE: anteprima leggera, il player arriva al clic
   ===================================================================== */
.f-yt { position: absolute; inset: 0; background: var(--f-ink); }
.f-yt__play {
  position: absolute; inset: 0; width: 100%; height: 100%;
  padding: 0; border: 0; background: none; cursor: pointer; overflow: hidden;
}
.f-yt__play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--f-ease), filter .3s; }
.f-yt__play:hover img { transform: scale(1.03); filter: brightness(.9); }
.f-yt__icon {
  position: absolute; left: 50%; top: 50%;
  width: 76px; height: 54px; margin: -27px 0 0 -38px;
  border-radius: 16px; background: rgba(11, 34, 51, .82);
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .5);
  transition: background-color .25s var(--f-ease), transform .25s var(--f-ease);
}
.f-yt__icon::before {
  content: ""; position: absolute; left: 31px; top: 16px;
  border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.f-yt__play:hover .f-yt__icon, .f-yt__play:focus-visible .f-yt__icon { background: var(--f-button); transform: scale(1.06); }
.f-yt__link { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.f-yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =====================================================================
   DOMANDE FREQUENTI (pagine con "faq" in tools/pagine.json)
   ===================================================================== */
.f-faq { background: var(--f-paper); padding: clamp(48px, 7vw, 88px) 0 !important; }
.f-faq__list { display: grid; gap: 10px; max-width: 920px; }
.f-faq__item { border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--f-line); padding: 0 22px; }
.f-faq__item summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 18px 40px 18px 0;
  font-weight: 700; font-size: 1.1rem; line-height: 1.35; color: var(--f-ink);
}
.f-faq__item summary::-webkit-details-marker { display: none; }
.f-faq__item summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--f-button); border-bottom: 2px solid var(--f-button);
  transform: rotate(45deg); transition: transform .25s var(--f-ease);
}
.f-faq__item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.f-home .f-faq__item p { margin: 0 0 20px !important; max-width: 70ch; }

/* Progetti conclusi (pagina Progetti, generati da tools/progetti.py): righe con logo,
   anni, finanziatori, partner, importo e link ai dettagli */
.f-plist { padding-top: 0; }
.f-plist__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.f-proj {
  display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; align-items: center;
  gap: clamp(16px, 3vw, 32px);
  margin: 0; padding: 18px 26px 18px 18px; border-radius: 20px;
  background: var(--f-paper);
  transition: background-color .3s var(--f-ease), box-shadow .3s var(--f-ease);
}
.f-proj:hover { background: #fff; box-shadow: var(--f-shadow-hover); }
.f-proj__logo {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 10; padding: 14px; border-radius: 14px; overflow: hidden;
  background: #fff; box-shadow: inset 0 0 0 1px var(--f-line);
}
.f-proj__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.f-proj__logo--photo { padding: 0; }
/* progetto senza logo (ancora): riquadro con il nome */
.f-proj__logo--text { background: radial-gradient(130% 150% at 100% 0%, #0a6aa6 0%, var(--f-ink) 60%) var(--f-ink); box-shadow: none; }
.f-proj__logo--text span { color: #fff; font-weight: 800; font-size: 1.15rem; line-height: 1.2; text-align: center; letter-spacing: -0.01em; }
.f-proj__logo--photo img { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.f-home .f-proj__years {
  display: inline-block; margin: 0 0 8px !important; padding: 3px 10px; border-radius: 8px;
  background: var(--f-cyan-soft); color: #005c8f; font-size: .8rem !important; font-weight: 700; line-height: 1.5 !important;
}
.f-home .f-proj__name { margin: 0 0 10px !important; font-size: 1.25rem !important; color: var(--f-ink) !important; }
.f-proj__name a { color: inherit; text-decoration: none; }
.f-proj__name a:hover { color: var(--f-button); text-decoration: underline; text-underline-offset: 4px; }
.f-proj__facts { margin: 0; display: grid; gap: 6px; }
.f-proj__facts > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
.f-proj__facts dt { font-size: .85rem; font-weight: 600; line-height: 1.55; color: var(--f-mute); }
.f-proj__facts dd { margin: 0; font-size: .95rem; line-height: 1.55; color: var(--f-text); }
.f-proj__cta { white-space: nowrap; font-size: .95rem; }
@media (max-width: 760px) {
  .f-proj { grid-template-columns: 1fr; padding: 16px; }
  .f-proj__logo { max-width: 240px; }
  .f-proj__facts > div { grid-template-columns: 1fr; gap: 0; }
  .f-proj__cta { justify-self: start; }
}
.f-card__title a, .f-flow h2 a { color: inherit; text-decoration: none; }
.f-card__title a:hover, .f-flow h2 a:hover { color: var(--f-button); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Movimento ridotto --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .f-btn:hover { transform: none; }
}

/* =====================================================================
   HOME — ridisegnata (index.html, blocco .f-home)
   Tre impaginazioni diverse: riquadro in evidenza, editoriale, bento.
   ===================================================================== */

.f-home { --f-gap: clamp(16px, 2vw, 24px); }
.f-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); box-sizing: border-box; }
.f-section { padding: clamp(48px, 7vw, 96px) 0; }
.f-section + .f-section { padding-top: 0; }
.f-home h2 { margin: 0 0 .35em !important; }
.f-home p { margin: 0 0 1em; max-width: 65ch; }
.f-home figure { margin: 0; }
.f-head { margin-bottom: clamp(24px, 3.5vw, 40px); }
.f-lead { font-size: 1.25rem !important; line-height: 1.5 !important; color: var(--f-ink); }
.f-intro { font-size: 1.15rem !important; color: var(--f-mute); }
.f-statement {
  font-size: clamp(1.3rem, 1.05rem + .9vw, 1.75rem) !important;
  line-height: 1.38 !important;
  font-weight: 500;
  color: var(--f-ink);
  max-width: 32ch !important;
  letter-spacing: -0.01em;
}
.f-statement strong { color: var(--f-accent); font-weight: 700; }
.f-home .f-btn { display: inline-block; margin-top: 8px; }

/* Riquadro scuole: testo + immagine che esce dal bordo */
.f-school { padding-top: clamp(40px, 6vw, 80px); }
.f-school__card {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  background: linear-gradient(135deg, #e6f4fb 0%, #f3f8fb 70%);
  border-radius: 28px;
  padding: clamp(28px, 4.5vw, 56px);
  box-shadow: inset 0 0 0 1px rgba(0, 119, 182, .08);
}
.f-school__text h2 { max-width: 20ch; }
.f-school__media { margin: -12% -2% -12% 0; }
.f-school__media img {
  width: 100%; height: auto; display: block;
  border-radius: 20px;
  box-shadow: var(--f-shadow-hover);
  transform: rotate(1.5deg);
}

/* Chi siamo: frase guida, poi foto larga e testo affiancato */
.f-about__grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.f-about__media img {
  width: 100%; height: auto; display: block; aspect-ratio: 3 / 2; object-fit: cover;
  border-radius: 20px; box-shadow: var(--f-shadow);
}
.f-about__text h3 { margin: 0 0 .6em !important; }
.f-about__text p { font-size: 1rem !important; }
.f-about__text strong { color: var(--f-ink); }

/* Cosa facciamo: bento 4 colonne, 6 tessere */
.f-bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: clamp(220px, 21vw, 280px);
  grid-template-areas:
    "a a b b"
    "a a c d"
    "e e f f";
  gap: var(--f-gap);
}
.f-tile--a { grid-area: a; } .f-tile--b { grid-area: b; } .f-tile--c { grid-area: c; }
.f-tile--d { grid-area: d; } .f-tile--e { grid-area: e; } .f-tile--f { grid-area: f; }
.f-tile {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end;
  border-radius: 20px;
  background: var(--f-ink);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: var(--f-shadow);
  transition: transform .45s var(--f-ease), box-shadow .45s var(--f-ease);
}
.f-tile img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--f-ease);
}
.f-tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(7, 26, 41, .92) 0%, rgba(7, 26, 41, .55) 42%, rgba(7, 26, 41, 0) 72%);
}
.f-tile__body { display: block; padding: clamp(16px, 2vw, 26px); width: 100%; }
.f-home .f-tile__title {
  color: #fff !important;
  font-size: clamp(1.25rem, 1.1rem + .5vw, 1.6rem) !important;
  margin: 0 0 .15em !important;
}
.f-tile--a .f-tile__title { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem) !important; }
.f-tile__tagline { display: block; font-weight: 600; font-size: 1rem; line-height: 1.35; color: rgba(255, 255, 255, .95); }
.f-tile__desc {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-top: .35em; font-size: .925rem; line-height: 1.45; color: rgba(255, 255, 255, .78); max-width: 52ch;
}
.f-tile--c .f-tile__desc, .f-tile--d .f-tile__desc { -webkit-line-clamp: 2; }
.f-tile:hover { transform: translateY(-4px); box-shadow: var(--f-shadow-hover); }
.f-tile:hover img { transform: scale(1.04); }
.f-tile:focus-visible { outline-offset: 4px; }
/* Tessera chiara per la scatola del gioco (immagine scontornata) */
.f-tile--light { background: linear-gradient(135deg, #eef6fb, #f7fafc); color: var(--f-ink) !important; }
.f-tile--light::before { display: none; }
.f-tile--light img { object-fit: contain; object-position: right center; padding: 16px 20px 16px 54%; box-sizing: border-box; }
.f-tile--light .f-tile__body { max-width: 52%; align-self: center; }
.f-home .f-tile--light .f-tile__title { color: var(--f-title) !important; }
.f-tile--light .f-tile__tagline { color: var(--f-ink); }
.f-tile--light .f-tile__desc { color: var(--f-text); -webkit-line-clamp: 3; }

.f-more { margin-top: clamp(20px, 3vw, 32px) !important; }
.f-link { font-weight: 700; font-size: 1.05rem; color: var(--f-button) !important; text-decoration: none !important; border-bottom: 2px solid currentColor; padding-bottom: 2px; }
.f-link:hover { color: var(--f-ink) !important; }
.f-link span { display: inline-block; transition: transform .3s var(--f-ease); }
.f-link:hover span { transform: translateX(4px); }

/* Apparizione allo scorrimento (fosforo.js aggiunge .is-in) */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--f-ease), transform .7s var(--f-ease); }
  .js-reveal [data-reveal].is-in { opacity: 1; transform: none; }
  .js-reveal .f-bento [data-reveal]:nth-child(2) { transition-delay: .06s; }
  .js-reveal .f-bento [data-reveal]:nth-child(3) { transition-delay: .12s; }
  .js-reveal .f-bento [data-reveal]:nth-child(4) { transition-delay: .18s; }
  .js-reveal .f-bento [data-reveal]:nth-child(5) { transition-delay: .24s; }
  .js-reveal .f-bento [data-reveal]:nth-child(6) { transition-delay: .30s; }
}

/* Tablet e mobile */
@media (max-width: 900px) {
  .f-school__card { grid-template-columns: 1fr; }
  .f-school__media { margin: 0; order: -1; }
  .f-school__media img { transform: none; }
  .f-about__grid { grid-template-columns: 1fr; }
  .f-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 220px;
    grid-template-areas: "a a" "b b" "c d" "e e" "f f";
  }
}
@media (max-width: 560px) {
  .f-bento { grid-template-columns: 1fr; grid-template-areas: "a" "b" "c" "d" "e" "f"; grid-auto-rows: 240px; }
  .f-tile--light img { padding-left: 56%; }
}

/* =====================================================================
   CHI SIAMO — ridisegnata (.f-chi)
   Manifesto, testo a colonne, fascia numeri, valori in righe, squadra.
   ===================================================================== */
.f-manifesto { padding-bottom: clamp(32px, 5vw, 64px); }
.f-home .f-manifesto__text {
  max-width: 30ch !important;
  margin: 0 auto !important;
  text-align: center;
  font-size: clamp(1.4rem, 1.05rem + 1.4vw, 2.25rem) !important;
  line-height: 1.32 !important;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--f-ink);
  text-wrap: balance;
}
.f-manifesto__text strong { color: var(--f-accent); font-weight: 800; }

.f-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.f-home .f-columns p { font-size: 1rem !important; margin: 0 !important; }
.f-columns strong { color: var(--f-ink); }

/* Fascia numeri a tutta larghezza */
.f-numbers {
  background: radial-gradient(120% 140% at 85% 0%, #123a5a 0%, var(--f-ink) 55%) var(--f-ink);
  color: #fff;
  padding: clamp(48px, 7vw, 88px) 0;
  margin: clamp(24px, 4vw, 48px) 0 clamp(48px, 7vw, 96px);
}
.f-home .f-numbers h2 { color: #fff !important; margin-bottom: clamp(24px, 4vw, 44px) !important; }
.f-numbers__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 3vw, 32px); margin: 0; }
.f-numbers__grid > div { display: flex; flex-direction: column-reverse; border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 18px; }
.f-numbers__grid dd {
  margin: 0; font-weight: 800; line-height: 1;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4.5rem);
  letter-spacing: -0.03em;
  color: var(--f-cyan);
  font-variant-numeric: tabular-nums;
}
.f-numbers__grid dt { margin-top: 10px; font-size: 1rem; font-weight: 500; color: rgba(255, 255, 255, .75); }

/* Valori: righe con titolo a sinistra e testo a destra */
.f-values { padding-top: 0; }
.f-value {
  display: grid; grid-template-columns: 4fr 8fr; gap: clamp(16px, 4vw, 56px);
  padding: clamp(20px, 3vw, 32px) 0;
  border-top: 1px solid var(--f-line);
}
.f-value:last-child { border-bottom: 1px solid var(--f-line); }
.f-home .f-value h2 { font-size: clamp(1.4rem, 1.2rem + .7vw, 1.875rem) !important; margin: 0 !important; }
.f-home .f-value p { margin: 0 !important; font-size: 1.075rem !important; }

/* Squadra: griglia di persone con foto, nome e descrizione sempre visibili */
.f-team__grid {
  list-style: none; margin: 0 !important; padding: 0 !important;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: clamp(20px, 2.5vw, 32px) clamp(16px, 2vw, 24px);
}
.f-person { margin: 0 !important; padding: 0 !important; list-style: none !important; background: none !important; }
.f-person::marker { content: none; }
.f-person::before { display: none !important; }
.f-person img {
  width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; display: block;
  border-radius: 20px; background: #fff;
  box-shadow: var(--f-shadow);
  transition: transform .4s var(--f-ease), box-shadow .4s var(--f-ease);
}
.f-person:hover img { transform: translateY(-3px); box-shadow: var(--f-shadow-hover); }
.f-home .f-person__name { font-size: 1.1rem !important; margin: 14px 0 4px !important; color: var(--f-ink) !important; }
.f-home .f-person__bio { font-size: .95rem !important; line-height: 1.5 !important; color: var(--f-text); margin: 0 !important; }

@media (max-width: 900px) {
  .f-columns { grid-template-columns: 1fr; }
  .f-numbers__grid { grid-template-columns: repeat(2, 1fr); }
  .f-value { grid-template-columns: 1fr; gap: 8px; }
}
@media (max-width: 560px) {
  .f-team__grid { grid-template-columns: repeat(2, 1fr); }
  .f-home .f-person__bio { font-size: .875rem !important; }
}

/* ---------- Sezioni su fondo scuro (.f-dark) ---------------------------- */
.f-home .f-section.f-dark,
.f-home .f-dark + .f-section {
  padding-top: clamp(56px, 8vw, 104px);
}
.f-dark {
  background: radial-gradient(120% 140% at 85% 0%, #123a5a 0%, var(--f-ink) 55%) var(--f-ink);
  color: rgba(255, 255, 255, .78);
  margin-top: clamp(24px, 4vw, 48px);
}
.f-home .f-dark h2, .f-home .f-dark h3 { color: #fff !important; }
.f-home .f-dark .f-statement { color: #fff; }
.f-home .f-dark .f-statement strong { color: var(--f-cyan); }
.f-home .f-dark p { color: rgba(255, 255, 255, .78); }
.f-home .f-dark strong { color: #fff; }
.f-dark .f-about__media img { box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .6); }
/* Squadra su fondo scuro (Chi siamo): nomi bianchi, foto con ombra profonda; il footer
   (anch'esso blu notte) si stacca con una linea sottile */
.f-home .f-dark .f-person__name { color: #fff !important; }
.f-home .f-dark .f-person__bio { color: rgba(255, 255, 255, .72); }
.f-dark .f-person img { background: #123a5a; box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .65); }
.f-dark .f-person:hover img { box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .75); }
.f-team.f-dark { padding-bottom: clamp(64px, 9vw, 112px); }
body:has(.f-team.f-dark) .f-foot { border-top: 1px solid rgba(255, 255, 255, .08); }


/* =====================================================================
   COSA FACCIAMO — ridisegnata (.f-cosa)
   Frase guida, tre proposte principali in griglia asimmetrica,
   le altre sei come schede orizzontali su due colonne.
   ===================================================================== */
.f-cosa__intro { padding-bottom: clamp(24px, 4vw, 40px); }
.f-home .f-cosa__lead { max-width: 34ch !important; margin-bottom: .5em !important; }
.f-cosa__main { padding-bottom: clamp(24px, 3vw, 32px); }
.f-home .f-cosa__more { padding-top: 0; }

.f-feature {
  display: grid;
  grid-template-columns: 7fr 5fr;
  grid-template-rows: repeat(2, clamp(220px, 22vw, 290px));
  gap: var(--f-gap);
}
.f-feature .f-tile--hero { grid-row: span 2; }
.f-home .f-feature .f-tile__title { font-size: clamp(1.4rem, 1.15rem + .8vw, 1.9rem) !important; }
.f-home .f-feature .f-tile--hero .f-tile__title { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem) !important; }
.f-feature .f-tile__desc { -webkit-line-clamp: 3; font-size: 1rem; color: rgba(255, 255, 255, .85); }

.f-items {
  list-style: none; margin: 0 !important; padding: 0 !important;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--f-gap);
}
.f-items > li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.f-items > li::before { display: none !important; }
.f-items > li::marker { content: none; }
.f-item {
  display: grid; grid-template-columns: 112px 1fr auto; align-items: center; gap: 20px;
  padding: 14px 22px 14px 14px;
  border-radius: 20px;
  background: var(--f-paper);
  text-decoration: none !important;
  color: var(--f-text) !important;
  transition: background-color .3s var(--f-ease), box-shadow .3s var(--f-ease), transform .3s var(--f-ease);
}
.f-item img { width: 112px; height: 112px; object-fit: cover; border-radius: 14px; box-shadow: var(--f-shadow); background: #fff; }
.f-home .f-item__title { font-size: 1.25rem !important; margin: 0 0 4px !important; color: var(--f-title) !important; }
.f-item__desc { display: block; font-size: .975rem; line-height: 1.5; color: var(--f-text); }
.f-item__arrow { font-size: 1.4rem; color: var(--f-button); transition: transform .3s var(--f-ease); }
.f-item:hover { background: #fff; box-shadow: var(--f-shadow-hover); transform: translateY(-2px); }
.f-item:hover .f-item__arrow { transform: translateX(4px); }

@media (max-width: 900px) {
  .f-feature { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 240px; }
  .f-feature .f-tile--hero { grid-row: auto; }
  .f-items { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .f-item { grid-template-columns: 84px 1fr; padding-right: 16px; }
  .f-item img { width: 84px; height: 84px; }
  .f-item__arrow { display: none; }
}

/* ---------- Home: progetti in corso (tools/progetti.py) ---------------- */
/* Tre schede intere cliccabili: immagine del progetto, "In corso" con un punto che pulsa,
   nome, una frase, anni e finanziatore. */
.f-home .f-now { padding-top: clamp(48px, 7vw, 96px); }
.f-now__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; }
.f-home .f-now__head .f-intro { margin: 0 !important; }
.f-now__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--f-gap);
}
.f-now__card {
  position: relative; isolation: isolate;
  display: flex; flex-direction: column; margin: 0;
  border-radius: 24px; overflow: hidden; background: #fff;
  box-shadow: var(--f-shadow);
  transition: transform .45s var(--f-ease), box-shadow .45s var(--f-ease);
}
.f-now__card:hover, .f-now__card:focus-within { transform: translateY(-6px); box-shadow: var(--f-shadow-hover); }
.f-now__media { position: relative; aspect-ratio: 1.9 / 1; overflow: hidden; background: var(--f-paper); }
.f-now__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--f-ease); }
/* logo quadrato su fondo del suo colore (campo "tinta" in tools/progetti.json) */
.f-now__media--logo { background: radial-gradient(120% 120% at 30% 20%, color-mix(in srgb, var(--f-tint) 80%, #fff) 0%, var(--f-tint) 70%); }
.f-now__media--logo img {
  position: absolute; top: 50%; left: 50%; width: auto; height: 70%; aspect-ratio: 1;
  transform: translate(-50%, -50%); object-fit: cover; border-radius: 16px;
  box-shadow: 0 14px 30px -12px rgba(40, 10, 50, .55);
}
.f-now__card:hover .f-now__media img { transform: scale(1.04); }
/* dopo la regola generale: il logo resta centrato anche quando si ingrandisce */
.f-now__card:hover .f-now__media--logo img { transform: translate(-50%, -50%) scale(1.05); }
.f-now__body { display: flex; flex-direction: column; flex: 1; padding: clamp(20px, 2.4vw, 28px); }
.f-home .f-now__live {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  margin: 0 0 12px !important; padding: 4px 12px 4px 10px; border-radius: 999px;
  background: #e7f7ee; color: #146c43; font-size: .8rem !important; font-weight: 700; line-height: 1.5 !important; letter-spacing: .02em;
}
.f-now__live span { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #1f9d5c; }
@media (prefers-reduced-motion: no-preference) {
  .f-now__live span::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%; background: #1f9d5c;
    animation: f-ping 2s var(--f-ease) infinite;
  }
}
@keyframes f-ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(2.8); opacity: 0; } }
.f-home .f-now__name { margin: 0 0 8px !important; font-size: clamp(1.3rem, 1.15rem + .5vw, 1.6rem) !important; letter-spacing: -0.015em !important; color: var(--f-ink) !important; }
.f-now__name a { color: inherit; text-decoration: none; }
.f-now__name a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.f-now__name a:focus-visible { outline: none !important; }
.f-now__card:focus-within { outline: 3px solid var(--f-accent); outline-offset: 3px; }
.f-home .f-now__text { margin: 0 0 16px !important; font-size: .975rem !important; line-height: 1.55 !important; color: var(--f-text); }
.f-home .f-now__meta { margin: auto 0 0 !important; padding-top: 14px; border-top: 1px solid var(--f-line); font-size: .85rem !important; font-weight: 600; color: var(--f-mute); }
.f-now__cta { margin-top: 12px; font-weight: 700; font-size: .95rem; color: var(--f-button); }
.f-now__cta span { display: inline-block; transition: transform .3s var(--f-ease); }
.f-now__card:hover .f-now__cta span { transform: translate(3px, -1px); }
@media (max-width: 900px) {
  .f-now__grid { grid-template-columns: 1fr; max-width: 560px; }
}
.f-proj__summary { margin: 0 0 10px !important; font-size: .975rem !important; line-height: 1.55 !important; color: var(--f-text); max-width: 70ch; }

/* ---------- Home: due siti (fosforoscienza.it / fosforo.me) ------------- */
.f-sites__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--f-gap); }
.f-site {
  display: flex; flex-direction: column; gap: 6px;
  padding: clamp(24px, 3.5vw, 40px);
  border-radius: 24px;
  text-decoration: none !important;
}
.f-home .f-site p { margin: 0 !important; max-width: 46ch; }
.f-site__label { font-size: .85rem !important; font-weight: 700; letter-spacing: .02em; color: var(--f-mute); }
.f-home .f-site__name {
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem) !important;
  letter-spacing: -0.02em !important;
  margin: 0 0 .25em !important;
}
.f-site--here { background: var(--f-paper); box-shadow: inset 0 0 0 1px var(--f-line); }
.f-site--here strong { color: var(--f-ink); }
.f-site--festival {
  background: radial-gradient(130% 150% at 100% 0%, #0a6aa6 0%, var(--f-ink) 60%) var(--f-ink);
  color: rgba(255, 255, 255, .82) !important;
  box-shadow: var(--f-shadow);
  transition: transform .35s var(--f-ease), box-shadow .35s var(--f-ease);
}
.f-home .f-site--festival .f-site__name { color: #fff !important; }
.f-site--festival .f-site__label { color: var(--f-cyan); }
.f-home .f-site--festival p { color: rgba(255, 255, 255, .82); }
.f-site--festival strong { color: #fff; }
.f-site__cta { margin-top: auto; padding-top: 18px; font-weight: 700; color: #fff; }
.f-site__cta span { display: inline-block; transition: transform .3s var(--f-ease); }
.f-site--festival:hover { transform: translateY(-3px); box-shadow: var(--f-shadow-hover); }
.f-site--festival:hover .f-site__cta span { transform: translateX(4px); }
@media (max-width: 760px) { .f-sites__grid { grid-template-columns: 1fr; } }

/* =====================================================================
   PARTNER — ridisegnata (.f-partners)
   Frase guida, indice delle categorie fisso in alto, una griglia per
   categoria con logo su tessera bianca, nome e descrizione.
   ===================================================================== */
.f-partners__intro { padding-bottom: clamp(16px, 3vw, 28px); }
.f-home .f-partners__intro .f-statement { max-width: 36ch !important; }

.f-partners__nav {
  position: sticky; top: 70px; z-index: 5;
  margin: 0 calc(-1 * clamp(16px, 4vw, 40px)) clamp(24px, 4vw, 40px);
  padding: 10px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--f-line);
}
.f-partners__nav ul {
  list-style: none; margin: 0 !important; padding: 0 !important;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
}
.f-partners__nav ul::-webkit-scrollbar { display: none; }
.f-partners__nav li { margin: 0 !important; padding: 0 !important; list-style: none !important; flex: none; }
.f-partners__nav li::before { display: none !important; }
.f-partners__nav a {
  display: block; padding: 8px 14px; border-radius: 12px;
  font-weight: 600; font-size: .95rem; white-space: nowrap;
  color: var(--f-ink) !important; text-decoration: none !important;
  background: var(--f-paper);
  transition: background-color .25s var(--f-ease), color .25s var(--f-ease);
}
.f-partners__nav a:hover { background: var(--f-button); color: #fff !important; }

.f-partners__group { padding-bottom: clamp(40px, 6vw, 72px); scroll-margin-top: 140px; }
.f-partners__head { margin-bottom: clamp(18px, 2.5vw, 28px); }
.f-home .f-partners__head h2 { margin-bottom: .2em !important; }

.f-partners__grid {
  list-style: none; margin: 0 !important; padding: 0 !important;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(20px, 2.5vw, 32px) clamp(16px, 2vw, 24px);
}
.f-partner { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.f-partner::before { display: none !important; }
.f-partner::marker { content: none; }
.f-partner__logo {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 16 / 10;
  padding: 18px 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--f-line);
  transition: box-shadow .3s var(--f-ease), transform .3s var(--f-ease);
}
.f-partner__logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.f-partner:hover .f-partner__logo { box-shadow: inset 0 0 0 1px transparent, var(--f-shadow); transform: translateY(-2px); }
.f-home .f-partner__name { font-size: 1.05rem !important; margin: 12px 0 4px !important; color: var(--f-ink) !important; }
.f-home .f-partner__desc { font-size: .925rem !important; line-height: 1.5 !important; color: var(--f-text); margin: 0 !important; }

@media (max-width: 778px) {
  .f-partners__nav { top: 60px; }
}
@media (max-width: 560px) {
  .f-partners__grid { grid-template-columns: repeat(2, 1fr); }
  .f-home .f-partner__desc { font-size: .85rem !important; }
}

/* =====================================================================
   CONTATTI — ridisegnata (.f-contact)
   ===================================================================== */
.f-contact__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 56px); align-items: stretch; }
.f-contact__list { list-style: none; margin: 0 !important; padding: 0 !important; display: grid; gap: 22px; }
.f-contact__list li { margin: 0 !important; padding: 0 0 20px !important; list-style: none !important; border-bottom: 1px solid var(--f-line); }
.f-contact__list li::before { display: none !important; }
.f-contact__label { display: block; font-size: .9rem; font-weight: 600; color: var(--f-mute); margin-bottom: 4px; }
.f-contact__big {
  font-size: clamp(1.35rem, 1.1rem + .9vw, 1.9rem); font-weight: 800; letter-spacing: -0.015em;
  color: var(--f-ink) !important; text-decoration: none !important; word-break: break-word;
  background: linear-gradient(var(--f-accent), var(--f-accent)) left bottom / 0 3px no-repeat;
  transition: background-size .35s var(--f-ease), color .25s;
}
.f-contact__big:hover { background-size: 100% 3px; color: var(--f-button) !important; }
.f-contact__addr { font-size: 1.15rem; font-weight: 600; color: var(--f-ink); }
.f-map { display: flex; flex-direction: column; gap: 10px; }
.f-map__frame {
  width: 100%; flex: 1; min-height: 320px; border: 0;
  border-radius: 20px; box-shadow: var(--f-shadow);
  background: var(--f-paper) url("logo-cyan.png") center / 140px auto no-repeat;
}

.f-social__grid, .f-downloads__grid {
  list-style: none; margin: 0 !important; padding: 0 !important;
  display: grid; gap: var(--f-gap);
}
.f-social__grid { grid-template-columns: repeat(4, 1fr); }
.f-social__grid li { margin: 0 !important; padding: 0 !important; list-style: none !important; }
.f-social__grid li::before { display: none !important; }
/* riquadri alti uguali: il link riempie tutta la cella della griglia */
.f-social__grid > li { display: flex; }
.f-social__grid > li > .f-social__item { flex: 1 1 auto; }
.f-social__item, .f-download {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: 20px;
  background: var(--f-paper);
  color: var(--f-text) !important; text-decoration: none !important;
  transition: background-color .3s var(--f-ease), box-shadow .3s var(--f-ease), transform .3s var(--f-ease);
}
.f-social__item:hover, .f-download:hover { background: #fff; box-shadow: var(--f-shadow-hover); transform: translateY(-2px); }
.f-social__item .socicon {
  flex: none; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-size: 20px;
  background: var(--f-button); color: #fff;
}
.f-social__item strong, .f-download strong { display: block; color: var(--f-ink); font-size: 1.05rem; }
.f-social__item span span, .f-download span span { display: block; font-size: .9rem; color: var(--f-mute); }

.f-downloads__grid { grid-template-columns: 1fr 1fr; }
.f-download img { width: 120px; height: auto; flex: none; }
.f-download__doc {
  flex: none; width: 120px; height: 46px; display: grid; place-items: center;
  border-radius: 12px; background: var(--f-ink); color: #fff; font-weight: 800; letter-spacing: .08em; font-size: .85rem;
}
.f-download__cta { margin-left: auto; font-weight: 700; color: var(--f-button); white-space: nowrap; }

.f-join__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.f-newsletter {
  padding: clamp(24px, 3.5vw, 40px); border-radius: 24px;
  background: var(--f-paper); box-shadow: inset 0 0 0 1px var(--f-line);
}
.f-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0; }
.f-field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.f-field--full { grid-column: 1 / -1; }
.f-field label, .f-checks legend { font-weight: 600; font-size: .95rem; color: var(--f-ink); }
.f-checks legend { margin-bottom: 6px; padding: 0; }
.f-form input[type="email"], .f-form input[type="text"] {
  height: 48px; padding: 0 14px; border-radius: 12px !important;
  border: 1px solid rgba(11, 34, 51, .22) !important; background: #fff !important;
  font: inherit; font-size: 1rem; color: var(--f-ink); box-shadow: none !important;
}
.f-form input:focus { border-color: var(--f-button) !important; outline: 3px solid rgba(0, 149, 217, .25) !important; outline-offset: 0; }
.f-checks label { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: .95rem; color: var(--f-text); line-height: 1.45; }
.f-checks input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--f-button); flex: none; }
.f-home .f-checks p { margin: 0 0 6px !important; font-size: .95rem; }
.f-home .f-form__small { font-size: .82rem !important; color: var(--f-mute); margin-top: 6px !important; }
.f-home .f-form__note { grid-column: 1 / -1; margin: 0 !important; font-size: .85rem; color: var(--f-mute); }
.f-form button.f-btn { cursor: pointer; }

.f-legal { background: var(--f-paper); padding: clamp(48px, 7vw, 88px) 0 !important; margin-top: clamp(24px, 4vw, 48px); }
.f-legal__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
.f-home .f-legal h2 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.7rem) !important; }
.f-legal__dl { margin: 0; display: grid; gap: 0; }
.f-legal__dl > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--f-line); }
.f-legal__dl dt { font-weight: 600; color: var(--f-mute); font-size: .95rem; }
.f-legal__dl dd { margin: 0; color: var(--f-ink); }
.f-mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.f-legal__5x1000 { display: block; width: min(420px, 100%); height: auto; margin-top: 18px; border-radius: 16px; }

@media (max-width: 900px) {
  .f-contact__grid, .f-join__grid, .f-legal__grid { grid-template-columns: 1fr; }
  .f-social__grid { grid-template-columns: 1fr 1fr; }
  .f-downloads__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .f-social__grid { grid-template-columns: 1fr; }
  .f-form { grid-template-columns: 1fr; }
  .f-legal__dl > div { grid-template-columns: 1fr; gap: 2px; }
  .f-download img, .f-download__doc { width: 84px; }
}

/* =====================================================================
   SOTTOPAGINE di "Cosa facciamo" (.f-sub) — componenti comuni
   generati da tools/subpages.py
   ===================================================================== */
.f-sub__intro { padding-bottom: clamp(24px, 4vw, 40px); }
.f-intro-block .f-statement { max-width: 36ch !important; margin-bottom: .6em !important; }
.f-home .f-intro-block p { font-size: 1.05rem; }
.f-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-top: 18px; }
.f-sub .f-values { padding-top: 0; }
.f-sub .f-value > div p:last-child { margin-bottom: 0 !important; }

/* Formati (attività giornaliere, spettacoli…): riquadri affiancati */
.f-formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--f-gap); }
.f-format {
  padding: clamp(22px, 3vw, 34px); border-radius: 24px;
  background: radial-gradient(130% 150% at 100% 0%, #0a6aa6 0%, var(--f-ink) 60%) var(--f-ink);
  color: rgba(255, 255, 255, .82);
}
.f-home .f-format h2 { color: #fff !important; font-size: clamp(1.35rem, 1.15rem + .7vw, 1.8rem) !important; }
.f-home .f-format p { color: rgba(255, 255, 255, .82); }
.f-format strong { color: #fff; }
.f-format .f-btn { margin-top: 6px; background: #fff !important; color: var(--f-ink) !important; }
.f-format .f-btn:hover { background: var(--f-cyan) !important; color: var(--f-ink) !important; }

/* Schede di catalogo (laboratori, spettacoli, corsi, exhibit…) */
.f-cards {
  list-style: none; margin: 0 !important; padding: 0 !important;
  display: grid; gap: clamp(20px, 2.5vw, 28px) clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.f-cards--l { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.f-card { margin: 0 !important; padding: 0 !important; list-style: none !important; display: flex; flex-direction: column; }
.f-card::before { display: none !important; }
.f-card::marker { content: none; }
.f-card__media { display: block; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--f-paper); box-shadow: var(--f-shadow); }
.f-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--f-ease); }
.f-card:hover .f-card__media img { transform: scale(1.04); }
.f-card__body { padding-top: 14px; }
.f-home .f-card__title { font-size: 1.2rem !important; margin: 0 0 8px !important; color: var(--f-ink) !important; }
.f-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.f-tag {
  display: inline-block; padding: 4px 10px; border-radius: 8px;
  background: var(--f-cyan-soft); color: #005c8f;
  font-size: .8rem; font-weight: 700; letter-spacing: .01em;
}
.f-tag--off { background: var(--f-paper); color: var(--f-mute); box-shadow: inset 0 0 0 1px var(--f-line); }
.f-home .f-card p { font-size: .975rem !important; line-height: 1.55 !important; margin: 0 0 .6em !important; }
.f-card__links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 6px; }
.f-card__links .f-link { font-size: .95rem; }

.f-sub__catalog { padding-top: 0; }
/* elenco subito sotto una foto di testata (es. La scienza in classe): serve lo spazio della sezione */
.f-hero-page + .f-sub > .f-sub__catalog:first-child { padding-top: clamp(48px, 7vw, 96px); }
@media (max-width: 560px) {
  .f-cards { grid-template-columns: 1fr; }
}

/* Fascia titolo per le pagine senza testata con foto */
.f-pagehead {
  background: radial-gradient(120% 160% at 85% 0%, #123a5a 0%, var(--f-ink) 60%) var(--f-ink);
  padding: clamp(120px, 14vw, 170px) 0 clamp(40px, 6vw, 64px);
}
.f-home .f-pagehead h1 { color: #fff !important; margin: 0 !important; max-width: 20ch; }

/* Video e testo introduttivo prima delle schede */
.f-sub__extra { padding-top: 0; }
.f-extra { display: grid; gap: 14px; max-width: 900px; }
.f-home .f-extra h2 { margin-top: 12px !important; }
.f-video { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; box-shadow: var(--f-shadow); background: var(--f-ink) url("logo-white.png") center / 140px auto no-repeat; }
.f-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.f-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: clamp(20px, 3vw, 32px); }
.f-videos figure { margin: 0; }
.f-home .f-videos figcaption h3 { font-size: 1.15rem !important; margin: 12px 0 4px !important; }
.f-home .f-videos figcaption p { font-size: .95rem !important; margin: 0 !important; }
/* Logo della mostra e galleria nella scheda */
.f-card__logo { display: block; max-width: 160px; max-height: 48px; width: auto; height: auto; margin-bottom: 10px; object-fit: contain; }
.f-card__gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.f-card__gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }

/* Pagine "a flusso" (video, hub, pagine semplici) */
.f-flow .f-wrap > * { max-width: 900px; }
.f-flow .f-wrap > .f-cards, .f-flow .f-wrap > .f-videos, .f-flow .f-wrap > .f-tips { max-width: none; }
.f-home .f-flow h2 { margin-top: clamp(28px, 4vw, 48px) !important; }
.f-home .f-flow h2:first-child { margin-top: 0 !important; }
.f-flow .f-statement { max-width: 36ch !important; }
.f-videos--one { grid-template-columns: minmax(0, 900px); }
.f-tips { list-style: none; margin: 8px 0 0 !important; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--f-gap); }
.f-tips li { margin: 0 !important; padding: 20px 22px !important; list-style: none !important; border-radius: 18px; background: var(--f-paper); }
.f-tips li::before { display: none !important; }
.f-home .f-tips h3 { font-size: 1.05rem !important; margin: 0 0 6px !important; color: var(--f-title) !important; }
.f-home .f-tips p { font-size: .95rem !important; margin: 0 !important; }
.f-media-text { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(20px, 4vw, 48px); align-items: center; margin: 12px 0; }
.f-media-text img { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--f-shadow); }
/* .f-home davanti: ".f-home figure { margin: 0 }" toglieva lo spazio tra le immagini */
.f-figure, .f-home .f-figure { margin: clamp(24px, 3.5vw, 44px) 0; }
.f-figure img { width: 100%; height: auto; border-radius: 16px; box-shadow: var(--f-shadow); }
/* Copertine (libri, giochi) e manifesti (edizioni) */
.f-cards--p { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
/* copertine dei libri: bordo vero (un'ombra interna verrebbe coperta dallo sfondo bianco dei PNG),
   stesso margine per JPG e PNG */
.f-cards--p .f-card__media { aspect-ratio: 1; background: #fff; border: 1px solid var(--f-line); }
.f-cards--p .f-card__media, .f-cards--p .f-card__media:has(img) { box-shadow: none; }
.f-cards--p .f-card__media img[src] { object-fit: contain; padding: 12px; background: none; }
.f-cards--poster { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.f-cards--poster .f-card__media { aspect-ratio: 5 / 7; }
.f-home .f-series { font-size: 1.05rem !important; margin: 24px 0 14px !important; color: var(--f-mute) !important; font-weight: 600 !important; }
/* Loghi (png) nelle schede: interi su fondo bianco */
.f-card__media img[src$=".png"] { object-fit: contain; padding: 18px; background: #fff; }
.f-card__media:has(img[src$=".png"]) { background: #fff; box-shadow: inset 0 0 0 1px var(--f-line); }
.f-cards--l .f-card__media { aspect-ratio: 16 / 9; }
@media (max-width: 760px) { .f-media-text { grid-template-columns: 1fr; } .f-cards--p { grid-template-columns: repeat(2, 1fr); } }

/* Elenchi puntati nelle pagine a flusso */
.f-list { margin: 4px 0 16px !important; padding-left: 0 !important; list-style: none !important; display: grid; gap: 8px; max-width: 900px; }
.f-list li { position: relative; padding-left: 22px !important; margin: 0 !important; list-style: none !important; }
.f-list li::before { content: "" !important; display: block !important; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--f-accent); }

/* Eventi: due ingressi grandi e prossima edizione */
.f-feature--two { grid-template-columns: 1fr 1fr; grid-template-rows: clamp(320px, 34vw, 440px); }
.f-home .f-feature--two .f-tile__title { font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem) !important; }
.f-feature--two .f-tile__desc { -webkit-line-clamp: 3; font-size: 1rem; color: rgba(255, 255, 255, .85); }
.f-feature--two .f-site__cta { display: inline-block; padding-top: 12px; font-weight: 700; color: #fff; }
.f-sub__latest { padding-top: 0; }
.f-sub__next { padding-top: 0; }
.f-next { max-width: none; }
.f-home .f-next p { max-width: 60ch; }
@media (max-width: 760px) { .f-feature--two { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-rows: 300px; } }

/* =====================================================================
   LA SCIENZA ONLINE (fosforo-studios): mappa d'Italia a tutta larghezza,
   richiamo ai social, tre sezioni alternate foto + titolo + testo + pulsante
   ===================================================================== */
.f-studio-intro { background: var(--f-paper); }
.f-studio-intro__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.f-studio-intro__map img { display: block; width: 100%; max-width: 520px; height: auto; margin: 0 auto; }
.f-home .f-studio-intro h2 { font-size: clamp(2rem, 1.4rem + 2.2vw, 3.25rem); margin-bottom: .45em !important; }
.f-studio-intro .f-lead { max-width: 34ch; }
.f-studio-intro + .f-section { padding-top: clamp(48px, 7vw, 96px); }
.f-studio-social { padding-bottom: clamp(24px, 4vw, 48px); }

.f-studio__grid { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(24px, 4.5vw, 64px); align-items: center; }
.f-studio--rev .f-studio__grid { grid-template-columns: 5fr 7fr; }
.f-studio--rev .f-studio__media { order: 2; }
.f-studio__media { display: block; border-radius: 24px; overflow: hidden; box-shadow: var(--f-shadow); }
.f-studio__media img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  transition: transform .6s var(--f-ease);
}
.f-studio__media:hover img { transform: scale(1.03); }
.f-home .f-studio__title { font-size: clamp(1.9rem, 1.3rem + 2vw, 3rem); margin-bottom: .4em !important; }
.f-studio__title a { color: inherit; text-decoration: none; }
.f-studio__title a:hover { color: var(--f-button); }
.f-studio__body p { font-size: 1.1rem; }
.f-studio .f-actions .f-btn { margin-top: 0; }
@media (max-width: 860px) {
  .f-studio-intro__grid, .f-studio__grid, .f-studio--rev .f-studio__grid { grid-template-columns: 1fr; }
  .f-studio--rev .f-studio__media { order: 0; }
  .f-studio-intro__map img { max-width: 360px; }
}

/* Precedenti edizioni: i manifesti come fogli appesi a una parete chiara,
   un po' inclinati, con un nastro adesivo in alto e l'angolo in basso rialzato.
   Vale per tutti allo stesso modo, JPG e PNG (annulla il riquadro bianco dei PNG). */
.f-cards--poster .f-card__media,
.f-cards--poster .f-card__media:has(img) {
  aspect-ratio: 5 / 6; display: grid; place-items: center;
  background: linear-gradient(165deg, #f1f5f8 0%, #e2eaf0 100%);
  box-shadow: inset 0 0 0 1px rgba(11, 34, 51, .05);
}
.f-poster {
  position: relative; display: block; width: 62%;
  transform: rotate(-1.6deg); transition: transform .5s var(--f-ease);
}
.f-cards--poster > li:nth-child(even) .f-poster { transform: rotate(1.3deg); }
.f-cards--poster .f-card__media .f-poster img[src] {
  position: relative; z-index: 1; display: block;
  width: 100%; height: auto; aspect-ratio: auto; object-fit: fill;
  padding: 0; background: #fff; border-radius: 2px;
  box-shadow: 0 1px 2px rgba(11, 34, 51, .2), 0 16px 26px -14px rgba(11, 34, 51, .45);
  transform: none !important;
}
/* nastro adesivo */
.f-poster::before {
  content: ""; position: absolute; z-index: 2; top: -9px; left: 50%;
  width: 34%; height: 20px; margin-left: -17%;
  background: rgba(255, 255, 255, .55);
  box-shadow: 0 1px 2px rgba(11, 34, 51, .12);
  transform: rotate(-3deg);
  -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px);
}
/* angolo in basso a destra che si stacca dal muro: ombra più lunga sotto l'angolo */
.f-poster::after {
  content: ""; position: absolute; z-index: 0; right: 4%; bottom: 3%;
  width: 46%; height: 22%;
  box-shadow: 10px 16px 16px rgba(11, 34, 51, .32);
  transform: rotate(5deg) skewX(8deg);
}
.f-card:hover .f-poster { transform: rotate(0deg) translateY(-4px); }

/* Demonstration: griglia di schede con foto quadrate */
.f-cards--sq .f-card__media { aspect-ratio: 1; }
/* Tinkering: la struttura su ruote (foto verticale, scontornata) accanto al testo */
.f-tinker-box { grid-template-columns: 4fr 8fr; margin: clamp(32px, 5vw, 56px) 0 clamp(8px, 2vw, 16px); padding: clamp(20px, 3vw, 36px); border-radius: 24px; background: var(--f-paper); }
.f-tinker-box img { max-width: 300px; margin: 0 auto; box-shadow: none; border-radius: 0; }
.f-tinker-box h2 { margin-top: 0 !important; }
