/* =========================================================
   FAI — Antium: il Vallo, le Necropoli e Via Ardeatina
    Palette FAI: Arancio #C8471A + avorio + inchiostro verde antico
   ========================================================= */

/* ── FONT ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── TOKENS ───────────────────────────────────────────── */
:root {
  /* Colori FAI */
  --fai-orange:   #C8471A;
  --fai-orange-d: #9E3210;
  --fai-orange-l: #E8632E;
  --fai-cream:    #FAF7F2;
  --fai-cream-2:  #F1ECE3;
  --fai-cream-3:  #E3DACB;
  --fai-brown:    #24332E;
  --fai-brown-m:  #4E5B4D;
  --fai-brown-l:  #7F846B;
  --fai-gold:     #B78A2A;
  --fai-gold-l:   #D8B45B;
  --fai-divider:  #D4CAB8;
  --map-paper:    #FBF8F1;
  --map-paper-2:  #F0E8DA;
  --map-line:     rgba(104,116,91,0.13);
  --map-route:    rgba(200,71,26,0.085);

  /* Text */
  --text-primary:  #1B201A;
  --text-body:     #34372C;
  --text-muted:    #68705E;
  --text-faint:    #9B9A83;
  --text-inverse:  #FAF7F2;

  /* Type scale */
  --text-xs:   clamp(0.75rem,  0.7rem + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  /* Prosa di lettura: stessa misura in home (.intro-body, .section-intro) e
     sezioni (.article-body). Praticamente uniforme (~15px) tra desktop, tablet e
     mobile, dove l'override sotto i 480px la porta a 0.92rem. */
  --text-prose: clamp(0.9rem, 0.25vw + 0.83rem, 0.94rem);
  --text-md:   clamp(1.06rem,  1rem + 0.35vw,   1.28rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.75vw,   1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem + 1.25vw,  2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem + 2.5vw,   3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem + 4vw,       5rem);
  --text-hero: clamp(3rem,     0.5rem + 7vw,     7rem);

  /* Spacing */
  --sp-1: 0.25rem; --sp-2: 0.5rem;  --sp-3: 0.75rem;
  --sp-4: 1rem;    --sp-5: 1.25rem; --sp-6: 1.5rem;
  --sp-7: 1.75rem; --sp-8: 2rem;
  --sp-10: 2.5rem; --sp-12: 3rem;   --sp-16: 4rem;
  --sp-20: 5rem;   --sp-24: 6rem;   --sp-32: 8rem;

  /* Radii & shadows */
  --r-sm:  0.375rem;
  --r-md:  0.625rem;
  --r-lg:  1rem;
  --r-xl:  1.5rem;
  --shadow-card: 0 4px 24px rgba(42,28,14,0.10), 0 1px 4px rgba(42,28,14,0.06);
  --shadow-hover: 0 16px 48px rgba(42,28,14,0.18), 0 4px 12px rgba(42,28,14,0.10);
  --transition: 260ms cubic-bezier(0.16,1,0.3,1);

  /* Layout */
  --content-narrow:  640px;
  --content-default: 960px;
  --content-wide:    1200px;

  /* Fonts */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

/* ── RESET ────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html {
  -webkit-font-smoothing: antialiased;
  text-size-adjust: none;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-body);
  background-color: var(--map-paper);
  background-image:
    radial-gradient(ellipse at 16% 10%, rgba(216,180,91,0.18), transparent 34%),
    radial-gradient(ellipse at 80% 28%, rgba(36,51,46,0.10), transparent 30%),
    linear-gradient(115deg, transparent 0%, transparent 36%, var(--map-route) 36.2%, var(--map-route) 36.55%, transparent 36.8%, transparent 100%),
    linear-gradient(24deg, transparent 0%, transparent 58%, rgba(36,51,46,0.07) 58.15%, rgba(36,51,46,0.07) 58.5%, transparent 58.8%, transparent 100%),
    repeating-linear-gradient(0deg, var(--map-line) 0, var(--map-line) 1px, transparent 1px, transparent 52px),
    repeating-linear-gradient(90deg, rgba(104,116,91,0.09) 0, rgba(104,116,91,0.09) 1px, transparent 1px, transparent 52px);
  background-size: 100% 100%, 100% 100%, 920px 560px, 760px 460px, 52px 52px, 52px 52px;
  background-attachment: fixed;
  min-height: 100dvh;
  line-height: 1.65;
}
img, video { display:block; max-width:100%; height:auto; }
h1,h2,h3,h4,h5,h6 { text-wrap:balance; line-height:1.15; font-family:var(--font-display); }
p,li,figcaption { text-wrap:pretty; }
ul[role=list],ol[role=list] { list-style:none; }
button { cursor:pointer; background:none; border:none; font:inherit; color:inherit; }
a { color:inherit; text-decoration:none; }
a:hover { color: var(--fai-orange); }

.skip-link {
  position: fixed;
  top: var(--sp-3);
  left: var(--sp-3);
  z-index: 1000;
  background: var(--fai-brown);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform var(--transition);
}
.skip-link:focus { transform: translateY(0); }

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration:.01ms!important; transition-duration:.01ms!important;
  }
}

/* ── UTILITY ──────────────────────────────────────────── */
.container {
  width:100%; max-width:var(--content-default);
  margin-inline:auto; padding-inline:var(--sp-6);
}
.container--wide { max-width:var(--content-wide); }
.container--narrow { max-width:var(--content-narrow); }
.sr-only { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0; }

/* ── HEADER — three-strip editorial layout ───────────── */
.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--fai-cream);
  border-top: 4px solid var(--fai-bordeaux);
  border-bottom: 1px solid var(--fai-divider);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.site-header.scrolled { box-shadow: 0 6px 22px rgba(42,28,14,0.12); }

:root {
  --fai-bordeaux: #5a1a17;
  --fai-bordeaux-d: #441110;
}

/* 1) Brand band */
.site-brandband {
  background-color: #f4ead2;
  background-image:
    radial-gradient(ellipse at 0% 0%, rgba(200,71,26,0.06), transparent 45%),
    radial-gradient(ellipse at 100% 100%, rgba(90,26,23,0.05), transparent 45%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='3'/><feColorMatrix values='0 0 0 0 0.42 0 0 0 0 0.30 0 0 0 0 0.18 0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  border-bottom: 1px solid rgba(90,26,23,0.10);
}
.site-brandband-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: 4px var(--sp-6);
  display: grid;
  grid-template-columns: clamp(120px, 14vw, 200px) minmax(0, 1fr) minmax(160px, 220px);
  align-items: center;
  gap: var(--sp-4);
  min-height: auto;
}
.brand-logo {
  display: block;
  text-decoration: none;
  justify-self: start;
}
.brand-logo img {
  display: block;
  width: clamp(120px, 14vw, 200px);
  max-width: 100%;
  height: auto;
  max-height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 2px 5px rgba(60,30,10,0.14));
}
.brand-title { text-align: center; }
.brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  line-height: 1;
  color: var(--fai-brown);
  letter-spacing: 0.14em;
  text-indent: 0.14em;
}
.brand-name .brand-v {
  font-style: normal;
  color: #c54a1c;
}
.brand-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px auto 4px;
  max-width: 320px;
}
.brand-divider .brand-line {
  flex: 1 1 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fai-bordeaux) 30%, var(--fai-bordeaux) 70%, transparent);
  opacity: 0.55;
}
.brand-divider .brand-diamond {
  width: 6px; height: 6px;
  transform: rotate(45deg);
  background: var(--fai-bordeaux);
  flex-shrink: 0;
}
.brand-tagline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 0.9vw, 0.82rem);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fai-brown);
  font-weight: 500;
}

.brand-search {
  position: relative;
  display: flex;
  align-items: center;
  justify-self: end;
  width: 100%;
  max-width: 220px;
  border-bottom: 1px solid rgba(90,26,23,0.35);
}
.brand-search input {
  flex: 1 1 auto;
  background: transparent;
  border: 0;
  outline: none;
  padding: 5px 26px 5px 4px;
  font-family: var(--font-body);
  font-size: clamp(0.78rem, 0.85vw, 0.88rem);
  color: var(--fai-brown);
  font-style: normal;
  font-weight: 400;
}
.brand-search input::placeholder {
  color: rgba(60,30,10,0.45);
  font-style: normal;
  font-weight: 400;
}
.brand-search button[type="submit"] {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  display: grid;
  place-items: center;
  color: rgba(90,26,23,0.55);
  transition: color 0.2s ease;
}
.brand-search button[type="submit"]:hover { color: var(--fai-orange); }
.brand-search button[type="submit"] svg { width: 15px; height: 15px; }
.brand-search-status {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fffaf0;
  border: 1px solid var(--fai-divider);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--fai-brown);
  box-shadow: 0 6px 18px rgba(60,30,10,0.12);
  white-space: nowrap;
  z-index: 5;
}
.brand-search-status[hidden] { display: none; }
.brand-search-status .search-nav,
.brand-search-status .search-clear {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--fai-brown);
  font-size: 16px;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}
.brand-search-status .search-nav:hover,
.brand-search-status .search-clear:hover {
  background: var(--fai-orange);
  color: #fff;
}
.mobile-search-panel { display: none; }

/* 2) Topbar minimale sfumata (desktop) — sopra il brandband */
.site-menubar {
  position: relative;
  background: linear-gradient(180deg, #3d1009 0%, #2e0c07 60%, #260a06 100%);
  border-bottom: 1px solid rgba(247,212,136,0.10);
  box-shadow: inset 0 -1px 0 rgba(0,0,0,0.30);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.site-menubar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 50%, rgba(247,212,136,0.07), transparent 50%),
    radial-gradient(ellipse at 90% 50%, rgba(200,71,26,0.07), transparent 50%),
    repeating-linear-gradient(
      105deg,
      transparent 0,
      transparent 18px,
      rgba(247,212,136,0.025) 18px,
      rgba(247,212,136,0.025) 19px,
      transparent 19px,
      transparent 38px
    );
}
.site-menubar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247,212,136,0.45) 30%, rgba(247,212,136,0.45) 70%, transparent);
  pointer-events: none;
}
.site-menubar-inner {
  position: relative;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: 0 var(--sp-6);
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 32px;
  transition: min-height var(--transition);
}
.menu-links {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--sp-1);
  list-style: none;
  margin: 0; padding: 0;
}
.menu-links li { display: flex; position: relative; }
.menu-links li + li::before {
  content: "";
  align-self: center;
  width: 1px;
  height: 10px;
  background: rgba(247,212,136,0.18);
  margin-right: 0;
}
.menu-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--sp-4);
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(253,246,227,0.75);
  text-decoration: none;
  transition: color 0.25s ease, padding var(--transition), font-size var(--transition), letter-spacing var(--transition);
}
.menu-link::after {
  content: "";
  position: absolute;
  left: var(--sp-4);
  right: var(--sp-4);
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--fai-orange-l) 20%, var(--fai-orange) 50%, var(--fai-orange-l) 80%, transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.2,0.8,0.2,1);
}
.menu-link:hover { color: #fdf6e3; }
.menu-link:hover::after,
.menu-link.active::after,
.menu-link[aria-current="page"]::after { transform: scaleX(1); }
.menu-link.active,
.menu-link[aria-current="page"] { color: #fdf6e3; }

/* Header fisso: nessuna transizione di dimensione allo scroll */

.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px; height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  margin-left: auto;
  align-self: center;
  background: transparent;
}
.nav-menu-btn span {
  display: block;
  width: 22px; height: 2px;
  background: var(--fai-brown);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-menu-btn.open span:nth-child(2) { opacity: 0; }
.nav-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── TABLET + MOBILE (≤ 1024px) ─────────────────────────
   Header fisso non ridimensionato + hamburger con menu+search */
@media (max-width: 1024px) {
  /* Brandband: logo a sx, titolo centrato, hamburger a dx (no search inline) */
  .site-brandband-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "title";
    min-height: 96px;
    padding: 6px clamp(56px, 9vw, 80px);
    gap: 0;
  }
  .brand-logo {
    position: absolute;
    left: clamp(8px, 2vw, 16px);
    top: 50%;
    transform: translateY(-50%);
    grid-area: auto;
    justify-self: start;
    z-index: 2;
  }
  .brand-logo img {
    width: clamp(64px, 12vw, 110px);
    max-height: clamp(60px, 11vw, 96px);
  }
  .brand-title {
    grid-area: title;
    justify-self: center;
    text-align: center;
    min-width: 0;
  }
  .brand-divider {
    margin: 6px auto 5px;
    max-width: clamp(180px, 30vw, 280px);
  }
  .brand-name {
    font-size: clamp(1.7rem, 5.5vw, 2.6rem);
    letter-spacing: 0.10em;
    text-indent: 0.10em;
  }
  .brand-tagline {
    font-size: clamp(9px, 1.4vw, 11px);
    letter-spacing: clamp(0.13em, 0.4vw, 0.20em);
    white-space: normal;
  }

  /* Search inline nascosto, hamburger visibile */
  .brand-search:not(.brand-search--mobile) { display: none; }
  .nav-menu-btn {
    position: absolute;
    right: clamp(8px, 2vw, 16px);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    margin-left: 0;
    z-index: 4;
  }

  /* Pannello hamburger: nav + search */
  .mobile-search-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(82vw, 360px);
    height: 100svh;
    display: block;
    padding: 120px var(--sp-5) var(--sp-5);
    background: #f4ead2;
    border-left: 1px solid rgba(90,26,23,0.18);
    box-shadow: -16px 0 34px rgba(42,28,14,0.22);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 3;
    overflow-y: auto;
  }
  .mobile-search-panel.open { transform: translateX(0); }
  .mobile-search-panel[hidden] { display: none; }
  .brand-search--mobile {
    display: flex;
    max-width: none;
    border-bottom-color: var(--fai-bordeaux);
  }

  /* Topbar elegante NON va mostrato in tablet/mobile (vive nell'hamburger) */
  .site-menubar { display: none; }

  /* Menu nel pannello hamburger */
  .mobile-menu-links {
    list-style: none;
    margin: 0 0 var(--sp-5);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .mobile-menu-links li { display: block; }
  .mobile-menu-links a {
    display: block;
    padding: var(--sp-3) var(--sp-2);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fai-brown);
    text-decoration: none;
    border-bottom: 1px solid var(--fai-divider);
    transition: color 0.2s ease;
  }
  .mobile-menu-links a:hover,
  .mobile-menu-links a:focus-visible,
  .mobile-menu-links a[aria-current="page"] {
    color: var(--fai-orange);
    outline: none;
  }

  /* In mobile/tablet l'header NON si rimpicciolisce allo scroll */
  .site-header.scrolled .site-brandband-inner {
    padding-top: 4px;
    padding-bottom: 4px;
    min-height: auto;
    gap: 0;
  }
  .site-header.scrolled .brand-logo img {
    width: clamp(64px, 12vw, 110px);
    max-height: clamp(60px, 11vw, 96px);
    filter: drop-shadow(0 3px 8px rgba(60,30,10,0.18));
  }
  .site-header.scrolled .brand-name {
    font-size: clamp(1.7rem, 5.5vw, 2.6rem);
    letter-spacing: 0.10em;
  }
  .site-header.scrolled .brand-divider {
    margin: 6px auto 4px;
    max-width: clamp(180px, 30vw, 280px);
  }
  .site-header.scrolled .brand-tagline {
    font-size: clamp(9px, 1.4vw, 11px);
    letter-spacing: clamp(0.13em, 0.4vw, 0.20em);
  }
}

/* Mobile compatto (≤ 480px): logo più piccolo, titolo più ridotto */
@media (max-width: 480px) {
  .site-brandband-inner {
    min-height: auto;
    padding: 4px 56px;
  }
  .brand-logo img {
    width: clamp(54px, 16vw, 76px);
    max-height: 64px;
  }
  .brand-name {
    font-size: clamp(1.5rem, 7vw, 2rem);
    letter-spacing: 0.08em;
  }
  .brand-tagline { font-size: 9px; letter-spacing: 0.13em; }
  .brand-divider { max-width: 180px; margin: 4px auto 3px; }
  .site-header.scrolled .site-brandband-inner {
    min-height: auto;
    padding-top: 4px;
    padding-bottom: 4px;
  }
  .site-header.scrolled .brand-logo img {
    width: clamp(54px, 16vw, 76px);
    max-height: 64px;
  }
  .site-header.scrolled .brand-name {
    font-size: clamp(1.5rem, 7vw, 2rem);
    letter-spacing: 0.08em;
  }
}

