/* V3 polish layer: legibility, rhythm, atmosphere. Loaded last on every page. */
:root {
  --stone: #5f5b54;          /* captions and meta, darker for contrast on the plaster wall */
  --graphite: #2f2d29;
  --night-mute: #b6b0a5;
}

/* ---------- Legibility ---------- */
.lede { font-weight: 400; color: var(--graphite); }
.body-copy, .step p, .acc-b, .event-card p { font-weight: 400; }
.body-copy { color: #36332f; }
.field input, .field select, .field textarea { font-weight: 400; }
.small, .cap, .gallery-m figcaption { color: var(--stone); }
.eyebrow { color: #57534c; }
.night .lede, .night .body-copy, .night .step p { color: #e0dbd1; }
.motion .lede, .comm .lede, .hero-img .over .lede { color: #e6e1d7; }
.motion .eyebrow, .comm .eyebrow, .night .eyebrow { color: #bdb7ac; }
.night .small, .night .gallery-m figcaption, .night .demo-note { color: var(--night-mute); }

/* Navigation over photographs and paintings: light type on a soft scrim, so it reads on any image. */
.nav.on-dark, .nav.on-image:not(.is-solid) {
  color: #f8f5ef;
  background: linear-gradient(180deg, rgba(12, 11, 10, .62) 0%, rgba(12, 11, 10, .28) 60%, rgba(12, 11, 10, 0) 100%) !important;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .45);
}
.nav.on-dark .wordmark small, .nav.on-image:not(.is-solid) .wordmark small { opacity: .85; }

/* ---------- Rhythm: less dead air ---------- */
.section { padding-block: clamp(64px, 8vw, 124px); }
.section.tight { padding-block: clamp(48px, 5.5vw, 84px); }
.page-head { padding-top: calc(var(--nav-h) + clamp(36px, 5vw, 76px)); padding-bottom: clamp(32px, 4vw, 56px); position: relative; }

/* Stacked section heading: label above the title, no empty column beside it. */
.sec-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 4.5vw, 64px); max-width: 980px; }
.sec-head .h-l, .sec-head .h-xl { max-width: 20ch; }
.sec-head .lede { margin: 4px 0 0; }

/* Two-part editorial block: a held image beside the text. */
.with-art { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4.5vw, 80px); align-items: start; }
.with-art .art-hold { position: sticky; top: calc(var(--bar-h) + var(--nav-h) + 24px); margin: 0; }
.with-art .art-hold img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow-art); }
.with-art .art-hold figcaption { margin-top: 12px; font-size: 13px; color: var(--stone); }
.with-art .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .with-art { grid-template-columns: 1fr; } .with-art .art-hold { position: static; } .with-art .art-hold img { aspect-ratio: 16 / 10; } }
@media (max-width: 560px) { .with-art .steps { grid-template-columns: 1fr; } }

/* Steps with presence: large numerals and a gold rule that draws in. */
.step { position: relative; padding-top: 26px; border-top-color: var(--hair); }
.step::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--gold); transition: width 1.4s var(--ease-out) .25s; }
.step.in::before { width: 64px; }
.step .n { font-size: 15px; }
.step h3 { font-size: clamp(26px, 2.2vw, 32px); }
.step p { font-size: 15.5px; line-height: 1.7; }

/* Image cards for "what Vesna creates". */
.make-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.make { display: grid; gap: 14px; align-content: start; text-decoration: none; color: inherit; }
.make .ph { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: #d8d4cb; }
.make .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
a.make:hover .ph img, .make:hover .ph img { transform: scale(1.04); }
.make .n { font-family: var(--display); color: var(--gold); font-size: 15px; letter-spacing: .06em; }
.make h3 { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2vw, 30px); line-height: 1.1; }
.make p { margin: 0; font-size: 15px; color: var(--graphite); line-height: 1.65; }
@media (max-width: 1000px) { .make-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .make-grid { grid-template-columns: 1fr; } .make .ph { aspect-ratio: 16 / 11; } }

