/* Luigina Mazzocca — public site.
   Same language as the artwork certificate pages: warm paper, near-black ink,
   a restrained crimson (the "fruits"), EB Garamond for text, Inter for labels. */

:root {
  --paper: #f7f5f1;
  --paper-2: #efece6;
  --ink: #1d1b18;
  --ink-2: #4a453f;
  --muted: #6f675d;
  --line: #ddd8cf;
  --accent: #9b2d20;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --wrap: 1240px;
  --text: 680px;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  font-feature-settings: "liga" 1, "onum" 1;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--line); text-underline-offset: 3px; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--text); margin: 0 auto; }
.eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem;
}
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 99; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; }
.brand { display: block; width: 190px; flex: none; }
.brand img { width: 100%; height: auto; }
.nav { display: flex; gap: clamp(14px, 2vw, 30px); font-family: var(--sans); font-size: .82rem; letter-spacing: .04em; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--ink); }
.nav-toggle span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 5px 0; transition: transform .2s, opacity .2s; }

@media (max-width: 900px) {
  .site-header .wrap { height: 64px; }
  .brand { width: 150px; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; font-size: 1rem;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s;
  }
  .nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  body.nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

main { min-height: 60vh; }
.section { padding: clamp(48px, 8vw, 110px) 0; }
.section + .section { padding-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: clamp(24px, 4vw, 44px); flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.link-more { font-family: var(--sans); font-size: .8rem; letter-spacing: .06em; text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.link-more::after { content: " →"; }
.page-head { padding: clamp(40px, 7vw, 90px) 0 clamp(24px, 4vw, 48px); }
.page-head h1 { margin-bottom: .25em; }
.page-head .lead { font-size: 1.25rem; color: var(--ink-2); max-width: 46ch; }

/* ---------- home ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.hero-art { margin: 0; }
.hero-art a { display: block; text-decoration: none; }
.hero-art img { width: 100%; max-height: 78vh; object-fit: contain; object-position: left center; box-shadow: 0 30px 60px -30px rgba(29,27,24,.35); }
.hero-art figcaption { margin-top: 14px; font-size: .95rem; color: var(--muted); font-style: italic; }
.hero-text h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); margin-bottom: .35em; }
.hero-text h1 em { color: var(--accent); }
.hero-text p { font-size: 1.2rem; color: var(--ink-2); max-width: 36ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .hero-art img { max-height: 64vh; object-position: center; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-size: .82rem; letter-spacing: .05em;
  padding: 13px 20px; border: 1px solid var(--ink); color: var(--ink); text-decoration: none; background: transparent;
  cursor: pointer; transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.quote { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.quote blockquote { margin: 0 auto; max-width: 860px; text-align: center; font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.45; font-style: italic; color: var(--ink-2); }
.quote cite { display: block; margin-top: 18px; font-style: normal; font-family: var(--sans); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.visit { background: var(--paper-2); }
.visit .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 80px); align-items: center; }
@media (max-width: 760px) { .visit .wrap { grid-template-columns: 1fr; } }
.video-facade { position: relative; aspect-ratio: 16/9; background: var(--ink); color: var(--paper); display: grid; place-items: center; cursor: pointer; border: 0; width: 100%; padding: 0; overflow: hidden; }
.video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.video-facade .play { position: relative; font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 12px; }
.video-facade .play::before { content: ""; width: 54px; height: 54px; border-radius: 50%; border: 1px solid currentColor; background: no-repeat 55% 50% / 16px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12'%3E%3Cpath d='M0 0l10 6-10 6z' fill='%23f7f5f1'/%3E%3C/svg%3E"); }
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- series grid ---------- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(28px, 4vw, 52px) clamp(20px, 3vw, 36px); }
.series-card { text-decoration: none; display: block; }
.series-card .thumb { aspect-ratio: 4/5; background: var(--paper-2); overflow: hidden; }
.series-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.series-card:hover .thumb img { transform: scale(1.03); }
.series-card h3 { margin: 14px 0 2px; font-size: 1.3rem; }
.series-card .meta { font-family: var(--sans); font-size: .75rem; letter-spacing: .06em; color: var(--muted); }
.series-card.highlight .thumb { outline: 1px solid var(--accent); outline-offset: 6px; }

/* ---------- artworks (masonry) ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 32px; font-family: var(--sans); font-size: .78rem; }
.filters a { text-decoration: none; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); }
.filters a[aria-current="true"], .filters a:hover { border-color: var(--ink); color: var(--ink); }
.masonry { columns: 3 280px; column-gap: clamp(20px, 3vw, 40px); }
.work { break-inside: avoid; margin: 0 0 clamp(28px, 4vw, 48px); }
.work a { text-decoration: none; display: block; }
.work .img { background: var(--paper-2); }
.work img { width: 100%; transition: opacity .3s; }
.work a:hover img { opacity: .9; }
.work .cap { margin-top: 10px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.work .t { font-size: 1.05rem; line-height: 1.3; }
.work .d { font-family: var(--sans); font-size: .72rem; color: var(--muted); letter-spacing: .03em; white-space: nowrap; }
.badge { display: inline-block; font-family: var(--sans); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; padding: 3px 7px; margin-top: 6px; }
.dot-available { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: middle; }

.intro { font-size: 1.15rem; color: var(--ink-2); max-width: var(--text); }
.intro p:last-child { margin-bottom: 0; }

/* ---------- artwork page ---------- */
.artwork { padding: clamp(24px, 4vw, 56px) 0 clamp(48px, 7vw, 96px); }
.artwork .wrap { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .artwork .wrap { grid-template-columns: 1fr; } }
.artwork-media figure { margin: 0 0 20px; }
.artwork-media img { width: 100%; max-height: 86vh; object-fit: contain; background: var(--paper-2); cursor: zoom-in; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbs button { padding: 0; border: 1px solid transparent; background: none; cursor: pointer; width: 72px; height: 72px; }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.artwork-videos { margin-top: 28px; display: grid; gap: 22px; }
.artwork-video video { display: block; width: 100%; height: auto; max-height: 86vh; background: #111; }
.artwork-video video.portrait { width: auto; max-width: 100%; margin: 0 auto; }
.artwork-video figcaption { margin-top: 8px; font-size: .9rem; color: var(--muted, #6b655c); }
.artwork-info { position: sticky; top: 100px; }
.artwork-info h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.facts { margin: 24px 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 1.02rem; }
.facts dt { font-family: var(--sans); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: .25em; }
.facts dd { margin: 0; }
.artwork-desc { color: var(--ink-2); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; font-family: var(--sans); font-size: .8rem; }
.pager a { text-decoration: none; color: var(--ink-2); max-width: 48%; }
.breadcrumb { font-family: var(--sans); font-size: .76rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { text-decoration: none; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(20,19,17,.96); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 86vh; object-fit: contain; box-shadow: 0 20px 80px rgba(0,0,0,.5); }
.lightbox .lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #d9d4cb; font-size: 1rem; padding: 0 70px; }
.lightbox button { position: absolute; background: none; border: 0; color: #f0ece4; font: 300 2.2rem/1 var(--sans); cursor: pointer; padding: 18px; opacity: .8; }
.lightbox button:hover { opacity: 1; }
.lb-close { top: 4px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* ---------- news ---------- */
.news-list { display: grid; gap: clamp(32px, 5vw, 56px); }
.news-row { display: grid; grid-template-columns: 220px 1fr; gap: clamp(20px, 4vw, 44px); text-decoration: none; padding-bottom: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.news-row:last-child { border-bottom: 0; }
.news-row.no-cover { grid-template-columns: 1fr; }
.news-row .thumb { aspect-ratio: 4/3; background: var(--paper-2); overflow: hidden; }
.news-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-row h2, .news-row h3 { font-size: 1.6rem; margin: 4px 0 8px; }
.news-row p { color: var(--ink-2); margin: 0; }
.news-row time { font-family: var(--sans); font-size: .74rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
@media (max-width: 640px) { .news-row { grid-template-columns: 1fr; } }
.news-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(24px, 4vw, 40px); }
.news-card { text-decoration: none; border-top: 1px solid var(--ink); padding-top: 16px; }
.news-card h3 { margin: 6px 0 8px; }
.news-card p { color: var(--ink-2); font-size: 1rem; margin: 0; }
.news-card time { font-family: var(--sans); font-size: .72rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }

.prose { font-size: 1.15rem; }
.prose h2 { font-size: 1.7rem; margin: 1.6em 0 .5em; }
.prose h3 { font-size: 1.3rem; margin: 1.4em 0 .4em; }
.prose img { margin: 1.5em 0; }
.prose blockquote { margin: 1.5em 0; padding-left: 1.2em; border-left: 2px solid var(--accent); color: var(--ink-2); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose b, .prose strong { font-weight: 600; }
.prose a { text-decoration-color: var(--accent); }
.cover { margin: 0 0 clamp(28px, 4vw, 48px); }
.cover img { width: 100%; max-height: 70vh; object-fit: cover; }

/* ---------- about ---------- */
.about .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.about-portrait { position: sticky; top: 100px; margin: 0; }
.about-portrait img { width: 100%; filter: grayscale(.15); }
@media (max-width: 820px) { .about .wrap { grid-template-columns: 1fr; } .about-portrait { position: static; max-width: 420px; } }

/* ---------- timeline ---------- */
.timeline { border-top: 1px solid var(--line); }
.year { display: grid; grid-template-columns: 120px 1fr; gap: clamp(16px, 4vw, 48px); padding: 22px 0; border-bottom: 1px solid var(--line); }
.year h2 { font-size: 1.9rem; color: var(--accent); margin: 0; }
.year ul { list-style: none; margin: 0; padding: 0; }
.year li { padding: 4px 0 10px; }
.year li .k { font-family: var(--sans); font-size: .66rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 8px; }
@media (max-width: 600px) { .year { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(28px, 4vw, 48px); }
.contact-grid h3 { font-family: var(--sans); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.contact-grid p { font-size: 1.25rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 40px; margin-top: 40px; font-family: var(--sans); font-size: .8rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer .firma { width: 150px; opacity: .85; margin-bottom: 12px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

.admin-bar { position: fixed; right: 14px; bottom: 14px; z-index: 30; font-family: var(--sans); font-size: .76rem; display: flex; gap: 6px; }
.admin-bar a { background: var(--ink); color: var(--paper); text-decoration: none; padding: 9px 13px; border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.admin-bar a:hover { background: var(--accent); color: #fff; }

.empty { padding: 40px 0; color: var(--muted); font-style: italic; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.quote + .section { padding-top: 0; }
.quote { margin: clamp(24px, 4vw, 48px) 0 clamp(48px, 7vw, 96px); }
.avail-thumb { position: relative; }
.avail-count { position: absolute; left: 12px; bottom: 12px; background: var(--accent); color: #fff; font-family: var(--sans); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; }
.toc { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2 260px; column-gap: 32px; }
.toc li { margin: 0 0 6px; break-inside: avoid; }
.toc a { text-decoration: none; }
.prose h2[id] { scroll-margin-top: 96px; }
.preview-bar { background: var(--accent); color: #fff; text-align: center; font-family: var(--sans); font-size: .82rem; padding: 9px 16px; }
.work.hidden-work img { opacity: .45; }
.more-works { border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 72px); }
.row-works { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.5vw, 32px); }
@media (max-width: 760px) { .row-works { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row-works a { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.row-works .thumb { aspect-ratio: 1; background: var(--paper-2); overflow: hidden; margin-bottom: 6px; }
.row-works .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.row-works a:hover img { transform: scale(1.03); }
.row-works .t { font-size: 1rem; line-height: 1.3; }
.row-works .d { font-family: var(--sans); font-size: .72rem; color: var(--muted); }
.filters .sep { flex-basis: 100%; height: 0; }
@media (min-width: 900px) { .filters .sep { flex-basis: auto; width: 1px; height: auto; background: var(--line); margin: 0 6px; } }