/* ── HERO — editorial cinematic ───────────────────────── */
.hero {
  position: relative;
  min-height: calc(100svh - var(--site-header-height, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero--editorial {
  min-height: calc(100svh - var(--site-header-height, 0px));
}
.hero--editorial.hero--fit-viewport .hero-content {
  padding-top: clamp(10px, 1.4vh, 14px);
  padding-bottom: clamp(8px, 1.2vh, 12px);
}
.hero--editorial.hero--fit-viewport .hero-title {
  font-size: clamp(2.55rem, 7.2vw, 5.3rem);
  margin-bottom: var(--sp-3);
}
.hero--editorial.hero--fit-viewport .hero-eyebrow {
  font-size: clamp(1.02rem, 2vw, 1.45rem);
  margin-bottom: var(--sp-3);
}
.hero--editorial.hero--fit-viewport .hero-divider {
  margin-bottom: var(--sp-4);
}
.hero--editorial.hero--fit-viewport .hero-subtitle {
  font-size: clamp(0.92rem, 1.15vw, 1.02rem);
  line-height: 1.42;
  margin-bottom: var(--sp-4);
}

.section-page-hero {
  min-height: calc(100svh - var(--site-header-height, 0px));
  height: auto;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.06);
  transition: transform 14s ease;
  filter: saturate(1.05) contrast(1.02);
}
.hero.visible .hero-bg { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20,12,6,0.78) 0%, rgba(20,12,6,0.52) 35%, rgba(20,12,6,0.10) 65%, rgba(20,12,6,0) 100%),
    linear-gradient(180deg, rgba(20,12,6,0.18) 0%, rgba(20,12,6,0.45) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--sp-9) var(--sp-6);
  max-width: 760px;
  margin-inline: auto;
  width: 100%;
  color: #fdf6e3;
}
.hero-title {
  font-size: clamp(3.2rem, 8.5vw, 6.6rem);
  font-family: var(--font-display);
  font-weight: 400;
  color: #fdf6e3;
  line-height: 1.0;
  letter-spacing: 0.06em;
  margin: 0 0 var(--sp-4);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s ease 0.4s, transform 0.9s ease 0.4s;
  text-shadow: 0 4px 28px rgba(0,0,0,0.45);
}
.hero.visible .hero-title { opacity: 1; transform: translateY(0); }
.hero-eyebrow {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #fdf6e3;
  margin: 0 0 var(--sp-4);
  line-height: 1.15;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease 0.6s, transform 0.9s ease 0.6s;
}
.hero.visible .hero-eyebrow { opacity: 1; transform: translateY(0); }
.hero-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 220px;
  margin: 0 0 var(--sp-5);
  opacity: 0;
  transform: scaleX(0.6);
  transform-origin: left;
  transition: opacity 0.8s ease 0.8s, transform 0.8s ease 0.8s;
}
.hero-divider .line {
  flex: 1 1 auto; height: 1px;
  background: rgba(247,212,136,0.85);
}
.hero-divider .diamond {
  width: 6px; height: 6px;
  transform: rotate(45deg);
  background: rgba(247,212,136,0.85);
}
.hero.visible .hero-divider { opacity: 1; transform: scaleX(1); }
.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-style: normal;
  color: rgba(253,246,227,0.92);
  line-height: 1.55;
  margin: 0 0 var(--sp-7);
  max-width: 460px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease 0.9s, transform 0.9s ease 0.9s;
}
.hero.visible .hero-subtitle { opacity: 1; transform: translateY(0); }

/* ── HERO FOOTER — era cards + quote ──────────────────── */
.hero-footer {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  width: 100%;
  padding: 0 0 clamp(20px, 3vh, 32px);
  background: linear-gradient(180deg, rgba(20,12,6,0) 0%, rgba(20,12,6,0.55) 40%, rgba(20,12,6,0.82) 100%);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease 1.05s, transform 0.9s ease 1.05s;
}
.hero.visible .hero-footer { opacity: 1; transform: translateY(0); }
.hero--editorial.hero--fit-viewport .hero-footer {
  padding-bottom: clamp(12px, 1.6vh, 16px);
}

.hero-eras {
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(14px, 2vh, 22px) 0;
  border-top: 1px solid rgba(247,212,136,0.18);
  border-bottom: 1px solid rgba(247,212,136,0.18);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.hero--editorial.hero--fit-viewport .hero-eras {
  padding-top: clamp(8px, 1.2vh, 12px);
  padding-bottom: clamp(8px, 1.2vh, 12px);
}
.hero-eras::-webkit-scrollbar { display: none; width: 0; height: 0; }
.hero-eras.is-dragging { cursor: grabbing; }
.hero-eras.is-dragging .era-card { pointer-events: none; }

.era-card {
  flex: 1 1 0;
  min-width: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px clamp(8px, 1.2vw, 14px);
  text-align: center;
  text-decoration: none;
  color: #fdf6e3;
  position: relative;
  transition: transform 0.25s ease, color 0.25s ease;
}
.hero--editorial.hero--fit-viewport .era-card {
  min-width: 94px;
  padding-top: 4px;
  padding-bottom: 4px;
  gap: 4px;
}
.hero--editorial.hero--fit-viewport .era-icon {
  width: clamp(22px, 2.2vw, 26px);
  height: clamp(22px, 2.2vw, 26px);
}
.hero--editorial.hero--fit-viewport .era-title {
  font-size: clamp(0.72rem, 0.86vw, 0.86rem);
  letter-spacing: 0.11em;
}
.hero--editorial.hero--fit-viewport .era-sub {
  font-size: clamp(0.52rem, 0.58vw, 0.6rem);
  letter-spacing: 0.12em;
}
.era-card + .era-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14%;
  bottom: 14%;
  width: 1px;
  background: rgba(247,212,136,0.22);
}
.era-icon {
  display: inline-flex;
  width: clamp(28px, 3vw, 34px);
  height: clamp(28px, 3vw, 34px);
  color: rgba(247,212,136,0.92);
  transition: color 0.25s ease, transform 0.25s ease;
}
.era-icon svg { width: 100%; height: 100%; }
.era-title {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fdf6e3;
  line-height: 1.05;
}
.era-sub {
  font-family: var(--font-display);
  font-size: clamp(0.6rem, 0.7vw, 0.72rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(253,246,227,0.62);
  line-height: 1.2;
}
.era-card:hover,
.era-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
}
.era-card:hover .era-icon,
.era-card:focus-visible .era-icon {
  color: var(--fai-orange);
  transform: scale(1.06);
}
.era-card:hover .era-sub,
.era-card:focus-visible .era-sub {
  color: rgba(253,246,227,0.92);
}

.hero-quote {
  text-align: center;
  margin: clamp(14px, 2.4vh, 22px) auto 0;
  padding: 0 var(--sp-6);
  max-width: 760px;
  color: rgba(253,246,227,0.78);
}
.hero--editorial.hero--fit-viewport .hero-quote {
  margin-top: clamp(8px, 1.1vh, 10px);
}
.hero--editorial.hero--fit-viewport .hero-quote-text {
  font-size: clamp(0.82rem, 1vw, 0.95rem);
  line-height: 1.36;
}
.hero--editorial.hero--fit-viewport .hero-quote-author {
  margin-top: 4px;
}
.hero-quote-mark {
  display: block;
  width: 6px;
  height: 6px;
  margin: 0 auto 10px;
  transform: rotate(45deg);
  background: rgba(247,212,136,0.75);
}
.hero-quote-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.5;
  margin: 0;
  color: rgba(253,246,227,0.88);
}
.hero-quote-author {
  font-family: var(--font-body);
  font-size: clamp(0.7rem, 0.85vw, 0.78rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(247,212,136,0.78);
  margin: 8px 0 0;
}

@media (max-width: 768px) {
  .hero-eras {
    justify-content: flex-start;
    padding-inline: var(--sp-5);
    gap: 0;
  }
  .era-card {
    flex: 0 0 auto;
    min-width: 132px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .era-card, .era-icon, .hero-footer { transition: none; }
}

/* ── HERO ACTIONS — same UI as era-cards, used in section heroes ─ */
.hero-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
  margin-top: var(--sp-4);
  padding: clamp(10px, 1.6vh, 16px) 0;
  border-top: 1px solid rgba(247,212,136,0.18);
  border-bottom: 1px solid rgba(247,212,136,0.18);
  max-width: 520px;
}
.hero-actions .era-card {
  flex: 1 1 0;
  min-width: 150px;
}
@media (max-width: 480px) {
  .hero-actions { max-width: none; }
  .hero-actions .era-card { min-width: 130px; }
}

/* CTA in golden outline (matches example) */
.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border: 1.5px solid rgba(247,212,136,0.85);
  color: #fdf6e3;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.10);
  text-decoration: none;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
  border-radius: 0;
}
.btn-hero:hover {
  background: rgba(247,212,136,0.92);
  color: var(--fai-bordeaux-d);
  border-color: rgba(247,212,136,0.92);
  transform: translateY(-2px);
}
.btn-hero--soft { background: rgba(253,246,227,0.08); }

.section-page-hero {
  min-height: calc(100svh - var(--site-header-height, 0px));
}
.section-page-hero .hero-title {
  font-size: clamp(2.7rem, 6vw, 5.4rem);
  letter-spacing: 0.02em;
  max-width: 900px;
}
.volsci-page-hero .hero-content {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding-inline: clamp(2.25rem, 5vw, 5rem);
  padding-top: clamp(var(--sp-2), 1.5vh, var(--sp-4));
  padding-bottom: clamp(var(--sp-2), 1.5vh, var(--sp-4));
}
.volsci-page-hero .hero-copy {
  max-width: 760px;
}
.volsci-page-hero .hero-title {
  max-width: 16ch;
  font-size: clamp(1.82rem, 3.45vw, 3.5rem);
  line-height: 0.92;
  margin-bottom: 0.6rem;
}
.volsci-page-hero .hero-divider {
  width: min(220px, 44vw);
  margin-bottom: 0.55rem;
}
.volsci-page-hero .hero-subtitle {
  max-width: 28rem;
  font-size: clamp(0.88rem, 0.94vw, 0.98rem);
  line-height: 1.42;
  margin-bottom: 0.55rem;
}
.volsci-page-hero .hero-meta {
  margin: 0 0 0.6rem;
  font-size: clamp(0.68rem, 0.78vw, 0.82rem);
}
.section-page-hero .hero-actions--section-dual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 480px;
  padding: 4px 0;
}
.section-page-hero .hero-actions--section-dual .era-card {
  min-width: 0;
  min-height: 60px;
  padding: 6px 8px;
  border-radius: var(--r-md);
  border: 1px solid rgba(247,212,136,0.22);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.16), transparent 58%),
    linear-gradient(180deg, rgba(253,246,227,0.10), rgba(253,246,227,0.035));
}
.section-page-hero .hero-actions--section-dual .era-card + .era-card::before {
  display: none;
}
.section-page-hero .hero-actions--section-dual .era-icon {
  width: 20px;
  height: 20px;
}
.section-page-hero .hero-actions--section-dual .era-title {
  font-size: clamp(0.72rem, 0.78vw, 0.84rem);
  letter-spacing: 0.13em;
}
.section-page-hero .hero-actions--section-dual .era-sub {
  font-size: clamp(0.48rem, 0.54vw, 0.58rem);
  letter-spacing: 0.12em;
}
@media (max-width: 640px) {
  .volsci-page-hero .hero-content {
    gap: var(--sp-4);
    padding-top: var(--sp-3);
    padding-bottom: var(--sp-3);
  }
  .volsci-page-hero .hero-title {
    max-width: none;
    font-size: clamp(2.15rem, 11.5vw, 3.3rem);
  }
  .volsci-page-hero .hero-subtitle {
    max-width: none;
    font-size: clamp(0.9rem, 3.6vw, 1rem);
  }
  .section-page-hero .hero-actions--section-dual {
    max-width: none;
    gap: 8px;
  }
  .section-page-hero .hero-actions--section-dual .era-card {
    min-height: 60px;
    padding: 6px 8px;
  }
}
.hero-meta {
  margin: calc(-1 * var(--sp-4)) 0 var(--sp-6);
  color: rgba(247,212,136,0.92);
  font-family: var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-page-index { padding-top: var(--sp-14); }
.section-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-4);
}
.section-link-card {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "num title"
    "num meta";
  column-gap: var(--sp-4);
  row-gap: 4px;
  align-items: center;
  min-height: 112px;
  padding: var(--sp-5);
  background: #fff9ec;
  border: 1px solid var(--fai-divider);
  border-radius: var(--r-sm);
  color: var(--fai-brown);
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(65,39,15,0.08);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.section-link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(200,71,26,0.34);
  box-shadow: 0 16px 34px rgba(65,39,15,0.12);
}
.section-link-card span {
  grid-area: num;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--fai-orange);
}
.section-link-card strong { grid-area: title; font-family: var(--font-display); font-size: 1.25rem; }
.section-link-card em { grid-area: meta; font-size: 0.86rem; color: var(--fai-muted); font-style: normal; }

/* Highlight for in-page search results */
mark.search-hit {
  background: #ffe79a;
  color: var(--fai-brown);
  padding: 0 2px;
  border-radius: 3px;
  box-shadow: inset 0 -2px 0 rgba(200,71,26,0.35);
}
mark.search-hit.is-current {
  background: var(--fai-orange);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(200,71,26,0.30);
}

/* Dropdown risultati ricerca globale (tutte le sezioni) */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(380px, 86vw);
  max-height: min(60vh, 460px);
  overflow-y: auto;
  background: #fffaf0;
  border: 1px solid var(--fai-divider);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(60,30,10,0.20);
  z-index: 30;
  padding: 6px;
  text-align: left;
}
.search-results[hidden] { display: none; }
.search-results-head {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fai-muted);
  padding: 6px 8px 8px;
  border-bottom: 1px solid var(--fai-divider);
}
.search-results-empty {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fai-muted);
  padding: 14px 10px;
}
.search-results-group { padding: 4px 0; }
.search-results-section {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--fai-brown);
  padding: 8px 8px 4px;
}
.search-results-section .srg-here {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  font-style: italic;
  color: var(--fai-orange);
}
.search-results-section .srg-count {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: #fff;
  background: var(--fai-orange);
  border-radius: 999px;
  padding: 1px 7px;
}
.search-result-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 7px;
  padding: 7px 9px;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--fai-brown);
  cursor: pointer;
  transition: background 0.15s ease;
}
.search-result-item:hover,
.search-result-item:focus-visible {
  background: rgba(200,71,26,0.10);
  outline: none;
}
.search-result-item mark {
  background: #ffe79a;
  color: var(--fai-brown);
  padding: 0 1px;
  border-radius: 2px;
}

/* ── BUTTONS ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-10);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: var(--r-md);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--fai-orange);
  color: #fff;
  box-shadow: 0 4px 16px rgba(200,71,26,0.30);
}
.btn-primary:hover {
  background: var(--fai-orange-d);
  box-shadow: 0 8px 24px rgba(200,71,26,0.40);
}
.btn-outline {
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.40);
  backdrop-filter: blur(8px);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.65);
}
.btn-secondary {
  background: var(--fai-cream-2);
  color: var(--fai-orange);
  border: 1.5px solid var(--fai-divider);
}
.btn-secondary:hover {
  background: var(--fai-cream-3);
  box-shadow: var(--shadow-card);
}

/* ── Subscriptio link — usato al fondo di fonti.html come rimando al percorso ── */
.subscriptio-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45em;
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem);
  font-weight: 500;
  color: var(--fai-brown);
  letter-spacing: 0.015em;
  border-bottom: 1px solid var(--fai-gold);
  padding-bottom: 0.15em;
  transition: color var(--transition), border-color var(--transition), letter-spacing var(--transition);
  text-decoration: none;
}
.subscriptio-link:hover,
.subscriptio-link:focus-visible {
  color: var(--fai-orange);
  border-color: var(--fai-orange);
  letter-spacing: 0.04em;
}
.subscriptio-ornament {
  font-style: normal;
  font-size: 0.7em;
  line-height: 1;
  color: var(--fai-gold);
  transition: color var(--transition);
}
.subscriptio-link:hover .subscriptio-ornament,
.subscriptio-link:focus-visible .subscriptio-ornament {
  color: var(--fai-orange);
}

/* ── SECTION BASE ─────────────────────────────────────── */
.section {
  padding-block: clamp(var(--sp-16), 8vw, var(--sp-32));
}
.section--cream {
  background-color: rgba(251,248,241,0.84);
  background-image:
    linear-gradient(135deg, rgba(255,255,255,0.56), rgba(240,232,218,0.34)),
    repeating-linear-gradient(118deg, transparent 0, transparent 72px, rgba(104,116,91,0.045) 73px, rgba(104,116,91,0.045) 74px, transparent 75px, transparent 148px);
}
.section--cream2 {
  background-color: rgba(241,236,227,0.90);
  background-image:
    radial-gradient(ellipse at 85% 8%, rgba(200,71,26,0.07), transparent 32%),
    repeating-linear-gradient(42deg, transparent 0, transparent 86px, rgba(104,116,91,0.05) 87px, rgba(104,116,91,0.05) 88px, transparent 89px, transparent 170px);
}
.section--dark {
  background: var(--fai-brown);
  color: var(--text-inverse);
}
.section--dark .section-label { color: var(--fai-gold-l); }
.section--dark .section-title { color: #fff; }
.section--dark p { color: rgba(250,247,242,0.82); }

.section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fai-orange);
  margin-bottom: var(--sp-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
  line-height: 1.1;
}
.section-title em { font-style: italic; color: var(--fai-orange); }
.section-intro {
  font-size: var(--text-prose);
  color: var(--text-muted);
  max-width: 68ch;
  line-height: 1.75;
}
.section-header {
  margin-bottom: var(--sp-12);
}

/* Separator ornamental */
.ornament {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  margin-block: var(--sp-8);
}
.ornament::before,.ornament::after {
  content:'';
  flex:1;
  height:1px;
  background: var(--fai-divider);
}
.ornament-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--fai-orange);
  flex-shrink: 0;
}