/* Related works: every painting in an equal frame, aligned on one baseline. */
.related { align-items: start; }
.related .card .pic { height: clamp(220px, 22vw, 320px); display: flex; align-items: flex-end; justify-content: center; background: transparent; }
.related .card .pic img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; aspect-ratio: auto; }

/* Sticky left titles for list sections (exhibitions). */
.list-title { position: sticky; top: calc(var(--bar-h) + var(--nav-h) + 24px); display: grid; gap: 14px; }
.list-title .h-m { max-width: 12ch; }
@media (max-width: 900px) { .list-title { position: static; } }

/* ---------- Atmosphere ---------- */
/* A fine plaster grain over the light walls. */
/* Sits behind all content, so paintings and photographs are never tinted. */
body:not(.studio):not(.exh)::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .1  0 0 0 0 .09  0 0 0 0 .08  0 0 0 .9 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}
/* Light from the painting: a slow, blurred wash of the page's artwork behind page headings. */
.ambient { position: absolute; top: -12%; bottom: 0; left: 50%; width: 100vw; margin-left: -50vw; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient > i { position: absolute; inset: -20%; background-size: cover; background-position: center; filter: blur(70px) saturate(1.35); opacity: .36; transform: translate3d(0, 0, 0) scale(1.1); animation: amb-drift 38s ease-in-out infinite alternate; }
.ambient::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(236, 235, 230, 0) 0%, rgba(236, 235, 230, .25) 55%, var(--wall) 100%); }
.paper .ambient::after { background: linear-gradient(180deg, rgba(246, 245, 241, 0) 0%, var(--paper) 100%); }
html { overflow-x: clip; }
@keyframes amb-drift { 0% { transform: translate3d(-3%, -2%, 0) scale(1.1) rotate(0deg); } 100% { transform: translate3d(3%, 2%, 0) scale(1.18) rotate(3deg); } }
.page-head, .has-ambient { isolation: isolate; }
/* Night rooms get a faint warm spotlight. */
.night, .motion { background-image: radial-gradient(70% 60% at 80% 0%, rgba(154, 126, 77, .14), transparent 70%), radial-gradient(60% 50% at 0% 100%, rgba(120, 140, 170, .08), transparent 70%); }

/* ---------- Motion ---------- */
/* Headlines rise word by word from behind a mask. */
.split-w[data-rv], .split-w { opacity: 1 !important; transform: none !important; }
.split-w .wm { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .06em .14em 0; margin: 0 -.06em -.14em 0; }
.split-w .wi { display: inline-block; transform: translateY(108%); transition: transform 1.15s var(--ease-out); }
.split-w.in .wi { transform: none; }
/* Photographs unveil from a slight crop. */
figure[data-rv] img, .gallery-m figure img { clip-path: inset(6% 6% 6% 6%); transform: scale(1.05); transition: clip-path 1.5s var(--ease-out), transform 1.8s var(--ease-out); }
figure[data-rv].in img, .gallery-m figure.in img { clip-path: inset(0 0 0 0); transform: none; }

@media (prefers-reduced-motion: reduce) {
  .ambient > i { animation: none; }
  .split-w .wi, figure[data-rv] img, .gallery-m figure img { transform: none !important; clip-path: none !important; transition: none !important; }
  .step::before { transition: none; width: 64px; }
}

/* Artist statement with portrait. */
.stmt-art img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; box-shadow: var(--shadow-art); }
.stmt { align-self: center; }
@media (max-width: 900px) { .stmt-art img { aspect-ratio: 16 / 11; } }
.has-ambient { position: relative; }
.split > .stretch { align-self: stretch; }
.list-title .h-l { max-width: 14ch; }

