@font-face {
  font-family: "Misteria Serif";
  src: url("media/fonts/noto-serif-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Misteria Serif";
  src: url("media/fonts/noto-serif-bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

/* The soft visual language is shared by the public pages. */
:root {
  --navy: #293c35;
  --ink: #293c35;
  --blue: #466c64;
  --cyan: #a7d0c9;
  --lime: #e5ead1;
  --coral: #e3a18a;
  --paper: #faf7ef;
  --white: #fffdf8;
  --ice: #eaf1ed;
  --muted: #52645c;
  --line: #d4d9cb;
  --font-display: "Misteria Serif", Georgia, serif;
  --font-text: "Manrope", system-ui, sans-serif;
  --soft-shadow: 0 16px 30px rgba(61, 69, 56, .12), 0 3px 7px rgba(61, 69, 56, .07);
}
html { scroll-padding-top: 6rem; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-text); line-height: 1.65; }
main { overflow: clip; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #3d7974; outline-offset: 4px; }
h1, h2, h3, .project-title, .production-card h3, .workers-placeholder h3 {
  color: var(--ink); font-family: var(--font-display); font-weight: 700;
  text-transform: none; letter-spacing: -.02em; line-height: 1.12;
}
h1 { font-size: clamp(3.2rem, 6vw, 6.15rem); max-width: 14ch; overflow-wrap: normal; }
h2, .content h2 { font-size: clamp(2.45rem, 4.2vw, 4.35rem); line-height: 1.12; }
h3 { font-size: clamp(1.35rem, 2.1vw, 2rem); }
.eyebrow, .kicker, .content .kicker, .section-head .kicker, .school-teaser .kicker, .marchesa .kicker {
  display: inline-block; max-width: 100%; padding: 0; border: 0; background: transparent;
  color: #405e4b; font-family: var(--font-text); font-size: .78rem;
  font-weight: 800; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase;
}
.intro, .lead, .prose p, .intro-copy, .about-copy p { color: #40554a; }
.quote, .content .quote {
  border-left: 3px solid #c6a68e; color: var(--ink); font-family: var(--font-display);
  font-weight: 400; font-style: italic; line-height: 1.4;
}

/* Navigation: calm paper and a typographic wordmark. */
.site-header { background: rgba(250, 247, 239, .97); color: var(--ink); border-bottom: 1px solid #d9dfd3; backdrop-filter: blur(12px); }
.site-header .nav { min-height: 5.2rem; height: auto; }
.site-header .brand { color: var(--ink); gap: 0; font-family: var(--font-display); font-size: 2.05rem; font-weight: 400; letter-spacing: -.065em; line-height: 1; }
.site-header .brand img { display: none; }
.site-header .brand span { display: inline !important; text-transform: lowercase; }
.site-header .brand small { font: 800 .55rem/1 var(--font-text); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; margin-left: .3rem; }
.site-header .site-menu { gap: .86rem; }
.site-header .site-menu>li>a, .site-header summary { color: var(--ink); font-size: .82rem; font-weight: 750; }
.site-header .site-menu>li>a:hover, .site-header summary:hover, .site-header .site-menu>li>a[aria-current=page] { color: #527f75; }
.site-header .site-menu>li>a[href="news-e-social.html"] {
  display: inline-block; padding: .45rem .7rem; border-radius: 999px;
  background: #d9eae7; box-shadow: inset 0 0 0 1px #b4d0c9;
}
.site-header .site-menu>li>a[href="news-e-social.html"]:hover,
.site-header .site-menu>li>a[href="news-e-social.html"][aria-current=page] { background: #bddbd5; color: var(--ink); }
.site-header .site-submenu { border: 1px solid #d8d8c8; border-radius: 1rem; background: #fffdf8; box-shadow: var(--soft-shadow); padding: .45rem; }
.site-header .site-submenu a { border-radius: .6rem; color: var(--ink); }
.site-header .site-submenu a:hover, .site-header .site-submenu a:focus-visible { background: #e7f0e7; color: var(--ink); }
.site-header .site-menu a:focus-visible, .site-header summary:focus-visible, .site-menu-toggle:focus-visible { outline-color: #558a7c; }
.site-menu-toggle { border-color: var(--ink); border-radius: 999px; color: var(--ink); }

/* Shared paper, rounded photographs, and low shadows. */
.button, .content .button {
  border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fffdf8;
  box-shadow: 0 8px 15px rgba(38, 60, 49, .16); padding: .9rem 1.35rem;
  font-weight: 800; letter-spacing: .02em; text-transform: none;
}
.button:hover, .content .button:hover { border-color: #42675e; background: #42675e; color: white; box-shadow: 0 11px 20px rgba(38, 60, 49, .2); transform: translateY(-2px); }
.button.light { border-color: #a7b9a9; background: rgba(255, 253, 248, .55); color: var(--ink); box-shadow: none; }
.button.light:hover { border-color: #67877b; background: #eff4ed; color: var(--ink); }
.photo-letter { display: none !important; }
.photo-frame, .page-hero figure, .about-photo, .school-teaser figure, .story-grid figure, .content .story-grid figure,
.content .poster-sheet, .content .poster-banner, .content .documentary-wide, .content .documentary-sheet,
.education-photo, .school-project-photos figure, .appointment-visual, .project-gallery figure, .asset-gallery figure {
  border: 0; border-radius: 2.1rem 3.8rem 2.4rem 3.1rem / 2.5rem 2rem 3.7rem 2.4rem;
  overflow: hidden; background: #e9eee7; box-shadow: var(--soft-shadow); transform: none;
}
.photo-frame img, .page-hero figure img, .story-grid figure img, .education-photo img, .project-gallery img { border: 0; }
.photo-frame::before, .page-hero figure::before, .about-photo::before, .school-teaser figure::before { display: none; }
.photo-frame:nth-child(even), .card:nth-child(even) .photo-frame, .project-gallery figure:nth-child(even) {
  border-radius: 3.5rem 2.2rem 3.8rem 2rem / 2.3rem 3.6rem 2.2rem 3.2rem;
}
.page-hero figcaption, .story-grid figcaption, .education-photo figcaption, .content .story-grid figcaption {
  background: #fffdf8; color: var(--muted); padding: .65rem 1rem; font-size: .77rem;
}
.content .documentary-wide img, .content .poster-sheet img, .content .poster-banner img { border-radius: inherit; }

/* Each page may show one enlarged detail drawn from its own imagery. */
.page-hero { position: relative; isolation: isolate; overflow: hidden; background: radial-gradient(circle at 84% 30%, #e7efea 0, transparent 37%), linear-gradient(115deg, #faf7ef 10%, #f5e9dc 100%); color: var(--ink); border: 0; padding: clamp(3.4rem, 6vw, 5.4rem) 0; }
.page-hero>.wrap { position: relative; z-index: 1; }
.page-hero h1, .page-hero .lead, .page-hero .hero-tagline { color: var(--ink); text-transform: none; }
.page-hero h1 { font-size: clamp(3.1rem, 5.6vw, 5.8rem); line-height: 1.12; max-width: 14ch; }
.page-hero h1 + .lead { margin-top: .7rem; }
.body-project .page-hero h1, .sam-project .page-hero h1 { font-size: clamp(3.1rem, 5.15vw, 5.3rem); max-width: 15ch; }
.page-hero .lead { max-width: 38rem; line-height: 1.55; }
.page-hero figure, .page-hero .photo-frame { border: 0; border-radius: 2.4rem 4.4rem 2.7rem 3.5rem / 2.4rem 2.3rem 3.8rem 3rem; box-shadow: var(--soft-shadow); transform: rotate(1deg); }
.page-hero figure img { filter: none; }
.page-hero[data-motif] .page-hero-grid>figure { margin-top: clamp(8rem, 11vw, 10rem); }
.page-hero::after {
  content: ""; position: absolute; z-index: 0; width: min(40vw, 34rem); aspect-ratio: 1;
  right: max(1rem, calc((100vw - 1200px)/2 + 3rem)); top: -1.8rem;
  background: var(--motif-image) center / contain no-repeat; opacity: .84;
  filter: drop-shadow(11px 16px 16px rgba(48, 66, 54, .15)); pointer-events: none;
}
.page-hero:not([data-motif])::after { display: none; }
.page-hero[data-spine]::before {
  content: attr(data-spine); position: absolute; z-index: 2; top: clamp(4rem, 7vw, 6rem);
  left: max(.35rem, calc((100vw - var(--max))/2 - 4.25rem)); max-height: 19rem;
  writing-mode: vertical-rl; padding: 1.2rem .72rem; border-radius: .85rem .85rem .55rem .55rem;
  background: var(--spine-color, #d58e78); color: var(--ink); box-shadow: 4px 7px 14px rgba(51, 54, 45, .18);
  font: 700 1rem/1 var(--font-display); letter-spacing: 0; pointer-events: none;
}
.m-education { --motif-image: url("media/motifs/mask.svg"); --spine-color: #b2a0be; }
.m-sportello { --motif-image: url("media/motifs/marker.svg"); --spine-color: #dfad70; }
.m-body { --motif-image: url("media/motifs/hand.svg"); --spine-color: #89afa9; }
.m-news { --motif-image: url("media/motifs/whale.svg"); --spine-color: #89b4c5; }
.m-events, .m-halloween { --motif-image: url("media/motifs/pumpkin.svg"); --spine-color: #d99b79; }
.m-sam { --motif-image: url("media/motifs/fabric.svg"); --spine-color: #96b8b0; }
.m-babonzo { --motif-image: url("media/motifs/nose.svg"); --spine-color: #94b98c; }
.m-fam { --motif-image: url("media/motifs/hand.svg"); --spine-color: #d39b8a; }
.m-marchesa, .m-peace, .m-peace-presentation { --motif-image: url("media/motifs/arch.svg"); --spine-color: #d49b7e; }
.m-cantafavole { --motif-image: url("media/motifs/guitar.svg"); --spine-color: #c8aa73; }
.m-scuole { --motif-image: url("media/motifs/mask.svg"); --spine-color: #ac9cc3; }
.m-lumo { --spine-color: #9bb9a4; }
.m-io { --spine-color: #dcae76; }
.m-partners { --spine-color: #a8b7a1; }
.m-news .page-hero::after { width: min(59vw, 49rem); top: -1.8rem; right: -2%; opacity: .63; }
.m-body .page-hero::after { width: min(40vw, 32rem); right: 4%; top: -1.8rem; opacity: .57; }
.m-education .page-hero::after { width: min(39vw, 32rem); right: 5%; top: -5rem; opacity: .70; transform: rotate(-8deg); }
.m-events .page-hero::after, .m-halloween .page-hero::after { width: min(37vw, 31rem); right: 4%; }
.m-cantafavole .page-hero::after { width: min(30vw, 25rem); right: 7%; }
.m-babonzo .page-hero::after { opacity: .61; }
.m-fam .page-hero::after { opacity: .55; transform: rotate(-15deg); }

/* Home: readable story, real navigation spines, and the project photographs. */
.m-home .hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(3rem, 6vw, 5.4rem) 0 3rem; background: radial-gradient(circle at 88% 32%, #e4f0e8 0, transparent 40%), linear-gradient(115deg, #faf7ef 10%, #f5e7da 100%); color: var(--ink); border: 0; }
.m-home .hero::before {
  content: ""; position: absolute; z-index: 0; width: min(56vw, 44rem); aspect-ratio: 1;
  top: -.8rem; right: max(-7rem, calc((100vw - 1300px)/2 - 2rem));
  background: url("media/motifs/ring.svg") center / contain no-repeat; opacity: .72;
  filter: drop-shadow(8px 13px 14px rgba(53, 88, 77, .16)); pointer-events: none;
}
.m-home .hero-grid { position: relative; z-index: 1; grid-template-columns: 1.2fr .8fr; gap: clamp(1.5rem, 5vw, 5rem); min-height: 32rem; }
.m-home .hero-copy { max-width: 42rem; }
.m-home .hero h1 { max-width: 12.5ch; font-size: clamp(3.5rem, 6.15vw, 6.5rem); line-height: 1.12; color: var(--ink); }
.m-home .hero h1 { font-weight: 700; letter-spacing: -.025em; }
.m-home .hero .eyebrow { color: #506d58; }
.m-home .hero-copy .lead { max-width: 32rem; margin-top: 1.9rem; color: #43574d; font-size: clamp(1.1rem, 1.7vw, 1.4rem); line-height: 1.55; }
.m-spines { display: flex; align-items: flex-end; justify-content: center; gap: clamp(.35rem, 1vw, .85rem); min-width: 0; min-height: 27rem; padding: 1.2rem .1rem 1.8rem; }
.m-spine { position: relative; display: flex; align-items: flex-start; justify-content: center; width: clamp(4.2rem, 6vw, 5.6rem); height: clamp(17.4rem, 26vw, 22rem); padding: 1.3rem .6rem; border: 1px solid rgba(255,255,255,.5); border-radius: 1rem 1.15rem .72rem .8rem; color: var(--ink); box-shadow: inset 5px 0 8px rgba(255,255,255,.25), inset -5px 0 7px rgba(71,69,54,.12), 7px 12px 20px rgba(52, 64, 51, .2); font: 700 clamp(1.1rem, 1.6vw, 1.45rem)/1.1 var(--font-display); text-decoration: none; writing-mode: vertical-rl; transition: transform .2s ease, box-shadow .2s ease; }
.m-spine:hover { transform: translateY(-8px) rotate(0deg); box-shadow: 9px 18px 23px rgba(52,64,51,.23); }
.m-spine-education { background: #e9a763; transform: rotate(-5deg) translateY(4px); }
.m-spine-body { background: #b7d3d9; transform: rotate(-1.5deg) translateY(-6px); }
.m-spine-events { background: #69784e; color: #fffdf5; transform: rotate(3deg); }
.m-cover { display: block; flex: 0 0 clamp(4.3rem, 6vw, 6rem); margin-left: .35rem; margin-bottom: 1.7rem; transform: rotate(7deg); border-radius: .5rem; box-shadow: 7px 12px 18px rgba(52, 64, 51, .22); transition: transform .2s ease; }
.m-cover:hover { transform: translateY(-7px) rotate(2deg); }
.m-cover img { width: 100%; aspect-ratio: 1161/1641; object-fit: cover; border-radius: .5rem; }
.m-home-stories { position: relative; z-index: 1; padding: 2.2rem 0 .7rem; border-top: 1px solid #d2d8c9; }
.m-home-stories h2 { margin: .35rem 0 1.5rem; font-size: clamp(2.2rem, 3.4vw, 3.5rem); }
.m-story-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
.m-story-card { min-width: 0; margin: 0; }
.m-story-card a { display: block; color: var(--ink); text-decoration: none; }
.m-story-card img { display: block; width: 100%; height: clamp(13rem, 20vw, 18rem); min-height: 0; object-fit: cover; border-radius: 2.2rem 3.8rem 2.8rem 3rem / 2.4rem 2.2rem 3.7rem 2.9rem; box-shadow: var(--soft-shadow); }
.m-story-card:nth-child(2) img { border-radius: 3.8rem 2.1rem 3.4rem 2.6rem / 2.3rem 3.6rem 2.2rem 3rem; }
.m-story-card figcaption { padding: .75rem .35rem 0; font: 700 1.2rem/1.3 var(--font-display); }
.m-story-card a:hover figcaption { text-decoration: underline; text-underline-offset: .25em; }
.m-home .stats { position: relative; z-index: 1; max-width: var(--max); margin: 3rem auto 0; border: 0; border-radius: 1.5rem; background: #e7eedf; color: var(--ink); box-shadow: 0 8px 20px rgba(62,75,58,.08); }
.m-home .stats-grid { width: 100%; }
.m-home .stat { border-color: #cbd8c6; padding: 1.45rem; }
.m-home .stat strong { font-family: var(--font-display); font-weight: 400; }
.m-home .stat strong { letter-spacing: -.035em; }
.m-home .stat span { font-weight: 700; letter-spacing: .01em; text-transform: none; }
.manifesto-ribbon { border: 0; background: #e8f0e7; color: var(--ink); padding: 1.2rem 0; font: italic 400 clamp(1.25rem, 2vw, 1.7rem)/1.4 var(--font-display); letter-spacing: 0; text-transform: none; }
.manifesto-ribbon span { color: #c88370; }

/* Interior sections share the palette without repeating the motif. */
.m-home #chi-siamo { position: relative; background: #f5eee4; }
.m-home #chi-siamo .wrap { position: relative; z-index: 1; }
.m-home #progetti, #progetti { background: #eaf1e8; color: var(--ink); }
#progetti h2, #progetti .intro { color: var(--ink); }
.project-card, .project-card:first-child, .project-card:last-child {
  border: 0; border-radius: 1.35rem; background: #fffaf1; color: var(--ink);
  padding: 1.1rem 1.1rem 1.5rem; box-shadow: var(--soft-shadow); min-height: 0;
}
.project-card:nth-child(2) { background: #f6e7da; }
.project-card .project-image { border: 0; border-radius: 1.4rem 2.6rem 1.9rem 2.2rem; }
.project-card .project-title { margin-top: 1rem; font-family: var(--font-display); font-size: clamp(1.6rem, 2.3vw, 2.4rem); font-weight: 700; text-transform: none; }
.project-card .preview, .project-card .number { color: #4c5f53; }
.project-card .project-arrow { border: 0; border-radius: 50%; background: #dce9dc; color: var(--ink); }
.project-card .project-link:hover .project-title { color: #4c766e; }
.support-band { border: 0; background: #f1dfcf; color: var(--ink); }
.support-band h2, .support-band p, .support-band .kicker { color: var(--ink); }
.support-band .button { box-shadow: 0 8px 15px rgba(38,60,49,.16); }
.school-teaser { background: #f8f6ec; }
.school-names li { border: 1px solid #c9d8c9; border-radius: 999px; background: #fffdf7; color: var(--ink); }
.marchesa { background: #eee8ee; }
.marchesa-image img { border: 0; border-radius: 2.5rem 3rem 3rem 2rem; }
.marchesa-label { border-radius: 0 1.1rem 0 0; background: rgba(41,60,53,.87); font-family: var(--font-display); }
.principles b { color: #52796b; font-family: var(--font-display); }
.workers-placeholder { border: 1px solid #e4c8b5; border-radius: 1.2rem; background: #f8e9dd; box-shadow: none; }
.workers-placeholder h3 { font-size: 2.4rem; }
.network-teaser { background: #e8efe7; }
.news-teaser { border: 0; background: #f5ede2; }

.facts { border: 0; background: #e9ece0; color: var(--ink); }
.fact { border-color: #c9d6c9; }
.fact strong { font-family: var(--font-display); font-weight: 400; }
.fact span { letter-spacing: .02em; text-transform: none; }
.content, .content.chapter-paper { border: 0; background: #faf7ef; color: var(--ink); }
.content.alt { background: #f3f1e7; }
.content.chapter-violet { background: #eaece9; color: var(--ink); }
.content.chapter-lime { background: #ecf1e2; color: var(--ink); }
.content.chapter-coral { background: #f4e6dc; color: var(--ink); }
.content.chapter-violet h2, .content.chapter-violet h3, .content.chapter-violet .quote,
.content.chapter-violet .prose p, .content.chapter-violet .prose ul,
.content.chapter-violet .intro-copy, .content.chapter-violet .credit-group>p,
.content.chapter-violet .asset-gallery figcaption, .content.chapter-violet .lume-grid figcaption,
.content.chapter-violet .school-gallery figcaption { color: var(--ink); }
.content.chapter-violet .inline-link, .content.chapter-violet .doc-links a, .content.chapter-violet .school-gallery a { color: #3a756e; }
.content .kicker { color: #55705d; }
.content .card, .content .activity-card, .content .milestone, .content .production-card,
.content .partner-card, .content .program-grid article, .content .news-card, .fam-programme article,
.school, .media-card, .appointment-card, .news-panel {
  border: 1px solid #e0dfd1; border-radius: 1.3rem; background: #fffdf7; box-shadow: 0 7px 20px rgba(55, 69, 55, .08);
  overflow: hidden;
}
.content .card:nth-child(3n+2), .content .production-card:nth-child(3n+2) { background: #eff3e8; }
.content .card:nth-child(3n), .content .production-card:nth-child(3n) { background: #f6e8de; }
.content .card h3, .content .production-card h3 { font-family: var(--font-display); font-weight: 700; text-transform: none; }
.content .card .meta, .content .school .tag, .activity-card .meta { color: #537569; }
.content .milestones, .school-grid, .program-grid { gap: 1rem; border: 0; background: transparent; }
.content .milestone { box-shadow: none; }
.content .story-grid figure, .sam-photo-pair figure, .content .education-photo, .school-project-photos figure {
  border: 0; box-shadow: var(--soft-shadow);
}
.content .education-photo img, .school-project-photos img { background: #e8e9df; }
.education-card .education-photo { margin: 0 0 1.3rem; }
.project-credits { border: 0; background: #ecf0e5 !important; }
.project-credits .partner-card { border: 1px solid #dfe3d6; background: #fffdf7; }
.project-credits .credit-group h3 { border-color: #b4c8b7; }
.chapter-links a, .project-jump a { border: 1px solid #bdcbbd; border-radius: 999px; background: #fffdf8; color: var(--ink); box-shadow: none; }
.chapter-links a:hover, .project-jump a:hover { background: #e3eee3; }
.project-explorer { border: 0; background: #e3edeb; color: var(--ink); }
.project-explorer h2, .project-explorer .kicker { color: var(--ink); }
.project-explorer h2 { font-weight: 700; }
.project-jump a, .project-jump a:nth-child(n), .project-jump a[aria-current=page] {
  border: 1px solid #cbdacf; border-radius: 1rem; background: #fffdf8; color: var(--ink); outline: none;
}
.project-jump a[aria-current=page] { box-shadow: inset 0 0 0 2px #8db2a5; }
.project-jump a:hover, .project-jump a:focus-visible { box-shadow: var(--soft-shadow); transform: translateY(-2px); }
.gallery-section { background: #e7eee9; color: var(--ink); }
.gallery-section h2, .gallery-section .kicker, .gallery-section .prose>p { color: var(--ink); }
.gallery-section .project-gallery figure { border: 0; background: #e6e8e0; box-shadow: var(--soft-shadow); }
.gallery-section .project-gallery figcaption { color: #fffdf8; }
.next { border: 0; background: #e8efe3; color: var(--ink); }
.next h2 { color: var(--ink); }
.transparency { background: #334e45; color: white; }
.transparency h2, .transparency h3 { color: white; }
.transparency .kicker, .year h3 { color: #d9e7cf; }
.transparency .document { border: 1px solid rgba(255,255,255,.24); border-radius: .8rem; }
#contatti { background: #f2e4d8; }
.contact-card { border: 1px solid #e2d7c8; border-radius: 1.3rem; box-shadow: var(--soft-shadow); }
footer { background: #324c43; }
footer p { color: #e6eee5; }
.footer-logo { border-radius: .7rem; }
.news-panel, .appointment-card { padding: clamp(1.2rem, 2.5vw, 2rem); }
.news-panel h3, .appointment-card h3 { color: var(--ink); }
.quaderno-preview { border-radius: 1.4rem; }
.quaderno-pages { border: 0; border-radius: 1.4rem 2.8rem 1.8rem 2.3rem; overflow: hidden; padding: .8rem; background: #fffdf8; box-shadow: var(--soft-shadow); }
.quaderno-pages img { border-radius: .85rem 2.1rem 1.1rem 1.65rem; }
.quaderno-controls button { border: 1px solid #a9bdae; border-radius: 50%; background: #e8efe6; color: var(--ink); }
.quaderno-controls button:hover:not(:disabled) { background: #d4e8df; }
.appointment-card .appointment-date { border-radius: 999px; background: #e3ece0; }

/* BodyNoBody's visual chapter uses the same softer type and paper palette. */
.body-project .bnb-hub { background: #e7efeb; color: var(--ink); }
.body-project .bnb-hub .kicker { color: #587166; }
.body-project .bnb-hub h2 { color: var(--ink); font: 700 clamp(2.7rem, 5.7vw, 5.3rem)/1.12 var(--font-display); letter-spacing: -.02em; text-transform: none; }
.body-project .bnb-hub h2 em { color: #6d9a8b; font-style: italic; }
.body-project .bnb-hub-intro, .body-project .bnb-hub-end p { color: #40554a; }
.body-project .bnb-hub-end { border-color: #c5d4c8; }
.body-project .bnb-hub-end a { color: #396f65; }
.body-project .bnb-door { border-radius: 2rem 3.7rem 2.4rem 2.8rem; box-shadow: var(--soft-shadow); }
.body-project .bnb-door .bnb-door-copy strong { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.12; text-transform: none; }
.body-project .bnb-door .bnb-number { background: #e9f1e2; color: var(--ink); }
.body-project .bnb-door:nth-child(2) .bnb-number { background: #f0dcd9; }
.body-project .bnb-door:nth-child(3) .bnb-number { background: #e7e1ee; }
.body-project .bnb-door:nth-child(4) .bnb-number { background: #f2e4d1; }

@media (max-width: 1100px) {
  .site-header .site-navigation { background: #faf7ef; border-bottom: 1px solid #d6dfd2; }
  .site-header .site-menu>li { border-color: #d6dfd2; }
  .site-header .site-menu>li>a, .site-header summary { color: var(--ink); }
  .site-header .site-menu>li>a:hover, .site-header summary:hover { color: #527f75; }
  .site-header .site-submenu { border: 1px solid #d6dfd2; }
}
@media (max-width: 850px) {
  .m-home .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .m-spines { justify-content: flex-start; min-height: 19rem; padding: .8rem .25rem 1.5rem; }
  .m-home .hero::before { width: 27rem; right: -6rem; top: 18rem; }
  .page-hero::after { width: 26rem; right: -7rem; top: 2rem; opacity: .33; }
  .page-hero[data-motif] .page-hero-grid>figure { margin-top: 0; }
  .page-hero figure { transform: none; }
  .page-hero[data-spine]::before { display: none; }
}
@media (max-width: 1280px) and (min-width: 851px) {
  .page-hero[data-spine]::before { display: none; }
}
@media (max-width: 610px) {
  .site-header .brand { font-size: 1.75rem; }
  .m-home .hero { padding-top: 2.6rem; }
  .m-home .hero h1 { font-size: clamp(3.35rem, 12vw, 4.7rem); }
  .m-home .hero-copy .lead { font-size: 1.1rem; }
  .m-home .hero::before { width: 22rem; right: -8rem; top: 22rem; opacity: .46; }
  .m-spines { gap: .4rem; min-height: 16rem; }
  .m-spine { width: clamp(3.25rem, 17vw, 4.25rem); height: 14.2rem; font-size: 1.12rem; padding: 1rem .4rem; }
  .m-cover { flex-basis: clamp(3.4rem, 17vw, 4.6rem); margin-bottom: 1.2rem; margin-left: 0; }
  .m-story-grid { gap: .75rem; }
  .m-story-card img { height: 10rem; }
  .m-story-card figcaption { font-size: 1.05rem; }
  .m-home .stats { margin-top: 2rem; }
  .m-home .stat { padding: .85rem .7rem; }
  .page-hero { padding: 2.8rem 0 3rem; }
  .page-hero h1 { font-size: clamp(2.7rem, 11vw, 4.2rem); }
  .page-hero::after { width: 20rem; right: -7rem; top: 3rem; opacity: .27; }
  .m-body .page-hero::after { width: 20rem; right: -8rem; opacity: .29; }
  .m-education .page-hero::after { width: 20rem; right: -7rem; opacity: .35; }
  .m-news .page-hero::after { width: 21rem; right: -7rem; top: 2rem; opacity: .28; }
  .m-events .page-hero::after, .m-halloween .page-hero::after { width: 19rem; right: -7rem; opacity: .31; }
  .m-cantafavole .page-hero::after { width: 19rem; right: -7rem; opacity: .31; }
  .content h2 { font-size: clamp(2.2rem, 9.5vw, 3.3rem); }
  .button { font-size: .8rem; }
  .body-project .bnb-hub h2 { font-size: clamp(2.7rem, 11vw, 4.3rem); }
  .quaderno-pages { box-shadow: var(--soft-shadow); }
}
@media (prefers-reduced-motion: reduce) { .m-spine, .m-cover { transition: none; } }

/* The vertical book spines return wherever visitors choose a story. */
.m-home #progetti .project-card { position: relative; overflow: visible; }
.m-home #progetti .project-card::after {
  content: "Eventi culturali"; position: absolute; z-index: 3; top: 1.2rem; right: -.55rem;
  display: flex; align-items: flex-start; justify-content: center; width: 3.15rem; height: 10.5rem;
  padding: .9rem .55rem; border-radius: .7rem .8rem .55rem .55rem; background: #dba384; color: var(--ink);
  writing-mode: vertical-rl; font: 700 .98rem/1.15 var(--font-display);
  box-shadow: inset 3px 0 6px rgba(255,255,255,.28), 5px 9px 14px rgba(48,60,49,.2); pointer-events: none;
}
.m-home #progetti .project-card:nth-child(2)::after { content: "Educazione"; background: #afcbd1; height: 9.4rem; }

:is(.m-education #sezioni, .m-events #esperienze) .education-card { position: relative; overflow: visible; }
:is(.m-education #sezioni, .m-events #esperienze) .education-card::after {
  content: var(--choice-label); position: absolute; z-index: 2; top: -.55rem; right: .65rem;
  display: flex; justify-content: center; width: 2.65rem; height: 8.5rem; padding: .75rem .4rem;
  writing-mode: vertical-rl; border-radius: .65rem .7rem .45rem .45rem;
  background: var(--choice-color, #e4ad7f); color: var(--ink); font: 700 .88rem/1.15 var(--font-display);
  box-shadow: inset 3px 0 6px rgba(255,255,255,.3), 4px 8px 12px rgba(48,60,49,.2); pointer-events: none;
}
.m-education #sezioni .education-card:nth-child(1) { --choice-label: "Sportello"; --choice-color: #e5b27e; }
.m-education #sezioni .education-card:nth-child(2) { --choice-label: "Sam"; --choice-color: #b7c9a7; }
.m-education #sezioni .education-card:nth-child(3) { --choice-label: "BodyNoBody"; --choice-color: #aecbd0; }
.m-events #esperienze .education-card:nth-child(1) { --choice-label: "Halloween"; --choice-color: #dea487; }
.m-events #esperienze .education-card:nth-child(2) { --choice-label: "FAM"; --choice-color: #b8bed6; }
.m-events #esperienze .education-card:nth-child(3) { --choice-label: "Babonzo"; --choice-color: #b7cda6; }
.m-events #esperienze .education-card:nth-child(4) { --choice-label: "Marchesa"; --choice-color: #e7bb9d; }
.m-events #esperienze .education-card:nth-child(5) { --choice-label: "Cantafavole"; --choice-color: #c9c3dd; }

.body-project .bnb-door .bnb-number {
  align-self: flex-start; display: flex; justify-content: center; width: 2.7rem; height: 10.5rem;
  margin: .8rem; padding: .8rem .45rem; border-radius: .7rem .75rem .45rem .45rem;
  writing-mode: vertical-rl; font: 800 .72rem/1.1 var(--font-text);
  box-shadow: inset 3px 0 6px rgba(255,255,255,.26), 4px 7px 12px rgba(21,38,34,.25);
}

.m-page .project-jump { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .7rem; padding: 1rem .15rem 1.5rem; border: 0; background: transparent; }
.m-page .project-jump a, .m-page .project-jump a:nth-child(n), .m-page .project-jump a[aria-current=page] {
  flex: 1 1 5.3rem; max-width: 7.7rem; min-width: 5.2rem; height: 18rem; min-height: 0;
  display: flex; align-items: flex-start; justify-content: center; padding: 1.1rem .65rem;
  writing-mode: vertical-rl; text-orientation: mixed; overflow-wrap: normal; white-space: normal;
  border: 1px solid rgba(255,255,255,.6); border-radius: .85rem 1rem .6rem .7rem;
  background: var(--spine-tile, #c4d6c5); color: var(--ink);
  box-shadow: inset 4px 0 8px rgba(255,255,255,.3), inset -4px 0 7px rgba(69,71,54,.12), 6px 10px 17px rgba(48,61,51,.18);
  font: 700 .9rem/1.15 var(--font-display); text-decoration: none;
  transform: rotate(var(--spine-tilt, 0deg)) translateY(var(--spine-offset, 0px));
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}
.m-page .project-jump a:nth-child(5n+1) { --spine-tile: #e6b38a; --spine-tilt: -2deg; --spine-offset: 3px; }
.m-page .project-jump a:nth-child(5n+2) { --spine-tile: #b7ced0; --spine-tilt: 1deg; --spine-offset: -5px; }
.m-page .project-jump a:nth-child(5n+3) { --spine-tile: #c7d5b5; --spine-tilt: 2deg; --spine-offset: 2px; }
.m-page .project-jump a:nth-child(5n+4) { --spine-tile: #d0c1d5; --spine-tilt: -1deg; --spine-offset: -3px; }
.m-page .project-jump a:nth-child(5n) { --spine-tile: #e7c4b1; --spine-tilt: 1.5deg; --spine-offset: 4px; }
.m-page .project-jump a[aria-current=page] { box-shadow: inset 0 0 0 2px #456c61, 6px 10px 17px rgba(48,61,51,.18); }
.m-page .project-jump a:hover, .m-page .project-jump a:focus-visible {
  background: var(--spine-tile); box-shadow: inset 4px 0 8px rgba(255,255,255,.32), 9px 15px 22px rgba(48,61,51,.23);
  transform: translateY(-.7rem) rotate(0deg);
}

/* Put the public diary near the beginning of the home page. */
.m-home .news-teaser {
  position: relative; isolation: isolate; overflow: hidden; border: 0;
  padding: clamp(3.25rem, 5.5vw, 5rem) 0;
  background: linear-gradient(115deg, #dcebe8 0%, #e9eee0 100%);
}
.m-home .news-teaser::before {
  content: ""; position: absolute; z-index: 0; width: min(42vw, 36rem); aspect-ratio: 1;
  top: -9rem; right: -7rem; opacity: .26;
  background: url("media/motifs/whale.svg") center / contain no-repeat; pointer-events: none;
}
.m-home .news-teaser-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 3.7rem minmax(0, 1fr) minmax(17rem, .7fr); gap: clamp(1.3rem, 3vw, 3rem); align-items: center; }
.m-home .news-teaser-spine {
  display: flex; align-items: center; justify-content: center; height: 15.5rem;
  writing-mode: vertical-rl; border-radius: .9rem 1rem .6rem .6rem;
  background: #92bfc5; color: var(--ink); font: 700 1.1rem/1.1 var(--font-display);
  box-shadow: inset 4px 0 7px rgba(255,255,255,.28), 6px 11px 17px rgba(40,69,64,.18);
}
.m-home .news-teaser-copy h2 { max-width: 16ch; margin: .35rem 0 .8rem; }
.m-home .news-teaser-copy>p:not(.kicker) { max-width: 39rem; color: #40574d; }
.m-home .news-teaser-copy .button { display: inline-flex; margin-top: 1rem; }
.m-home .news-teaser-social {
  position: relative; padding: 1.7rem 1.8rem 1.9rem; border-radius: 2.5rem 1.5rem 2.8rem 1.8rem;
  background: #fffaf0; box-shadow: var(--soft-shadow); transform: rotate(1deg);
}
.m-home .news-teaser-social strong { display: block; max-width: 15ch; font: 700 clamp(1.45rem, 2vw, 2rem)/1.18 var(--font-display); }
.m-home .news-teaser-social p { margin: .8rem 0 1.1rem; color: #415b50; }
.m-home .news-teaser-social a { color: #2e665f; font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: .25em; overflow-wrap: anywhere; }
.m-home .news-teaser-at { display: block; color: #6b9f9b; font: 700 3.8rem/1 var(--font-display); margin-bottom: .5rem; }
.m-news .news-hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* The photographs respond differently, as individual pieces on the page. */
.m-page :is(.photo-frame, .m-story-card, .about-photo, .school-teaser figure, .project-gallery figure, .sam-photo-pair figure, .school-project-photos figure, .activity-card, .bnb-door) {
  --photo-hover-transform: scale(1.055);
  --photo-hover-duration: .42s;
}
.m-home .m-story-card:first-child,
.m-home #progetti .project-card:first-child .photo-frame,
:is(.m-education #sezioni, .m-events #esperienze) .education-card:nth-child(3n+1) .photo-frame,
.m-page .project-gallery figure:nth-child(4n+1),
.m-page .asset-gallery figure:nth-child(4n+1) {
  --photo-hover-transform: rotate(-2deg) scale(1.07);
  --photo-hover-duration: .52s;
}
.m-home #progetti .project-card:nth-child(2) .photo-frame,
:is(.m-education #sezioni, .m-events #esperienze) .education-card:nth-child(3n+2) .photo-frame,
.m-page .project-gallery figure:nth-child(4n+2),
.m-page .asset-gallery figure:nth-child(4n+2),
.m-page .school-project-photos figure:nth-child(even) {
  --photo-hover-transform: translate(9px, -7px) scale(1.065);
  --photo-hover-duration: .48s;
}
.m-home .m-story-card:nth-child(2),
:is(.m-education #sezioni, .m-events #esperienze) .education-card:nth-child(3n) .photo-frame,
.m-page .project-gallery figure:nth-child(4n+3),
.m-page .asset-gallery figure:nth-child(4n+3) {
  --photo-hover-transform: scale(1.12);
  --photo-hover-duration: .6s;
}
.m-page .page-hero figure:not(.concept-art):not(.marchesa-art),
.m-page .project-gallery figure:nth-child(4n),
.m-page .asset-gallery figure:nth-child(4n),
.m-page .about-photo {
  --photo-hover-transform: translateY(-8px) rotate(1.4deg) scale(1.055);
  --photo-hover-duration: .5s;
}

/* Give photographs depth while leaving illustrated and archival pages intact. */
.m-page :where(.photo-frame:not(.poster-sheet):not(.poster-banner):not(.documentary-sheet):not(.concept-art):not(.marchesa-art), .m-story-card, .about-photo, .school-teaser figure, .project-gallery figure, .sam-photo-pair figure, .school-project-photos figure, .activity-card, .bnb-door) img:not([src*="/body/io/"]):not([src*="/body/lume/"]) {
  filter: contrast(1.1) saturate(1.09) brightness(.99);
  transition: transform var(--photo-hover-duration, .42s) cubic-bezier(.22,.7,.26,1), filter .38s ease;
}
.m-page .page-hero figure:not(.concept-art):not(.marchesa-art) img:not([src*="/body/io/"]):not([src*="/body/lume/"]) {
  filter: contrast(1.1) saturate(1.09) brightness(.99);
}
.m-lumo .photo-frame img, .m-io .photo-frame img,
.m-page .quaderno-pages img, .m-page .io-cards img, .m-page .lume-grid img,
.m-page .poster-sheet img, .m-page .poster-banner img, .m-page .documentary-sheet img {
  filter: none; transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .m-page :where(.photo-frame:not(.poster-sheet):not(.poster-banner):not(.documentary-sheet):not(.concept-art):not(.marchesa-art), .m-story-card, .about-photo, .school-teaser figure, .project-gallery figure, .sam-photo-pair figure, .school-project-photos figure, .activity-card, .bnb-door):is(:hover, :focus-within) img:not([src*="/body/io/"]):not([src*="/body/lume/"]) {
    filter: contrast(1.13) saturate(1.14) brightness(1); transform: var(--photo-hover-transform, scale(1.055));
  }
  .m-page .page-hero figure:not(.concept-art):not(.marchesa-art):is(:hover, :focus-within) img:not([src*="/body/io/"]):not([src*="/body/lume/"]) {
    filter: contrast(1.13) saturate(1.14) brightness(1); transform: var(--photo-hover-transform, scale(1.055));
  }
  .m-lumo .photo-frame:is(:hover, :focus-within) img,
  .m-io .photo-frame:is(:hover, :focus-within) img,
  .m-page :is(.poster-sheet, .poster-banner, .documentary-sheet):is(:hover, :focus-within) img { filter: none; transform: none; }
}
@media (max-width: 700px) {
  .m-home .news-teaser-grid { grid-template-columns: 2.7rem minmax(0, 1fr); gap: 1rem; }
  .m-home .news-teaser-spine { height: 12rem; font-size: .9rem; }
  .m-home .news-teaser-social { grid-column: 2; transform: none; }
  .m-home .news-teaser::before { width: 23rem; right: -10rem; top: 8rem; opacity: .2; }
  .m-news .news-hero-actions .button { font-size: .78rem; }
  .m-page .project-jump { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-color: #95b6aa transparent; padding: 1.1rem .3rem 1.6rem; }
  .m-page .project-jump a, .m-page .project-jump a:nth-child(n), .m-page .project-jump a[aria-current=page] { flex: 0 0 5.1rem; width: 5.1rem; height: 15.7rem; min-width: 5.1rem; font-size: .8rem; scroll-snap-align: start; }
  .m-home #progetti .project-card::after { right: -.4rem; width: 2.55rem; height: 8.7rem; font-size: .84rem; }
  .m-home #progetti .project-card:nth-child(2)::after { height: 7.8rem; }
  :is(.m-education #sezioni, .m-events #esperienze) .education-card::after { width: 2.25rem; height: 7.6rem; font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  .m-page .project-jump a, .m-page .project-jump a:hover, .m-page .project-jump a:focus-visible { transition: none; transform: none; }
  .m-page :is(.photo-frame, .m-story-card, .about-photo, .school-teaser figure, .project-gallery figure, .sam-photo-pair figure, .school-project-photos figure, .activity-card, .bnb-door) img { transition: none !important; }
  .m-page :is(.photo-frame, .m-story-card, .about-photo, .school-teaser figure, .project-gallery figure, .sam-photo-pair figure, .school-project-photos figure, .activity-card, .bnb-door):is(:hover, :focus-within) img { transform: none !important; }
}