/* ── CARD 3D ──────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-6);
}
.cards-grid--2 { grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); }

.card-3d {
  background: #fff;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transform-style: preserve-3d;
  transition: transform var(--transition), box-shadow var(--transition);
  will-change: transform;
  cursor: default;
  /* Initial reveal state */
  opacity: 0;
  transform: translateY(40px) perspective(800px);
}
.card-3d.revealed {
  opacity: 1;
  transform: translateY(0) perspective(800px);
  transition: opacity 0.7s ease, transform 0.7s ease, box-shadow var(--transition);
}
.card-3d:hover {
  transform: perspective(800px) rotateX(3deg) rotateY(-3deg) translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: linear-gradient(135deg, #fff 0%, var(--fai-cream-2) 100%);
  display: block;
  transition: transform 0.5s ease;
}
.card-3d:hover .card-img { transform: scale(1.015); }
.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-6) var(--sp-7, 1.75rem);
}
.card-tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fai-orange);
  background: rgba(200,71,26,0.08);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-full, 9999px);
  align-self: flex-start;
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.25;
}
.card-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.7;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--fai-cream-3);
  background: var(--fai-cream);
}
.card-meta {
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-weight: 500;
}
.card-link {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--fai-orange);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  transition: gap var(--transition), color var(--transition);
}
.card-link:hover { gap: var(--sp-2); color: var(--fai-orange-d); }

/* ── PARTE HERO (section hero per le due parti) ───────── */
.part-hero {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--r-xl);
  margin-block: var(--sp-8);
}
.part-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.6s ease;
}
.part-hero:hover .part-hero-bg { transform: scale(1.03); }
.part-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(30,18,8,0.85) 0%, rgba(30,18,8,0.15) 60%, transparent 100%);
}
.part-hero-content {
  position: relative; z-index: 2;
  padding: var(--sp-10) var(--sp-8);
  width: 100%;
}
.part-hero-num {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fai-gold-l);
  margin-bottom: var(--sp-3);
}
.part-hero-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--sp-2);
}
.part-hero-sub {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.72);
}

/* ── TIMELINE ─────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: var(--sp-10);
}
.timeline::before {
  content:'';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--fai-orange) 0%, var(--fai-divider) 100%);
}
.timeline-item {
  position: relative;
  margin-bottom: var(--sp-10);
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.revealed { opacity: 1; transform: translateX(0); }
.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--sp-10) - 5px);
  top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--fai-orange);
  border: 2px solid var(--fai-cream);
  box-shadow: 0 0 0 3px rgba(200,71,26,0.20);
}
.timeline-date {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--fai-orange);
  text-transform: uppercase;
  margin-bottom: var(--sp-1);
}
.timeline-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.timeline-text {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── BLOCKQUOTE / CITAZIONE ───────────────────────────── */
.quote-block {
  border-left: 3px solid var(--fai-orange);
  padding: var(--sp-6) var(--sp-8);
  margin-block: var(--sp-8);
  background: var(--fai-cream-2);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.quote-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--fai-brown-m);
  line-height: 1.6;
  margin-bottom: var(--sp-3);
}
.quote-source {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

/* ── CALLOUT BOXES ────────────────────────────────────── */
.callout {
  border-radius: 0;
  padding: var(--sp-5) var(--sp-6);
  margin-block: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  background: var(--fai-cream-3);
  border: none;
  outline: none;
  box-shadow: inset 0 0 0 2px var(--fai-brown-l);
}

.callout.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16,1,0.3,1);
}
.callout.reveal.visible {
  opacity: 1;
  transform: none;
}

.callout-header {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.callout-icon {
  width: 18px;
  height: 18px;
  border-radius: 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.callout--curiosita .callout-icon  { color: var(--fai-orange); }
.callout--suggerimento .callout-icon { color: var(--fai-gold); }
.callout--critica .callout-icon    { color: var(--fai-orange-d); }
.callout-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--text-base);
  font-weight: 600;
  font-style: italic;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  text-transform: none;
  margin-bottom: 0;
}
.callout--curiosita .callout-label  { color: var(--fai-orange); }
.callout--suggerimento .callout-label { color: var(--fai-brown-m); }
.callout--critica .callout-label    { color: var(--fai-orange-d); }
.callout-text {
  font-size: var(--text-sm);
  color: var(--text-body);
  line-height: 1.75;
  padding-left: 0;
}
.callout a,
.source-list a,
.image-credit a {
  color: var(--fai-orange-d);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* ── GLOSSARY TERM (term pop) ─────────────────────────── */
.term {
  color: var(--fai-orange);
  font-style: italic;
  cursor: help;
  border-bottom: 1px dotted var(--fai-orange);
  transition: color var(--transition);
}
.term:hover { color: var(--fai-orange-d); }

/* ── ARTICLE BODY ─────────────────────────────────────── */
.article-body {
  max-width: 72ch;
  margin-inline: auto;
}
.article-body h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  color: var(--text-primary);
  margin-top: var(--sp-12);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--fai-divider);
}
.article-body > h2:first-child {
  margin-top: 0;
}
.article-body h3 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--text-muted);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}
.article-body h4 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-2);
}
.article-body p {
  font-size: var(--text-prose);
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: var(--sp-5);
  max-width: 72ch;
}
.article-body p:last-child { margin-bottom: 0; }

/* Elenchi puntati in articoli — rombo dorato allineato al testo */
.article-body ul {
  list-style: none;
  padding-left: 1.6rem; /* rientro pieno: rombo a 0.5rem dal margine, testo a 1.6rem */
  margin-bottom: var(--sp-5);
}
.article-body ul li {
  position: relative;
  padding-left: 0;
  margin-bottom: var(--sp-3);
  font-size: var(--text-prose);
  line-height: 1.7;
  color: var(--text-body);
}
.article-body ul li:last-child {
  margin-bottom: 0;
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: -1.1rem;
  top: 0.85em;
  transform: translateY(-50%) rotate(45deg);
  width: 7px;
  height: 7px;
  background: var(--fai-gold);
  border-radius: 0;
}

.article-body--long {
  max-width: 860px;
}
.article-body--long p,
.article-body--long .quote-block,
.article-body--long .callout,
.article-body--long .table-wrap,
.article-body--long .bib-list,
.article-body--long .doc-list {
  max-width: 78ch;
}
.termine {
  color: var(--fai-orange-d);
  font-style: italic;
  white-space: nowrap;
}
.termine::before {
  content: '◆ ';
  color: var(--fai-gold);
  font-style: normal;
  font-size: 0.7em;
  vertical-align: 0.08em;
}
.phase-block {
  margin: var(--sp-7) 0;
  padding: var(--sp-5) var(--sp-6);
  border-left: 3px solid var(--fai-gold);
  background: rgba(255,255,255,0.58);
  box-shadow: inset 0 0 0 1px rgba(212,202,184,0.65);
}
.phase-block h3,
.phase-block h4 {
  margin-top: 0;
  color: var(--fai-brown);
}
.article-figure {
  margin: var(--sp-8) 0;
  max-width: 78ch;
}
.article-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  background: var(--fai-cream-2);
}
.article-figure--narrow {
  max-width: min(460px, 100%);
  margin-inline: auto;
}
/* Figure verticali (portrait): si limita l'ALTEZZA dell'immagine, non la
   larghezza, così anche gli scatti molto slanciati restano contenuti e
   armonici accanto al testo invece di allungarsi a dismisura. La larghezza
   segue le proporzioni; box e didascalia restano centrati. */
.article-figure--portrait {
  max-width: min(460px, 100%);
  margin-inline: auto;
}
.article-figure--portrait img {
  width: auto;
  max-width: 100%;
  max-height: 440px;
  margin-inline: auto;
}
.article-figure figcaption {
  margin-top: var(--sp-3);
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
  text-align: center;
}
.doc-list {
  display: grid;
  gap: var(--sp-3);
  margin: var(--sp-4) 0 var(--sp-8);
  padding-left: 1.3rem;
}
.doc-list li {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-body);
}
.doc-bibliography {
  margin-bottom: var(--sp-10);
}

/* ── ANTIUM EDITORIAL LAYOUT ───────────────────────────── */
.intro-section {
  position: relative;
  padding-top: var(--sp-10);
  background-color: rgba(251,248,241,0.94);
  background-image:
    /* Mappa stilizzata — percorso costiero e strade */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 800' preserveAspectRatio='xMidYMid slice'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M-100 680 C150 660 300 600 450 550 S750 470 950 420 S1300 340 1500 290' stroke='%23C8471A' stroke-width='1.8' stroke-opacity='0.22' stroke-dasharray='10 7 3 7'/%3E%3Cpath d='M50 780 C250 740 400 690 550 640 S850 560 1050 510 S1400 430 1600 380' stroke='%2324332E' stroke-width='1.1' stroke-opacity='0.14' stroke-dasharray='5 12'/%3E%3Cpath d='M250 250 Q450 210 650 240 T1050 200 T1450 170' stroke='%2324332E' stroke-width='0.8' stroke-opacity='0.10'/%3E%3Ccircle cx='450' cy='550' r='5' fill='%23C8471A' fill-opacity='0.22'/%3E%3Ccircle cx='750' cy='470' r='4' fill='%23C8471A' fill-opacity='0.18'/%3E%3Ccircle cx='950' cy='420' r='5' fill='%23C8471A' fill-opacity='0.22'/%3E%3Ccircle cx='1300' cy='340' r='4' fill='%23C8471A' fill-opacity='0.18'/%3E%3C/g%3E%3C/svg%3E"),
    /* Griglia cartografica antica */
    linear-gradient(rgba(104,116,91,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(104,116,91,0.055) 1px, transparent 1px),
    /* Texture carta invecchiata */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 0.50 0 0 0 0 0.40 0 0 0 0 0.25 0 0 0 0.065 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    /* Luci e ombre atmosferiche */
    radial-gradient(ellipse at 18% 82%, rgba(200,71,26,0.09), transparent 55%),
    radial-gradient(ellipse at 82% 18%, rgba(36,51,46,0.06), transparent 50%),
    linear-gradient(165deg, rgba(255,255,255,0.42), rgba(240,232,218,0.36));
  background-size: cover, 70px 70px, 70px 70px, 200px 200px, 100% 100%, 100% 100%, 100% 100%;
  background-position: center, center, center, center, center, center, center;
}

/* Riduce il distacco tra hero e prima sezione nelle pagine di dettaglio */
.section-page-content {
  padding-top: var(--sp-10);
}
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: var(--sp-8);
  align-items: start;
}
.story-lead {
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  padding: clamp(var(--sp-6), 4vw, var(--sp-10));
}
.story-lead p {
  font-size: clamp(1.05rem, 1vw + .85rem, 1.25rem);
  color: var(--text-body);
  margin-bottom: var(--sp-4);
}
/* Sezioni sempre a colonna unica: corpo dell'articolo e side-notes/curiosità
   uno sotto l'altro, mai affiancati, a qualsiasi larghezza (inclusi tablet in
   portrait). Non reintrodurre layout a due colonne in queste pagine. */
.article-layout,
.article-layout--media {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(var(--sp-6), 4vw, var(--sp-12));
  align-items: start;
  padding-block: var(--sp-10) var(--sp-6);
}
.article-layout .article-body {
  margin-inline: 0;
}
.side-notes {
  display: grid;
  gap: var(--sp-5);
}
.section-endnotes {
  clear: both;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-6);
  margin-top: var(--sp-10);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--fai-divider);
}
.side-notes .callout,
.callout-grid .callout,
.story-grid > .callout {
  margin-block: 0;
}

/* Affordance lightbox sulle figure dell'articolo (tutte le larghezze) */
.article-figure.is-zoomable {
  cursor: zoom-in;
}

/* ── REVISIONE UI/UX SEZIONI · solo desktop (≥1024px) ──────────
   Layout editoriale a RAIL STICKY: il contenuto occupa il viewport
   con margini equilibrati; colonna di lettura a sinistra (~74ch) e
   rail sticky a destra che raccoglie TUTTI i box contestuali (callout
   sparsi + side-notes finale) in un'unica sidebar scrollabile.
   I callout sono spostati nel rail via JS (initArticleRail) in modo
   che la colonna di lettura contenga solo testo, figure e tabelle.
   ATTENZIONE: introduce un rail laterale SOLO su desktop (eccezione
   documentata in CLAUDE.md). Sotto i 1024px resta la colonna unica
   con i callout nel flusso del testo, e nulla di tutto questo è
   attivo. */
@media (min-width: 1024px) {
  /* 1 · area dei contenuti: si estende a tutta la viewport con
        padding interno proporzionale (32-94px), così da avere
        margini sx/dx simmetrici e ampi su monitor larghi.
        Niente max-width: il body riempie tutto il viewport, l'aria
        è garantita dal padding-inline. */
  .section-page-content .container--wide {
    max-width: 100%;
    padding-inline: clamp(32px, 4vw, 94px);
  }

  /* 2 · corpo: griglia a 2 colonne (lettura + rail).
        - Body: fluido, riempie tutto lo spazio disponibile a sinistra
          del rail (le figure prendono il 100% del body, mentre il
          testo è limitato a 74ch sui paragrafi per leggibilità).
        - Rail: 320-540px (clamp), subito a destra del body con gap
          proporzionale (32-94px) uguale ai margini esterni del
          container. Niente aria vuota né tra body e rail né tra
          rail e bordo del container: i tre spazi (sx, gap, dx) sono
          della stessa misura. */
  .section-page-article .article-layout--media {
    --rail-w: clamp(320px, 28vw, 540px);
    --rail-gap: clamp(32px, 4vw, 94px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--rail-w);
    gap: var(--rail-gap);
    align-items: start;
    padding-block: var(--sp-10) var(--sp-8);
  }
  /* Il rail vive a <body>: rendi disponibili le variabili del grid
     anche al di fuori dell'articolo, cosi' puo' usare --rail-w. */
  body:has(> .article-rail) {
    --rail-w: clamp(320px, 28vw, 540px);
  }
  /* Body fluido: riempie tutta la colonna grid (le figure e le tabelle
     prendono il 100% del body, mentre il testo è limitato sotto). */
  .section-page-article .article-body--long {
    max-width: none;
    margin-inline: 0;
    min-width: 0;
  }
  /* Testo limitato a 74ch per leggibilità (paragrafi, liste, quote,
     headings). Le figure, tabelle e phase-block restano fluide al
     100% del body, così le immagini sono ampie e proporzionate. */
  .section-page-article .article-body--long > p,
  .section-page-article .article-body--long > ul,
  .section-page-article .article-body--long > ol,
  .section-page-article .article-body--long > h2,
  .section-page-article .article-body--long > h3,
  .section-page-article .article-body--long > h4,
  .section-page-article .article-body--long > .panel-lede,
  .section-page-article .article-body--long > .quote-block {
    max-width: 74ch;
  }
  /* il testo resta nella colonna di lettura */
  .section-page-article .article-body--long p,
  .section-page-article .article-body--long ul li,
  .section-page-article .article-body--long .quote-block,
  .section-page-article .article-body--long .table-wrap,
  .section-page-article .article-body--long .phase-block {
    max-width: none;
  }

  /* 3 · RAIL: sidebar dx che contiene tutti i callout.
         Il rail è SEMPRE `position: fixed` (è figlio di <body>, fuori
         dal transform di fade-in dell'articolo). JS gestisce la
         posizione e la visibilità in base allo scroll: appare durante
         la lettura dell'articolo, si nasconde sopra l'hero e sotto il
         pager/footer. Scrollbar sottilissima in oro, hover più visibile. */
  body > .article-rail {
    position: fixed;
    top: calc(var(--site-header-height, 0px) + 16px);
    right: auto;          /* left impostato da JS in base alla colonna */
    /* Width impostato da JS (fluido: dal bordo dx del body di lettura
       al bordo dx del container). Default 320px per il primo frame
       prima che JS calcoli le misure. */
    width: var(--rail-w, 320px);
    max-height: calc(100vh - var(--site-header-height, 0px) - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(183,138,42,0.18) transparent;
    padding: 4px 10px 4px 6px;       /* spazio per la scrollbar visiva */
    margin-right: -6px;               /* compensa il padding */
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    z-index: 10;                      /* sopra l'articolo, sotto header/menu (100) */
  }
  body > .article-rail::-webkit-scrollbar {
    width: 4px;
  }
  body > .article-rail::-webkit-scrollbar-track {
    background: transparent;
  }
  body > .article-rail::-webkit-scrollbar-thumb {
    background: rgba(183,138,42,0.18);
    border-radius: 999px;
    transition: background 0.2s ease;
  }
  body > .article-rail:hover::-webkit-scrollbar-thumb {
    background: rgba(183,138,42,0.36);
  }
  body > .article-rail .callout {
    margin-block: 0;
    background: rgba(255,255,255,0.66);
  }
  /* Allinea la grandezza del testo del rail a quella del body
     (l'utente percepiva il callout-text leggermente piu' grande:
     --text-sm raggiunge 1rem mentre --text-prose si ferma a .94rem). */
  body > .article-rail .callout-text,
  body > .article-rail .callout p,
  body > .article-rail .side-notes p,
  body > .article-rail .section-endnotes p {
    font-size: var(--text-prose);
  }
  body > .article-rail .side-notes,
  body > .article-rail .section-endnotes {
    display: contents;
  }

  /* 4 · figure: box editoriale nella colonna di lettura */
  .section-page-article .article-figure {
    max-width: 100%;
    margin-inline: auto;
    margin-block: clamp(2rem, 3.5vw, 3rem);
    padding: var(--sp-4);
    background: linear-gradient(135deg, #fff, var(--fai-cream-2));
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
  }
  .section-page-article .article-figure img {
    box-shadow: none;
    border-radius: var(--r-sm);
  }
  .section-page-article .article-figure figcaption {
    margin-top: var(--sp-3);
    padding-inline: var(--sp-2);
  }
  .section-page-article .article-figure.is-zoomable:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(42,28,14,0.16);
  }
  .section-page-article .article-figure--narrow {
    max-width: min(380px, 70%);
    margin-inline: auto;
  }
  .section-page-article .article-figure--portrait {
    width: min(300px, 70%);
    max-width: min(300px, 90%);
    margin: var(--sp-4) auto;
    padding: var(--sp-3);
  }
  .section-page-article .article-figure--portrait img {
    width: auto;
    max-width: 100%;
    max-height: 360px;
    margin-inline: auto;
  }
  .section-page-article .article-figure--portrait figcaption {
    font-size: clamp(0.72rem, 0.7vw, 0.8rem);
    line-height: 1.42;
    padding-inline: 0;
  }
}
.callout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-6);
  margin-block: var(--sp-6) var(--sp-10);
}
.figure-card {
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  align-self: start;
}

