/* =====================================================================
   FRANCESCO BONDI — v2
   Palette "palcoscenico": nero di scena, carta avorio, luce dorata.
   ===================================================================== */
:root {
    --ink: #121110;
    --ink-2: #1b1917;
    --ink-3: #2a2724;
    --paper: #f7f4ef;
    --paper-2: #eee8df;
    --white: #fff;
    --muted: #77716a;
    --muted-light: rgba(247, 244, 239, 0.66);
    --line: rgba(18, 17, 16, 0.12);
    --line-light: rgba(247, 244, 239, 0.16);
    --gold: #b8955a;
    --gold-light: #d8c19c;

    --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --sans: 'Raleway', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --wrap: 1240px;
    --gutter: clamp(20px, 5vw, 64px);
    --header: 84px;
    --radius: 4px;
    --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 16px); }
body {
    font-family: var(--sans); font-size: 17px; line-height: 1.7; font-weight: 400;
    color: var(--ink); background: var(--paper);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
address { font-style: normal; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed !important; z-index: 3000; top: 12px; left: 12px; width: auto; height: auto; clip: auto; margin: 0; padding: 12px 20px; background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 820px; }
.section:where(:not(.v1 *)) { padding-block: clamp(72px, 10vw, 140px); }
.section--tight:where(:not(.v1 *)) { padding-block: clamp(40px, 6vw, 72px) clamp(72px, 10vw, 120px); }
.section--dark:where(:not(.v1 *)) { background: var(--ink); color: var(--paper); }
.section--paper:where(:not(.v1 *)) { background: var(--paper-2); }
.icon { width: 1.15em; height: 1.15em; flex: none; }

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; }
.display { font-size: clamp(2.2rem, 5vw, 3.8rem); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.05; }
.display--xl { font-size: clamp(2.6rem, 7vw, 5.4rem); }
.display--lg { font-size: clamp(2.2rem, 5.5vw, 4.2rem); }
.display--sm { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.display small { font-size: 0.45em; letter-spacing: 0.08em; color: var(--muted); }
.eyebrow {
    font-family: var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
    color: var(--muted); margin-bottom: 18px; display: block;
}
.eyebrow a { border-bottom: 1px solid transparent; transition: border-color .3s; }
.eyebrow a:hover { border-color: currentColor; }
.eyebrow--gold { color: var(--gold); }
.eyebrow--light { color: var(--muted-light); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.75; color: var(--muted); max-width: 640px; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.02em; }
.meta__author { color: var(--ink); font-weight: 500; }
.count { font-family: var(--sans); font-size: 0.4em; letter-spacing: 0.1em; vertical-align: super; color: var(--gold); }
.notice { padding: 40px 0; color: var(--muted); }

/* ---------- Pulsanti e link ---------- */
.btn:where(:not(.v1 *)) {
    --bg: var(--ink); --fg: var(--paper); --bd: var(--ink);
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    min-height: 52px; padding: 14px 30px;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--fg); background: var(--bg); border: 1px solid var(--bd); border-radius: var(--radius);
    position: relative; overflow: hidden; isolation: isolate;
    transition: color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
}
.btn:where(:not(.v1 *))::before {
    content: ''; position: absolute; inset: 0; z-index: -1; background: var(--gold);
    transform: scaleX(0); transform-origin: right; transition: transform .55s var(--ease-out);
}
.btn:where(:not(.v1 *)):hover::before { transform: scaleX(1); transform-origin: left; }
.btn:where(:not(.v1 *)):hover { --fg: var(--ink); border-color: var(--gold); }
.btn:where(:not(.v1 *)):active { transform: scale(.98); }
.btn:where(:not(.v1 *)) .icon { transition: transform .45s var(--ease); }
.btn:where(:not(.v1 *)):hover .icon { transform: translateX(4px); }
.btn--dark:where(:not(.v1 *)) { --bg: var(--ink); --fg: var(--paper); --bd: var(--ink); }
.btn--light:where(:not(.v1 *)) { --bg: var(--paper); --fg: var(--ink); --bd: var(--paper); }
.btn--ghost-light:where(:not(.v1 *)) { --bg: transparent; --fg: var(--paper); --bd: rgba(247,244,239,.5); }
.btn--block:where(:not(.v1 *)) { width: 100%; }

.link-arrow:where(:not(.v1 *)) {
    display: inline-flex; align-items: center; gap: 10px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
    padding-bottom: 6px; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
    transition: background-size .5s var(--ease), color .3s;
}
.link-arrow:where(:not(.v1 *)):hover { background-size: 30% 1px; color: var(--gold); }
.link-arrow:where(:not(.v1 *)) .icon { transition: transform .45s var(--ease); }
.link-arrow:where(:not(.v1 *)):hover .icon { transform: translateX(5px); }
.link-arrow--light:where(:not(.v1 *)) { color: var(--paper); }

.pill {
    display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 99px;
    background: var(--ink); color: var(--paper); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
    transition: background .3s, color .3s;
}
.pill:hover { background: var(--gold); color: var(--ink); }
.pill--light { background: var(--paper); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
    position: fixed; z-index: 1000; inset: 0 0 auto 0; height: var(--header);
    display: flex; align-items: center;
    background: rgba(247, 244, 239, 0.94); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--line);
    transition: transform .5s var(--ease), background-color .4s, border-color .4s, height .4s var(--ease);
    padding-top: env(safe-area-inset-top);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: block; position: relative; flex: none; }
.brand__logo { height: 44px; width: auto; transition: filter .4s; }
.nav { display: none; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 28px; }
.nav__list a, .nav__list .menu-item a {
    font-size: 0.74rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; padding: 8px 0;
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--ease), color .3s;
}
.nav__list a:hover, .nav__list a[aria-current], .nav__list .current-menu-item > a { background-size: 100% 1px; }

