/* Galleria d'Arte San Barnaba — feuille de style (kit WIDE Edizioni, 23/11/2026)
   1. Jetons : à régler d'après le style graphique choisi (_lavoro/direction.txt) — le reste suit.
   2. Règles WIDE intégrées : icônes dans les menus, boutons animés, entrée du héros, apparitions au défilement,
      effets d'images, composition éditoriale ; version immobile avec prefers-reduced-motion. */

/* ---------- 1. jetons : style Editorial + Ornamental (lexique WIDE) — una galleria dell'Ottocento : parete di velluto
   oliva per i quadri, carta pietra per i testi, l'oliva-oro del logo d'origine (#64572a) e l'oro delle cornici.
   Caratteri : Bodoni Moda (il Bodoni di Parma, l'Ottocento italiano ; asse ottico 6–96) e Schibsted Grotesk (grottesco
   da giornale, per i testi lunghi). Licenza SIL OFL, file in assets/fonts. ---------- */
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-italic.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
:root {
  --bg: #ecebe3; --paper-2: #e1e0d4; --surface: #f7f6f0; --ink: #1d1c18; --muted: #57544b; --line: #cfcdbf;
  --wall: #23251d; --wall-2: #2b2e24; --on-wall: #f4f1ea; --on-wall-2: #b9b2a2;
  --accent: #64572a; --accent-ink: #ffffff; --accent-soft: #ece4cc; --gold: #d9c690;
  --f-display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --f-text: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: clamp(.82rem, .79rem + .15vw, .9rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.09rem);
  --step-1: clamp(1.18rem, 1.08rem + .45vw, 1.42rem);
  --step-2: clamp(1.5rem, 1.25rem + 1.1vw, 2.15rem);
  --step-3: clamp(2.1rem, 1.6rem + 2.3vw, 3.6rem);
  --step-4: clamp(2.8rem, 1.8rem + 4.6vw, 6.4rem);
  --radius: 2px; --wrap: 1240px; --gap: clamp(1.1rem, .6rem + 2.2vw, 2.8rem);
  --ease-out: cubic-bezier(.2, .7, .2, 1); --ease-io: cubic-bezier(.65, 0, .35, 1);
  --top-h: 76px;
}
/* popup WIDE Edizioni (wide-credit.js) : carta pietra, oliva-oro, Bodoni */
wide-credit { --wc-bg: var(--bg); --wc-fg: var(--ink); --wc-muted: var(--muted); --wc-line: var(--line); --wc-field-bg: var(--surface); --wc-accent: var(--accent); --wc-accent-ink: #fff; --wc-em: var(--accent); --wc-display: var(--f-display); --wc-display-weight: 400; --wc-body: var(--f-text); --wc-radius: 2px; --wc-btn-radius: 2px; --wc-field-radius: 2px; }

/* ---------- 2. base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-0)/1.65 var(--f-text); font-kerning: normal; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; font-weight: 400; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 2 * var(--gap), var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--surface); padding: .6rem 1rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.ic { width: 1.15em; height: 1.15em; flex: none; }

/* composition éditoriale : surtitre en petites capitales espacées, titres Bodoni, chapeau en italique, lettrine */
.kicker { display: flex; align-items: center; gap: .55em; font: 600 var(--step--1)/1.3 var(--f-text); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.display { font: 400 var(--step-4)/1 var(--f-display); letter-spacing: -.01em; font-optical-sizing: auto; }
.h2 { font: 400 var(--step-3)/1.08 var(--f-display); letter-spacing: -.005em; }
.h3 { font: 500 var(--step-1)/1.25 var(--f-display); }
.lead { font: italic 400 var(--step-1)/1.5 var(--f-display); color: var(--muted); max-width: 52ch; }
.prose { max-width: 62ch; font-variant-numeric: oldstyle-nums; }
.prose p { margin-bottom: 1.1em; }
.lettrine::first-letter { float: left; font: 400 3.4em/.82 var(--f-display); margin: .06em .1em 0 0; color: var(--accent); }
@supports (initial-letter: 3) { .lettrine::first-letter { float: none; font-size: 1em; line-height: inherit; margin: 0 .12em 0 0; initial-letter: 3; } }
.link { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; transition: background-size .35s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .link:hover { background-size: 0 1px; background-position: 100% 100%; } }
.link-arrow { display: inline-flex; align-items: center; gap: .6em; font: 600 var(--step--1)/1.2 var(--f-text); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--accent); padding-block: .5rem; background: linear-gradient(currentColor, currentColor) 0 100% / 2.2em 1px no-repeat; }
@media (prefers-reduced-motion: no-preference) {
  .link-arrow { transition: background-size .45s var(--ease-out); } .link-arrow .ic { transition: transform .3s var(--ease-out); }
  @media (hover: hover) and (pointer: fine) { .link-arrow:hover { background-size: 100% 1px; } .link-arrow:hover .ic { transform: translateX(5px); } }
}

/* ---------- bandeau de démo (règle WIDE : noir, gris clair, serif élégante) ---------- */
.demo-bar { background: #000; color: #cfcfcf; font: 400 .92rem/1.4 "EB Garamond", Garamond, Georgia, serif; text-align: center; padding: .45rem 1rem; position: relative; z-index: 60; }
.demo-bar a { color: #fff; }

/* ---------- en-tête : logo, menu avec icônes ; sur la home il flotte sur le tableau puis prend le papier au défilement ---------- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: background-color .35s, border-color .35s, box-shadow .35s, color .35s; }
.top.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgb(0 0 0 / .35); }
.top-in { display: flex; align-items: center; gap: 1.2rem; min-height: var(--top-h); }
.brand { text-decoration: none; margin-right: auto; display: flex; align-items: center; }
.brand img { height: clamp(40px, 3.4vw, 48px); width: auto; }
.brand-light { display: none; }
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav-list, .langs, .foot-nav ul, .foot-contact { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; gap: 1.5rem; }
.nav-link { display: inline-flex; align-items: center; gap: .5em; text-decoration: none; font-size: var(--step--1); font-weight: 500; letter-spacing: .03em; padding-block: .35rem; position: relative; }
.nav-link .ic { color: var(--accent); }
.nav-list .nav-link::after { content: ""; position: absolute; left: 1.65em; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.nav-list .nav-link[aria-current="true"]::after, .nav-list .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.langs { display: flex; gap: .2rem; font-size: var(--step--1); }
.langs a { text-decoration: none; padding: .3rem .45rem; border-radius: var(--radius); }
.langs a[aria-current] { background: var(--ink); color: var(--bg); }
.burger { display: none; background: none; border: 0; padding: .5rem; color: inherit; cursor: pointer; min-width: 44px; min-height: 44px; }
.burger .ic { width: 1.6rem; height: 1.6rem; }
/* home : en-tête transparent sur l'ouverture */
.top--over { margin-bottom: calc(-1 * var(--top-h)); }
.top--over:not(.is-scrolled) { background: transparent; backdrop-filter: none; color: var(--on-wall); }
.top--over:not(.is-scrolled) .brand-dark { display: none; }
.top--over:not(.is-scrolled) .brand-light { display: block; }
.top--over:not(.is-scrolled) .nav-link .ic { color: var(--gold); }
.top--over:not(.is-scrolled) .langs a[aria-current] { background: var(--on-wall); color: var(--wall); }
.top--over:not(.is-scrolled) .top-cta { background: var(--gold); border-color: var(--gold); color: var(--ink); }
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .nav-link .ic { transition: transform .3s var(--ease-out); }
  .nav-link:hover .ic { transform: translateY(-2px) rotate(-6deg); }
  .nav-list .nav-link:hover::after { transform: scaleX(1); }
}
@media (max-width: 1060px) {
  .burger { display: inline-flex; }
}
@media (max-width: 560px) { .top .top-cta { display: none; } }
@media (max-width: 1060px) {
  .nav { position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100svh - var(--top-h)); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 1rem; background: var(--bg); color: var(--ink); padding: 1.2rem var(--gap) 1.6rem; border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -24px rgb(0 0 0 / .4); visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .3s var(--ease-out), visibility 0s .3s; }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .3s var(--ease-out); }
  .nav-list { flex-direction: column; gap: .2rem; }
  .nav .nav-link { font-size: var(--step-1); padding-block: .55rem; }
  .top--over:not(.is-scrolled) .nav .nav-link .ic { color: var(--accent); }
  .top--over:has(.nav.is-open) { background: var(--bg); color: var(--ink); }
  .top--over:has(.nav.is-open) .brand-dark { display: block; }
  .top--over:has(.nav.is-open) .brand-light { display: none; }
  .top--over:not(.is-scrolled) .nav .langs a[aria-current] { background: var(--ink); color: var(--bg); }
}

