/* ==========================================================================
   Jelena Feldman Art Studio — minimal white gallery
   ========================================================================== */

:root {
  --paper:        #ffffff;
  --paper-soft:   #fafafa;
  --ink:          #0e0e0e;
  --ink-soft:     #4a4a4a;
  --muted:        #9b9b9b;
  --line:         rgba(0, 0, 0, .10);
  --line-soft:    rgba(0, 0, 0, .06);
  --gold:         #b08d57;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans:  "Inter", -apple-system, "Segoe UI", sans-serif;

  --ease:    cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, .02, .28, 1);

  --nav-h: 78px;
  --pad:   clamp(20px, 5vw, 88px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Pinned by JS while the lightbox or the mobile drawer is open. */
body.is-locked {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}

button, a, input, .card__media {
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }
/* <picture> must not introduce a box of its own — the <img> is sized directly. */
picture { display: contents; }
a   { color: inherit; text-decoration: none; }

button, input {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -.015em;
  margin: 0;
}

::selection { background: var(--ink); color: var(--paper); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Shared atoms
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  isolation: isolate;
  transition: color .55s var(--ease), border-color .55s var(--ease);
}
.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: translateY(101%);
  transition: transform .6s var(--ease);
}
.button-primary { background: var(--ink); color: var(--paper); }
.button-primary::before { background: var(--paper); }
.button-ghost { border-color: var(--line); color: var(--ink); }

@media (hover: hover) {
  .button:hover::before { transform: translateY(0); }
  .button:hover { color: var(--paper); }
  .button-primary:hover { color: var(--ink); }
  .button-ghost:hover { border-color: var(--ink); }
}

/* Touch devices get a press state instead of a hover that would stick. */
@media (hover: none) {
  .button:active { opacity: .72; }
}

/* --------------------------------------------------------------------------
   Preloader
   -------------------------------------------------------------------------- */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--paper);
  transition: opacity .9s var(--ease), visibility .9s;
}
.preloader__mark {
  font-family: var(--serif);
  font-size: clamp(26px, 5vw, 46px);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: center;
  opacity: 0;
  animation: markIn 1.4s var(--ease) forwards;
}
.preloader__line {
  width: min(280px, 50vw);
  height: 1px;
  margin: 22px auto 0;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.preloader__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: loadBar 1.4s var(--ease-io) forwards;
}
@keyframes markIn  { from { opacity: 0; letter-spacing: .38em; } to { opacity: 1; letter-spacing: .18em; } }
@keyframes loadBar { to { transform: scaleX(1); } }

body.is-loaded .preloader { opacity: 0; visibility: hidden; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 120;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 var(--pad);
  background: rgba(255, 255, 255, 0);
  transition: background .6s var(--ease), box-shadow .6s var(--ease), transform .6s var(--ease);
}
.header.is-solid {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 var(--line-soft);
}

.brand { display: flex; align-items: center; margin-right: auto; }
.brand img {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: opacity .5s var(--ease);
}
@media (hover: hover) { .brand:hover img { opacity: .6; } }

.nav { display: flex; gap: 34px; }
.nav a {
  position: relative;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 6px 0;
  transition: color .4s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
@media (hover: hover) {
  .nav a:hover { color: var(--ink); }
  .nav a:hover::after { transform: scaleX(1); transform-origin: left; }
}

.lang { display: flex; align-items: center; gap: 2px; }
.lang button {
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--muted);
  padding: 6px 8px;
  cursor: pointer;
  transition: color .4s var(--ease);
}
@media (hover: hover) { .lang button:hover { color: var(--ink); } }
.lang button.is-active { color: var(--ink); }

.burger {
  display: none;
  width: 30px; height: 16px;
  position: relative;
  cursor: pointer;
  flex: none;
}
.burger span {
  position: absolute;
  left: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transition: transform .5s var(--ease), opacity .3s var(--ease);
}
.burger span:nth-child(1) { top: 0; }
.burger span:nth-child(2) { bottom: 0; }
body.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--pad);
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease);
}
body.menu-open .drawer { clip-path: inset(0 0 0 0); }
.drawer a {
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 62px);
  color: var(--ink);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