/* ── ARTICLE RAIL HEAD ────────────────────────────────── */
.article-rail-head {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-style: italic;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--fai-brown-d);
  margin: 0 0 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--fai-divider);
}
.figure-stack {
  display: grid;
  gap: var(--sp-6);
  align-self: start;
}
.figure-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: linear-gradient(135deg, #fff 0%, var(--fai-cream-2) 100%);
}
.figure-card--wide img {
  aspect-ratio: 4 / 3;
}
.figure-card figcaption,
.image-credit,
.source-note,
.source-credit {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.55;
}
.source-credit {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--fai-cream-3);
  font-style: italic;
}
.figure-card figcaption { padding: var(--sp-4) var(--sp-5) var(--sp-5); }
.image-credit {
  margin-top: var(--sp-1);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--fai-cream-3);
  max-width: 100%;
}
.unit {
  font-family: var(--font-body);
  font-size: 0.24em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.source-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: var(--sp-6);
  align-items: start;
}
.source-card {
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  padding: clamp(var(--sp-5), 3vw, var(--sp-8));
}
.source-card h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: var(--sp-4);
}
.source-list {
  display: grid;
  gap: var(--sp-3);
  padding-left: 1.05rem;
}
.source-list li {
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-body);
}
.source-note {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--fai-divider);
}

/* ── PAGINA CREDITI — archivio manoscritto ─────────────── */
.credits-page-hero {
  background: #2f1a0e;
  height: calc(100svh - var(--site-header-height, 0px));
  min-height: 0;
  max-height: calc(100svh - var(--site-header-height, 0px));
  overflow: hidden;
}
@supports (height: 100dvh) {
  .credits-page-hero {
    height: calc(100dvh - var(--site-header-height, 0px));
    max-height: calc(100dvh - var(--site-header-height, 0px));
  }
}
.credits-page-hero .hero-bg {
  background-color: #4f321d;
  background-image:
    linear-gradient(180deg, rgba(52,31,14,0.12) 0%, rgba(24,12,5,0.55) 100%),
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(239,204,142,0.09) 31px 32px, transparent 33px 64px),
    repeating-linear-gradient(92deg, transparent 0 70px, rgba(104,116,91,0.11) 71px 72px, transparent 73px 140px),
    repeating-radial-gradient(ellipse at 18% 26%, rgba(239,204,142,0.10) 0 1px, transparent 1px 22px),
    repeating-conic-gradient(from -8deg at 78% 24%, rgba(239,204,142,0.13) 0deg 1deg, transparent 1deg 16deg),
    linear-gradient(135deg, #745033 0%, #51321d 46%, #2e190d 100%);
  background-size: auto, 100% 64px, 140px 140px, 280px 220px, 360px 360px, auto;
  background-position: center, top left, center, -90px -40px, calc(100% + 120px) -140px, center;
  background-repeat: no-repeat, repeat, repeat, repeat, no-repeat, no-repeat;
  transform: none;
  transition: none;
  filter: none;
  overflow: hidden;
}
.credits-page-hero .hero-bg::before {
  content: "ANTIVM FORTVNA CAENON ROSTRA LITORIS\A MARE TVRRIS VIA ARDEATINA LANCIVS\A FONTES IMAGINES TESTIMONIA MEMORIA";
  position: absolute;
  inset: -14% -12%;
  color: rgba(247,212,136,0.13);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7.5vw, 7rem);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: pre;
  transform: rotate(-9deg);
  text-shadow: 120px 90px 0 rgba(247,212,136,0.055), -90px 170px 0 rgba(247,212,136,0.05);
}
.credits-page-hero .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(115deg, transparent 0 46%, rgba(247,212,136,0.13) 46.2% 46.5%, transparent 46.7% 100%),
    radial-gradient(ellipse at 72% 68%, transparent 0 32%, rgba(247,212,136,0.10) 32.5% 33%, transparent 33.5% 100%),
    radial-gradient(ellipse at 25% 74%, transparent 0 28%, rgba(104,116,91,0.16) 28.5% 29%, transparent 29.5% 100%);
  opacity: 0.75;
}
.credits-page-hero .hero-overlay {
  background:
    linear-gradient(90deg, rgba(24,12,5,0.92) 0%, rgba(24,12,5,0.76) 44%, rgba(24,12,5,0.42) 72%, rgba(24,12,5,0.26) 100%),
    linear-gradient(180deg, rgba(24,12,5,0.12) 0%, rgba(24,12,5,0.68) 100%);
}
.credits-page-hero .hero-content {
  width: calc(100% - clamp(40px, 8vw, 112px));
  max-width: 1120px;
  margin-inline: auto;
  padding: clamp(var(--sp-4), 3.6vh, var(--sp-8)) 0;
  justify-content: center;
}
.credits-page-hero .hero-eyebrow {
  font-size: clamp(1rem, 1.8vw, 1.45rem);
  margin-bottom: var(--sp-3);
}
.credits-page-hero .hero-title {
  font-size: clamp(2.45rem, 5.8vw, 4.85rem);
  line-height: 0.98;
  margin-bottom: var(--sp-3);
  max-width: 820px;
}
.credits-page-hero .hero-divider {
  width: min(220px, 46vw);
  margin-bottom: var(--sp-4);
}
.credits-page-hero .hero-subtitle {
  max-width: 620px;
  margin-bottom: var(--sp-3);
  font-size: clamp(0.94rem, 1vw, 1.05rem);
  line-height: 1.48;
}
.credits-page-hero .hero-meta {
  margin: 0 0 var(--sp-4);
  font-size: clamp(0.74rem, 0.9vw, 0.9rem);
}
.credits-hero-actions {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
  width: min(860px, 100%);
  max-width: 860px;
  margin-top: clamp(8px, 1.8vh, 16px);
  padding: 8px 0;
  background: rgba(24,12,5,0.28);
  border-color: rgba(247,212,136,0.22);
  backdrop-filter: blur(4px);
  overflow: hidden;
}
.credits-page-hero .credits-hero-actions .era-card {
  flex: 0 0 auto;
  min-width: 0;
  min-height: 98px;
  border: 1px solid rgba(247,212,136,0.22);
  border-radius: var(--r-md);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.16), transparent 58%),
    linear-gradient(180deg, rgba(253,246,227,0.10), rgba(253,246,227,0.035));
  padding: 9px 10px;
}
.credits-hero-actions .era-card + .era-card::before {
  display: none;
}
.credits-home-action {
  width: 100%;
}
.credits-hero-actions-scroll {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(247,212,136,0.22) transparent;
}
.credits-hero-actions-scroll .era-card {
  width: 148px;
  flex-basis: 148px;
  scroll-snap-align: start;
}
.credits-hero-actions-scroll::-webkit-scrollbar {
  height: 6px;
}
.credits-hero-actions-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.credits-hero-actions-scroll::-webkit-scrollbar-thumb {
  background: rgba(247,212,136,0.18);
  border-radius: 999px;
}
.credits-page-hero .credits-hero-actions .era-icon {
  width: 24px;
  height: 24px;
}
.credits-page-hero .credits-hero-actions .era-title {
  font-size: clamp(0.76rem, 0.88vw, 0.9rem);
  letter-spacing: 0.13em;
}
.credits-page-hero .credits-hero-actions .era-sub {
  font-size: clamp(0.52rem, 0.58vw, 0.62rem);
  letter-spacing: 0.12em;
}
.pdf-page-hero {
  background: #302113;
  min-height: calc(100svh - var(--site-header-height, 0px));
  overflow: hidden;
}
@supports (height: 100dvh) {
  .pdf-page-hero {
    min-height: calc(100dvh - var(--site-header-height, 0px));
  }
}
.pdf-page-hero .hero-bg {
  background-color: #4d3722;
  background-image:
    linear-gradient(180deg, rgba(49,29,15,0.08) 0%, rgba(19,11,5,0.52) 100%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(239,204,142,0.08) 32px 33px, transparent 34px 66px),
    repeating-linear-gradient(90deg, transparent 0 76px, rgba(104,116,91,0.08) 77px 78px, transparent 79px 154px),
    radial-gradient(ellipse at 18% 24%, rgba(247,212,136,0.10) 0 1px, transparent 1px 22px),
    radial-gradient(ellipse at 78% 30%, rgba(247,212,136,0.08) 0 1px, transparent 1px 20px),
    linear-gradient(135deg, #6d4b30 0%, #4f3421 46%, #2d1b0e 100%);
  background-size: auto, 100% 66px, 154px 154px, 240px 220px, 260px 240px, auto;
  background-position: center, top left, center, -60px -30px, calc(100% + 60px) 12%, center;
  background-repeat: no-repeat, repeat, repeat, repeat, repeat, no-repeat;
  transform: none;
  transition: none;
  filter: none;
}
.pdf-page-hero .hero-bg::before {
  content: "ARCHIVIVM PDF DOCUMENTA SEPARATA RESTITVTA\A VEDUTE TAVOLE RELAZIONI MAPPAE\A HOME INDEX SCARICA APRI CONSULTA";
  position: absolute;
  inset: -10% -14%;
  color: rgba(247,212,136,0.11);
  font-family: var(--font-display);
  font-size: clamp(2rem, 7vw, 6.5rem);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: pre;
  transform: rotate(-8deg);
  text-shadow: 110px 86px 0 rgba(247,212,136,0.045), -84px 156px 0 rgba(247,212,136,0.04);
}
.pdf-page-hero .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(116deg, transparent 0 45%, rgba(247,212,136,0.11) 45.2% 45.5%, transparent 45.7% 100%),
    radial-gradient(ellipse at 74% 66%, transparent 0 30%, rgba(247,212,136,0.09) 30.5% 31%, transparent 31.5% 100%),
    radial-gradient(ellipse at 24% 72%, transparent 0 26%, rgba(104,116,91,0.14) 26.5% 27%, transparent 27.5% 100%);
  opacity: 0.72;
}
.pdf-page-hero .hero-overlay {
  background:
    linear-gradient(90deg, rgba(20,12,5,0.90) 0%, rgba(20,12,5,0.72) 38%, rgba(20,12,5,0.36) 70%, rgba(20,12,5,0.22) 100%),
    linear-gradient(180deg, rgba(20,12,5,0.10) 0%, rgba(20,12,5,0.62) 100%);
}
.pdf-page-hero .hero-content {
  width: calc(100% - clamp(40px, 8vw, 112px));
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(var(--sp-3), 2.4vh, var(--sp-6)) 0;
  justify-content: center;
}
.pdf-page-hero .hero-eyebrow {
  font-size: clamp(0.92rem, 1.5vw, 1.2rem);
  margin-bottom: var(--sp-2);
}
.pdf-page-hero .hero-title {
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  line-height: 0.98;
  margin-bottom: var(--sp-2);
  max-width: 720px;
}
.pdf-page-hero .hero-divider {
  width: min(220px, 46vw);
  margin-bottom: var(--sp-3);
}
.pdf-page-hero .hero-subtitle {
  max-width: 620px;
  margin-bottom: var(--sp-2);
  font-size: clamp(0.86rem, 0.95vw, 0.98rem);
  line-height: 1.38;
}
.pdf-page-hero .hero-meta {
  margin: 0 0 var(--sp-3);
  font-size: clamp(0.66rem, 0.75vw, 0.78rem);
}
.pdf-hero-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  width: min(1180px, 100%);
  margin-top: clamp(8px, 1.6vh, 14px);
  padding: 8px;
  background: rgba(24,12,5,0.26);
  border: 1px solid rgba(247,212,136,0.20);
  backdrop-filter: blur(4px);
}
/* Tutte le card (Home + i PDF) scorrono in un'unica griglia che va a capo:
   niente più scroll orizzontale nascosto, ogni documento resta raggiungibile. */