/* ---------- boutons animés : un remplissage qui glisse, l'icône qui avance, l'appui ---------- */
.btn { position: relative; isolation: isolate; overflow: clip; display: inline-flex; align-items: center; justify-content: center; gap: .65em; min-height: 50px; padding: .85rem 1.55rem; border: 1px solid var(--accent); border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: 600 var(--step--1)/1.15 var(--f-text); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; text-align: left; cursor: pointer; }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.btn--small { min-height: 42px; padding: .55rem 1rem; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--gold::before { background: var(--on-wall); }
.btn--ghost { background: transparent; color: var(--on-wall); border-color: color-mix(in srgb, var(--on-wall) 70%, transparent); }
.btn--ghost::before { background: var(--on-wall); }
.btn--ghost .ic { color: var(--gold); }
.btn--ghost-dark { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost-dark .ic { color: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform .15s ease-out, color .35s, border-color .35s; }
  .btn::before { transition: transform .5s var(--ease-io); }
  .btn .ic { transition: transform .3s var(--ease-out), color .35s; }
  .btn:active { transform: scale(.97); }
}
@media (hover: hover) and (pointer: fine) {
  .btn:hover { border-color: var(--ink); }
  .btn:hover::before { transform: scaleX(1); }
  .btn:hover .ic { transform: translateX(4px); }
  .btn--gold:hover, .btn--ghost:hover { color: var(--ink); border-color: var(--on-wall); }
  .btn--ghost:hover .ic, .btn--ghost-dark:hover .ic { color: inherit; }
  .btn--ghost-dark:hover { color: var(--bg); }
}
@media (prefers-reduced-motion: reduce) { .btn:hover::before { transform: scaleX(1); } }

/* ---------- ouverture : le tableau a tutta pagina, come sul sito d'origine ---------- */
.hero { position: relative; display: grid; align-items: end; min-height: min(100svh, 1000px); background: var(--wall); color: var(--on-wall); overflow: clip; }
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 55%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgb(35 37 29 / .9) 0%, rgb(35 37 29 / .62) 38%, rgb(35 37 29 / .08) 72%),
              linear-gradient(180deg, rgb(35 37 29 / .55) 0%, rgb(35 37 29 / 0) 22%, rgb(35 37 29 / 0) 70%, rgb(35 37 29 / .45) 100%); }