body.menu-open .drawer a { opacity: 1; transform: none; }
body.menu-open .drawer a:nth-child(1) { transition-delay: .18s; }
body.menu-open .drawer a:nth-child(2) { transition-delay: .26s; }
body.menu-open .drawer a:nth-child(3) { transition-delay: .34s; }
body.menu-open .drawer a:nth-child(4) { transition-delay: .42s; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 40%;
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: calc(var(--nav-h) + 40px) var(--pad) 66px;
}

.hero__copy { max-width: 680px; }

.hero__eyebrow {
  opacity: 0;
  animation: fadeUp 1s var(--ease) .9s forwards;
}

.hero__title {
  font-size: clamp(44px, 7.6vw, 108px);
  margin: 22px 0 0;
}
.hero__title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .06em;
}
.hero__title .word > span {
  display: inline-block;
  transform: translateY(110%);
  animation: wordUp 1.15s var(--ease) forwards;
}

.hero__lead {
  max-width: 42ch;
  margin: 30px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1.35s forwards;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1.5s forwards;
}

.hero__figure {
  position: relative;
  align-self: stretch;
  min-height: 62vh;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
  animation: wipeUp 1.5s var(--ease) .55s forwards;
}
.hero__figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.16);
  animation: kenBurns 16s var(--ease) 1.2s forwards;
}
.hero__caption {
  position: absolute;
  left: 0; bottom: 0;
  padding: 18px 24px 20px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 1.9s forwards;
}
.hero__caption strong {
  display: block;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  margin: 6px 0 2px;
}
.hero__caption small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .12em;
}

.hero__scroll {
  position: absolute;
  left: var(--pad);
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 9px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0;
  animation: fadeUp 1s var(--ease) 2.1s forwards;
}
.hero__scroll i {
  display: block;
  width: 56px; height: 1px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform-origin: left;
  animation: scrollLine 2.6s var(--ease-io) infinite;
}

@keyframes fadeUp   { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes wordUp   { to { transform: translateY(0); } }
@keyframes wipeUp   { to { clip-path: inset(0 0 0 0); } }
@keyframes kenBurns { to { transform: scale(1); } }
@keyframes scrollLine {
  0%   { transform: scaleX(0); transform-origin: left; }
  45%  { transform: scaleX(1); transform-origin: left; }
  55%  { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* --------------------------------------------------------------------------
   Manifesto
   -------------------------------------------------------------------------- */

.manifesto {
  padding: clamp(90px, 14vh, 170px) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 22ch) minmax(0, 1fr);
  gap: clamp(24px, 6vw, 90px);
  align-items: start;
}
.manifesto__text {
  font-family: var(--serif);
  font-size: clamp(23px, 2.9vw, 40px);
  line-height: 1.36;
  letter-spacing: -.01em;
  margin: 0;
  color: var(--ink);
}
.manifesto__text .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(.45em);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.manifesto.is-in .manifesto__text .w { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Gallery
   -------------------------------------------------------------------------- */

.gallery-section { padding: 0 var(--pad) clamp(80px, 12vh, 150px); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 8px;
}
.section-head h2 { font-size: clamp(30px, 4.4vw, 58px); }
.section-head__count {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 22px 0 30px;
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  background: linear-gradient(var(--paper) 82%, rgba(255, 255, 255, 0));
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  position: relative;
  padding: 9px 18px;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: color .45s var(--ease), border-color .45s var(--ease), background .45s var(--ease);
}
@media (hover: hover) {
  .filter:hover { color: var(--ink); border-color: var(--line); }
}
.filter.is-active { color: var(--paper); background: var(--ink); border-color: var(--ink); }

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  transition: border-color .45s var(--ease);
}
.search:focus-within { border-color: var(--ink); }
.search svg { width: 15px; height: 15px; flex: none; stroke: var(--muted); fill: none; }
.search input {
  width: 100%;
  font-size: 13px;
  letter-spacing: .04em;
  outline: none;
}
.search input::placeholder { color: var(--muted); }

/* Masonry grid (row-major order, JS-measured row spans) */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(16px, 2.4vw, 40px);
  grid-auto-rows: 8px;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .grid { grid-template-columns: minmax(0, 1fr); } }

.grid.is-empty { display: block; }

.card {
  grid-row-end: span var(--span, 46);
  opacity: 0;
  transform: translateY(38px);
  transition: opacity .95s var(--ease), transform .95s var(--ease);
}
.card.is-in { opacity: 1; transform: none; }

.card__inner { padding-bottom: clamp(30px, 4vw, 64px); }

.card__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--paper-soft);
  cursor: pointer;
  padding: 0;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
  opacity: 0;
  transition: transform 1.2s var(--ease), opacity .7s var(--ease);
}
.card__media img.is-loaded { opacity: 1; }
.card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
@media (hover: hover) {
  .card:hover .card__media img { transform: scale(1.055); }
  .card:hover .card__media::after { opacity: .09; }
}
@media (hover: none) {
  .card__media:active img { transform: scale(1.02); }
}