.pdf-hero-actions-scroll {
  display: contents;
}
.pdf-page-hero .hero-actions .era-card {
  min-width: 0;
  min-height: 78px;
  border: 1px solid rgba(247,212,136,0.20);
  border-radius: var(--r-md);
  background:
    radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.16), transparent 58%),
    linear-gradient(180deg, rgba(253,246,227,0.10), rgba(253,246,227,0.035));
  padding: 6px 8px;
}
.pdf-home-action {
  width: 100%;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.24), transparent 62%),
    linear-gradient(180deg, rgba(253,246,227,0.16), rgba(253,246,227,0.06));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);
}
.pdf-page-hero .hero-actions .era-icon {
  width: 20px;
  height: 20px;
}
.pdf-page-hero .hero-actions .era-title {
  font-size: clamp(0.68rem, 0.78vw, 0.82rem);
  letter-spacing: 0.11em;
}
.pdf-page-hero .hero-actions .era-sub {
  font-size: clamp(0.46rem, 0.52vw, 0.56rem);
  letter-spacing: 0.1em;
}
.pdf-archive-section {
  padding-top: clamp(var(--sp-7), 4vw, var(--sp-12));
  padding-bottom: clamp(var(--sp-10), 6vw, var(--sp-20));
}
.credits-section {
  padding-top: clamp(var(--sp-7), 4vw, var(--sp-12));
  padding-bottom: clamp(var(--sp-10), 6vw, var(--sp-20));
  scroll-margin-top: clamp(74px, 8vw, 104px);
}
.credits-section + .credits-section {
  padding-top: clamp(var(--sp-6), 3.2vw, var(--sp-10));
}
.credits-section .section-header {
  margin-bottom: clamp(var(--sp-6), 4vw, var(--sp-10));
}
.credits-section .source-columns {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: stretch;
}
.credits-section .source-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(104,116,91,0.18);
  background-color: #fffaf0;
  background-image:
    radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.08), transparent 46%),
    repeating-linear-gradient(180deg, transparent 0 29px, rgba(140,90,40,0.045) 30px 31px, transparent 32px 60px),
    linear-gradient(180deg, #fffdf6 0%, #f7edd5 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.55),
    0 18px 42px -28px rgba(36,24,12,0.28);
}
.credits-section .source-card h3 {
  flex: 0 0 auto;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid rgba(183,138,42,0.28);
}
#fonti-documenti .source-card,
#fonti-digitali .source-card {
  height: clamp(420px, 54vh, 540px);
  min-height: 0;
  overflow: hidden;
}
#fonti-documenti .source-list,
#fonti-digitali .source-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: var(--sp-3);
  padding-bottom: var(--sp-5);
  scrollbar-width: thin;
  scrollbar-color: rgba(183,138,42,0.22) transparent;
}
#fonti-documenti .source-card::after,
#fonti-digitali .source-card::after {
  content: "";
  position: absolute;
  right: var(--sp-5);
  bottom: var(--sp-4);
  width: 8px;
  height: 8px;
  background: rgba(183,138,42,0.45);
  transform: rotate(45deg);
  pointer-events: none;
}
.credits-section .source-list::-webkit-scrollbar {
  width: 7px;
}
.credits-section .source-list::-webkit-scrollbar-track {
  background: transparent;
}
.credits-section .source-list::-webkit-scrollbar-thumb {
  background: rgba(183,138,42,0.16);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: content-box;
}
.credits-section .source-list::-webkit-scrollbar-thumb:hover {
  background: rgba(183,138,42,0.28);
  background-clip: content-box;
}
.credits-section .source-list::-webkit-scrollbar-button:single-button:vertical:increment {
  height: 16px;
  background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><path d='M8 3 13 8 8 13 3 8Z' fill='%23B78A2A' fill-opacity='0.55'/></svg>") center / 12px 12px no-repeat;
}
.credits-section .source-list::-webkit-scrollbar-button:single-button:vertical:decrement {
  height: 4px;
  background: transparent;
}
.source-card--wide {
  max-width: 980px;
  margin-inline: auto;
}
.credits-section .table-wrap {
  background: #fffaf0;
  border-color: rgba(183,138,42,0.32);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.45);
}
.credits-section .data-table thead th {
  background:
    linear-gradient(180deg, #efe0b2 0%, #e2c98c 100%);
}
.credits-section .data-table tbody tr:hover td {
  background: rgba(200,71,26,0.055);
}
.credit-preview {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: var(--sp-2);
  width: 100%;
  padding: 0 0 0 var(--sp-4);
  border: 0;
  background: transparent;
  color: var(--fai-brown);
  font: inherit;
  font-family: var(--font-display);
  font-style: italic;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.credit-preview::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
  color: rgba(183,138,42,0.75);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.credit-preview:hover,
.credit-preview:focus-visible {
  color: var(--fai-orange-d);
  outline: none;
}
.credit-preview:hover::before,
.credit-preview:focus-visible::before {
  background: rgba(200,71,26,0.18);
  color: var(--fai-orange);
  transform: rotate(45deg) scale(1.12);
}
.credit-preview:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
@media (max-width: 760px) {
  .credits-section {
    padding-top: var(--sp-7);
    padding-bottom: var(--sp-12);
    scroll-margin-top: 72px;
  }
  .credits-section + .credits-section {
    padding-top: var(--sp-6);
  }
  .credits-section .section-header {
    margin-bottom: var(--sp-6);
  }
  .credits-page-hero {
    height: calc(100svh - var(--site-header-height, 0px));
    max-height: calc(100svh - var(--site-header-height, 0px));
  }
  .credits-page-hero .hero-bg::before {
    inset: -6% -18%;
    font-size: clamp(2rem, 13vw, 4.4rem);
    line-height: 1.55;
    opacity: 0.86;
  }
  .credits-page-hero .hero-overlay {
    background:
      linear-gradient(180deg, rgba(24,12,5,0.84) 0%, rgba(24,12,5,0.68) 48%, rgba(24,12,5,0.9) 100%),
      linear-gradient(90deg, rgba(24,12,5,0.58) 0%, rgba(24,12,5,0.3) 100%);
  }
  .credits-page-hero .hero-content {
    width: calc(100% - 32px);
    padding: clamp(12px, 2.6vh, 22px) 0;
  }
  .credits-page-hero .hero-eyebrow {
    font-size: clamp(0.86rem, 4vw, 1.1rem);
    margin-bottom: var(--sp-2);
  }
  .credits-page-hero .hero-title {
    font-size: clamp(2.05rem, 13vw, 3.35rem);
    max-width: 100%;
    margin-bottom: var(--sp-2);
  }
  .credits-page-hero .hero-divider {
    margin-bottom: var(--sp-3);
  }
  .credits-page-hero .hero-subtitle {
    font-size: 0.92rem;
    line-height: 1.42;
    margin-bottom: var(--sp-3);
  }
  .credits-page-hero .hero-meta {
    margin-bottom: var(--sp-3);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }
  .credits-hero-actions {
    grid-template-columns: 92px minmax(0, 1fr);
    max-width: none;
    gap: 6px;
    padding-block: 6px;
  }
  .credits-page-hero .credits-hero-actions .era-card {
    min-height: 88px;
    padding: 7px 8px;
  }
  .credits-hero-actions-scroll .era-card {
    width: 132px;
    flex-basis: 132px;
  }
  .credits-page-hero .credits-hero-actions .era-icon {
    width: 21px;
    height: 21px;
  }
  .credits-page-hero .credits-hero-actions .era-title {
    font-size: 0.72rem;
  }
  .credits-page-hero .credits-hero-actions .era-sub {
    font-size: 0.5rem;
  }
  .pdf-page-hero .hero-bg::before {
    inset: -6% -18%;
    font-size: clamp(2rem, 13vw, 4.4rem);
    line-height: 1.55;
    opacity: 0.86;
  }
  .pdf-page-hero .hero-overlay {
    background:
      linear-gradient(180deg, rgba(20,12,5,0.80) 0%, rgba(20,12,5,0.66) 48%, rgba(20,12,5,0.90) 100%),
      linear-gradient(90deg, rgba(20,12,5,0.56) 0%, rgba(20,12,5,0.26) 100%);
  }
  .pdf-page-hero .hero-content {
    width: calc(100% - 32px);
    padding: clamp(12px, 2.6vh, 22px) 0;
  }
  .pdf-page-hero .hero-eyebrow {
    font-size: clamp(0.86rem, 4vw, 1.1rem);
    margin-bottom: var(--sp-2);
  }
  .pdf-page-hero .hero-title {
    font-size: clamp(2.05rem, 12vw, 3.35rem);
    max-width: 100%;
    margin-bottom: var(--sp-2);
  }
  .pdf-page-hero .hero-divider {
    margin-bottom: var(--sp-3);
  }
  .pdf-page-hero .hero-subtitle {
    font-size: 0.92rem;
    line-height: 1.42;
    margin-bottom: var(--sp-3);
  }
  .pdf-page-hero .hero-meta {
    margin-bottom: var(--sp-3);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }
  .pdf-hero-actions {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 6px;
    padding: 6px;
  }
  .pdf-page-hero .hero-actions .era-card {
    min-height: 84px;
    padding: 7px 8px;
  }
  .pdf-page-hero .hero-actions .era-icon {
    width: 21px;
    height: 21px;
  }
  .pdf-page-hero .hero-actions .era-title {
    font-size: 0.72rem;
  }
  .pdf-page-hero .hero-actions .era-sub {
    font-size: 0.5rem;
  }
  .pdf-archive-section {
    padding-top: var(--sp-7);
    padding-bottom: var(--sp-12);
  }
  #fonti-documenti .source-card,
  #fonti-digitali .source-card {
    height: min(520px, 68svh);
  }
}
@media (max-height: 720px) and (min-width: 761px) {
  .credits-page-hero .hero-content {
    padding-block: var(--sp-4);
  }
  .credits-page-hero .hero-title {
    font-size: clamp(2.3rem, 5vw, 4.2rem);
  }
  .credits-page-hero .hero-subtitle {
    line-height: 1.38;
  }
  .credits-page-hero .hero-meta {
    margin-bottom: var(--sp-3);
  }
  .credits-page-hero .credits-hero-actions .era-card {
    min-height: 86px;
    padding-block: 7px;
  }
  .credits-page-hero .credits-hero-actions .era-icon {
    width: 22px;
    height: 22px;
  }
}

/* ── PHOTO GALLERY ────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-3);
  margin-block: var(--sp-8);
}
.gallery-item {
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-hover);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

/* ── LIGHTBOX ─────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,6,2,0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-4);
  padding: var(--sp-8);
  overflow-y: auto;
}
.lightbox.open { display: flex; }
.lightbox-img {
  max-width: min(90vw, 1100px);
  max-height: min(62vh, 760px);
  flex-shrink: 0;
  border-radius: var(--r-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  object-fit: contain;
}
.lightbox-caption {
  width: min(90vw, 900px);
  color: rgba(253,246,227,0.88);
  text-align: center;
  flex-shrink: 0;
}
.lightbox-caption-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.15;
  color: #fdf6e3;
  margin-bottom: var(--sp-2);
}
.lightbox-caption-note {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: rgba(253,246,227,0.72);
  margin-inline: auto;
  max-width: 760px;
}
.lightbox-caption-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--sp-3);
  color: rgba(247,212,136,0.95);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}
.lightbox-caption-source::before {
  content: "";
  width: 7px;
  height: 7px;
  background: currentColor;
  transform: rotate(45deg);
}
.lightbox-caption-source:hover {
  color: #fdf6e3;
}
.lightbox-close {
  position: absolute;
  top: var(--sp-6);
  right: var(--sp-6);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(250,247,242,0.12);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(250,247,242,0.25); }
@media (max-width: 640px) {
  .lightbox {
    padding: var(--sp-5) var(--sp-4);
  }
  .lightbox-img {
    max-width: 94vw;
    max-height: 54vh;
  }
  .lightbox-close {
    top: var(--sp-4);
    right: var(--sp-4);
  }
}


/* ── CREDITS POPUP (pagina manoscritta) ─────────────────── */
.credits-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(20, 12, 4, 0.76);
  align-items: center;
  justify-content: center;
  padding: var(--sp-8) var(--sp-4);
  backdrop-filter: blur(4px);
}
.credits-overlay.open { display: flex; }

.credits-popup {
  position: relative;
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  /* Pergamena con texture a righe e sfumatura radiale */
  background-color: #efe0b2;
  background-image:
    repeating-linear-gradient(
      180deg,
      transparent 0px,
      transparent 27px,
      rgba(140, 90, 40, 0.07) 27px,
      rgba(140, 90, 40, 0.07) 28px
    ),
    linear-gradient(
      90deg,
      rgba(170, 100, 50, 0.10) 0px,
      rgba(170, 100, 50, 0.10) 1px,
      transparent 1px
    ),
    radial-gradient(ellipse at 50% 42%, #f6eacb 40%, #d8ba80 100%);
  border-radius: 2px;
  border: 1px solid rgba(110, 75, 25, 0.30);
  box-shadow:
    0 0 0 5px rgba(110, 75, 25, 0.09),
    0 0 0 9px rgba(110, 75, 25, 0.04),
    0 36px 90px rgba(8, 4, 0, 0.55),
    inset 0 0 80px rgba(200, 140, 60, 0.07);
  padding: var(--sp-12) var(--sp-10) var(--sp-8);
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: #261608;
  /* Animazione dal centro verso l'esterno */
  transform: scale(0.04);
  opacity: 0;
  transition:
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.32s ease;
}
.credits-overlay.open .credits-popup {
  transform: scale(1);
  opacity: 1;
}

.credits-popup-close {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-5);
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(110, 75, 25, 0.10);
  color: #261608;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  font-family: 'Inter', sans-serif;
  line-height: 1;
}
.credits-popup-close:hover { background: rgba(110, 75, 25, 0.22); }

.credits-popup-ornament {
  display: block;
  text-align: center;
  font-size: 1.1rem;
  color: rgba(110, 75, 25, 0.50);
  letter-spacing: 0.35em;
  margin-bottom: var(--sp-4);
}
.credits-popup-title {
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #261608;
  text-align: center;
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}
.credits-popup-subtitle {
  font-size: var(--text-sm);
  color: rgba(38, 22, 8, 0.58);
  text-align: center;
  font-style: italic;
  margin-bottom: var(--sp-6);
  letter-spacing: 0.05em;
}
.credits-popup-divider {
  display: block;
  width: 70px;
  height: 1px;
  background: rgba(110, 75, 25, 0.35);
  margin: 0 auto var(--sp-8);
}
.credits-popup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}
.credits-popup-table th {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(38, 22, 8, 0.50);
  border-bottom: 1px solid rgba(110, 75, 25, 0.30);
  padding: var(--sp-2) var(--sp-3) var(--sp-2) 0;
  text-align: left;
  font-family: 'Inter', sans-serif;
}
.credits-popup-table td {
  padding: var(--sp-3) var(--sp-3) var(--sp-3) 0;
  border-bottom: 1px solid rgba(110, 75, 25, 0.10);
  vertical-align: top;
  line-height: 1.6;
}
.credits-popup-table tr:last-child td { border-bottom: none; }
.credits-popup-footer {
  margin-top: var(--sp-8);
  font-size: 0.75rem;
  color: rgba(38, 22, 8, 0.40);
  font-style: italic;
  text-align: center;
  letter-spacing: 0.03em;
}
.credits-trigger {
  background: none;
  border: none;
  padding: 0;
  color: var(--fai-orange);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: inherit;
}
.credits-trigger:hover { color: var(--fai-orange-d); }


/* ── BIBLIOGRAPHY ─────────────────────────────────────── */
.bib-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.bib-list li {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.65;
  padding-left: var(--sp-6);
  position: relative;
}
.bib-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--fai-orange);
}
.bib-list em { font-style: italic; color: var(--text-body); }

/* ── IN-PAGE TAB NAV — section card carousel ──────────── */
.sticky-tabs {
  position: relative;
  z-index: 5;
  background-color: rgba(251,248,241,0.96);
  background-image:
    radial-gradient(ellipse at 12% 0%, rgba(216,180,91,0.12), transparent 38%),
    radial-gradient(ellipse at 90% 100%, rgba(200,71,26,0.07), transparent 40%),
    repeating-linear-gradient(112deg, transparent 0, transparent 70px, rgba(104,116,91,0.05) 71px, rgba(104,116,91,0.05) 72px, transparent 73px, transparent 142px);
  border-top: 1px solid var(--fai-cream-3);
  border-bottom: 1px solid var(--fai-cream-3);
  padding: var(--sp-6) var(--sp-2) var(--sp-7);
}
.tabs-frame {
  position: relative;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: 56px;
}
.tabs-inner {
  display: flex;
  gap: var(--sp-4);
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 12px 4px 18px;
}
.tabs-inner::-webkit-scrollbar { display: none; }

/* Equal-size historic cards */
.tab-btn {
  --card-w: 230px;
  --card-h: 280px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-4);
  width: var(--card-w);
  min-width: var(--card-w);
  height: var(--card-h);
  flex: 0 0 var(--card-w);
  scroll-snap-align: center;
  cursor: pointer;
  text-align: left;
  color: var(--fai-brown);
  border: 1px solid rgba(104,116,91,0.22);
  border-radius: 14px;
  background-color: #fbf5e7;
  background-image:
    radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.10), transparent 55%),
    radial-gradient(ellipse at 0% 100%, rgba(216,180,91,0.18), transparent 55%),
    linear-gradient(180deg, #fdf9ee 0%, #f4e9cc 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%23685947' stroke-opacity='0.07' stroke-width='1'><path d='M0 40h80M40 0v80M0 0l80 80M80 0L0 80'/><circle cx='40' cy='40' r='18'/></g></svg>");
  background-blend-mode: multiply, multiply, normal, normal;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.5),
    0 2px 6px rgba(36,51,46,0.06),
    0 14px 30px -12px rgba(36,51,46,0.18);
  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.3s ease,
    background-color 0.3s ease,
    color 0.3s ease;
  overflow: hidden;
  isolation: isolate;
}
.tab-btn::before {
  /* corner ornament */
  content: "";
  position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px solid rgba(104,116,91,0.18);
  border-radius: 10px;
  pointer-events: none;
  transition: border-color 0.3s ease;
}
.tab-btn:hover {
  transform: translateY(-6px);
  border-color: rgba(200,71,26,0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.55),
    0 6px 14px rgba(36,51,46,0.10),
    0 28px 50px -16px rgba(200,71,26,0.30);
}
.tab-btn:hover::before { border-color: rgba(200,71,26,0.30); }

.tab-btn.active {
  color: #fdf9ee;
  border-color: rgba(0,0,0,0);
  background-color: #6a2d12;
  background-image:
    radial-gradient(ellipse at 30% 0%, rgba(216,180,91,0.45), transparent 55%),
    radial-gradient(ellipse at 90% 100%, rgba(255,210,140,0.18), transparent 55%),
    linear-gradient(160deg, #8a3618 0%, #5a2510 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'><g fill='none' stroke='%23fef0c9' stroke-opacity='0.10' stroke-width='1'><path d='M0 40h80M40 0v80M0 0l80 80M80 0L0 80'/><circle cx='40' cy='40' r='18'/></g></svg>");
  background-blend-mode: screen, screen, normal, normal;
  box-shadow:
    inset 0 0 0 1px rgba(255,210,140,0.30),
    0 16px 36px -10px rgba(106,45,18,0.55),
    0 30px 60px -22px rgba(200,71,26,0.55);
  transform: translateY(-4px) scale(1.03);
}
.tab-btn.active::before { border-color: rgba(255,210,140,0.30); }

.tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(200,71,26,0.10);
  color: var(--fai-orange);
  flex-shrink: 0;
  transition: background 0.3s ease, color 0.3s ease, transform 0.4s ease;
}
.tab-btn:hover .tab-icon { transform: rotate(-4deg) scale(1.05); }
.tab-btn.active .tab-icon {
  background: rgba(255,210,140,0.18);
  color: #fef0c9;
}
.tab-icon svg { display: block; }

.tab-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  opacity: 0.75;
  line-height: 1;
}
.tab-btn.active .tab-num { opacity: 0.95; color: #f7d488; }

.tab-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: 0.005em;
  white-space: normal;
  display: block;
  width: 100%;
}

.tab-era {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-top: 1px solid rgba(104,116,91,0.20);
  padding-top: var(--sp-3);
  width: 100%;
  margin-top: auto;
}
.tab-btn.active .tab-era {
  color: #f4d896;
  border-top-color: rgba(255,210,140,0.25);
}

/* Arrow controls for the carousel */
.tabs-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--fai-cream-3);
  color: var(--fai-brown);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition), transform var(--transition);
  box-shadow: 0 4px 14px rgba(36,51,46,0.10);
}
.tabs-arrow:hover {
  background: var(--fai-orange);
  border-color: var(--fai-orange);
  color: #fff;
}
.tabs-arrow:disabled {
  opacity: 0.30;
  cursor: not-allowed;
  transform: translateY(-50%) scale(0.95);
}
.tabs-arrow.prev { left: 4px; }
.tabs-arrow.next { right: 4px; }
.tabs-arrow svg { width: 18px; height: 18px; }