.hero-txt { position: relative; z-index: 1; padding-block: calc(var(--top-h) + 4rem) clamp(4rem, 11vh, 8rem); }
.hero-txt { text-shadow: 0 1px 20px rgb(20 21 16 / .45); }
.hero-txt .btn { text-shadow: none; }
.hero .kicker { color: var(--gold); }
.hero .display { max-width: 11ch; margin-bottom: 1.4rem; }
.hero-p { font: italic 400 var(--step-2)/1.3 var(--f-display); color: color-mix(in srgb, var(--on-wall) 88%, transparent); max-width: 24ch; margin: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 2.4rem 0 0; }
.hero-cartel { position: absolute; z-index: 1; right: var(--gap); bottom: clamp(1.4rem, 4vh, 2.6rem); margin: 0; padding: .55rem .9rem .6rem; max-width: 22rem; background: var(--bg); color: var(--ink); font: italic 400 .86rem/1.35 var(--f-display); box-shadow: 0 10px 24px -12px rgb(0 0 0 / .6); border-left: 2px solid var(--accent); }
@media (max-width: 700px) {
  .hero { min-height: min(92svh, 760px); }
  .hero::after { background: linear-gradient(180deg, rgb(35 37 29 / .55) 0%, rgb(35 37 29 / .12) 18%, rgb(35 37 29 / .7) 36%, rgb(35 37 29 / .88) 60%, rgb(35 37 29 / .95) 100%); }
  .hero-img img { object-position: 70% 50%; }
  .hero-txt { padding-bottom: 5.5rem; }
  .hero-cartel { left: var(--gap); right: auto; bottom: 1.2rem; font-size: .8rem; }
  .hero-cta .btn { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes rise { from { opacity: 0; transform: translateY(18px); } }
  @keyframes unveil { from { clip-path: inset(0 0 100% 0); transform: scale(1.08); } }
  @keyframes drift { to { transform: scale(1.07) translate(-1.2%, -.8%); } }
  [data-enter] { animation: rise .8s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 120ms + 250ms); }
  .hero-img img { animation: unveil 1.4s var(--ease-io) backwards, drift 32s ease-in-out 1.4s infinite alternate; }
}