.card__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-top: 16px;
  text-align: left;
}
.card__title {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
  margin: 0;
}
.card__meta {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
}
.card__price {
  flex: none;
  font-size: 13px;
  letter-spacing: .06em;
  padding-top: 4px;
}

/* Availability marker under every work */
.card__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.card__status b { font-weight: 400; }
.card__status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5f9c78;
  flex: none;
}

.card.is-unavailable .card__status { color: var(--muted); }
.card.is-unavailable .card__status i {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--muted);
}
.card.is-unavailable .card__price { color: var(--muted); text-decoration: line-through; }
.card.is-unavailable .card__media img { filter: grayscale(.35); }

.card__line {
  height: 1px;
  background: var(--line);
  margin-top: 14px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--ease) .1s, background .8s var(--ease);
}
.card.is-in .card__line { transform: scaleX(1); }
@media (hover: hover) { .card:hover .card__line { background: var(--ink); } }

.empty {
  padding: 70px 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 22px;
}

/* Hover cursor bubble */
.bubble {
  position: fixed;
  top: 0; left: 0;
  z-index: 200;
  width: 92px; height: 92px;
  margin: -46px 0 0 -46px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: grid;
  place-items: center;
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  pointer-events: none;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .45s var(--ease);
}
.bubble.is-on { opacity: 1; transform: scale(1); }
@media (hover: none) { .bubble { display: none; } }

/* --------------------------------------------------------------------------
   Artist strip
   -------------------------------------------------------------------------- */

.artist {
  display: grid;
  grid-template-columns: minmax(0, 30%) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding: clamp(80px, 12vh, 150px) var(--pad);
  border-top: 1px solid var(--line-soft);
}
/* The portrait is a small original — shown any larger it just looks soft. */
.artist__photo {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-width: 340px;
  background: var(--paper-soft);
}
.artist__photo picture { display: contents; }
.artist__photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 1.6s var(--ease);
}
@media (hover: hover) {
  .artist__photo img { transform: scale(1.08); }
  .artist:hover .artist__photo img { transform: scale(1); }
}

.artist__body h2 {
  font-size: clamp(30px, 4.2vw, 56px);
  margin: 18px 0 24px;
}
.artist__body p {
  max-width: 56ch;
  color: var(--ink-soft);
  margin: 0 0 16px;
  font-size: 15px;
}
.artist__body .button { margin-top: 22px; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  padding: clamp(80px, 12vh, 160px) var(--pad);
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46%);
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}
.contact h2 {
  font-size: clamp(32px, 4.8vw, 68px);
  margin: 18px 0 0;
  max-width: 14ch;
}
.contact__panel > p { color: var(--ink-soft); margin: 0 0 26px; max-width: 48ch; font-size: 15px; }

.contact__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.contact__row span { color: var(--muted); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }
.contact__row a { position: relative; }
.contact__row a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease);
}
@media (hover: hover) {
  .contact__row a:hover::after { transform: scaleX(1); transform-origin: left; }
}