/* Hero photographs: a side and bottom shade so headlines read on any image. */
.hero-img .over { background: linear-gradient(90deg, rgba(14, 13, 12, .72) 0%, rgba(14, 13, 12, .38) 42%, rgba(14, 13, 12, 0) 72%), linear-gradient(0deg, rgba(14, 13, 12, .7) 0%, rgba(14, 13, 12, 0) 50%), linear-gradient(180deg, rgba(14, 13, 12, .35) 0%, rgba(14, 13, 12, 0) 22%); }
.hero-img .over h1 { text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
@media (max-width: 700px) { .hero-img .over { background: linear-gradient(0deg, rgba(14, 13, 12, .85) 0%, rgba(14, 13, 12, .35) 60%, rgba(14, 13, 12, .3) 100%); } }

/* Artwork page wash stays quiet so the painting leads. */
.art.has-ambient > .ambient > i { opacity: .22; }
.art.has-ambient > .ambient { bottom: 30%; }

/* Galleries as justified rows: every photo whole, no ragged gaps. */
.gallery-m { columns: auto; display: flex; flex-wrap: wrap; gap: clamp(14px, 1.6vw, 22px); }
.gallery-m figure { margin: 0; flex: var(--ar, 1.33) 1 calc(var(--ar, 1.33) * clamp(150px, 17vw, 250px)); min-width: 0; }
.gallery-m img { width: 100%; height: auto; aspect-ratio: var(--ar, 1.33); object-fit: cover; }
.gallery-m { column-gap: clamp(14px, 1.6vw, 22px); row-gap: clamp(18px, 2vw, 28px); }
@media (max-width: 560px) { .gallery-m figure { flex-basis: 100%; } }

/* The hang ends with breathing room after the last card. */
.hang-end { margin-right: max(var(--gutter), 5vw); }
.ov-title, .ov-title * { text-shadow: 0 2px 24px rgba(0, 0, 0, .38); }



/* Collection: every card visible at once, fading in on arrival rather than waiting for scroll. */
#grid .card { animation: card-in .9s var(--ease-out) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #grid .card { animation: none; } }

/* Featured paintings beside the collection heading. */
.wh-feat { position: absolute; right: max(var(--gutter), env(safe-area-inset-right, 0px)); top: calc(var(--nav-h) + 40px); bottom: 36px; width: min(34vw, 520px); }
.wh-slide { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; text-decoration: none; opacity: 0; transition: opacity 1.6s var(--ease-out); pointer-events: none; }
.wh-slide.on { opacity: 1; pointer-events: auto; }
.wh-frame { position: relative; min-height: 0; }
.wh-frame img { position: absolute; inset: 0; margin: auto 0 auto auto; max-width: 100%; max-height: 100%; width: auto; height: auto; box-shadow: var(--shadow-art); transform: scale(.985); transition: transform 6s ease-out; }
.wh-slide.on .wh-frame img { transform: none; }
.wh-slide .label { justify-self: end; text-align: right; }
@media (max-width: 1099px) { .wh-feat { display: none; } }
.artist.section { padding-top: clamp(40px, 5vw, 72px); }

/* Page heroes: the photograph settles in on arrival, then drifts gently as you scroll (where the browser supports it). */
.hero-img > img { animation: hero-in 2.4s var(--ease-out) both; transform-origin: 50% 40%; }
@keyframes hero-in { from { transform: scale(1.12); filter: brightness(.82); } to { transform: scale(1.02); filter: none; } }
@supports (animation-timeline: view()) {
  .hero-img > img { animation: hero-in 2.4s var(--ease-out) both, hero-drift linear both; animation-timeline: auto, view(); animation-range: normal, exit 0% exit 100%; }
  @keyframes hero-drift { from { translate: 0 0; } to { translate: 0 12%; } }
  .make .ph img, .stmt-art img, .with-art .art-hold img { animation: soft-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
  @keyframes soft-rise { from { transform: scale(1.08); } to { transform: scale(1); } }
}
@media (prefers-reduced-motion: reduce) { .hero-img > img, .make .ph img, .stmt-art img, .with-art .art-hold img { animation: none !important; } }
