:root {
    color-scheme: dark;
    --bg: #0b0b0d !important;
    --bg-paper: #17171a !important;
    --bg-dark: #0b0b0d !important;
    --ink: #f0f0ec !important;
    --mute: #a7a7aa !important;
    --paper: #18181b !important;
    --accent: #c41e3a !important;
}

/* Selettore lingua condiviso da tutte le pagine. */
.site-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: .34rem;
    color: #f3f0e9;
    font-family: var(--grotesk, 'Space Grotesk', sans-serif);
    font-size: .66rem;
    font-weight: 600;
    letter-spacing: .13em;
    line-height: 1;
    text-transform: uppercase;
}

.site-language-switcher--fixed {
    position: fixed;
    top: 1.1rem;
    left: 1.35rem;
    z-index: 1200;
    min-height: 2.35rem;
    padding: 0 .8rem;
    background: rgba(8, 8, 9, .94);
    border: 1px solid rgba(255, 255, 255, .16);
    backdrop-filter: blur(10px);
}

.site-language-switcher button {
    appearance: none;
    border: 0;
    padding: .35rem .08rem;
    color: inherit;
    background: transparent;
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
    opacity: .46;
    transition: color .2s ease, opacity .2s ease;
}

.site-language-switcher button:hover,
.site-language-switcher button:focus-visible,
.site-language-switcher button.is-active {
    color: #ff3959;
    opacity: 1;
}

.site-language-switcher button:focus-visible {
    outline: 1px solid currentColor;
    outline-offset: 3px;
}

.contact-map {
    position: relative;
    width: min(1100px, 100%);
    margin: 4rem auto 0;
    border: 1px solid rgba(255, 255, 255, .18);
    background: #080809;
    overflow: hidden;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: clamp(320px, 42vw, 520px);
    border: 0;
    filter: grayscale(1) invert(.92) contrast(.9);
    opacity: .82;
}

.contact-map a {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: .72rem 1rem;
    color: #fff !important;
    background: rgba(11, 11, 13, .94);
    border: 1px solid rgba(255, 255, 255, .24);
    font-family: var(--type, monospace);
    font-size: .7rem;
    letter-spacing: .12em;
    text-decoration: none;
    text-transform: uppercase;
}

.contact-map a:hover,
.contact-map a:focus-visible {
    color: #ff3959 !important;
    border-color: #ff3959;
}

@media (max-width: 720px) {
    .site-language-switcher--fixed {
        top: .8rem;
        left: .8rem;
        min-height: 2rem;
        padding: 0 .62rem;
        font-size: .58rem;
    }

    .contact-map {
        margin-top: 2.5rem;
    }

    .contact-map iframe {
        height: 340px;
    }
}

html {
    background: #0b0b0d !important;
    color: var(--ink) !important;
}

/* Fondale d'archivio esteso a tutte le pagine, derivato dalla seconda hero. */
body {
    background-color: #0b0b0d !important;
    background-image:
        linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px),
        radial-gradient(circle at 82% 18%, rgba(196, 30, 58, .07), transparent 30rem),
        linear-gradient(rgba(11, 11, 13, .8), rgba(11, 11, 13, .9)),
        url('img-ext/32a2b57c1f4b-sm.webp'),
        url('img-ext/4d5ea1495ad1-sm.webp'),
        url('img-ext/409e15035795-sm.webp') !important;
    background-position:
        0 0,
        0 0,
        center,
        center,
        4vw 16vh,
        calc(100% - 5vw) 50vh,
        45% 82vh !important;
    background-repeat: repeat, repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat !important;
    background-size: 84px 84px, 84px 84px, auto, auto, min(34rem, 42vw) auto, min(32rem, 38vw) auto, min(28rem, 34vw) auto !important;
    background-attachment: fixed !important;
    color: var(--ink) !important;
}

.stage {
    background: transparent !important;
    color: var(--ink) !important;
}

.main-nav {
    background: rgba(11, 11, 13, .9) !important;
    border-bottom-color: rgba(255, 255, 255, .12) !important;
    color: var(--ink) !important;
    mix-blend-mode: normal !important;
}

.main-nav a,
.main-nav .nav-trigger,
.main-nav .nav-wordmark {
    color: var(--ink) !important;
}

.menu-overlay {
    background: #0b0b0d !important;
    color: var(--ink) !important;
}

.stage > section,
.news-section,
.artista-section,
.contatti-section,
.arc-form-section,
.spazio-section,
.archive-collection {
    background: rgba(11, 11, 13, .64) !important;
    background-image: none !important;
    color: var(--ink) !important;
}

.site-footer {
    background: rgba(11, 11, 13, .9) !important;
    color: var(--ink) !important;
}

.site-footer,
.news-row,
.news-row:last-child,
.year-block,
.biblio-item,
.committee-card,
.arc-divider hr,
.tab-selector,
.bio-chapter,
.bio-sidebar,
.archive-collection__header {
    border-color: rgba(255, 255, 255, .14) !important;
}