.contact__panel .button { margin-top: 32px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  padding: 34px var(--pad) 42px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (hover: hover) { .footer a:hover { color: var(--ink); } }

/* --------------------------------------------------------------------------
   Lightbox
   -------------------------------------------------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 220;
  background: var(--paper);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(20px, 4vw, 64px);
  padding: clamp(64px, 9vh, 96px) var(--pad) clamp(28px, 5vh, 56px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s var(--ease), visibility .6s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  overflow: hidden;
}

/* Zoom and pan live on the frame; the FLIP open animation lives on the image,
   so the two never fight over the same transform. */
.lightbox__frame {
  display: grid;
  place-items: center;
  max-width: 100%;
  will-change: transform;
  touch-action: pan-y;
  transform-origin: center center;
}
.lightbox__frame.is-zoomed {
  touch-action: none;
  cursor: grab;
}
.lightbox__frame.is-dragging { cursor: grabbing; }

.lightbox__img {
  max-width: 100%;
  max-height: 76vh;
  width: auto; height: auto;
  object-fit: contain;
  will-change: transform;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .10);
  user-select: none;
  -webkit-user-drag: none;
}

/* Zoom controls */
.zoom {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.zoom button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink);
  transition: background .4s var(--ease), color .4s var(--ease), opacity .3s var(--ease);
}
.zoom svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.zoom button:disabled { opacity: .3; cursor: default; }
.zoom__level {
  width: auto;
  min-width: 56px;
  padding: 0 10px;
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  border-radius: 999px;
}
@media (hover: hover) {
  .zoom button:not(:disabled):hover { background: var(--ink); color: var(--paper); }
  .zoom__level:not(:disabled):hover { color: var(--paper); }
}

.lightbox__info {
  align-self: center;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  min-height: 0;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease) .2s, transform .7s var(--ease) .2s;
}
.lightbox.is-open .lightbox__info { opacity: 1; transform: none; }

.lightbox__scroll {
  min-height: 0;
  overflow-y: auto;
  padding-right: 10px;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 26px), transparent);
}
.lightbox__scroll::-webkit-scrollbar { width: 2px; }
.lightbox__scroll::-webkit-scrollbar-thumb { background: var(--line); }

.lightbox__info .button { flex: none; align-self: flex-start; margin-top: 24px; }

.lightbox__title {
  font-size: clamp(30px, 3.4vw, 46px);
  margin: 14px 0 24px;
}
.lightbox__facts {
  margin: 0 0 28px;
  border-top: 1px solid var(--line);
}
.lightbox__facts div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}
.lightbox__facts dt {
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.lightbox__facts dd { margin: 0; font-size: 14px; }

.lightbox__desc {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.85;
  white-space: pre-line;
  margin: 0 0 8px;
}

.lightbox__close {
  position: absolute;
  top: 22px; right: var(--pad);
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
}
@media (hover: hover) {
  .lightbox__close:hover {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
    transform: rotate(90deg);
  }
}

.lightbox__nav {
  position: absolute;
  left: var(--pad); bottom: 26px;
  display: flex;
  gap: 8px;
}
.lightbox__nav button {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
@media (hover: hover) {
  .lightbox__nav button:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
}
.lightbox__nav svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }

.lightbox__index {
  position: absolute;
  right: var(--pad); bottom: 38px;
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Reveal helper
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .1s; }
.reveal[data-delay="2"] { transition-delay: .2s; }
.reveal[data-delay="3"] { transition-delay: .3s; }
.reveal[data-delay="4"] { transition-delay: .4s; }

/* --------------------------------------------------------------------------
   Bio page
   -------------------------------------------------------------------------- */

.bio-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 30%);
  gap: clamp(28px, 5vw, 76px);
  align-items: center;
  padding: calc(var(--nav-h) + clamp(50px, 10vh, 110px)) var(--pad) clamp(60px, 10vh, 120px);
}
.bio-hero h1 { font-size: clamp(44px, 7vw, 96px); margin: 20px 0 26px; }
.bio-hero p { max-width: 48ch; color: var(--ink-soft); margin: 0 0 32px; }
.bio-hero__photo {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-width: 340px;
  justify-self: end;
  background: var(--paper-soft);
}
.bio-hero__photo img { width: 100%; height: 100%; object-fit: cover; }