.site-header.is-overlay:not(.is-scrolled) { background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--paper); }
/* il logo nero diventa bianco sopra le foto (vale qualunque sia il colore del file) */
.site-header.is-overlay:not(.is-scrolled) .brand__logo, body.menu-open .brand__logo { filter: brightness(0) invert(1); }
.site-header.is-overlay:not(.is-scrolled) .pill { background: var(--paper); color: var(--ink); }
.site-header.is-overlay:not(.is-scrolled) .burger span { background: var(--paper); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header.is-scrolled { height: 70px; }
body.menu-open .site-header { transform: none; }
.has-overlay-header main > :first-child { margin-top: 0; }
body:not(.has-overlay-header) main { padding-top: var(--header); }

.burger { width: 48px; height: 48px; display: grid; place-content: center; gap: 7px; margin-right: -10px; }
.burger span { display: block; width: 26px; height: 1.5px; background: var(--ink); transition: transform .45s var(--ease), background .3s; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }
body.menu-open .burger span { background: var(--paper); }

.menu-panel {
    position: fixed; inset: 0; z-index: 900; background: var(--ink); color: var(--paper);
    display: flex; align-items: center; overflow-y: auto; overscroll-behavior: contain;
    padding: calc(var(--header) + 24px) 0 max(32px, env(safe-area-inset-bottom));
    clip-path: circle(0 at var(--mx, calc(100% - 44px)) var(--my, 42px));
    transition: clip-path .8s var(--ease-out);
}
.menu-panel.is-open { clip-path: circle(150% at var(--mx, calc(100% - 44px)) var(--my, 42px)); }
.menu-panel[hidden] { display: none; }
.menu-panel__inner { display: flex; flex-direction: column; gap: 48px; }
.menu-panel__list li { overflow: hidden; border-bottom: 1px solid var(--line-light); }
.menu-panel__list a {
    display: block; padding: 14px 0; font-family: var(--serif); font-size: clamp(2rem, 9vw, 3.4rem); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.1;
    transform: translateY(105%); transition: transform .8s var(--ease-out), color .3s;
}
.menu-panel.is-open .menu-panel__list a { transform: none; }
.menu-panel__list li:nth-child(2) a { transition-delay: .06s; } .menu-panel__list li:nth-child(3) a { transition-delay: .12s; }
.menu-panel__list li:nth-child(4) a { transition-delay: .18s; } .menu-panel__list li:nth-child(5) a { transition-delay: .24s; }
.menu-panel__list li:nth-child(6) a { transition-delay: .30s; } .menu-panel__list li:nth-child(n+7) a { transition-delay: .36s; }
.menu-panel__list a:hover, .menu-panel__list a[aria-current] { color: var(--gold-light); }
.menu-panel__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; font-size: 0.9rem; color: var(--muted-light); opacity: 0; transition: opacity .6s .45s; }
.menu-panel.is-open .menu-panel__foot { opacity: 1; }
body.menu-open { overflow: hidden; }