@media (max-width: 600px) {
  .sticky-tabs { padding: var(--sp-5) var(--sp-1) var(--sp-6); }
  .tabs-frame { padding-inline: 36px; }
  .tabs-arrow { width: 36px; height: 36px; }
  .tab-btn {
    --card-w: 200px;
    --card-h: 250px;
    padding: var(--sp-4) var(--sp-3);
  }
  .tab-name { font-size: 1.15rem; }
}

/* ── SECTION SHOWCASE — dynamic per-section hero ──────── */
.section-showcase {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  align-items: center;
  padding: var(--sp-10) 0;
  margin: 0 0 var(--sp-8);
  border-bottom: 1px solid var(--fai-cream-3);
}
.showcase-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -3;
  transform: scale(1.05);
  transition: opacity 0.55s ease, transform 8s ease-out;
  filter: saturate(1.05);
  animation: showcase-pan 22s ease-in-out infinite alternate;
}
@keyframes showcase-pan {
  from { transform: scale(1.05) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-2%, -1%, 0); }
}
.showcase-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(28,18,10,0.72) 0%, rgba(28,18,10,0.55) 55%, rgba(28,18,10,0.78) 100%),
    linear-gradient(120deg, rgba(106,45,18,0.45), rgba(36,51,46,0.55));
}
.showcase-pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><g fill='none' stroke='%23fef0c9' stroke-opacity='0.18' stroke-width='1'><path d='M0 60h120M60 0v120'/><path d='M0 0h30v30H0zM30 30h30v30H30zM60 60h30v30H60zM90 90h30v30H90z'/><circle cx='60' cy='60' r='28'/></g></svg>");
  background-size: 240px 240px;
  mix-blend-mode: overlay;
}
.showcase-content {
  max-width: 760px;
  color: #fdf9ee;
  animation: showcase-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes showcase-in {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.showcase-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.32em;
  font-weight: 600;
  color: #f7d488;
  background: rgba(255,210,140,0.10);
  border: 1px solid rgba(255,210,140,0.30);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: var(--sp-4);
}
.showcase-era {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(247,212,136,0.85);
  margin-bottom: var(--sp-3);
}
.showcase-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0 0 var(--sp-5);
  color: #fffaf0;
  text-shadow: 0 2px 24px rgba(0,0,0,0.35);
}
.showcase-subtitle {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  color: rgba(253,249,238,0.92);
  margin: 0 0 var(--sp-6);
  max-width: 640px;
}
.showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.showcase-actions .btn { display: inline-flex; align-items: center; gap: 8px; }
.btn-outline--light {
  border-color: rgba(253,249,238,0.55);
  color: #fdf9ee;
  background: transparent;
}
.btn-outline--light:hover {
  background: rgba(253,249,238,0.10);
  border-color: #fdf9ee;
  color: #fff;
}
@media (max-width: 600px) {
  .section-showcase { min-height: 320px; padding: var(--sp-8) 0; }
}

/* Smooth crossfade when changing section */
.section-showcase.is-changing .showcase-content { opacity: 0; transform: translateY(10px); transition: opacity 0.25s ease, transform 0.25s ease; }
.section-showcase.is-changing .showcase-bg { opacity: 0.6; }

/* ── PAGE CONTENT PANEL ───────────────────────────────── */
.page-panel {
  display: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.page-panel.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: panel-fade-in 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes panel-fade-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .page-panel, .page-panel.active, .section-showcase .showcase-bg { animation: none !important; transition: none !important; }
}

.panel-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fai-orange);
  margin: 0 0 var(--sp-3);
}
.panel-lede {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.45;
  color: var(--fai-brown);
  font-style: italic;
  margin: var(--sp-3) 0 var(--sp-6);
  padding-left: var(--sp-4);
  border-left: 3px solid var(--fai-orange);
}

.table-wrap {
  margin: var(--sp-5) 0;
  overflow-x: auto;
  border-radius: 0;
  border: 1px solid var(--fai-divider);
  background: transparent;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  line-height: 1.45;
}
.data-table thead th {
  background: var(--fai-cream-3);
  color: var(--fai-brown);
  font-family: var(--font-display);
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  text-align: left;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--fai-gold);
}
.data-table tbody td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--fai-divider);
  vertical-align: top;
}
.data-table tbody td:first-child {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--fai-brown);
  font-size: var(--text-base);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: rgba(183,138,42,0.05); }

.simple-footer {
  background:
    linear-gradient(180deg, #260a06 0%, #1e0905 60%, #160704 100%);
  background-image:
    linear-gradient(180deg, #2e0c07 0%, #1e0905 60%, #160704 100%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 10px,
      rgba(247,212,136,0.085) 10px,
      rgba(247,212,136,0.085) 11px,
      transparent 11px,
      transparent 22px
    ),
    repeating-radial-gradient(
      circle at 12% 130%,
      rgba(247,212,136,0.09) 0,
      rgba(247,212,136,0.09) 1px,
      transparent 1px,
      transparent 18px
    ),
    repeating-linear-gradient(
      114deg,
      transparent 0,
      transparent 22px,
      rgba(247,212,136,0.07) 22px,
      rgba(247,212,136,0.07) 23px,
      transparent 23px,
      transparent 46px
    );
  background-blend-mode: normal, normal;
  border-radius: 0;
  color: rgba(253,246,227,0.65);
  padding: 24px var(--sp-8) 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
  gap: 20px;
  align-items: end;
  font-size: var(--text-sm);
  border-top: 1px solid rgba(247,212,136,0.12);
  position: relative;
  overflow: hidden;
}
.simple-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(200,71,26,0.17), transparent 45%),
    radial-gradient(ellipse at 100% 100%, rgba(247,212,136,0.10), transparent 52%),
    linear-gradient(90deg, transparent 0, rgba(247,212,136,0.10) 12%, transparent 24%, transparent 76%, rgba(247,212,136,0.10) 88%, transparent 100%);
}
.simple-footer::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247,212,136,0.40) 30%, rgba(247,212,136,0.40) 70%, transparent);
  pointer-events: none;
}
.simple-footer p {
  max-width: none;
}
.footer-summary,
.footer-meta {
  display: grid;
  gap: var(--sp-2);
  position: relative;
}
.footer-summary {
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 12px;
  max-width: 560px;
}
.footer-brand-logo {
  width: clamp(56px, 6.6vw, 74px);
  height: clamp(56px, 6.6vw, 74px);
  display: block;
  margin-bottom: 0;
  object-fit: cover;
  object-position: left center;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.25));
  grid-column: 1;
  grid-row: 1;
  border-radius: 6px;
}
.footer-antivm {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 0.95;
  color: rgba(253,246,227,0.92);
  letter-spacing: 0.06em;
  margin: 0;
  grid-column: 2;
  grid-row: 1;
}
.footer-summary > strong {
  margin: 0;
  grid-column: 2;
  grid-row: 1;
}
.footer-antivm .brand-v {
  color: var(--fai-orange);
}
.footer-summary > .footer-kicker,
.footer-summary > blockquote,
.footer-summary > p:not(.footer-antivm) {
  grid-column: 1 / -1;
}
.footer-cicero {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  color: rgba(247,212,136,0.70);
  line-height: 1.6;
  max-width: 420px;
}
.footer-cicero cite {
  display: block;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,246,227,0.35);
  margin-top: var(--sp-2);
}
.footer-kicker {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fai-orange);
  display: none;
}
.footer-meta {
  text-align: right;
  color: rgba(253,246,227,0.50);
  gap: 0.28rem;
  font-size: clamp(0.68rem, 0.68vw, 0.78rem);
  line-height: 1.35;
  max-width: 360px;
  justify-self: end;
}
.footer-meta p {
  margin: 0;
}
.footer-meta-note {
  margin-block: 0.15rem 0.1rem;
}
.footer-meta-title {
  color: rgba(247,212,136,0.78);
  font-family: var(--font-display);
  font-size: clamp(0.84rem, 0.85vw, 0.95rem);
  font-style: italic;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  line-height: 1.15;
}
.footer-meta a {
  color: rgba(247,212,136,0.80);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.footer-meta a:hover {
  color: var(--fai-orange-l);
}

/* ── FOOTER ───────────────────────────────────────────── */
.site-footer {
  background: var(--fai-brown);
  color: rgba(250,247,242,0.75);
  padding-block: var(--sp-16);
}
.footer-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-12);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(250,247,242,0.12);
  margin-bottom: var(--sp-8);
}
@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; gap: var(--sp-8); }
}
.footer-brand { grid-column: 1; }
.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.footer-logo svg { width: 40px; height: 40px; }
.footer-brand-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 300;
  color: #fff;
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}
.footer-tagline {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(250,247,242,0.60);
}
.footer-col-title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fai-gold-l);
  margin-bottom: var(--sp-5);
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.footer-links a {
  font-size: var(--text-sm);
  color: rgba(250,247,242,0.65);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.footer-links a:hover { color: #fff; }
.footer-links a::before {
  content: '›';
  color: var(--fai-orange);
  font-size: 1rem;
}

.footer-visit-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: rgba(250,247,242,0.40);
  letter-spacing: 0.04em;
}
.footer-visit-icon {
  display: flex;
  align-items: center;
  opacity: 0.6;
}
#counter-value {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: rgba(250,247,242,0.55);
  letter-spacing: 0.02em;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(250,247,242,0.08);
  margin-top: var(--sp-6);
}
.footer-org {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250,247,242,0.55);
}
.footer-license {
  font-size: var(--text-xs);
  color: rgba(250,247,242,0.40);
}
.footer-license a { color: var(--fai-gold-l); }
.footer-license a:hover { color: var(--fai-gold-l); text-decoration: underline; }

/* ── SCROLL REVEAL ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── BACK TO TOP ──────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--fai-cream-2);
  color: var(--fai-brown);
  border: 1.5px solid var(--fai-divider);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(36,51,46,0.10);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  z-index: 200;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover {
  transform: translateY(-2px);
  border-color: var(--fai-gold);
  box-shadow: 0 4px 12px rgba(183,138,42,0.18);
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 600px) {
  .cards-grid, .cards-grid--2 { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(2.5rem, 10vw, 5rem); }
  .part-hero { min-height: 40vh; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .back-to-top { bottom: var(--sp-5); right: var(--sp-5); }
}
/* ── PDF DOWNLOAD — light paper card ───────────────────── */
.pdf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-7);
}
.pdf-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-radius: 14px;
  border: 1px solid var(--fai-cream-3);
  background-color: #fdf9ee;
  background-image:
    radial-gradient(ellipse at 100% 0%, rgba(216,180,91,0.20), transparent 55%),
    linear-gradient(160deg, #fdf9ee 0%, #f4e9cc 100%);
  color: var(--fai-brown);
  text-decoration: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.5),
    0 4px 14px rgba(36,51,46,0.08);
  transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.4s ease, border-color 0.3s ease;
  overflow: hidden;
  isolation: isolate;
}
.pdf-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><g fill='none' stroke='%23685947' stroke-opacity='0.06' stroke-width='1'><circle cx='40' cy='40' r='18'/><path d='M0 40h80M40 0v80'/></g></svg>");
  background-size: 160px 160px;
  z-index: -1;
}
.pdf-card:hover {
  transform: translateY(-6px);
  border-color: rgba(200,71,26,0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.6),
    0 22px 40px -16px rgba(200,71,26,0.30);
}
.pdf-card-num {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--fai-orange);
}
.pdf-card-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1.2;
  font-weight: 600;
  color: var(--fai-brown);
  margin-top: 2px;
}
.pdf-card-meta {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: var(--sp-1);
  margin-bottom: var(--sp-3);
}
.pdf-card-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--fai-orange);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 6px 14px rgba(200,71,26,0.30);
  transition: background 0.3s ease, transform 0.3s ease;
}
.pdf-card:hover .pdf-card-cta {
  background: var(--fai-brown);
  transform: translateX(2px);
}
.pdf-grid-note {
  margin-top: var(--sp-6);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.pdf-grid-note a {
  color: var(--fai-orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.podcast-page-hero .hero-bg {
  background-image: url('../podcast/cover.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #5a3a20;
  background-attachment: scroll;
  transform: none;
  transition: none;
  filter: none;
}

.podcast-page-hero .hero-overlay {
  background:
    linear-gradient(90deg, rgba(52,31,14,0.92) 0%, rgba(52,31,14,0.76) 42%, rgba(52,31,14,0.34) 68%, rgba(52,31,14,0.18) 100%),
    linear-gradient(180deg, rgba(88,56,25,0.22) 0%, rgba(33,18,7,0.68) 100%);
}

.podcast-hero-content {
  max-width: 1180px;
}

.podcast-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: clamp(var(--sp-7), 5vw, var(--sp-12));
}

.podcast-hero-copy {
  max-width: 680px;
  padding-left: clamp(var(--sp-4), 4vw, var(--sp-10));
}

.podcast-page-hero .hero-title,
.podcast-page-hero .hero-eyebrow,
.podcast-page-hero .hero-subtitle,
.podcast-page-hero .hero-meta {
  text-shadow: 0 4px 24px rgba(0,0,0,0.28);
}

.podcast-page-hero .hero-actions {
  max-width: 980px;
}

.podcast-hero-actions {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 8px;
  width: min(100%, 980px);
  padding: 8px;
  border: 1px solid rgba(247,212,136,0.20);
  background: rgba(24,12,5,0.26);
  backdrop-filter: blur(4px);
}

.podcast-hero-actions > .era-card {
  flex: 0 0 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.podcast-page-hero .podcast-hero-actions > .era-card {
  background: radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.18), transparent 58%), linear-gradient(180deg, rgba(254,246,227,0.10) 0%, rgba(220,182,113,0.06) 100%);
  box-shadow: inset 0 0 0 1px rgba(247,212,136,0.16);
}

.podcast-hero-actions-scroll {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(247,212,136,0.22) transparent;
}

.podcast-hero-actions-scroll .era-card {
  flex: 0 0 184px;
  min-width: 184px;
  scroll-snap-align: start;
  background: radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.12), transparent 58%), linear-gradient(180deg, rgba(254,246,227,0.08) 0%, rgba(220,182,113,0.05) 100%);
  box-shadow: inset 0 0 0 1px rgba(247,212,136,0.16);
}

.podcast-hero-actions-scroll::-webkit-scrollbar {
  height: 6px;
}

.podcast-hero-actions-scroll::-webkit-scrollbar-thumb {
  background: rgba(247,212,136,0.28);
  border-radius: 999px;
}

.podcast-page-hero .hero-actions > .era-card {
  background: radial-gradient(ellipse at 100% 0%, rgba(200,71,26,0.18), transparent 58%), linear-gradient(180deg, rgba(254,246,227,0.10) 0%, rgba(220,182,113,0.06) 100%);
  box-shadow: inset 0 0 0 1px rgba(247,212,136,0.16);
}

.podcast-hero-cover {
  margin: 0;
  justify-self: end;
  margin-right: clamp(var(--sp-3), 3vw, var(--sp-8));
  width: min(100%, 360px);
}

.podcast-hero-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-lg);
}

@media (max-width: 900px) {
  .podcast-hero-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }

  .podcast-hero-actions {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 6px;
  }

  .podcast-hero-actions-scroll .era-card {
    flex-basis: 162px;
    min-width: 162px;
  }

  .podcast-hero-cover {
    justify-self: center;
    margin-right: 0;
    width: min(100%, 320px);
  }

  .podcast-page-hero .hero-actions {
    max-width: none;
  }

  .podcast-hero-copy {
    padding-left: 0;
    max-width: none;
  }
}