.bio-block {
  display: grid;
  grid-template-columns: minmax(0, 26ch) minmax(0, 1fr);
  gap: clamp(24px, 6vw, 90px);
  padding: clamp(50px, 8vh, 90px) var(--pad);
  border-top: 1px solid var(--line-soft);
  align-items: start;
}
.bio-block h2 { font-size: clamp(26px, 3.2vw, 42px); margin: 14px 0 0; }
.bio-block p { color: var(--ink-soft); margin: 0 0 18px; max-width: 62ch; }
.bio-block ul { list-style: none; margin: 0; padding: 0; max-width: 62ch; }
.bio-block li {
  position: relative;
  padding: 14px 0 14px 26px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
}
.bio-block li::before {
  content: "";
  position: absolute;
  left: 0; top: 25px;
  width: 12px; height: 1px;
  background: var(--ink);
}

.bio-statement {
  padding: clamp(70px, 12vh, 140px) var(--pad);
  border-top: 1px solid var(--line-soft);
  text-align: center;
}
.bio-statement blockquote {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.4;
  margin: 26px auto 0;
  max-width: 24ch;
  max-width: 46ch;
}
.bio-statement cite {
  display: block;
  margin-top: 30px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .nav { display: none; }
  .burger { display: block; }
  .hero {
    grid-template-columns: 1fr;
    padding-top: calc(var(--nav-h) + 24px);
  }
  .hero__figure { min-height: 54vh; order: 2; }
  .hero__scroll { display: none; }
  .manifesto { grid-template-columns: 1fr; }
  .artist, .contact, .bio-hero, .bio-block { grid-template-columns: 1fr; }
  .artist__photo, .bio-hero__photo { max-width: 300px; justify-self: start; }
  /* Column flow instead of grid: auto rows in a viewport-height grid squeeze
     the description down to a fraction of its real height. */
  .lightbox {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-top: 74px;
    padding-bottom: 52px;
    gap: 26px;
  }
  .lightbox__stage { flex: none; }
  .lightbox__info  { flex: none; min-height: auto; }
  .lightbox__img { max-height: 52vh; box-shadow: 0 18px 44px rgba(0, 0, 0, .10); }
  .lightbox__info { max-height: none; align-self: start; }
  .lightbox__scroll {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    padding-right: 0;
  }
  .lightbox__title { margin: 12px 0 20px; }
  .lightbox__nav {
    position: static;
    margin-top: 26px;
    justify-content: flex-start;
  }
  .lightbox__nav button { width: 48px; height: 48px; }
  /* Stays reachable while the panel scrolls. */
  .lightbox__close {
    position: fixed;
    top: 14px;
    right: 16px;
    width: 46px;
    height: 46px;
    z-index: 5;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .lightbox__index { display: none; }
  .lightbox__info .button { width: 100%; }
}

@media (max-width: 620px) {
  .toolbar {
    position: static;
    gap: 18px;
    padding: 16px 0 26px;
  }

  /* Filters become one swipeable row instead of wrapping into three lines. */
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin: 0 calc(var(--pad) * -1);
    padding: 2px var(--pad);
    scroll-snap-type: x proximity;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter {
    flex: none;
    padding: 11px 18px;
    scroll-snap-align: start;
  }

  .search { width: 100%; }
  /* 16px keeps iOS Safari from zooming the page when the field is focused. */
  .search input { font-size: 16px; }

  .card__body { flex-direction: column; gap: 4px; }
  .card__price { padding-top: 8px; font-size: 14px; }
  .card__status { margin-top: 8px; }

  .hero__actions { gap: 10px; }
  .hero__actions .button { flex: 1 1 auto; min-width: 0; }

  .footer { justify-content: flex-start; gap: 12px; line-height: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .card, .hero__eyebrow, .hero__lead, .hero__actions, .hero__caption { opacity: 1; transform: none; }
  .hero__figure { clip-path: none; }
  .hero__title .word > span { transform: none; }
  .manifesto__text .w { opacity: 1; transform: none; }
}