.serie-card .card-img,
.seduta-card,
.modulo-card,
.team-card,
.archive-document,
.latest-exhibitions-grid > a,
.search-bar input,
input,
textarea,
select {
    background: rgba(24, 24, 27, .86) !important;
    border-color: rgba(255, 255, 255, .14) !important;
    color: var(--ink) !important;
}

.search-bar input::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--mute) !important;
}

.archive-collection__summary,
.archive-loading,
.news-row .nr-date,
.news-row .nr-tag,
.serie-card .card-blurb,
.committee-role,
.team-card p {
    color: var(--mute) !important;
}

/* Seconda hero: bianco e grigi diventano neri e grigi scuri; il rosso resta invariato. */
#hero-animated,
.hero-pin {
    background: #0b0b0d !important;
    color: var(--ink) !important;
}

.hero-pin::after {
    background: rgba(11, 11, 13, .18) !important;
}

.paper-a {
    background: #2b2b30 !important;
}

.paper-b {
    background-color: #1c1c20 !important;
    background-image: repeating-linear-gradient(0deg, transparent 0 20px, rgba(255, 255, 255, .035) 21px) !important;
}

.diagram-circle,
.diagram-grid {
    border-color: rgba(255, 255, 255, .24) !important;
}

.diagram-circle::before,
.diagram-circle::after {
    background: rgba(255, 255, 255, .2) !important;
}

.diagram-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, .09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .09) 1px, transparent 1px) !important;
}

.tesi-frag {
    filter: invert(1) grayscale(1);
    mix-blend-mode: screen;
}

.l1-bg .iconic,
.l1-bg .num,
.scorri-wrap {
    color: var(--ink) !important;
}

.scorri-line {
    background: var(--ink) !important;
}

.archive-print {
    padding: 5px !important;
    background: #efefec !important;
    border: 1px solid rgba(224, 224, 226, .9) !important;
    color: var(--accent) !important;
    box-shadow:
        0 34px 48px -22px rgba(0, 0, 0, .96),
        0 16px 28px -14px rgba(0, 0, 0, .86),
        0 0 0 1px rgba(255, 255, 255, .12),
        0 1px 0 rgba(255, 255, 255, .22) inset !important;
}

.archive-print figure {
    position: relative;
    margin: 0;
}

.archive-print img {
    width: 100%;
    height: auto;
    border: 0;
}

.archive-print figcaption {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    padding: 1.4rem .8rem .65rem;
    color: var(--accent) !important;
    background: linear-gradient(to top, rgba(5, 5, 7, .94), rgba(5, 5, 7, 0));
    font-weight: 700;
    text-shadow: 0 0 9px rgba(196, 30, 58, .5);
}

.archive-print:hover,
.archive-print:focus-visible {
    border-color: rgba(242, 242, 244, .92) !important;
    box-shadow:
        0 44px 62px -24px rgba(0, 0, 0, 1),
        0 22px 34px -16px rgba(0, 0, 0, .92),
        0 0 0 1px rgba(255, 255, 255, .2),
        0 0 22px rgba(225, 225, 228, .1) !important;
}

/* Le opere e le fotografie mantengono i colori originali. */
.archive-print img,
.archive-image__frame img,
.serie-card img,
.storia-img img,
.spazio-img img,
.bio-figure img,
.hero-photo img {
    filter: none;
}

/* Piccole cornici da stampa e ombre per staccare le immagini dal fondale. */
.artista-img,
.hero-photo,
.serie-card .card-img,
.storia-img,
.spazio-img,
.archive-image__frame {
    padding: 5px;
    background: #efefec !important;
    border: 1px solid rgba(224, 224, 226, .88) !important;
    box-shadow:
        0 28px 42px -20px rgba(0, 0, 0, .96),
        0 12px 24px -14px rgba(0, 0, 0, .88),
        0 1px 0 rgba(255, 255, 255, .72) inset;
}

.bio-figure img {
    padding: 5px;
    background: #efefec;
    border: 1px solid rgba(224, 224, 226, .88);
    box-shadow:
        0 28px 42px -20px rgba(0, 0, 0, .96),
        0 12px 24px -14px rgba(0, 0, 0, .88),
        0 1px 0 rgba(255, 255, 255, .72) inset;
}

.serie-card:hover .card-img,
.archive-image:hover .archive-image__frame,
.archive-image:focus-visible .archive-image__frame {
    border-color: rgba(245, 245, 242, .98) !important;
    box-shadow:
        0 36px 52px -20px rgba(0, 0, 0, 1),
        0 18px 30px -14px rgba(0, 0, 0, .94),
        0 0 18px rgba(255, 255, 255, .08);
}

.photo-cover-title .cover-line2 {
    background: none !important;
    color: var(--accent) !important;
    -webkit-text-fill-color: var(--accent) !important;
}

/* Prima hero: il nome è una sezione autonoma, fisicamente sopra la fotografia. */
.hero-title-band {
    min-height: clamp(12rem, 15vw, 14rem);
    padding: 68px 3rem 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 5;
    overflow: visible;
    background: #050507;
    color: var(--accent);
}