@media (min-width: 901px) {
  .podcast-page-hero .hero-bg {
    background-image: none;
    background:
      radial-gradient(130% 90% at 20% 20%, rgba(208,166,96,0.22) 0%, rgba(90,58,32,0) 56%),
      linear-gradient(180deg, #6a482a 0%, #4a301b 100%);
  }
}

@media (max-width: 640px) {
  .podcast-page-hero {
    position: relative;
    background-color: #3b2414;
  }

  .podcast-page-hero .hero-bg {
    background-color: #4f321d;
    background-image:
      linear-gradient(180deg, rgba(54,32,16,0.28) 0%, rgba(28,14,6,0.46) 100%),
      repeating-linear-gradient(0deg, rgba(234,205,150,0.12) 0 1px, transparent 1px 42px),
      repeating-linear-gradient(90deg, rgba(234,205,150,0.10) 0 1px, transparent 1px 42px),
      repeating-linear-gradient(135deg, transparent 0 34px, rgba(234,205,150,0.10) 35px 36px, transparent 37px 72px),
      repeating-conic-gradient(from 12deg at 78% 26%, rgba(234,205,150,0.12) 0deg 1deg, transparent 1deg 15deg),
      repeating-radial-gradient(ellipse at 18% 32%, rgba(234,205,150,0.10) 0 1px, transparent 1px 18px),
      linear-gradient(135deg, #6a482a 0%, #4a301b 48%, #2f1a0e 100%);
    background-size:
      auto,
      42px 42px,
      42px 42px,
      72px 72px,
      260px 260px,
      240px 190px,
      auto;
    background-position:
      center,
      top left,
      top left,
      center,
      calc(100% + 70px) -80px,
      -70px -35px,
      center;
    background-repeat: no-repeat, repeat, repeat, repeat, no-repeat, repeat, no-repeat;
    background-attachment: scroll;
  }

  .podcast-page-hero .hero-overlay {
    background:
      linear-gradient(180deg, rgba(24,12,5,0.76) 0%, rgba(24,12,5,0.64) 46%, rgba(24,12,5,0.88) 100%),
      linear-gradient(90deg, rgba(24,12,5,0.62) 0%, rgba(24,12,5,0.34) 100%);
  }

  .podcast-page-hero .hero-content {
    padding-top: clamp(var(--sp-6), 15vh, var(--sp-10));
    padding-bottom: clamp(var(--sp-6), 15vh, var(--sp-10));
    padding-inline: var(--sp-4);
    position: relative;
    z-index: 1;
  }

  .podcast-hero-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .podcast-hero-cover {
    display: none;
  }

  .podcast-hero-copy {
    width: 100%;
    max-width: none;
  }

  .podcast-page-hero .hero-actions {
    margin-top: var(--sp-4);
  }

  .podcast-hero-actions {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 8px;
  }

  .podcast-hero-actions-scroll {
    padding-bottom: 2px;
  }

  .podcast-hero-actions-scroll .era-card {
    flex-basis: 138px;
    min-width: 138px;
  }
}

@media (max-width: 480px) {
  .podcast-page-hero .hero-title {
    font-size: clamp(2rem, 11vw, 2.55rem);
    line-height: 1.1;
  }

  .podcast-page-hero .hero-subtitle {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .podcast-page-hero .hero-meta {
    margin-bottom: var(--sp-4);
  }

  .podcast-hero-actions {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 6px;
  }

  .podcast-hero-actions > .era-card {
    min-width: 0;
  }

  .podcast-hero-actions-scroll {
    gap: 6px;
  }

  .podcast-hero-actions-scroll .era-card {
    flex: 0 0 min(64vw, 150px);
    min-width: min(64vw, 150px);
  }
}

@media (max-width: 360px) {
  .podcast-page-hero .hero-content {
    padding-inline: var(--sp-3);
  }

  .podcast-hero-actions {
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 6px;
  }

  .podcast-hero-actions-scroll .era-card {
    flex: 0 0 130px;
    min-width: 130px;
  }

  .podcast-page-hero .hero-actions .era-title {
    letter-spacing: 0.1em;
    font-size: 0.75rem;
  }

  .podcast-page-hero .hero-actions .era-sub {
    letter-spacing: 0.12em;
    font-size: 0.65rem;
  }
}

@media (max-height: 920px) and (min-width: 641px) {
  .pdf-page-hero .hero-content {
    padding-top: clamp(var(--sp-2), 1.4vh, var(--sp-4));
    padding-bottom: clamp(var(--sp-2), 1.4vh, var(--sp-4));
  }

  .pdf-page-hero .hero-title {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: var(--sp-1);
  }

  .pdf-page-hero .hero-divider {
    margin-bottom: var(--sp-2);
  }

  .pdf-page-hero .hero-subtitle,
  .pdf-page-hero .hero-meta {
    margin-bottom: var(--sp-2);
  }

  .pdf-page-hero .hero-subtitle {
    font-size: 0.84rem;
    line-height: 1.34;
  }

  .pdf-hero-actions {
    margin-top: 4px;
    padding: 5px;
  }

  .pdf-page-hero .hero-actions .era-card {
    min-height: 72px;
    padding: 5px 7px;
  }

  .pdf-page-hero .hero-actions .era-icon {
    width: 18px;
    height: 18px;
  }

  .pdf-page-hero .hero-actions .era-title {
    font-size: 0.66rem;
  }

  .pdf-page-hero .hero-actions .era-sub {
    font-size: 0.45rem;
  }
}

.pdf-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-5);
  background: transparent;
  border-top: 1px solid var(--fai-cream-3);
  border-bottom: 1px solid var(--fai-cream-3);
  border-radius: 0;
  padding: var(--sp-10) var(--sp-6);
  margin-block: var(--sp-10);
  position: relative;
}
.pdf-bar::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -1px;
  transform: translateX(-50%);
  width: 56px;
  height: 2px;
  background: var(--fai-orange);
}
.pdf-bar-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.pdf-icon {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: transparent;
  border: 1px solid var(--fai-cream-3);
  color: var(--fai-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pdf-icon svg,
.btn-pdf svg {
  color: currentColor;
  stroke: currentColor;
  flex-shrink: 0;
}
.pdf-bar-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-body);
  line-height: 1.2;
}
.pdf-bar-meta {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.btn-pdf {
  display: flex;
  width: fit-content;
  margin: 0 auto;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--text-sm);
  font-weight: 600;
  background: var(--fai-orange);
  color: #fff;
  border-radius: 25px;
  box-shadow: 0 4px 16px rgba(200,71,26,0.35);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn-pdf:hover {
  background: var(--fai-orange-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,71,26,0.45);
}


/* ══ TIMELINE VERTICALE FINALE ══════════════════════════════
   Approccio: flex column, linea come border-left di .tl-track,
   dot come elemento inline-block. Zero position:absolute che
   escapa il container. Zero pseudo-elementi con top/bottom.
   ═══════════════════════════════════════════════════════════ */

.tl-section {
  background-color: rgba(251,248,241,0.86);
  background-image:
    radial-gradient(ellipse at 24% 0%, rgba(216,180,91,0.14), transparent 32%),
    repeating-linear-gradient(102deg, transparent 0, transparent 84px, rgba(104,116,91,0.055) 85px, rgba(104,116,91,0.055) 86px, transparent 87px, transparent 168px);
  padding-block: var(--sp-10) var(--sp-20);
}

/* Container centralizzato */
.tl-root {
  max-width: 820px;
  margin-inline: auto;
}
/* Variante compatta per elenchi di fasi (colonna sinistra ridotta) */
.tl-root--compact .tl-left {
  width: 120px;
}
.tl-root--compact .tl-date {
  font-size: var(--text-base);
}
@media (max-width: 600px) {
  .tl-root--compact .tl-left { width: 72px; }
}

/* Lista degli step */
.tl-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Singolo step: flex row */
.tl-step {
  display: flex;
  gap: 0;
  align-items: stretch;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.tl-step.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── COLONNA SINISTRA: data ────────────────────────── */
.tl-left {
  width: 160px;
  flex-shrink: 0;
  text-align: right;
  padding-right: var(--sp-6);
  padding-top: 18px;
  padding-bottom: var(--sp-8);
}
.tl-date {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--fai-brown);
  line-height: 1.1;
  display: block;
}
.tl-place {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: var(--sp-2);
  display: block;
}

/* ── COLONNA CENTRALE: linea + dot ────────────────── */
.tl-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
}
/* Segmento superiore della linea */
.tl-seg-t {
  width: 1px;
  height: 24px;
  background: var(--fai-divider);
  opacity: 1;
  flex-shrink: 0;
}
/* Primo step: nasconde il segmento superiore */
.tl-step:first-child .tl-seg-t {
  background: transparent;
}
/* Dot — rombo dorato stile registro archivistico */
.tl-dot {
  width: 10px;
  height: 10px;
  border-radius: 0;
  transform: rotate(45deg);
  background: var(--fai-cream-2);
  border: 1.5px solid var(--fai-gold);
  box-shadow: none;
  flex-shrink: 0;
  transition: background 0.22s ease, transform 0.22s ease;
  margin-block: 3px;
}
.tl-step:hover .tl-dot {
  background: var(--fai-gold);
  transform: rotate(45deg) scale(1.25);
  box-shadow: none;
}
/* Segmento inferiore */
.tl-seg-b {
  width: 1px;
  flex: 1;
  min-height: var(--sp-8);
  background: var(--fai-divider);
  opacity: 1;
  flex-shrink: 0;
}
/* Ultimo step: nasconde il segmento inferiore */
.tl-step:last-child .tl-seg-b {
  background: transparent;
}

/* ── COLONNA DESTRA: card ─────────────────────────── */
.tl-right {
  flex: 1;
  padding-left: var(--sp-6);
  padding-bottom: var(--sp-8);
  padding-top: 14px;
}
.tl-card {
  background: transparent;
  border-radius: 0;
  padding: var(--sp-3) 0 var(--sp-6) 0;
  border-bottom: 1px solid var(--fai-divider);
  box-shadow: none;
  transition: border-color 0.24s ease;
}
.tl-step:last-child .tl-card {
  border-bottom: none;
}
.tl-step:hover .tl-card {
  border-color: var(--fai-gold);
}
.tl-card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  line-height: 1.2;
}
.tl-card-text {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.78;
}

/* ── MOBILE ──────────────────────────────────────── */
@media (max-width: 600px) {
  .tl-left {
    width: 80px;
    padding-right: var(--sp-3);
  }
  .tl-date { font-size: var(--text-base); }
  .tl-right { padding-left: var(--sp-3); }
  .tl-card { padding: var(--sp-4) var(--sp-4) var(--sp-4) calc(var(--sp-4) + var(--sp-2)); }
}

@media (max-width: 900px) {
  .story-grid,
  .source-columns {
    grid-template-columns: 1fr;
  }
  .callout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container { padding-inline: var(--sp-4); }
  .hero-title { font-size: clamp(2.6rem, 17vw, 4.4rem); }
  .hero-subtitle { font-size: var(--text-base); }
  .btn { width: 100%; justify-content: center; padding-inline: var(--sp-5); }
  .theme-toggle { width: 38px; height: 38px; }
  .nav-logo-mark { width: 150px; height: 42px; }
  .story-lead,
  .source-card,
  .callout {
    padding: var(--sp-5);
  }
  .callout-text {
    padding-left: 0;
  }
  .source-list {
    padding-left: 1rem;
  }
  .simple-footer {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .footer-meta {
    text-align: left;
    justify-self: start;
    max-width: none;
  }
}

/* ══ SEZIONE NUMERI / KPI — light guidebook ════════════════ */
.kpi-section {
  background-color: var(--map-paper);
  background-image:
    radial-gradient(ellipse at 18% 0%, rgba(216,180,91,0.10), transparent 32%),
    radial-gradient(ellipse at 82% 100%, rgba(200,71,26,0.05), transparent 36%),
    repeating-linear-gradient(118deg, transparent 0, transparent 80px, rgba(104,116,91,0.05) 81px, rgba(104,116,91,0.05) 82px, transparent 83px, transparent 160px);
  padding-block: var(--sp-16) var(--sp-20);
  overflow: hidden;
  border-top: 1px solid var(--fai-cream-3);
  border-bottom: 1px solid var(--fai-cream-3);
}
.kpi-section .section-header { margin-bottom: var(--sp-10); }
.kpi-section .section-label { color: var(--fai-orange); }
.kpi-section .section-title { color: var(--text-body); }
.kpi-section .section-intro { color: var(--text-muted); }

/* ─── BENTO GRID ───────────────────────────────────────────── */
/*
  Layout (desktop, 2 rows):
  Row 1: [HERO — 55%] [MED-1 — 22.5%] [MED-2 — 22.5%]
  Row 2: [HERO continues] [WIDE-1 — 15%] [WIDE-2 — 15%] [WIDE-3 — 15%]
*/
.bento-grid {
  display: grid;
  grid-template-columns: 55fr 22.5fr 22.5fr;
  grid-template-rows: auto auto;
  gap: 14px;
  color: var(--text-body);
}

/* CARD BASE */
.bento-card {
  background: #fff;
  border: 1px solid var(--fai-cream-3);
  border-radius: 18px;
  padding: 28px 26px;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  min-width: 0;
  box-shadow: 0 1px 2px rgba(36,51,46,0.04);
}
.bento-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.bento-card:hover {
  background: #fff;
  border-color: rgba(200,71,26,0.40);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(36,51,46,0.10);
}

/* ─── CARD HERO (mosaico) — col 1, rows 1-2 ─────── */
.bento-hero {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
  background: linear-gradient(135deg, #fff 0%, var(--fai-cream-2) 100%);
  border-color: rgba(200,71,26,0.30);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  padding: 36px 32px;
}
.bento-hero:hover {
  background: linear-gradient(135deg, #fff 0%, var(--fai-cream-2) 100%);
  border-color: rgba(200,71,26,0.55);
}

.bento-deco {
  position: absolute;
  top: -10px; right: -10px;
  width: 160px; height: 160px;
  color: var(--fai-gold-l);
  opacity: 0.22;
  pointer-events: none;
}
.bento-deco svg { width: 100%; height: 100%; }

.bento-body { position: relative; z-index: 1; }

.bento-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fai-orange);
  background: rgba(200,71,26,0.08);
  border: 1px solid rgba(200,71,26,0.25);
  border-radius: 100px;
  padding: 4px 12px;
  margin-bottom: 20px;
}

.bento-hero .bento-num {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 5.5vw, 5.5rem);
  font-weight: 300;
  color: var(--fai-orange);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.bento-hero .bento-num sup {
  font-size: 0.4em;
  vertical-align: super;
}
.bento-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 320px;
}

/* ─── CARD MEDIE — col 2-3, row 1 ─────────────────── */
.bento-med {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fai-orange);
  opacity: 0.95;
}
.bento-eyebrow svg {
  width: 16px; height: 16px;
  stroke: var(--fai-orange);
  flex-shrink: 0;
}

/* ── CTA SEZIONI — griglia percorso ──────────────────── */
.sections-cta {
  background-color: var(--fai-cream);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(200,71,26,0.06), transparent 55%),
    repeating-linear-gradient(90deg, transparent 0, transparent 60px, rgba(104,116,91,0.04) 61px, rgba(104,116,91,0.04) 62px, transparent 63px, transparent 120px);
  padding-block: var(--sp-16) var(--sp-20);
  border-top: 1px solid var(--fai-cream-3);
  border-bottom: 1px solid var(--fai-cream-3);
}
.sections-cta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: var(--sp-5);
  margin-top: var(--sp-10);
}
.section-cta-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
  padding: var(--sp-6) var(--sp-4);
  background: #fff;
  border: 1px solid var(--fai-cream-3);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 12px rgba(42,28,14,0.06);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.section-cta-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--fai-orange);
}
.section-cta-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  color: var(--fai-orange);
  line-height: 1;
  letter-spacing: -0.02em;
}
.section-cta-icon {
  width: 48px; height: 48px;
  color: var(--fai-brown);
  flex-shrink: 0;
}
.section-cta-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--fai-brown);
  line-height: 1.25;
}
.section-cta-era {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fai-orange);
}
.section-cta-desc {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
}
@media (max-width: 640px) {
  .sections-cta-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-3);
  }
  .section-cta-desc { display: none; }
}

.bento-num--lg {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  font-weight: 400;
  color: var(--fai-brown);
  line-height: 1;
  letter-spacing: -0.02em;
}

.bento-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.5;
}
.bento-wide .bento-label {
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: none;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ─── CARD WIDE (orizzontali) — col 2-3, row 2 ──────
   3 wide cards split col 2-3 (= 45fr total) into thirds
   Use sub-grid via a nested row ─────────────────────── */
.bento-row2 {
  grid-column: 2 / 4;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.bento-wide {
  background: #fff;
  border: 1px solid var(--fai-cream-3);
  border-radius: 18px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(36,51,46,0.04);
}
.bento-wide:hover {
  background: #fff;
  border-color: rgba(200,71,26,0.40);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(36,51,46,0.10);
}

.bento-side-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  color: var(--fai-orange);
  opacity: 0.85;
  margin-bottom: 4px;
}
.bento-side-icon svg { width: 100%; height: 100%; }

.bento-side-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }

.bento-num--md {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  font-weight: 400;
  color: var(--fai-brown);
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 960px) {
  .bento-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; }
  .bento-hero { grid-column: 1 / 3; grid-row: 1; min-height: 220px; }
  .bento-med:nth-child(2) { grid-column: 1; grid-row: 2; }
  .bento-med:nth-child(3) { grid-column: 2; grid-row: 2; }
  .bento-row2 { grid-column: 1 / 3; grid-row: 3; grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 560px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-hero { grid-column: 1; grid-row: auto; min-height: 180px; padding: 24px 20px; }
  .bento-med:nth-child(2), .bento-med:nth-child(3) { grid-column: 1; grid-row: auto; }
  .bento-row2 { grid-column: 1; grid-row: auto; grid-template-columns: 1fr 1fr; }
  .bento-wide:last-child { grid-column: 1 / 3; }
  .bento-hero .bento-num { font-size: clamp(3rem, 12vw, 4rem); }
  .bento-deco { width: 100px; height: 100px; }
  .bento-wide { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================================================
   MOSAIC SECTION — I numeri che orientano il racconto
   ============================================================ */
.mosaic-section {
  position: relative;
  padding: var(--sp-16) 0 var(--sp-20);
  overflow: hidden;
}

/* ---- BACKGROUND LAYERS ---- */
.mosaic-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Layer 1: pattern tessere geometriche */
.mosaic-bg-pattern {
  position: absolute;
  inset: 0;
  background:
    /* tessere quadrate sfalsate */
    repeating-linear-gradient(
      90deg,
      transparent 0, transparent 38px,
      rgba(184,138,42,0.04) 38px, rgba(184,138,42,0.04) 40px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0, transparent 38px,
      rgba(184,138,42,0.04) 38px, rgba(184,138,42,0.04) 40px
    ),
    /* tessere diagonali sottili */
    repeating-linear-gradient(
      45deg,
      transparent 0, transparent 26px,
      rgba(199,71,26,0.025) 26px, rgba(199,71,26,0.025) 28px
    ),
    /* base scura */
    #121814;
}

/* Layer 2: foto del mosaico del museo */
.mosaic-bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 40%;
  background-attachment: fixed;
  opacity: 0.48;
  filter: saturate(0.95) contrast(1.05);
  mix-blend-mode: normal;
}

/* Layer 3: velatura per leggibilità + sfumatura bordi */
.mosaic-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    #121814 0%,
    rgba(18, 24, 20, 0.48) 12%,
    rgba(18, 24, 20, 0.58) 42%,
    rgba(18, 24, 20, 0.52) calc(100% - 100px),
    #121814 100%
  );
}