/* ---------- sections ---------- */
.sec { padding-block: clamp(4.5rem, 10vw, 9rem); }
.sec-head { margin-bottom: clamp(2.4rem, 5vw, 4rem); max-width: 62ch; }
.sec-head .lead { margin-top: 1rem; }
.sec-head--row { max-width: none; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.4rem 2rem; }

/* compravendita : la promessa, impaginata come un catalogo */
.comp-in { display: grid; gap: 2rem var(--gap); grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
.comp .h2 { max-width: 12ch; }
.comp-a { font: 400 var(--step-2)/1.3 var(--f-display); margin-bottom: 1.4rem; }
.comp-quote { font: italic 400 var(--step-1)/1.5 var(--f-display); color: var(--accent); border-left: 2px solid var(--accent); padding: .2rem 0 .2rem 1.3rem; margin: 0 0 1.4rem; }
.comp-txt > p:not([class]) { color: var(--muted); max-width: 58ch; }
@media (max-width: 860px) { .comp-in { grid-template-columns: 1fr; } }

/* ---------- la sala : parete velluto oliva, luce dall'alto, quadri in cornice dorata ---------- */
.sala { background: radial-gradient(ellipse 70% 45% at 50% 0%, rgb(217 198 144 / .11), transparent 72%), var(--wall); color: var(--on-wall); }
.sala .kicker { color: var(--gold); }
.sala .lead { color: var(--on-wall-2); }
.cornice { --fr: clamp(6px, .7vw, 10px); position: relative; display: block; padding: var(--fr);
  background: linear-gradient(145deg, #e6d6a0 0%, #a98f4a 20%, #6c5a25 42%, #cdb676 60%, #876f31 80%, #dcc88a 100%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -1px 0 rgb(0 0 0 / .35), 0 26px 40px -20px rgb(0 0 0 / .75), 0 6px 12px -6px rgb(0 0 0 / .5); }
.cornice::after { content: ""; position: absolute; inset: var(--fr); pointer-events: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .45), inset 0 0 14px rgb(0 0 0 / .35);
  background: linear-gradient(115deg, transparent 30%, rgb(255 255 255 / .16) 45%, transparent 60%) -150% 0 / 250% 100% no-repeat; }
.cornice img { width: 100%; height: auto; background: var(--wall-2); }
.cartel { display: block; margin-top: 1.1rem; font-size: .84rem; line-height: 1.4; color: var(--on-wall-2); text-align: center; font-variant-numeric: oldstyle-nums; }
.cartel b { display: block; font: 500 1.02rem/1.25 var(--f-display); color: var(--on-wall); }
.cartel i { display: block; font-family: var(--f-display); }
.cartel small { display: block; font-size: .78rem; letter-spacing: .02em; margin-top: .2rem; }
.q-a, .g-a { display: block; text-decoration: none; color: inherit; }
@media (prefers-reduced-motion: no-preference) {
  .cornice { transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
  .cornice img { transition: filter .6s var(--ease-out); }
  .cornice::after { transition: background-position 1.1s var(--ease-out); }
}
@media (hover: hover) and (pointer: fine) {
  .q-a:hover .cornice, .g-a:hover .cornice { transform: translateY(-4px); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -1px 0 rgb(0 0 0 / .35), 0 40px 50px -24px rgb(0 0 0 / .85), 0 8px 16px -6px rgb(0 0 0 / .5); }
  .q-a:hover .cornice img, .g-a:hover .cornice img { filter: brightness(1.07) saturate(1.05); }
  .q-a:hover .cornice::after, .g-a:hover .cornice::after { background-position: 250% 0; }
  .q-a:hover .cartel b, .g-a:hover .cartel b { color: var(--gold); }
}
.q-a:focus-visible, .g-a:focus-visible { outline-color: var(--gold); outline-offset: 8px; }

/* quadreria della home : allestimento sulla linea mediana, formati diversi come in galleria */
.quadreria { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(2.6rem, 5vw, 4.5rem) clamp(1.6rem, 3.4vw, 3.4rem); }
.q { --qh: clamp(150px, 15vw, 215px); width: calc(var(--r) * var(--qh)); max-width: 100%; }
.q0, .q4, .q8 { --qh: clamp(180px, 20vw, 290px); }
.q2, .q6 { --qh: clamp(130px, 12vw, 170px); }
@media (max-width: 640px) {
  .quadreria { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 2.4rem 1.1rem; }
  .q { width: auto; } .q0 { grid-column: 1 / -1; }
  .cartel { font-size: .78rem; } .cartel b { font-size: .92rem; }
}

/* elenco delle opere : una nicchia quadrata per opera, il quadro centrato con il suo formato */
.sala--pagina { padding-top: clamp(3.5rem, 7vw, 6rem); }
.filtri { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: end; margin-bottom: clamp(2.4rem, 5vw, 4rem); padding-bottom: 1.4rem; border-bottom: 1px solid rgb(244 241 234 / .16); }
.filtri label { display: flex; align-items: center; gap: .6rem; flex: 1 1 260px; max-width: 420px; border-bottom: 1px solid rgb(244 241 234 / .45); padding-bottom: .2rem; }
.filtri .ic { color: var(--gold); }
.filtri input, .filtri select { width: 100%; min-height: 46px; font: 400 var(--step-0) var(--f-text); color: var(--on-wall); background: transparent; border: 0; padding: .4rem 0; }
.filtri input::placeholder { color: var(--on-wall-2); opacity: 1; }
.filtri select { appearance: none; cursor: pointer; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d9c690' stroke-width='1.6'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right center / 18px no-repeat; padding-right: 1.6rem; }
.filtri select option { color: var(--ink); background: var(--bg); }
.filtri label:focus-within { border-color: var(--gold); }
.filtri input:focus, .filtri select:focus { outline: none; }
.filtri label:has(:focus-visible) { outline: 2px solid var(--gold); outline-offset: 6px; }
.griglia { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(2.2rem, 4vw, 3.6rem) clamp(1rem, 2.6vw, 2.6rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .griglia { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1080px) { .griglia { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.griglia li[hidden] { display: none; }
.slot { display: grid; place-items: center; aspect-ratio: 1; }
.slot .cornice { width: calc(90% * min(1, var(--r))); }
.vuoto { color: var(--on-wall-2); font: italic var(--step-1) var(--f-display); }

/* scheda dell'opera */
.opera { background: radial-gradient(ellipse 55% 60% at 32% 40%, rgb(217 198 144 / .12), transparent 70%), var(--wall); color: var(--on-wall); padding-block: clamp(2.5rem, 6vw, 5.5rem); }
.opera-in { display: grid; gap: 2.5rem var(--gap); grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: center; }
.opera-fig { margin: 0; display: grid; place-items: center; }
.cornice--grande { --fr: clamp(10px, 1.2vw, 18px); display: inline-block; cursor: zoom-in; }
.cornice--grande img { width: auto; max-height: min(74svh, 820px); }
.crumbs { font-size: var(--step--1); color: var(--on-wall-2); margin-bottom: 1.6rem; }
.crumbs a { color: var(--on-wall); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.opera-t { margin-bottom: 1.6rem; }
.opera-art { display: block; font: 400 var(--step-3)/1.06 var(--f-display); letter-spacing: -.01em; }
.opera-tit { display: block; font: italic 400 var(--step-2)/1.25 var(--f-display); color: var(--gold); margin-top: .5rem; }
.opera-dl { display: flex; gap: 1rem; align-items: baseline; margin: 0 0 2rem; padding-block: .9rem; border-block: 1px solid rgb(244 241 234 / .18); }
.opera-dl dt { font: 600 .78rem/1 var(--f-text); letter-spacing: .16em; text-transform: uppercase; color: var(--on-wall-2); }
.opera-dl dd { margin: 0; font: 400 var(--step-1)/1.2 var(--f-display); font-variant-numeric: oldstyle-nums; }
.opera-tel { display: flex; gap: .6rem; align-items: center; margin-top: 1.2rem; color: var(--on-wall-2); }
.opera-tel .ic { color: var(--gold); }
.opera-tel a { color: var(--on-wall); }
.opera-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid rgb(244 241 234 / .18); }
.opera-nav a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; text-decoration: none; font-size: var(--step--1); letter-spacing: .04em; color: var(--on-wall); }
.opera-nav .ic { color: var(--gold); }
@media (prefers-reduced-motion: no-preference) { .opera-nav .ic { transition: transform .3s var(--ease-out); } }
@media (hover: hover) and (pointer: fine) { .opera-nav a[rel="prev"]:hover .ic { transform: translateX(-4px); } .opera-nav a[rel="next"]:hover .ic { transform: translateX(4px); } .cornice--grande:hover { transform: none; } }
.sala--corta { padding-top: clamp(2rem, 4vw, 3rem); border-top: 1px solid rgb(244 241 234 / .1); }
.sala--corta .h3 { margin-bottom: 2.4rem; color: var(--on-wall); }
@media (max-width: 900px) { .opera-in { grid-template-columns: 1fr; } .cornice--grande img { max-height: 62svh; } }

/* chi siamo : la sala vera in panoramica, poi il racconto */
.chi-foto { margin: 0 0 clamp(2.6rem, 6vw, 5rem); overflow: clip; border-radius: var(--radius); }
.chi-foto img { width: 100%; aspect-ratio: 900 / 335; object-fit: cover; }
.chi-in { display: grid; gap: 2rem var(--gap); grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: start; }
.chi-head { position: sticky; top: calc(var(--top-h) + 2rem); }
.chi-head .h2 { margin-bottom: 2rem; }
@media (max-width: 860px) { .chi-in { grid-template-columns: 1fr; } .chi-head { position: static; } .chi-foto img { aspect-ratio: 16 / 9; object-position: 30% 50%; } }

/* apparitions au défilement (amélioration progressive : sans prise en charge, tout reste visible) */
@media (prefers-reduced-motion: no-preference) {
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    @keyframes reveal { from { opacity: 0; transform: translateY(28px); } }
    .reveal { animation: reveal linear backwards; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes img-in { from { opacity: 0; transform: translateY(36px) scale(.97); } }
    .reveal-img { animation: img-in linear backwards; animation-timeline: view(); animation-range: entry 0% entry 70%; }
    @keyframes pano { from { clip-path: inset(0 12% 0 12%); } }
    .chi-foto.reveal-img { animation-name: pano; animation-range: entry 0% cover 35%; }
  }
}

/* ---------- acquisto e valutazione : il testo e il modulo con le fotografie ---------- */
.val { background: var(--paper-2); }
.val-in { display: grid; gap: 2.4rem calc(var(--gap) * 1.4); grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
.val-txt .h2 { max-width: 14ch; }
.val-txt .lead { margin: 1.2rem 0 2rem; color: var(--ink); }
.val-txt .prose { color: var(--muted); }
@media (max-width: 900px) { .val-in { grid-template-columns: 1fr; } }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.4rem); display: grid; gap: 1.1rem; align-content: start; box-shadow: 0 30px 60px -45px rgb(35 37 29 / .45); }
.form-t { font: 400 var(--step-2)/1.15 var(--f-display); margin-bottom: .3rem; }
.form label > span, .seg legend { display: block; font-size: var(--step--1); font-weight: 500; margin-bottom: .4rem; }
.form input:not([type="radio"]):not([type="file"]), .form textarea { width: 100%; min-height: 48px; font: inherit; color: inherit; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem .9rem; transition: border-color .2s, box-shadow .2s; }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.form input:user-invalid, .form textarea:user-invalid { border-color: #a3261a; }
.form .trap { position: absolute; left: -9999px; }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.seg legend { width: 100%; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg label span { display: inline-flex; align-items: center; min-height: 42px; padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; font-size: var(--step--1); background: var(--bg); transition: background-color .25s, color .25s, border-color .25s; }
.seg input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .seg label:hover span { border-color: var(--accent); } }
.file { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: center; padding: 1rem 1.1rem; border: 1px dashed var(--accent); border-radius: var(--radius); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); cursor: pointer; transition: background-color .3s, border-color .3s; }
.file > .ic { width: 1.8rem; height: 1.8rem; color: var(--accent); }
.file-t b { display: block; font-weight: 600; }
.file-t small { display: block; color: var(--muted); font-size: var(--step--1); }
.file input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.file.has-files { border-style: solid; background: var(--accent-soft); }
.file.has-files small { color: var(--accent); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .file:hover { background: var(--accent-soft); } }
.form-note { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--step--1); color: var(--muted); margin: 0; }
.form-note .ic { color: var(--accent); margin-top: .15rem; }
.form .btn { justify-self: start; }
.form-msg { margin: 0; font-size: var(--step--1); min-height: 1.4em; }
.form-msg.is-ok { color: #2f6b3a; } .form-msg.is-err { color: #a3261a; }

/* ---------- contatti ---------- */
.con-in { display: grid; gap: 2rem calc(var(--gap) * 1.5); grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "h l" "c l"; grid-template-rows: auto 1fr; align-items: start; }
.con-in > header { grid-area: h; } .con-list { grid-area: l; } .con-cta { grid-area: c; }
.con-in .h2 { margin-bottom: 1rem; }
@media (max-width: 860px) { .con-in { grid-template-columns: 1fr; grid-template-areas: "h" "l" "c"; } }
.con-list { list-style: none; margin: 0; padding: 0; display: grid; }
.con-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 1rem; padding-block: 1.3rem; border-bottom: 1px solid var(--line); }
.con-list li:first-child { border-top: 1px solid var(--line); }
.con-list .ic { width: 1.4rem; height: 1.4rem; color: var(--accent); margin-top: .25rem; }
.con-list b { display: block; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.con-list p { margin: .25rem 0 .2rem; font: 400 var(--step-1)/1.4 var(--f-display); }
.con-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin: 0; }

/* ---------- pied de page : parete oliva, logo chiaro, menu con icone ---------- */
.foot { background: #1b1d16; color: var(--on-wall); padding-top: clamp(3.5rem, 7vw, 5.5rem); }
.foot a { color: inherit; }
.foot-in { display: grid; gap: 2.4rem var(--gap); grid-template-columns: 1.2fr 1fr 1fr; padding-bottom: 3rem; }
@media (max-width: 860px) { .foot-in { grid-template-columns: 1fr; } }
.foot-brand img { height: 60px; width: auto; margin-bottom: 1.4rem; }
.foot-line { display: flex; gap: .6rem; color: var(--on-wall-2); }
.foot .nav-link { font-weight: 400; }
.foot .nav-link .ic, .foot-line .ic { color: var(--gold); }
.foot-nav ul, .foot-contact { display: grid; gap: .3rem; align-content: start; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.4rem 2rem; border-top: 1px solid rgb(244 241 234 / .14); font-size: var(--step--1); color: var(--on-wall-2); }
.foot-legal p { margin: 0; }
.wide { background: none; border: 0; padding: .3rem 0; min-height: 44px; color: inherit; font: inherit; cursor: pointer; }
.wide b { font-weight: 600; color: var(--on-wall); }
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) { .wide b { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s var(--ease-out); } .wide:hover b { background-size: 100% 1px; } }
@media (hover: hover) and (pointer: fine) { .foot .nav-link:hover span { color: var(--gold); } }

/* ---------- page secondaire (confidentialité) ---------- */
.legal { padding-block: clamp(3rem, 7vw, 6rem); max-width: 760px; }
.legal-upd { color: var(--muted); font-size: var(--step--1); }
.legal-sec { margin-top: 2.4rem; }
.legal-sec .h3 { margin-bottom: .8rem; }

/* ---------- agrandissement des photos ---------- */
.lb { border: 0; padding: 0; background: transparent; max-width: 94vw; max-height: 92vh; }
.lb::backdrop { background: rgb(20 21 16 / .92); }
.lb img { max-height: 88vh; width: auto; }
.lb-x { position: fixed; top: 1rem; right: 1rem; background: rgb(0 0 0 / .5); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; cursor: pointer; font-size: 1.4rem; }