.hero-title-band__title {
    width: 100%;
    margin: 0;
    line-height: 1;
    text-align: center;
    position: relative;
    z-index: 60;
    transform: translate3d(0, var(--title-follow-y, 0px), 0);
    will-change: transform;
}

.hero-title-band__title .cover-line2 {
    display: block;
    color: var(--accent);
    font-family: var(--stencil);
    font-size: clamp(2.75rem, 6.7vw, 6.5rem);
    font-weight: 900;
    letter-spacing: .16em;
    line-height: 1;
    white-space: nowrap;
    -webkit-text-fill-color: var(--accent);
    text-shadow:
        0 1px 0 #ad1b35,
        0 2px 0 #97172e,
        0 3px 0 #801327,
        0 4px 0 #681020,
        0 5px 0 #500c19,
        0 6px 0 #380811,
        0 15px 24px rgba(0, 0, 0, .96),
        0 0 28px rgba(196, 30, 58, .32);
}

.photo-cover {
    height: calc(43.7004405vw + 1.5cm);
    background: #050507 !important;
}

.photo-cover img,
.photo-cover .hero-book-image {
    inset: 0 auto auto 0;
}

.photo-cover::after {
    top: 0;
}

/* News senza bordo: la luce appartiene alla tipografia, non al contenitore. */
.news-type-ticker-link {
    border: 0 !important;
    outline: 0;
    color: #ff3959 !important;
    background: rgba(11, 11, 13, .97) !important;
    text-shadow:
        0 0 2px rgba(255, 255, 255, .72),
        0 0 7px rgba(255, 44, 82, .95),
        0 0 16px rgba(196, 30, 58, .82),
        0 0 28px rgba(196, 30, 58, .56);
}

.photo-cover .news-type-ticker {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    bottom: 0 !important;
    z-index: 80 !important;
}

.news-type-ticker-track {
    filter: drop-shadow(0 0 7px rgba(255, 44, 82, .82));
}

/* Fascia NEWS persistente sotto ogni pagina del sito. */
.news-type-ticker,
.photo-cover .news-type-ticker,
.sitewide-news-ticker {
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0 !important;
    z-index: 900 !important;
    display: block !important;
    width: 100%;
    height: 1.5cm;
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.news-type-ticker-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    height: 100%;
    padding: .55rem 3rem;
    overflow: hidden;
    font-family: var(--type, monospace);
    font-size: clamp(.9rem, 1.2vw, 1.12rem);
    letter-spacing: .105em;
    line-height: 1.2;
    text-decoration: none;
    text-transform: uppercase;
}

.news-type-ticker-label,
.news-type-ticker-divider {
    flex: 0 0 auto;
}

.news-type-ticker-copy {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}

.news-type-ticker-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: sitewide-news-marquee 30s linear infinite;
}

.news-type-ticker-sequence {
    flex: 0 0 auto;
    padding-right: 5rem;
}

.news-type-ticker-link:hover .news-type-ticker-track {
    animation-play-state: paused;
}

@keyframes sitewide-news-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

body {
    padding-bottom: 1.5cm;
}

@media (prefers-reduced-motion: reduce) {
    .news-type-ticker-track { animation: none !important; }
}

.news-type-ticker-label,
.news-type-ticker-divider {
    color: #ff6a82 !important;
}

.news-type-ticker-copy {
    color: #fff4f5 !important;
    text-shadow:
        0 0 3px rgba(255, 255, 255, .96),
        0 0 8px rgba(255, 65, 97, .96),
        0 0 18px rgba(196, 30, 58, .9),
        0 0 32px rgba(196, 30, 58, .62);
}

.news-type-ticker-link:hover .news-type-ticker-copy {
    text-decoration: none;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 1),
        0 0 10px rgba(255, 65, 97, 1),
        0 0 22px rgba(196, 30, 58, .96),
        0 0 38px rgba(196, 30, 58, .7);
}

.news-type-ticker-link:focus-visible {
    outline: 1px dashed rgba(255, 255, 255, .7);
    outline-offset: -4px;
}

@media (max-width: 720px) {
    body {
        background-position: 0 0, 0 0, center, center, -7rem 16vh, calc(100% + 8rem) 55vh, center 88vh !important;
        background-size: 72px 72px, 72px 72px, auto, auto, 25rem auto, 24rem auto, 22rem auto !important;
        background-attachment: scroll !important;
    }

    .main-nav {
        background: rgba(11, 11, 13, .94) !important;
    }

    .hero-title-band {
        min-height: 10rem;
        padding: 68px 1rem 1rem;
    }

    .hero-title-band__title .cover-line2 {
        font-size: clamp(1.8rem, 7.3vw, 2.75rem);
        letter-spacing: .1em;
    }

    .archive-print {
        padding: 4px !important;
    }

    .archive-print figcaption {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        padding: 1.05rem .55rem .48rem;
    }

    .artista-img,
    .hero-photo,
    .serie-card .card-img,
    .storia-img,
    .spazio-img,
    .archive-image__frame,
    .bio-figure img {
        padding: 4px;
    }
}