/* Container sits above background */
.mosaic-section .container--wide {
  position: relative;
  z-index: 1;
}

/* Section header */
.mosaic-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}
.mosaic-header .section-intro {
  max-width: 58ch;
  margin: 0.6rem auto 0;
  font-size: var(--text-prose);
  line-height: 1.65;
}

/* ---- MOSAIC LAYOUT: tessere bilanciate per viewport ---- */
.mosaic-grid {
  --mosaic-gap: 12px;
  --mosaic-tile-basis: calc((100% - 36px) / 4);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--mosaic-gap);
  align-items: stretch;
}

/* ---- BASE TILE ---- */
.mosaic-tile {
  position: relative;
  flex: 0 1 var(--mosaic-tile-basis);
  max-width: var(--mosaic-tile-basis);
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.32rem;
  background: rgba(28, 36, 30, 0.70);
  border: 1px solid rgba(184, 138, 42, 0.18);
  border-radius: 10px;
  padding: 1.25rem 1.3rem 1.35rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: rgba(253, 246, 227, 0.88);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;

  /* Initial hidden/scattered state */
  opacity: 0;
  transform: scale(0.68) translateY(28px) rotate(var(--mosaic-tilt, 0deg));
  transition:
    opacity 0.55s ease,
    transform 0.55s cubic-bezier(0.34, 1.42, 0.64, 1),
    border-color 0.3s ease,
    background 0.3s ease;
}
.mosaic-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(ellipse at 25% 0%, rgba(199, 71, 26, 0.06), transparent 65%),
    linear-gradient(135deg, rgba(247, 212, 136, 0.055) 0 1px, transparent 1px 13px),
    linear-gradient(45deg, rgba(253, 246, 227, 0.035) 0 1px, transparent 1px 17px);
  pointer-events: none;
}
.mosaic-tile > * {
  position: relative;
  z-index: 1;
}
.mosaic-tile:hover {
  border-color: rgba(184, 138, 42, 0.50);
  background: rgba(36, 46, 38, 0.80);
}
.mosaic-tile:focus-visible {
  outline: 2px solid rgba(247, 212, 136, 0.85);
  outline-offset: 4px;
}

/* Tile composition: visible state */
.mosaic-tile.in-view {
  opacity: 1;
  transform: scale(1) translateY(0) rotate(0deg);
}

/* ---- TILE SIZE VARIANTS: accenti visivi, non tessere giganti ---- */
.mosaic-tile--2x2,
.mosaic-tile--2x1,
.mosaic-tile--wide {
  min-height: 162px;
}

/* ---- ACCENT VARIANTS ---- */
.mosaic-tile--accent {
  background: rgba(199, 71, 26, 0.18);
  border-color: rgba(199, 71, 26, 0.40);
}
.mosaic-tile--accent2 {
  background: rgba(36, 51, 46, 0.72);
  border-color: rgba(184, 138, 42, 0.40);
}
.mosaic-tile--dark {
  background: rgba(15, 20, 17, 0.78);
}

/* ---- TILE CONTENT ---- */
.mt-eyebrow {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fai-gold, #B78A2A);
  margin-bottom: 0.55rem;
  opacity: 0.85;
}
.mt-num {
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.04;
  color: #fdf6e3;
  letter-spacing: 0;
  margin-bottom: 0.18rem;
}
.mosaic-tile--2x2 .mt-num {
  font-size: clamp(2.45rem, 4.4vw, 3.75rem);
}
.mosaic-tile--2x1 .mt-num {
  font-size: clamp(2.35rem, 4vw, 3.45rem);
}
.mt-unit {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fai-orange, #C8471A);
  margin-top: 0.18rem;
  margin-bottom: 0.65rem;
}
.mt-desc {
  font-size: 0.80rem;
  line-height: 1.5;
  color: rgba(253, 246, 227, 0.62);
  margin: 0.1rem 0 0;
}
.mt-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fai-gold, #B78A2A);
  text-decoration: none;
  border-bottom: 1px solid rgba(184, 138, 42, 0.30);
  transition: color 0.2s, border-color 0.2s;
}
.mt-link:hover {
  color: var(--fai-orange, #C8471A);
  border-color: var(--fai-orange, #C8471A);
}

/* Horizontal number row (--wide tiles) */
.mt-num-horiz {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 0.95rem;
  font-family: var(--font-display, 'Cormorant Garamond', serif);
  font-size: clamp(1.35rem, 2.4vw, 1.95rem);
  font-weight: 600;
  color: #fdf6e3;
  margin: 0.35rem 0 0.7rem;
}
.mt-num-horiz em {
  font-style: normal;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fai-orange, #C8471A);
  display: block;
  margin-top: 0.05rem;
}
.mt-sep {
  color: rgba(184, 138, 42, 0.35);
  font-size: 0.6rem;
  align-self: center;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
  .mosaic-grid { --mosaic-tile-basis: calc((100% - 24px) / 3); }
}
@media (max-width: 768px) {
  .mosaic-grid { --mosaic-gap: 10px; --mosaic-tile-basis: calc((100% - 10px) / 2); }
  .mosaic-bg-photo { background-attachment: scroll; }
}
@media (max-width: 480px) {
  .mosaic-grid { --mosaic-tile-basis: 100%; }
  .mosaic-tile { max-width: 100%; }
}

/* ============================================================
   FORMATI SECTION � Tre vie per scoprire Antium (Web / PDF / Podcast)
   ============================================================ */
.section--paper {
  background: linear-gradient(180deg, #fbf5e9 0%, #f6edda 100%);
}
.formati-section { padding-block: var(--sp-16); }
.formati-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-10);
}
.formato-card {
  background: #fffdf7;
  border: 1px solid rgba(124, 84, 50, 0.15);
  border-radius: var(--r-md, 10px);
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  box-shadow: 0 2px 6px rgba(124, 84, 50, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.formato-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(124, 84, 50, 0.12);
  border-color: rgba(200, 71, 26, 0.4);
}
.formato-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #C8471A;
  background: rgba(200, 71, 26, 0.08);
  border-radius: 50%;
}
.formato-icon svg { width: 32px; height: 32px; }
.formato-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: #3a2a17;
  margin: 0;
  font-weight: 600;
}
.formato-text {
  color: #5a4a36;
  line-height: 1.6;
  margin: 0;
  font-size: var(--text-base, 1rem);
}
.formato-link {
  margin-top: auto;
  align-self: flex-start;
  color: #C8471A;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid rgba(200, 71, 26, 0.3);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.formato-link:hover { border-color: #C8471A; }
@media (max-width: 880px) {
  .formati-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RICHIAMI SECTION � Nove porte verso le sezioni
   ============================================================ */
.richiami-section { padding-block: var(--sp-16); }
.richiami-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-10);
}
.richiamo-card {
  position: relative;
  background: #fffdf7;
  border: 1px solid rgba(124, 84, 50, 0.18);
  border-left: 4px solid #C8471A;
  border-radius: var(--r-md, 10px);
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 2px 6px rgba(124, 84, 50, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.richiamo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(124, 84, 50, 0.14);
}
.richiamo-numero {
  position: absolute;
  top: 0.8rem;
  right: 1.1rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: rgba(200, 71, 26, 0.35);
  letter-spacing: 0.05em;
}
.richiamo-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: #8a6d4a;
  margin: 0;
  font-weight: 600;
}
.richiamo-titolo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  color: #3a2a17;
  margin: 0.15rem 0 0.3rem;
  font-weight: 600;
  line-height: 1.2;
}
.richiamo-hook {
  color: #4f4030;
  line-height: 1.6;
  margin: 0 0 0.4rem;
  font-size: 0.98rem;
}
.richiamo-links {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(124, 84, 50, 0.2);
}
.richiamo-link {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}
.richiamo-link--web {
  color: #fff;
  background: #C8471A;
}
.richiamo-link--web:hover { background: #a83a14; }
.richiamo-link--pdf {
  color: #7a4a1a;
  background: rgba(200, 71, 26, 0.10);
}
.richiamo-link--pdf:hover { background: rgba(200, 71, 26, 0.20); }
.richiamo-link--audio {
  color: #2a4a3a;
  background: rgba(60, 110, 80, 0.12);
}
.richiamo-link--audio:hover { background: rgba(60, 110, 80, 0.22); }

@media (max-width: 1100px) {
  .richiami-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .richiami-grid { grid-template-columns: 1fr; }
}

/* Intro section: sottotitolo full-width e body senza box */
.intro-section .section-header { max-width: none; }
.intro-section .section-intro { max-width: none; }
.intro-body {
  margin: 0 0 var(--sp-8);
}
.intro-body p {
  font-size: var(--text-prose);
  color: var(--text-body);
  line-height: 1.7;
  margin: 0 0 var(--sp-4);
}

@media (max-width: 480px) {
  .intro-body p,
  .section-intro,
  .article-body p,
  .article-body ul li {
    font-size: 0.92rem;
    line-height: 1.65;
  }
}

.intro-section .intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: var(--sp-8);
  align-items: start;
  margin-top: var(--sp-6);
}
.intro-section .intro-body { margin: 0; }
@media (max-width: 860px) {
  .intro-section .intro-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   CROSSLINK — rimandi tra sezioni con anteprima a pergamena
   Parola chiave tratteggiata → box che si apre dall'alto al
   basso, nello stesso stile dei popup dei crediti.
   ============================================================ */
.crosslink {
  color: var(--fai-brown-m);
  text-decoration: none;
  border-bottom: 1px dashed var(--fai-orange);
  text-underline-offset: 3px;
  cursor: pointer;
  font-weight: 500;
  transition: color var(--transition), border-color var(--transition);
}
.crosslink:hover,
.crosslink:focus-visible {
  color: var(--fai-orange-d);
  border-bottom-color: var(--fai-orange-d);
  outline: none;
}
.crosslink::after {
  content: '◇';
  font-size: 0.62em;
  vertical-align: 0.35em;
  margin-left: 0.18em;
  color: var(--fai-gold);
}

.crosslink-pop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  width: min(340px, calc(100vw - 28px));
  background-color: #efe0b2;
  background-image:
    repeating-linear-gradient(180deg, transparent 0px, transparent 27px, rgba(140,90,40,0.07) 27px, rgba(140,90,40,0.07) 28px),
    linear-gradient(90deg, rgba(170,100,50,0.10) 0px, rgba(170,100,50,0.10) 1px, transparent 1px);
  border: 1px solid rgba(110,75,25,0.30);
  border-radius: var(--r-md, 10px);
  box-shadow: 0 18px 40px rgba(38,22,8,0.28);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.crosslink-pop.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.crosslink-pop::before {
  content: '';
  position: absolute;
  top: -7px;
  left: var(--cross-arrow, 24px);
  width: 12px;
  height: 12px;
  background: #efe0b2;
  border-left: 1px solid rgba(110,75,25,0.30);
  border-top: 1px solid rgba(110,75,25,0.30);
  transform: rotate(45deg);
}
.crosslink-pop.above::before {
  top: auto;
  bottom: -7px;
  border-left: none;
  border-top: none;
  border-right: 1px solid rgba(110,75,25,0.30);
  border-bottom: 1px solid rgba(110,75,25,0.30);
}
.crosslink-pop-eyebrow {
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: rgba(38,22,8,0.55);
  margin: 0 0 var(--sp-2);
}
.crosslink-pop-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.28rem;
  font-weight: 600;
  color: #261608;
  line-height: 1.2;
  margin: 0 0 var(--sp-2);
}
.crosslink-pop-note {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #4f4030;
  margin: 0 0 var(--sp-3);
}
.crosslink-pop-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--fai-orange-d);
  text-decoration: none;
  padding-top: var(--sp-3);
  border-top: 1px dashed rgba(124,84,50,0.25);
  width: 100%;
}
.crosslink-pop-cta:hover { color: var(--fai-orange); }
.crosslink-pop-cta::after {
  content: '→';
  transition: transform 0.2s ease;
}
.crosslink-pop-cta:hover::after { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .crosslink-pop { transition: opacity 0.15s ease; transform: none; }
  .crosslink-pop.open { transform: none; }
}


/* Tipografia fine: titoli bilanciati, paragrafi senza righe orfane */
.hero-title, .section-title, .article-body h2, .article-body h3, .article-body h4, .callout-label {
  text-wrap: balance;
}
.article-body p, .intro-body p, .callout-text, .article-figure figcaption {
  text-wrap: pretty;
}

/* ============================================================
   STAMPA — le guide si stampano: testo nero su bianco, niente
   interfaccia, callout e figure non spezzati tra le pagine.
   ============================================================ */
@media print {
  .site-header, .hero-actions, .hero-eras, .back-to-top, .lightbox,
  .brand-search, .nav-menu-btn, .mobile-search-panel { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .hero, .section, .mosaic-section, .tl-section { background: #fff !important; }
  .hero-bg, .hero-overlay, .mosaic-bg { display: none !important; }
  .hero-title, .hero-subtitle, .hero-meta, .section-title, .section-intro,
  .mosaic-header .section-title, .mosaic-header .section-intro { color: #000 !important; }
  .callout, .article-figure, .quote-block, .table-wrap, .tl-card {
    break-inside: avoid;
    box-shadow: none !important;
  }
  .article-body p, .intro-body p, .callout-text { color: #000 !important; }
  a { color: #000 !important; text-decoration: underline; }
  .article-figure img { box-shadow: none !important; max-height: 18cm; }
}


/* ============================================================
   PAGER DI SEZIONE — precedente / successiva in fondo a ogni
   pagina, per percorrere il sito senza tornare in home.
   ============================================================ */
.section-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--sp-8) var(--sp-6) var(--sp-4);
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-5) var(--sp-6);
  background: var(--fai-cream-2, #f6efe2);
  border: 1px solid rgba(122, 88, 56, 0.18);
  border-radius: var(--r-md);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.pager-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
  border-color: var(--fai-orange, #C8471A);
}
.pager-link--next { text-align: right; align-items: flex-end; }
.pager-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pager-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--text-primary);
  text-wrap: balance;
}
@media (max-width: 640px) {
  .section-pager { grid-template-columns: 1fr; }
  .pager-link--next { text-align: left; align-items: flex-start; }
}

/* Data di ultimo aggiornamento della pagina (stampigliata da scripts/stamp_updates.py) */
.page-updated {
  text-align: center;
  font-size: var(--text-xs);
  font-style: italic;
  color: var(--text-muted);
  margin: var(--sp-2) auto var(--sp-10);
  padding: 0 var(--sp-6);
}
@media print { .section-pager { display: none !important; } }


/* ============================================================
   LEMMI — glossario interattivo: ville dai nomi stratificati e
   termini tecnici spiegati in poche parole. Diamante dorato + testo
   dorato con puntini dorati, in un unico colore (--fai-gold) — anche
   in hover. Popup a pergamena condiviso con i crosslink.
   I rimandi tra sezioni (.crosslink) restano invece tratteggiati in
   arancio, per non confondere le due funzioni.
   ============================================================ */
.lemma {
  color: var(--fai-gold, #b78a2a);
  font-weight: 500;
  text-decoration: underline dotted var(--fai-gold, #b78a2a);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
  cursor: help;
  transition: background-color var(--transition), box-shadow var(--transition);
}
.lemma::before {
  content: "◆";
  color: var(--fai-gold, #b78a2a);
  font-size: 0.78em;
  margin-right: 0.28em;
  vertical-align: 0.08em;
  opacity: 0.95;
  transition: opacity var(--transition);
}
.lemma:hover,
.lemma:focus-visible {
  color: var(--fai-gold, #b78a2a);
  text-decoration-color: var(--fai-gold, #b78a2a);
  background-color: rgba(183, 138, 42, 0.10);
  box-shadow: 0 0 0 2px rgba(183, 138, 42, 0.10);
  border-radius: 3px;
  outline: none;
}
.lemma:hover::before,
.lemma:focus-visible::before {
  opacity: 1;
}
/* Le voci dentro <em> (corsivo) restano corsive: la regola .lemma
   non altera lo stile tipografico dell'elemento ospite. */
.crosslink-pop-rows {
  margin: var(--sp-3) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(110,75,25,0.18);
}
.crosslink-pop-rows li {
  display: grid;
  grid-template-columns: minmax(64px, auto) 1fr;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid rgba(110,75,25,0.12);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: #4a3217;
}
.crosslink-pop-rows li:last-child { border-bottom: none; }
.crosslink-pop-rows .lemma-quando {
  font-family: var(--font-display);
  font-weight: 600;
  white-space: nowrap;
  color: var(--fai-brown, #6b4423);
}
@media print {
  .lemma { background: none; color: inherit; font-weight: inherit; text-decoration: none; cursor: auto; box-shadow: none; }
  .lemma::before { content: none; }
}