/* ---------- Apertura (home) ---------- */
.hero {
    position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end;
    color: var(--paper); background: var(--ink); overflow: hidden; isolation: isolate;
    padding-bottom: clamp(96px, 14vh, 150px);
}
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--ease); }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); }
.hero__slide.is-active { opacity: 1; }
.hero__slide.is-active img { animation: kenburns 9s linear both; }
@keyframes kenburns { from { transform: scale(1.12) translate3d(0, 1.5%, 0); } to { transform: scale(1.02) translate3d(0, 0, 0); } }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,9,8,.55) 0%, rgba(10,9,8,.15) 35%, rgba(10,9,8,.35) 60%, rgba(10,9,8,.88) 100%); }
.hero__content { position: relative; }
.hero__title { font-size: clamp(2.3rem, 5.4vw, 5rem); text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.04; margin-bottom: 28px; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .04em; }
.hero__title .line > span { display: inline-block; animation: line-up 1.2s var(--ease-out) both; }
.hero__title .line:nth-child(2) > span { animation-delay: .12s; }
@keyframes line-up { from { transform: translateY(105%); } to { transform: none; } }
.hero__eyebrow, .hero__lead, .hero__actions { animation: rise 1.1s var(--ease-out) both; }
.hero__eyebrow { animation-delay: .05s; } .hero__lead { animation-delay: .35s; } .hero__actions { animation-delay: .5s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero__lead { max-width: 560px; font-size: clamp(1rem, 1.5vw, 1.15rem); color: rgba(247,244,239,.82); margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__meta { position: absolute; left: 0; right: 0; bottom: 32px; display: flex; justify-content: flex-end; align-items: center; gap: 20px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(247,244,239,.7); }
.hero__caption { transition: opacity .5s; }
.hero__dots { display: flex; gap: 8px; }
.hero__dots i { width: 28px; height: 2px; background: rgba(247,244,239,.3); position: relative; overflow: hidden; }
.hero__dots i.is-active::after { content: ''; position: absolute; inset: 0; background: var(--paper); transform-origin: left; animation: dot 7s linear both; }
@keyframes dot { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hero__scroll { position: absolute; left: 50%; bottom: 26px; width: 1px; height: 56px; background: rgba(247,244,239,.25); overflow: hidden; display: none; }
.hero__scroll span { position: absolute; inset: 0; background: var(--paper); animation: scrollcue 2.4s var(--ease) infinite; }
@keyframes scrollcue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* ---------- Presentazione ---------- */
.intro__grid { display: grid; gap: clamp(40px, 6vw, 96px); align-items: center; }
.intro__photo { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); max-width: 520px; }
.intro__photo img { width: 100%; height: 100%; object-fit: cover; }
.intro__quote { margin: 26px 0 34px; padding-left: 22px; border-left: 2px solid var(--gold); font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1.8vw, 1.32rem); line-height: 1.65; color: #3a3631; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.facts > div { padding: 22px 16px 20px 0; display: flex; flex-direction: column-reverse; gap: 4px; }
.facts > div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.facts dt { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.facts dd { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1; font-variant-numeric: tabular-nums; margin: 0; }

/* ---------- Intestazioni di sezione ---------- */
.section-head:where(:not(.v1 *)) { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: clamp(36px, 5vw, 64px); }

/* ---------- Portfolio (tessere in home) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 20px); }
.tile a { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); background: var(--ink-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .8s; filter: saturate(.9); }
.tile a::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(10,9,8,.82)); transition: opacity .6s; }
.tile__label { position: absolute; z-index: 1; left: 20px; right: 20px; bottom: 18px; display: flex; flex-direction: column; gap: 2px; }
.tile__name { font-family: var(--serif); font-size: clamp(1.3rem, 2.4vw, 1.9rem); text-transform: uppercase; letter-spacing: 0.06em; }
.tile__count { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-light); transform: translateY(6px); opacity: .0; transition: transform .6s var(--ease), opacity .6s; }
.tile a:hover img, .tile a:focus-visible img { transform: scale(1.06); filter: saturate(1.05); }
.tile a:hover .tile__count, .tile a:focus-visible .tile__count { transform: none; opacity: 1; }
@media (hover: none) { .tile__count { opacity: 1; transform: none; } }

/* ---------- Servizi ---------- */
.services__head:where(:not(.v1 *)) { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.services__head:where(:not(.v1 *)) .lead { margin-top: 22px; }
.services__list:where(:not(.v1 *)) { display: grid; gap: 0; border-top: 1px solid var(--line); }
.service:where(:not(.v1 *)) { position: relative; padding: 34px 0 36px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 52px 1fr; column-gap: 20px; align-items: start; }
.service:where(:not(.v1 *))::after { content: ''; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease-out); }
.service:where(:not(.v1 *)):hover::after { transform: scaleX(1); }
.service__num:where(:not(.v1 *)) { grid-row: span 3; font-family: var(--serif); font-size: 0.95rem; color: var(--gold); padding-top: 6px; }
.service:where(:not(.v1 *)) .icon { width: 30px; height: 30px; color: var(--gold); margin-bottom: 14px; transition: transform .6s var(--ease); }
.service:where(:not(.v1 *)):hover .icon { transform: translateY(-3px) rotate(-4deg); }
.service__title:where(:not(.v1 *)) { font-size: clamp(1.35rem, 2.2vw, 1.7rem); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.service:where(:not(.v1 *)) p { color: var(--muted); max-width: 520px; }

/* ---------- Stampa ---------- */
.press:where(:not(.v1 *)) { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.press__title:where(:not(.v1 *)) { text-align: center; margin-bottom: 36px; }
.marquee:where(:not(.v1 *)) { display: flex; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track:where(:not(.v1 *)) { display: flex; align-items: center; gap: clamp(40px, 6vw, 80px); padding-right: clamp(40px, 6vw, 80px); flex: none; animation: marquee 48s linear infinite; }
.marquee:where(:not(.v1 *)):hover .marquee__track { animation-play-state: paused; }
.marquee__track:where(:not(.v1 *)) img { height: 42px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1); opacity: .62; transition: filter .4s, opacity .4s; }
.marquee__track:where(:not(.v1 *)) li:hover img { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Card articoli ---------- */
.cards:where(:not(.v1 *)) { display: grid; gap: clamp(28px, 3vw, 44px) clamp(20px, 2.4vw, 32px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card:where(:not(.v1 *)) { display: flex; flex-direction: column; gap: 18px; }
.card__media:where(:not(.v1 *)) { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.card__media:where(:not(.v1 *)) img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-out); }
.card:where(:not(.v1 *)):hover .card__media img { transform: scale(1.05); }
.card__placeholder:where(:not(.v1 *)) { position: absolute; inset: 0; background: linear-gradient(135deg, var(--paper-2), #e2dacd); }
.card__cat:where(:not(.v1 *)) { position: absolute; left: 14px; top: 14px; padding: 6px 12px; border-radius: 99px; background: rgba(247,244,239,.92); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.card__body:where(:not(.v1 *)) { display: flex; flex-direction: column; gap: 8px; }
.card__meta:where(:not(.v1 *)) { font-size: 0.74rem; color: var(--muted); display: flex; gap: 6px; letter-spacing: 0.04em; }
.card__title:where(:not(.v1 *)) { font-size: clamp(1.25rem, 1.9vw, 1.45rem); line-height: 1.25; }
.card__title:where(:not(.v1 *)) a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.card:where(:not(.v1 *)):hover .card__title a { background-size: 100% 1px; }
.card__excerpt:where(:not(.v1 *)) { font-size: 0.95rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.section--dark:where(:not(.v1 *)) .card__meta, .section--dark:where(:not(.v1 *)) .card__excerpt { color: var(--muted-light); }

/* ---------- Testimonianze ---------- */
.quotes .display { margin-bottom: 40px; }
.quotes__track { display: grid; grid-auto-flow: column; grid-auto-columns: min(86%, 560px); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 6px; scrollbar-width: none; }
.quotes__track::-webkit-scrollbar { display: none; }
.quote:where(:not(.v1 *)) { scroll-snap-align: start; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; padding: clamp(28px, 3vw, 40px); background: var(--ink-2); border: 1px solid var(--line-light); border-radius: var(--radius); transition: border-color .5s; }
.quote:where(:not(.v1 *)):hover { border-color: rgba(184,149,90,.5); }
.quote:where(:not(.v1 *)) blockquote { font-family: var(--serif); font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.7; color: rgba(247,244,239,.9); position: relative; padding-top: 34px; }
.quote:where(:not(.v1 *)) blockquote::before { content: '“'; position: absolute; top: -14px; left: -4px; font-size: 4rem; line-height: 1; color: var(--gold); }
.quote:where(:not(.v1 *)) figcaption { display: flex; align-items: center; gap: 14px; font-size: 0.82rem; color: var(--muted-light); line-height: 1.45; }
.quote:where(:not(.v1 *)) figcaption strong { color: var(--paper); font-weight: 600; letter-spacing: 0.04em; }
.quote__photo:where(:not(.v1 *)) { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; filter: grayscale(.3); }
.quotes__nav { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
.round { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line-light); display: grid; place-items: center; color: var(--paper); transition: background .3s, border-color .3s, color .3s; }
.round:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.quotes__dots { display: flex; gap: 8px; }
.quotes__dots i { width: 22px; height: 2px; background: var(--line-light); transition: background .4s, width .4s var(--ease); }
.quotes__dots i.is-active { background: var(--gold); width: 36px; }

/* ---------- Ricordi Appesi ---------- */
.ricordi__grid { display: grid; gap: 36px; align-items: center; padding: clamp(32px, 5vw, 64px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.ricordi__logo img { width: 240px; height: auto; transition: transform .6s var(--ease); }
.ricordi__logo:hover img { transform: rotate(-2deg) scale(1.03); }
.ricordi__grid p:not(.eyebrow) { color: var(--muted); max-width: 640px; margin: 14px 0 24px; }

/* ---------- Invito finale ---------- */
.cta { background: var(--ink); color: var(--paper); text-align: center; padding-block: clamp(88px, 12vw, 170px); position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; left: 50%; top: -40%; width: 70vmax; height: 70vmax; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(184,149,90,.18), transparent 70%); pointer-events: none; }
.cta .wrap { position: relative; }
.cta__title { font-size: clamp(2.4rem, 6.6vw, 5.6rem); text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.04; margin-bottom: 26px; }
.cta__text { max-width: 560px; margin: 0 auto 38px; color: var(--muted-light); font-size: 1.08rem; }
.cta--compact { padding-block: clamp(64px, 8vw, 110px); }
.cta--compact .cta__title { font-size: clamp(1.8rem, 4vw, 3rem); }

/* ---------- Intestazioni di pagina ---------- */
.page-hero { padding-top: clamp(48px, 8vw, 110px); padding-bottom: clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.page-hero .display { margin-bottom: 22px; }
.page-hero__lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.7; color: var(--muted); max-width: 680px; margin-bottom: 28px; }
.page-hero > .wrap > * , .post-hero__text > * { animation: rise 1s var(--ease-out) both; }
.page-hero > .wrap > :nth-child(2), .post-hero__text > :nth-child(2) { animation-delay: .06s; }
.page-hero > .wrap > :nth-child(3), .post-hero__text > :nth-child(3) { animation-delay: .12s; }
.page-hero > .wrap > :nth-child(n+4), .post-hero__text > :nth-child(n+4) { animation-delay: .2s; }
.page-hero--dark { background: var(--ink); color: var(--paper); border: 0; padding-top: calc(var(--header) + clamp(40px, 6vw, 80px)); }
.page-hero--dark .page-hero__lead { color: var(--muted-light); }
.page-hero--dark .crumbs, .page-hero--dark .crumbs a { color: var(--muted-light); }
.page-hero__grid { display: grid; gap: 40px; align-items: end; }
.page-hero__grid > .page-hero__text > * { animation: rise 1s var(--ease-out) both; }
.page-hero__photo { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); max-width: 460px; }
.page-hero__photo img { width: 100%; height: 100%; object-fit: cover; animation: settle 1.8s var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.1); } to { transform: none; } }
.page-hero--center { text-align: center; }
.page-hero--center .page-hero__lead { margin-inline: auto; }

.crumbs { margin-bottom: 22px; font-size: 0.74rem; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li { display: inline-flex; gap: 6px; }
.crumbs li + li::before { content: '/'; opacity: .45; }
.crumbs a:hover { color: var(--ink); }
.page-hero--dark .crumbs a:hover { color: var(--paper); }

/* ---------- About ---------- */
.bio__text p { font-size: 1.12rem; line-height: 1.85; margin-bottom: 1.3em; color: #34302b; }
.bio__lead { font-family: var(--serif); font-size: clamp(1.35rem, 2.4vw, 1.7rem) !important; line-height: 1.55 !important; color: var(--ink) !important; }
.bio__en { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.bio__en summary { cursor: pointer; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; list-style: none; display: inline-flex; gap: 10px; align-items: center; }
.bio__en summary::-webkit-details-marker { display: none; }
.bio__en summary::after { content: '+'; font-size: 1.2rem; transition: transform .4s var(--ease); }
.bio__en[open] summary::after { transform: rotate(45deg); }
.bio__en p { margin-top: 16px; color: var(--muted); }

.timeline { position: relative; margin-top: 48px; padding-left: 34px; }
.timeline::before, .timeline::after { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; }
.timeline::before { background: var(--line); }
.timeline::after { background: var(--gold); transform-origin: top; transform: scaleY(var(--p, 0)); transition: transform .2s linear; }
.timeline__item { position: relative; padding-bottom: 34px; }
.timeline__item::before { content: ''; position: absolute; left: -33px; top: 8px; width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--gold); background: var(--paper-2); transition: background .5s; }
.timeline__item.active::before { background: var(--gold); }
.timeline__year { font-family: var(--serif); font-size: 1.6rem; line-height: 1; display: block; margin-bottom: 6px; color: var(--ink); }
.timeline__item p { color: #4b463f; max-width: 620px; }

.split { display: grid; gap: clamp(48px, 6vw, 96px); }
.list-lines { margin-top: 28px; border-top: 1px solid var(--line); }
.list-lines li { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.list-lines a, .list-lines span { font-size: 1.02rem; transition: color .3s, padding .45s var(--ease); }
.list-lines a:hover { color: var(--gold); padding-left: 8px; }
.list-lines a[target="_blank"]::after { content: ' ↗'; font-size: .8em; color: var(--muted); }
.list-lines small { font-size: 0.8rem; color: var(--muted); }
.list-lines--light { border-color: var(--line-light); }
.list-lines--light li { border-color: var(--line-light); }
.list-lines--light a[target="_blank"]::after, .list-lines--light small { color: var(--muted-light); }

.pubs { margin-top: 36px; columns: 1; column-gap: 40px; }
.pubs li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.96rem; }
.pubs a { transition: color .3s; }
.pubs a:hover { color: var(--gold); }
.pubs a[target="_blank"]::after { content: ' ↗'; font-size: .8em; color: var(--muted); }
.pubs.is-collapsed li:nth-child(n+19) { display: none; }
.pubs__more { margin-top: 28px; }

/* ---------- Portfolio ---------- */
.chips { margin-top: 8px; }
.chips ul { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 99px; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; transition: background .3s, color .3s, border-color .3s; }
.chips a span { font-size: 0.68rem; opacity: .55; }
.chips a:hover { border-color: var(--ink); }
.chips a[aria-current] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.gallery-section { padding-top: clamp(56px, 7vw, 96px); }
.gallery-section[hidden] { display: none; }
.gallery-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.gallery-section__head p { color: var(--muted); }
.masonry { columns: 2; column-gap: clamp(8px, 1.4vw, 18px); }
.masonry__item { break-inside: avoid; margin-bottom: clamp(8px, 1.4vw, 18px); }
.masonry__item a { display: block; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); position: relative; }
.masonry__item img { width: 100%; height: auto; transition: transform 1.1s var(--ease-out), opacity .6s; }
.masonry__item a::after { content: ''; position: absolute; inset: 0; background: rgba(18,17,16,0); transition: background .5s; }
.masonry__item a:hover img { transform: scale(1.04); }
.masonry__item a:hover::after { background: rgba(18,17,16,.12); }
.banner { margin-block: clamp(64px, 8vw, 110px) 0; padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; background: var(--white); }
.banner p:not(.eyebrow) { color: var(--muted); max-width: 560px; margin-top: 8px; }

/* ---------- Visualizzatore ---------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; padding: 0; border: 0; background: rgba(10,9,8,.97); color: var(--paper); }
.lightbox::backdrop { background: rgba(10,9,8,.9); }
.lightbox[open] { display: grid; place-items: center; animation: fade .35s var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 72px 48px; max-height: 100%; }
.lightbox__img { max-width: min(92vw, 1100px); max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 2px; transition: opacity .35s var(--ease), transform .45s var(--ease-out); }
.lightbox__img.is-loading { opacity: 0; transform: scale(.985); }
.lightbox__caption { font-size: 0.8rem; letter-spacing: 0.08em; color: var(--muted-light); text-align: center; min-height: 1.2em; }
.lightbox__btn { position: absolute; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; color: var(--paper); transition: background .3s; }
.lightbox__btn:hover { background: rgba(247,244,239,.12); }
.lightbox__btn .icon { width: 26px; height: 26px; }
.lightbox__close { top: 14px; right: 14px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__count { position: absolute; top: 28px; left: 24px; font-size: 0.72rem; letter-spacing: 0.18em; color: var(--muted-light); }

/* ---------- Contatti ---------- */
.contact__grid { display: grid; gap: clamp(40px, 6vw, 80px); align-items: start; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 48px); }
.form { display: flex; flex-direction: column; gap: 22px; }
.form__row { display: grid; gap: 22px; }
.field { position: relative; }
.field input, .field textarea {
    width: 100%; padding: 22px 0 10px; border: 0; border-bottom: 1px solid rgba(18,17,16,.25); background: transparent;
    font-size: 16px; outline: none; border-radius: 0; transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field label { position: absolute; left: 0; top: 20px; font-size: 0.98rem; color: var(--muted); pointer-events: none; transform-origin: left; transition: transform .35s var(--ease), color .3s; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field input:focus + label, .field textarea:focus + label,
.field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-20px) scale(.76); color: var(--ink); }
.field::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out); }
.field:focus-within::after { transform: scaleX(1); }
.req { color: var(--gold); }
.opt { font-size: 0.8em; color: var(--muted); }
.topics { border: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topics legend { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.topic input { position: absolute; opacity: 0; pointer-events: none; }
.topic span { display: inline-flex; padding: 9px 16px; border: 1px solid var(--line); border-radius: 99px; font-size: 0.86rem; cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.topic input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.topic input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 12px; font-size: 0.86rem; color: var(--muted); line-height: 1.6; cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; border: 1px solid rgba(18,17,16,.4); border-radius: 3px; display: grid; place-content: center; margin-top: 1px; transition: background .25s, border-color .25s; cursor: pointer; }
.consent input::after { content: ''; width: 10px; height: 6px; border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper); transform: rotate(-45deg) scale(0); margin-top: -3px; transition: transform .25s var(--ease); }
.consent input:checked { background: var(--ink); border-color: var(--ink); }
.consent input:checked::after { transform: rotate(-45deg) scale(1); }
.consent a, .form__note a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.form__note { font-size: 0.76rem; line-height: 1.6; color: var(--muted); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 16px 18px; border-radius: var(--radius); margin-bottom: 22px; font-size: 0.92rem; }
.alert--err { background: #f9e7e3; color: #8c2f1f; }
.alert--ok { background: transparent; padding: 24px 0; }
.alert--ok p { color: var(--muted); margin-top: 10px; }
.contact-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); margin-bottom: 36px; }
.contact-list li { display: flex; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.contact-list .icon { width: 22px; height: 22px; color: var(--gold); margin-top: 3px; }
.contact-list small { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.contact-list a { font-size: 1.05rem; transition: color .3s; }
.contact-list a:hover { color: var(--gold); }

.social { display: flex; gap: 10px; }
.social a { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-light); display: grid; place-items: center; transition: background .3s, color .3s, transform .4s var(--ease); }
.social a:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); transform: translateY(-2px); }
.social .icon { width: 19px; height: 19px; }
.social--dark a { border-color: var(--line); }

/* ---------- Link in Bio ---------- */
.bio-page { background: var(--ink); color: var(--paper); }
.linkbio { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 48px 20px; position: relative; isolation: isolate; }
.linkbio__bg { position: fixed; inset: 0; z-index: -1; }
.linkbio__bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(6px) brightness(.35); transform: scale(1.1); }
.linkbio__card { width: 100%; max-width: 440px; text-align: center; }
.linkbio__avatar { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%; overflow: hidden; border: 1px solid rgba(247,244,239,.4); animation: rise .9s var(--ease-out) both; }
.linkbio__avatar img { width: 100%; height: 100%; object-fit: cover; }
.linkbio__name { font-size: 1.9rem; text-transform: uppercase; letter-spacing: 0.06em; animation: rise .9s .08s var(--ease-out) both; }
.linkbio__role { color: var(--muted-light); font-size: 0.86rem; letter-spacing: 0.08em; margin: 6px 0 30px; animation: rise .9s .14s var(--ease-out) both; }
.linkbio__list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.linkbio__list li { animation: rise .8s var(--ease-out) both; animation-delay: calc(.2s + var(--d, 0ms)); }
.linkbio__list a { display: block; padding: 16px 20px; border: 1px solid rgba(247,244,239,.35); border-radius: var(--radius); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; background: rgba(18,17,16,.35); backdrop-filter: blur(6px); transition: background .35s, color .35s, border-color .35s, transform .35s var(--ease); }
.linkbio__list a:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); transform: translateY(-2px); }
.linkbio .social { justify-content: center; }

/* ---------- Articoli e pagine ---------- */
.post-hero { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); margin-bottom: clamp(36px, 5vw, 64px); }
.post-hero__grid { display: grid; gap: 36px; align-items: end; }
.post-hero__title { font-size: clamp(2.2rem, 5.4vw, 4.4rem); text-transform: uppercase; letter-spacing: 0.03em; line-height: 1.06; margin-bottom: 22px; }
.post-hero__title.is-long { font-size: clamp(2rem, 4.4vw, 3.5rem); }
.post-hero__title.is-xlong { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.post-hero__media { aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); }
.post-hero__media img { width: 100%; height: 100%; object-fit: cover; animation: settle 1.8s var(--ease-out) both; }
.post--doc .post-hero__title { font-size: clamp(2rem, 4.4vw, 3.2rem); }

.reading { max-width: 760px; margin: 0 auto; padding-bottom: clamp(48px, 7vw, 96px); }
.reading.has-toc { max-width: 1120px; display: grid; gap: 56px; }
.toc { font-size: 0.86rem; }
.toc details { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--white); }
.toc__title { cursor: pointer; list-style: none; display: flex; gap: 8px; align-items: center; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.toc__title::-webkit-details-marker { display: none; }
.toc details[open] .toc__title { margin-bottom: 14px; }
.toc__count { padding: 2px 8px; border-radius: 99px; background: var(--paper-2); letter-spacing: 0; }
.toc__list { display: flex; flex-direction: column; gap: 10px; }
.toc__item a { color: var(--muted); display: block; line-height: 1.4; transition: color .3s, transform .3s var(--ease); }
.toc__item a:hover, .toc__item a.is-active { color: var(--ink); }
.toc__item a.is-active { transform: translateX(3px); }
.toc__item--h3 { padding-left: 14px; font-size: 0.82rem; }

.prose { font-size: 1.1rem; line-height: 1.85; color: #2b2824; overflow-wrap: break-word; }
.prose > * + * { margin-top: 1.3em; }
.post:not(.post--doc) .prose > p:first-child { font-size: 1.24rem; line-height: 1.7; color: var(--ink); }
.post:not(.post--doc) .prose > p:first-child::first-letter { font-family: var(--serif); float: left; font-size: 4.4em; line-height: .82; padding: 6px 12px 0 0; color: var(--gold); }
.prose h2, .prose h3, .prose h4 { color: var(--ink); margin-top: 2.2em; scroll-margin-top: calc(var(--header) + 24px); }
.prose h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); text-transform: uppercase; letter-spacing: 0.04em; padding-top: 18px; position: relative; }
.prose h2::before { content: ''; position: absolute; left: 0; top: 0; width: 44px; height: 1px; background: var(--gold); }
.prose h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.prose a { text-decoration: underline; text-decoration-color: rgba(184,149,90,.6); text-underline-offset: 3px; transition: color .3s; }
.prose a:hover { color: var(--gold); }
.prose ul { list-style: disc; padding-left: 1.4em; }
.prose ol { list-style: decimal; padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose img { border-radius: var(--radius); }
.prose figure { margin-block: 2.2em; }
.prose figcaption { font-size: 0.84rem; color: var(--muted); text-align: center; margin-top: 10px; }
.prose blockquote { border-left: 2px solid var(--gold); padding: 6px 0 6px 24px; font-family: var(--serif); font-style: italic; font-size: 1.24rem; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: .95rem; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose iframe, .prose video { max-width: 100%; }
.prose .wp-block-embed iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; }
.prose .wp-block-gallery { gap: 10px !important; }
.prose .alignwide, .prose .alignfull { width: 100%; max-width: 100%; margin-inline: 0; }
.prose .numbered-heading { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.35rem; margin-top: 1.8em; color: var(--ink); scroll-margin-top: calc(var(--header) + 24px); }
.prose [id] { scroll-margin-top: calc(var(--header) + 24px); }
.post--doc .prose { font-size: 1rem; }
.post--doc .prose .has-small-font-size { font-size: 1rem !important; }
.doc-note { padding: 18px 22px; background: var(--paper-2); border-radius: var(--radius); font-size: .95rem; }

.post-foot { margin-top: 3.2em !important; padding-top: 2em; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 28px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none !important; padding: 0 !important; }
.tags a { text-decoration: none !important; font-size: .8rem; padding: 6px 12px; border-radius: 99px; background: var(--paper-2); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share__label { font-size: .7rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
.share a, .share__copy { text-decoration: none !important; font-size: .78rem; padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); transition: background .3s, color .3s, border-color .3s; }
.share a:hover, .share__copy:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.share__copy.is-copied { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.author { display: flex; gap: 18px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.author p { margin: 0 !important; }
.author__photo { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex: none; }
.author__photo img { width: 100%; height: 100%; object-fit: cover; }
.author__label { font-size: .68rem !important; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.author__name { font-family: var(--serif); font-size: 1.3rem !important; }
.author__name a { text-decoration: none !important; }
.author__bio { font-size: .9rem !important; color: var(--muted); line-height: 1.6; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-bottom: clamp(48px, 7vw, 96px); max-width: 1120px; margin-inline: auto; }
.post-nav__link { display: flex; flex-direction: column; gap: 6px; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); transition: background .3s, transform .45s var(--ease); }
.post-nav__link:hover { background: var(--white); transform: translateY(-3px); }
.post-nav__link small { font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.post-nav__link span { font-family: var(--serif); font-size: 1.1rem; line-height: 1.3; }
.post-nav__link--next { text-align: right; grid-column: 2; }
.related { border-top: 1px solid var(--line); }
.related .display { margin-bottom: 40px; }

.pager { margin-top: 64px; display: flex; justify-content: center; }
.pager .nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pager .page-numbers { min-width: 46px; min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 16px; border: 1px solid var(--line); border-radius: 99px; font-size: .86rem; transition: background .3s, color .3s; }
.pager .page-numbers:hover { border-color: var(--ink); }
.pager .page-numbers.current { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.search { display: flex; gap: 10px; max-width: 520px; margin-top: 24px; }
.page-hero--center .search { margin-inline: auto; }
.search input { flex: 1; min-width: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-size: 16px; }
.search input:focus { outline: none; border-color: var(--ink); }
.e404 .page-hero { padding-top: clamp(64px, 10vw, 140px); padding-bottom: clamp(80px, 10vw, 140px); }
.e404__code { font-family: var(--serif); font-size: clamp(5rem, 18vw, 11rem); line-height: 1; color: var(--gold); }
.e404__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 24px; margin-top: 36px; }
.e404__links a { border-bottom: 1px solid var(--line); padding-bottom: 2px; }

/* ---------- Footer (stile v1) ---------- */
.site-footer { background: #070707; color: rgba(255,255,255,0.72); padding-top: clamp(64px, 8vw, 100px); font-size: 0.95rem; }
.site-footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1.3fr 1fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.site-footer__logo { width: 180px; height: auto; margin-bottom: 20px; filter: brightness(0) invert(1); }
.site-footer__brand p { max-width: 320px; margin: 0 0 1em; }
.site-footer .label { display: block; margin: 0 0 14px; font-family: 'Manrope', var(--sans); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255,255,255,0.5); }
.site-footer__col ul { list-style: none; display: grid; gap: 8px; }
.site-footer a { transition: color 0.3s; }
.site-footer a:hover { color: #fff; }
.site-footer address a { line-height: 2; }
.site-footer .social { display: flex; gap: 10px; }
.site-footer .social a { width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.18); display: grid; place-items: center; transition: background .3s, color .3s, border-color .3s; }
.site-footer .social a:hover { background: #fff; color: #070707; border-color: #fff; }
.site-footer__ricordi img { width: 170px; height: auto; filter: invert(1); opacity: 0.8; transition: opacity 0.3s; }
.site-footer__ricordi:hover img { opacity: 1; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 24px; font-family: 'Manrope', var(--sans); font-size: 0.74rem; letter-spacing: 0.04em; color: rgba(255,255,255,0.45); }
.site-footer__bottom p { margin: 0; }
.site-footer .linklike:hover { color: #fff; }
@media (max-width: 1024px) { .site-footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .site-footer__top { grid-template-columns: 1fr; } }

/* ---------- Animazioni allo scroll (solo con JS attivo) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal--curtain { opacity: 1; transform: none; }
.js .reveal--curtain img { clip-path: inset(100% 0 0 0); transform: scale(1.18); transition: clip-path 1.4s var(--ease-out), transform 1.8s var(--ease-out); }
.js .reveal--curtain.is-in img { clip-path: inset(0); transform: none; }
.js .cards:where(:not(.v1 *)) > .reveal:nth-child(3n+2) { --d: 90ms; } .js .cards:where(:not(.v1 *)) > .reveal:nth-child(3n+3) { --d: 180ms; }
.js .tiles > .reveal:nth-child(2) { --d: 90ms; } .js .tiles > .reveal:nth-child(3) { --d: 180ms; } .js .tiles > .reveal:nth-child(4) { --d: 270ms; }

.read-progress { position: fixed; z-index: 1100; inset: 0 0 auto 0; height: 2px; background: var(--gold); transform-origin: left; transform: scaleX(0); pointer-events: none; }

/* Transizione morbida tra le pagine (browser compatibili) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .5s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
    .masonry { columns: 3; }
    .form__row { grid-template-columns: 1fr 1fr; }
    .pubs { columns: 2; }
}
@media (min-width: 900px) {
    .intro__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
    .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .services__list:where(:not(.v1 *)) { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; gap: 40px; }
    .service:where(:not(.v1 *)) { grid-template-columns: 1fr; border-top: 1px solid var(--line); border-bottom: 0; padding-top: 30px; }
    .service:where(:not(.v1 *))::after { top: -1px; bottom: auto; }
    .service__num:where(:not(.v1 *)) { grid-row: auto; margin-bottom: 18px; }
    .ricordi__grid { grid-template-columns: 280px 1fr; gap: 56px; }
    .page-hero__grid { grid-template-columns: 1fr 420px; }
    .post-hero--image .post-hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
    .split { grid-template-columns: 1fr 1fr; }
    .contact__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
    .pubs { columns: 3; }
    .hero__scroll { display: block; }
}
@media (min-width: 1024px) {
    .nav { display: flex; }
    .burger { display: none; }
    .menu-panel { display: none !important; }
    .masonry { columns: 4; }
    .reading.has-toc { grid-template-columns: 230px minmax(0, 1fr); }
    .toc { position: sticky; top: calc(var(--header) + 24px); }
    .toc details { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: none; padding: 0 0 0 20px; }
}
@media (max-width: 899px) {
    .hero { padding-bottom: 110px; }
    .hero__meta { justify-content: space-between; }
    .page-hero__photo { max-width: none; aspect-ratio: 1; order: -1; }
    .post-nav { grid-template-columns: 1fr; }
    .post-nav__link--next { grid-column: auto; text-align: left; }
}
@media (max-width: 640px) {
    :root { --header: 70px; }
    .brand__logo { height: 36px; }
    body { font-size: 16px; }
    .facts { grid-template-columns: 1fr 1fr; }
    .facts > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
    .hero__actions .btn:where(:not(.v1 *)) { flex: 1 1 100%; }
    .hero__caption { display: none; }
    .chips ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); }
    .chips ul::-webkit-scrollbar { display: none; }
    .chips li { flex: none; }
    .lightbox__figure { padding: 64px 8px 40px; }
    .lightbox__prev, .lightbox__next { top: auto; bottom: 10px; transform: none; }
    .author { flex-direction: column; text-align: center; }
    .prose { font-size: 1.04rem; }
}
@media (hover: none) {
    .btn:where(:not(.v1 *))::before { display: none; }
    .tile img, .card__media:where(:not(.v1 *)) img, .masonry__item img { transition: none; }
}

/* ---------- Meno movimento ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .js .reveal, .js .reveal--curtain img { opacity: 1; transform: none; clip-path: none; }
    .marquee__track:where(:not(.v1 *)) { animation: none; }
    .marquee:where(:not(.v1 *)) { overflow-x: auto; }
    .menu-panel { clip-path: none; }
    .site-header.is-hidden { transform: none; }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

@media print {
    .site-header, .menu-panel, .site-footer, .hero__slides, .marquee:where(:not(.v1 *)), .share, .cta, .lightbox { display: none !important; }
    body { background: #fff; color: #000; }
    .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- Consenso cookie ---------- */
.linklike { padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.linklike:hover { color: var(--paper); }
.btn--ghost:where(:not(.v1 *)) { --bg: transparent; --fg: var(--ink); --bd: rgba(18,17,16,.3); }
.consent-bar {
    position: fixed; z-index: 2000; left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom));
    max-width: 440px; padding: 26px 26px 24px; background: var(--paper); color: var(--ink);
    border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 60px -20px rgba(10,9,8,.45);
    transform: translateY(24px); opacity: 0; transition: transform .7s var(--ease-out), opacity .5s;
}
.consent-bar.is-in { transform: none; opacity: 1; }
.consent-bar[hidden] { display: none; }
.consent-bar__title { font-family: var(--serif); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; padding-right: 32px; }
.consent-bar__text { font-size: .86rem; line-height: 1.6; color: var(--muted); margin-bottom: 18px; }
.consent-bar__text a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.consent-bar__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent-bar__actions .btn:where(:not(.v1 *)) { min-height: 46px; padding: 10px 16px; }
.consent-bar__x { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.consent-bar__x:hover { color: var(--ink); background: var(--paper-2); }
@media (min-width: 700px) { .consent-bar { left: 24px; right: auto; bottom: 24px; } }

/* Barra di amministrazione (solo da loggati): l'intestazione scende sotto la barra */
.admin-bar .site-header { top: 32px; }
.admin-bar .menu-panel { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header, .admin-bar .menu-panel { top: 46px; } }
@media (max-width: 600px) { #wpadminbar { position: fixed; } }

/* Titolo di apertura: il nome con il lettering del logo (senza "Portrait Studio") */
.hero__name { margin: 4px 0 30px; line-height: 0; }
.hero__logo { display: block; width: clamp(260px, 40vw, 560px); aspect-ratio: 7088 / 1983; animation: rise 1.2s .1s var(--ease-out) both; }
.hero__logo img { width: 100%; height: 100%; object-fit: contain; object-position: left center; filter: brightness(0) invert(1); }

/* About: progetti d'autore */
.projects .display { margin-bottom: clamp(32px, 4vw, 52px); }
.projects__list { display: grid; gap: clamp(28px, 3vw, 44px); }
.project__link { display: flex; flex-direction: column; height: 100%; }
.project__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--paper); margin-bottom: 20px; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.project__link:hover .project__media img { transform: scale(1.05); }
.project .eyebrow { margin-bottom: 8px; }
.project__title { font-size: clamp(1.4rem, 2.2vw, 1.8rem); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.project__text { color: var(--muted); font-size: .98rem; margin-bottom: 18px; }
.project .link-arrow { margin-top: auto; align-self: flex-start; }
@media (min-width: 900px) { .projects__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* WhatsApp */
.wa-link { display: inline-flex !important; align-items: center; gap: 8px; margin-top: 6px; }
.wa-link .icon--wa { width: 18px; height: 18px; color: #25d366; }
.contact-list .wa-link { font-size: .95rem; }
.btn--wa .icon--wa { width: 18px; height: 18px; }
.wa-float { position: fixed; z-index: 800; right: 18px; bottom: max(18px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px 0 14px; border-radius: 99px; background: #25d366; color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; box-shadow: 0 12px 30px -10px rgba(0,0,0,.45); transform: translateY(0); transition: transform .4s var(--ease), box-shadow .4s, opacity .4s; }
.wa-float .icon--wa { width: 24px; height: 24px; }
.wa-float:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -10px rgba(0,0,0,.5); }
body.menu-open .wa-float { opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .wa-float { width: 52px; padding: 0; justify-content: center; } .wa-float span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
@media print { .wa-float { display: none; } }
.contact-list .wa-link { display: flex !important; width: max-content; margin-top: 8px; }
