/* MariARTE — dark theme by default, light theme (white Figma frames) on toggle.
   Sizes follow the MARIARTE.fig frames (1920 wide) and scale down with the window. */
:root {
  --bg: #111112;
  --ink: #ededea;
  --muted: #8b8a86;
  --soft: #c9c8c3;          /* body text */
  --line: #3a3a3c;          /* hairlines */
  --card: #19191b;          /* statement card, info panel, form fields */
  --card-2: #ededea;        /* works card */
  --tile: #1c1c1e;          /* artist cards */
  --btn: #d9d8d3;           /* dark-on-light "SEE WORKS" button, toned down for dark */
  --on-btn: #111112;
  --on-card-2: #111112;
  --frame: #1b1b1c;
  --shadow: rgba(0, 0, 0, 0.7);
  --img-filter: brightness(0.92) contrast(1.02);
  --border: #2a2a2d;        /* card / control outlines */
  --switch-on: #3a3a3c;     /* active strip/grid segment */
  --accent: #ededea;        /* filled buttons (submit) */
  --on-accent: #111112;
  --gut: clamp(16px, 2.2vw, 42px);
  --u: calc(100vw / 1920);  /* one pixel of the 1920-wide Figma frame */
  --fu: min(calc(100vw / 1920), calc(100vh / 1080)); /* frame pixel that fits the whole frame (Info) */
  --rule-soft: #3a3a3c;     /* collection rows */
  --quote-blue: #6fa3cf;    /* #115989 in the white frame, lifted so it reads on dark */
  --field: #1c1c1e;         /* form fields */
  --panel: #19191b;         /* info panel */
  --switch-border: #4a4a4d;
  --radius: 0px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: var(--serif);     /* the new frames set almost everything in Cormorant */
  --ui: "Anek Latin", system-ui, sans-serif;
  --display: "ABeeZee", "Anek Latin", system-ui, sans-serif;
  color-scheme: dark;
}

/* light theme: colors from the white Figma frames */
:root[data-theme="light"] {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #7a7873;
  --soft: #2b2a28;
  --line: #111111;
  --card: #f1f0f0;
  --card-2: #e5e4e4;
  --tile: #f1f0f0;
  --btn: #222222;
  --on-btn: #ffffff;
  --on-card-2: #111111;
  --frame: #ecebe8;
  --shadow: rgba(27, 26, 24, 0.3);
  --img-filter: brightness(1); /* not "none": it's combined with blur() on out-of-group works */
  --border: #d6d4cf;
  --switch-on: #d4d4d4;
  --accent: #222222;
  --on-accent: #f6f4f4;
  --field: #f6f3f3;
  --panel: #f6f3f3;
  --switch-border: #bdbdbd;
  --rule-soft: #cfcdc8;
  --quote-blue: #115989;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  transition: background-color 0.5s ease, color 0.5s ease;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html { scrollbar-gutter: stable; }
/* the hall keeps its scroll position while a page or a work is open */
html.page-open, html.detail-open { overflow: hidden; }
/* while a page / work is open nothing behind it scrolls: give the full width back */
html.page-open, html.detail-open { scrollbar-gutter: auto; }

/* no text / image selection highlight when clicking around the gallery;
   form fields and contact details stay selectable */
body { -webkit-user-select: none; user-select: none; }
input, textarea, .contact-block a { -webkit-user-select: text; user-select: text; }
img { -webkit-user-drag: none; }

a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* small caps-style labels (Cormorant, uppercase, tracked) */
.caps { font-family: var(--serif); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- 3D space ---------- */
.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;  /* perspective is computed in main.js (no CSS 3D) */
  pointer-events: none;
  z-index: 1;
}

.scene {
  position: absolute;
  inset: 0;
}

.art {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
}

.art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--frame);
  box-shadow: 0 40px 80px -36px var(--shadow);
  filter: var(--img-filter);
  transition: filter 0.6s ease, box-shadow 0.6s ease;
}

/* ---------- labels ---------- */
.labels {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.label {
  position: absolute;
  top: 50%;
  width: min(320px, 28vw);
  opacity: 0;
  will-change: transform, opacity;
}
.label--right { right: 7vw; text-align: left; }
.label--left  { left: 7vw;  text-align: left; }

.label__idx {
  display: block;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 18px;
}

.label__rule {
  display: block;
  height: 1px;
  background: var(--ink);
  width: 64px;
  transform-origin: left center;
  margin-bottom: 22px;
}

.label__author {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.label__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.02;
  margin-bottom: 14px;
}

.label__date {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 20px;
}

.label__meta {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.label__works {
  list-style: none;
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.label__works li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
}
.label__works li span:first-child { color: var(--ink); opacity: 0.8; }
.label__works li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- intro / outro ---------- */
.intro, .outro {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  z-index: 3;
}
.outro { opacity: 0; }

.intro__kicker {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(60px, 17vh, 200px); /* clear of the works around the vanishing point */
}

.intro__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 112px);
  line-height: 0.95;
  max-width: 92vw;
  text-wrap: balance;
}

.intro__scroll {
  margin-top: clamp(70px, 19vh, 220px);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* first load: intro text rises in, the hall and top bar fade in */
.intro__kicker { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.1s backwards; }
.intro__title  { animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s backwards; }
.intro__scroll { animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s backwards, breathe 2.4s ease-in-out 1.4s infinite; }
.viewport { animation: fade-in 1.4s ease 0.3s backwards; }
.topbar   { animation: fade-in 0.9s ease 0.1s backwards; }
@keyframes fade-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .intro__kicker, .intro__title, .intro__scroll, .viewport, .topbar { animation: none; }
}

@keyframes breathe {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50%      { opacity: 1;    transform: translateY(6px); }
}


/* ---------- clickable / out-of-group works ---------- */
.art { pointer-events: none; cursor: zoom-in; }
.art.is-clickable { pointer-events: auto; }
.art img { transition: filter 0.6s ease, opacity 0.6s ease, outline-color 0.3s ease; outline: 1px solid transparent; outline-offset: 6px; }
.art.is-clickable:hover img { outline-color: var(--muted); }
/* works that aren't part of the group shown right now */
.art.is-out img { filter: var(--img-filter) blur(8px); opacity: 0.7; }

html.detail-open .labels,
html.detail-open .intro,
html.detail-open .outro { visibility: hidden; }


/* =====================================================================
   Everything below is laid out from MARIARTE.fig (frames are 1920 wide).
   --u is one pixel of the frame: calc(N * var(--u)) is "N px in Figma",
   so the pages keep the frame's exact proportions at any window width.
   Comments quote the frame values (x, y, w x h, font size).
   ===================================================================== */

/* ---------- top bar (Frame 1) ---------- */
/* hall: "Gallery of Art" 20 at (42,33) + theme toggle 79x29 at (134,27);
   pages: home icon 20.53x22 at (37,46), back circle 24x24 at (73,46).
   right: bag 20x24 at (1768,27), MENU 15 at (1806,31) */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: calc(70 * var(--u));
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.topbar > * { pointer-events: auto; }
html.detail-open .topbar { opacity: 0; }
html.detail-open .topbar > * { pointer-events: none; }

.topbar__left {
  position: absolute;
  left: calc(42 * var(--u));
  top: calc(46 * var(--u)); /* same band as the right group (bag, MENU, language): one centre line at y 58 */
  height: calc(24 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(11 * var(--u));
}
.brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--serif);
  font-size: max(12px, calc(20 * var(--u)));
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.brand:hover { opacity: 0.65; }
.brand__text { min-width: calc(81 * var(--u)); } /* text box 81 wide at (42,33): the toggle box starts at 134 */
.brand__text i { font-weight: 300; font-style: italic; }
/* the frame's icon image (20.53x22 box) as a mask in the text colour */
.brand__icon {
  display: none;
  width: max(17px, calc(20.53 * var(--u)));
  height: max(18px, calc(22 * var(--u)));
  background: currentColor;
  -webkit-mask: url(images/ui-home.png) center / 100% 100% no-repeat;
  mask: url(images/ui-home.png) center / 100% 100% no-repeat;
}
/* on the pages the icon takes the text's place, as in Frames 3-8 */
html.page-open .brand__icon, html.menu-open .brand__icon { display: block; } /* 20.53x22 box */
html.page-open .brand__text, html.menu-open .brand__text { display: none; }

/* toggle, from the frame's toggle image (79x29 box at (134,27)): pill 72.4x23.6 inset (3.3,2.3),
   thin light outline; half-filled circle 11.3 at 7 in; label ~9.7, tracked, starting 26.8 in */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: calc(8.5 * var(--u));
  height: max(20px, calc(23.6 * var(--u)));
  min-width: max(62px, calc(72.4 * var(--u)));
  margin-left: calc(3.3 * var(--u));
  padding: 0 calc(10 * var(--u)) 0 calc(6 * var(--u)); /* circle 7 in from the pill edge, incl. the 1px outline */
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
  font-family: var(--serif);
  font-size: max(9px, calc(9.7 * var(--u)));
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 0.3s ease, background-color 0.5s ease;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle__dot {
  width: max(10px, calc(11.3 * var(--u)));
  height: max(10px, calc(11.3 * var(--u)));
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: linear-gradient(90deg, var(--ink) 50%, transparent 50%);
  transition: transform 0.6s ease;
}
.theme-toggle[aria-pressed="true"] .theme-toggle__dot { transform: rotate(180deg); }

.topbar__right {
  position: absolute;
  right: calc(57 * var(--u)); /* RU at 1844, MENU 1785, bag 1747 */
  top: calc(46 * var(--u));
  height: calc(24 * var(--u));
  display: flex;
  align-items: center;
  gap: calc(18 * var(--u)); /* bag 1747..1767, MENU at 1785 */
}
.cart-link { display: inline-flex; transition: opacity 0.2s ease; }
.cart-link .bag { width: max(16px, calc(20 * var(--u))); height: max(19px, calc(24 * var(--u))); }
.cart-link:hover { opacity: 0.6; }
.menu-btn {
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: max(12px, calc(15 * var(--u)));
  line-height: 1;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 0.18em;
  transition: opacity 0.2s ease;
}
.menu-btn:hover { opacity: 0.6; }

/* language: "RU" 15 at (1844,50), 17 after MENU; a small list drops down under it.
   Only the choice is stored for now: the texts aren't translated yet. */
.lang { position: relative; display: flex; align-items: center; margin-left: calc(-1 * var(--u)); }
.lang__btn, .lang__list button {
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--serif);
  font-size: max(12px, calc(15 * var(--u)));
  line-height: 1;
  text-transform: uppercase;
  transition: opacity 0.2s ease;
}
.lang__btn { display: block; text-decoration: underline; text-decoration-thickness: 0.5px; text-underline-offset: 0.18em; }
.lang__btn:hover, .lang__list button:hover { opacity: 0.6; }
.lang__list {
  position: absolute;
  right: calc(-12 * var(--u));
  top: calc(100% + 12 * var(--u));
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: calc(10 * var(--u));
  padding: calc(12 * var(--u)) calc(12 * var(--u));
  background: var(--bg);
  border: 0.5px solid var(--border);
  text-align: right;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.lang__list[hidden] { display: none; }
.lang.is-open .lang__list { opacity: 1; transform: none; }
.lang__list button[aria-selected="true"] { text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 0.5px; }

/* go back (pages, menu): 24x24 at (73,46), 15.47 after the 20.53-wide icon at 37 */
.back-btn {
  display: none;
  order: 2;
  align-self: flex-start;
  margin-left: calc(4.47 * var(--u));
  width: max(20px, calc(24 * var(--u)));
  height: max(20px, calc(24 * var(--u)));
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.back-btn svg { display: block; width: 100%; height: 100%; overflow: visible; }
.back-btn__ring { fill: none; stroke: currentColor; stroke-width: 1.3; }
.back-btn__arrow { fill: currentColor; }
.back-btn:hover { opacity: 0.6; }
html.page-open .back-btn, html.menu-open .back-btn { display: block; }
html.page-open .brand, html.menu-open .brand { align-self: flex-start; margin-left: calc(-5 * var(--u)); }
html.page-open .theme-toggle, html.menu-open .theme-toggle { order: 3; }

/* ---------- menu (Frame 2) ---------- */
/* INFO / ARTISTS / CONTACT: Bold 50, centred, boxes 61 tall at y 436 / 525 / 614 */
.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: calc(31 * var(--u)); /* the group sits 15px below the middle */
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }
.menu__list { list-style: none; text-align: center; display: flex; flex-direction: column; gap: calc(28 * var(--u)); }
.menu__list a {
  display: inline-block;
  font-weight: 700;
  font-size: max(30px, calc(50 * var(--u)));
  line-height: 1.22;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, color 0.2s ease;
}
.menu.is-open .menu__list a { transform: none; opacity: 1; }
.menu.is-open li:nth-child(2) a { transition-delay: 0.05s, 0.05s, 0s; }
.menu.is-open li:nth-child(3) a { transition-delay: 0.1s, 0.1s, 0s; }
.menu__list a:hover { color: var(--muted); }

/* ---------- pages ---------- */
.page {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.page[hidden] { display: none; }
.page.is-in { opacity: 1; }
/* pages are sized in frame pixels of the full window width, so their scrollbar is hidden
   (they still scroll by wheel, touch and keys) */
.page { scrollbar-width: none; }
.page::-webkit-scrollbar { display: none; }
/* page -> page: the content fades into the page colour (the hall never shows through) */
.page::after { content: ""; position: fixed; inset: 0; z-index: 5; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
.page.is-leaving::after { opacity: 1; }

/* blocks rise in one after another when a page opens */
.rise {
  opacity: 0;
  animation: rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.08s + var(--i, 0) * 0.055s);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rise { animation: none; opacity: 1; }
}

/* ---------- return to start (hall) ---------- */
.to-start {
  position: fixed;
  left: calc(42 * var(--u));
  bottom: calc(34 * var(--u));
  z-index: 15;
  background: var(--bg);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease, background-color 0.2s ease, color 0.2s ease;
}
.to-start.is-shown { opacity: 1; transform: none; pointer-events: auto; }
html.page-open .to-start, html.detail-open .to-start, html.menu-open .to-start { opacity: 0; pointer-events: none; }

/* placeholder for sections that aren't built yet (cart) */
.wip { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(22 * var(--u)); padding: 0 var(--gut); text-align: center; }
.wip__title { font-weight: 400; font-size: max(36px, calc(70 * var(--u))); line-height: 1.1; text-transform: uppercase; }
.wip p { font-size: max(16px, calc(20 * var(--u))); color: var(--muted); }

/* page title: 50 at (42,100) (Info, Contacts) */
.wrap { padding: calc(100 * var(--u)) calc(42 * var(--u)) calc(80 * var(--u)); }
.ptitle {
  font-weight: 400;
  font-size: max(28px, calc(50 * var(--u)));
  line-height: 1;
  text-transform: uppercase;
}

/* ----- artists (Frame 3) ----- */
/* title Cormorant 70 (VISIONARY Bold) at (526,107), box 85; line at y 196 from x 28, 1870 long;
   4 columns of cards 453x377 from (24,230), gaps 20 / 19 */
.wrap--artists { padding: calc(107 * var(--u)) calc(23 * var(--u)) calc(80 * var(--u)) calc(24 * var(--u)); }
.artists__title {
  margin-left: calc(502 * var(--u)); /* 526 - 24 */
  font-family: var(--serif);
  font-weight: 400;
  font-size: max(30px, calc(70 * var(--u)));
  line-height: 1.214; /* 85 box */
  white-space: nowrap;
  text-transform: uppercase;
}
.artists__title b { font-weight: 700; }
.artists__rule { width: calc(1870 * var(--u)); margin: calc(4 * var(--u)) 0 0 calc(4 * var(--u)); border: none; border-top: 1px solid var(--ink); }
.acards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: calc(19 * var(--u)) calc(20 * var(--u));
  margin-top: calc(33 * var(--u)); /* 230 - 197 */
}
/* card 453x377; children at their exact offsets inside it (cqw = card width / 100) */
.acard {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 453 / 377;
  background: var(--tile);
  transition: background-color 0.5s ease;
}
.acard__cover { position: absolute; inset: 0; z-index: 1; } /* whole card opens the artist */
/* name 20 at (8,11); button 112x25 at (4,38), i.e. 7 under the name */
.acard__head {
  position: absolute;
  left: calc(8 / 453 * 100%);
  top: calc(11 / 377 * 100%);
  width: calc(150 / 453 * 100%);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: calc(7 / 453 * 100cqw);
}
.acard__name { font-weight: 400; font-size: calc(20 / 453 * 100cqw); line-height: 1; }
.acard__link { text-decoration: none; }
/* style 15 at (8,320), "(N works)" 15 at (8,347) */
.acard__style, .acard__count {
  position: absolute;
  left: calc(8 / 453 * 100%);
  width: calc(150 / 453 * 100%);
  font-size: calc(15 / 453 * 100cqw);
  line-height: 1.2;
}
.acard__style { bottom: calc(39 / 377 * 100%); } /* last line at y 320; longer names grow upwards */
.acard__count { top: calc(347 / 377 * 100%); }
/* image 277x355 at (163,11) */
.acard__img {
  position: absolute;
  left: calc(163 / 453 * 100%);
  top: calc(11 / 377 * 100%);
  width: calc(277 / 453 * 100%);
  height: calc(355 / 377 * 100%);
  overflow: hidden;
}
.acard__img img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.acard:hover .acard__img img { transform: scale(1.02); }

/* "SEE WORKS ->": 112x25, Inter semibold ~9.5, text starts 17 in */
.btn-dark {
  position: relative;
  z-index: 2;
  margin-left: calc(-4 / 453 * 100cqw);
  min-width: calc(112 / 453 * 100cqw); /* 112 in the frame, wider for longer translations */
  padding-right: calc(10 / 453 * 100cqw);
  height: calc(25 / 453 * 100cqw);
  display: inline-flex;
  align-items: center;
  gap: calc(6 / 453 * 100cqw);
  padding-left: calc(17 / 453 * 100cqw);
  background: var(--btn);
  color: var(--on-btn);
  font-family: "Inter", "Anek Latin", system-ui, sans-serif;
  font-weight: 600;
  font-size: calc(9.5 / 453 * 100cqw);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, background-color 0.5s ease, color 0.5s ease;
}
.btn-dark:hover { opacity: 0.8; }

/* ----- artist (Frame 4) ----- */
/* name Bold 60 at (93,68), box 73; rest Regular 50 at (93,133), box 61 */
.wrap--artist { padding: calc(68 * var(--u)) calc(83 * var(--u)) calc(74 * var(--u)) calc(93 * var(--u)); }
.ahead { font-weight: 400; }
.ahead__name { display: block; font-weight: 700; font-size: max(32px, calc(60 * var(--u))); line-height: 1.217; }
.ahead__rest { display: block; font-size: max(24px, calc(50 * var(--u))); line-height: 1.22; margin-top: calc(-8 * var(--u)); }

/* row at y 238, 768 tall; columns 323 | 12 | 346 | 8 | 346 | 9 | 348 | 8 | 344 */
.arow {
  display: grid;
  grid-template-columns: 323fr 12fr 346fr 8fr 346fr 9fr 348fr 8fr 344fr; /* gaps are tracks: they differ */
  height: calc(768 * var(--u));
  margin-top: calc(44 * var(--u)); /* 238 - 194 */
}
.arow > :nth-child(1) { grid-column: 1; }
.arow > :nth-child(2) { grid-column: 3; }
.arow > :nth-child(3) { grid-column: 5; }
.arow > :nth-child(4) { grid-column: 7; }
.arow > :nth-child(5) { grid-column: 9; }
.arow__img { overflow: hidden; background: var(--frame); }
.arow__img img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); }
.arow__img--empty { background: var(--card); } /* no photo yet */

.acol { position: relative; overflow: hidden; min-height: 0; }
.acol__label { position: absolute; top: calc(24 * var(--u)); font-size: max(10px, calc(12 * var(--u))); line-height: 1.25; word-spacing: 0.25em; }

/* statement card #f1f0f0: label (19,24); quote 24 at (19,61) w305; "/2 Biography" at (19,514); bio 20 at (19,537) w305 */
.acol--statement { background: var(--card); }
.acol--statement > .acol__label { left: calc(19 * var(--u)); }
.acol__statement {
  position: absolute;
  left: calc(19 * var(--u));
  top: calc(61 * var(--u));
  width: calc(305 * var(--u));
  font-size: max(14px, calc(24 * var(--u)));
  line-height: 1;
}
.acol__bio {
  position: absolute;
  left: calc(19 * var(--u));
  right: calc(22 * var(--u));
  bottom: calc(23 * var(--u));
  top: calc(514 * var(--u));
  overflow: hidden;
  font-size: max(12px, calc(20 * var(--u)));
  line-height: 1;
}
.acol__bio .acol__label { position: static; margin-bottom: calc(8 * var(--u)); }
.acol__meta { margin-bottom: calc(6 * var(--u)); color: var(--muted); }
.acol__bio p + p { margin-top: calc(4 * var(--u)); }

/* works card #e5e4e4: label (10,24); WORKS Inter Bold 48 centred at y 324; no image */
.acol--works { display: block; background: var(--card-2); color: var(--on-card-2); text-decoration: none; transition: background-color 0.3s ease; }
.acol--works > .acol__label { left: calc(10 * var(--u)); }
.acol__works-title {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(324 * var(--u));
  text-align: center;
  font-family: "Inter", "Anek Latin", system-ui, sans-serif;
  font-weight: 700;
  font-size: max(22px, calc(48 * var(--u)));
  line-height: 1.17;
  text-transform: uppercase;
  transition: letter-spacing 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.acol--works:hover .acol__works-title { letter-spacing: 0.06em; }

/* collections: 1px border, label (28,24); the names sit at the bottom as plain text
   (from the frame's list: rows 72 apart from y 380, line 39..287, year at 39, name at 96) */
.acol--collections { border: 1px solid var(--ink); }
.acol--collections > .acol__label { left: calc(28 * var(--u)); }
.acoll {
  position: absolute;
  left: calc(38 * var(--u));
  right: calc(60 * var(--u));
  bottom: calc(23 * var(--u));
  list-style: none;
}
.acoll li {
  display: grid;
  grid-template-columns: calc(57 * var(--u)) 1fr;
  min-height: calc(72 * var(--u));
  padding: calc(14 * var(--u)) 0 calc(8 * var(--u));
  border-top: 1px solid var(--rule-soft);
}
.acoll__year { padding-top: calc(3 * var(--u)); font-size: max(10px, calc(14 * var(--u))); line-height: 1.2; color: var(--muted); font-variant-numeric: lining-nums; }
.acoll__name { font-size: max(12px, calc(18 * var(--u))); line-height: 1.2; }
.acoll__name small { display: block; margin-top: calc(5 * var(--u)); font-size: max(11px, calc(17 * var(--u))); color: var(--muted); }

/* ----- works (Frames 5 = strip, 5/1 = grid) ----- */
/* WORKS 50 at (42,100); name Bold 40 at (42,191), box 49; line at y 241 from x 43, 1841 long */
.wrap--works { position: relative; padding: 0; }
.whead { position: relative; height: calc(241 * var(--u)); margin: 0 calc(36 * var(--u)) 0 calc(43 * var(--u)); border-bottom: 1px solid var(--ink); }
.whead__title { position: absolute; left: calc(-1 * var(--u)); top: calc(100 * var(--u)); font-weight: 400; font-size: max(28px, calc(50 * var(--u))); line-height: 1; text-transform: uppercase; }
.whead__name { position: absolute; left: calc(-1 * var(--u)); top: calc(191 * var(--u)); font-weight: 700; font-size: max(24px, calc(40 * var(--u))); line-height: 1.225; text-decoration: none; white-space: nowrap; }
.whead__name:hover { color: var(--muted); }

/* Strip / Grid switch: 147x33 pill (2px #bdbdbd border), active segment 72x30 #d4d4d4,
   Inter ~12.5; strip: pill right edge at 1873.5, top 194 */
.switch {
  position: absolute;
  right: calc(10.5 * var(--u)); /* pill right edge at 1873.5 */
  top: calc(194 * var(--u));
  display: inline-flex;
  width: max(110px, calc(147 * var(--u)));
  height: max(26px, calc(33 * var(--u)));
  padding: 1px;
  border: 2px solid var(--switch-border);
  border-radius: 999px;
}
.switch button {
  flex: 1;
  border: none;
  border-radius: 999px;
  background: none;
  font-family: "Inter", "Anek Latin", system-ui, sans-serif;
  font-size: max(11px, calc(12.5 * var(--u)));
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.switch button[aria-checked="true"] { background: var(--switch-on); }

.works { list-style: none; }
.wcard { min-width: 0; }
.wcard__btn { display: block; width: 100%; padding: 0; border: none; background: none; cursor: zoom-in; }
.wcard__img { display: block; overflow: hidden; background: var(--frame); }
.wcard__img img { width: 100%; height: 100%; object-fit: cover; filter: var(--img-filter); transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.wcard__btn:hover .wcard__img img { transform: scale(1.03); }
/* caption: NAME 20 left, year 16 right, 5 under the image */
.wcard__cap { display: flex; align-items: baseline; justify-content: space-between; gap: calc(10 * var(--u)); margin-top: calc(5 * var(--u)); }
.wcard__title { min-width: 0; font-size: max(13px, calc(20 * var(--u))); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard__year { flex-shrink: 0; font-size: max(11px, calc(16 * var(--u))); padding-right: calc(9 * var(--u)); }

/* strip: cards 268x607 from (49,343), every 293 */
.works--strip {
  display: flex;
  gap: calc(25 * var(--u));
  overflow-x: auto;
  margin-top: calc(102 * var(--u)); /* 343 - 241 */
  padding: 0 calc(36 * var(--u)) calc(40 * var(--u)) calc(49 * var(--u));
  scroll-snap-type: x proximity;
  scroll-padding: 0 calc(49 * var(--u));
  scrollbar-width: none; /* no bar: the mouse wheel moves the strip */
}
.works--strip::-webkit-scrollbar { display: none; }
.works--strip .wcard { flex: 0 0 calc(268 * var(--u)); scroll-snap-align: start; }
.works--strip .wcard__img { height: calc(607 * var(--u)); }

/* grid: 5 columns from (43,261) to 1884, gap 18; images ~354x349; next row at 655 */
.whead.is-ruled .switch { right: calc(-2.5 * var(--u)); top: calc(171 * var(--u)); } /* pill at (1739.5,171) */
.works--grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: calc(19 * var(--u)) calc(18 * var(--u));
  padding: calc(20 * var(--u)) calc(36 * var(--u)) calc(64 * var(--u)) calc(43 * var(--u));
}
.works--grid .wcard__img { aspect-ratio: 354 / 349; }
.works--grid .wcard__cap { margin-top: calc(2 * var(--u)); }

/* ----- info (Frame 7) ----- */
/* hero Anek Light 70 centred in x 421..1532 at y 99, 2 lines in 202 */
/* the page uses --fu so all of the 1920x1080 frame fits the window, centred */
.wrap--info { --u: var(--fu); width: calc(1920 * var(--u)); height: calc(1080 * var(--u)); margin: 0 auto; padding-bottom: 0; overflow: hidden; }
.page:has(.wrap--info) { display: flex; align-items: center; }
.page:has(.wrap--info)[hidden] { display: none; }
/* INFO sits inside the letterboxed frame, 42/100 in its own units: on very short/wide
   windows the frame is pillarboxed enough that a viewport-relative 42px would fall
   outside it and get clipped by the overflow:hidden above, so it stays frame-relative. */
.wrap--info { position: relative; }
.wrap--info .ptitle { position: absolute; top: calc(100 * var(--u)); left: calc(42 * var(--u)); }
.info-hero { margin: calc(-1 * var(--u)) 0 0 calc(379 * var(--u)); width: calc(1111 * var(--u)); text-align: center; }
.info-hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: max(30px, calc(70 * var(--u)));
  line-height: 1.443;
  text-transform: uppercase;
  white-space: pre;
}
.info-hero__title b { font-weight: 600; }
/* line at y 301 and panel #f6f3f3 1156x673 at y 341, both from x 376 */
.info-rule { width: calc(1156 * var(--u)); margin: 0 0 0 calc(334 * var(--u)); border: none; border-top: 1px solid var(--ink); }
.info-panel {
  position: relative;
  width: calc(1156 * var(--u));
  height: calc(673 * var(--u));
  margin: calc(40 * var(--u)) 0 0 calc(334 * var(--u));
  background: var(--panel);
}
/* +1200 40 at (70,5), ARTISTS Light 15 at (92,51); +88 at (956,5), GALERIES at (960,51) */
.stat { position: absolute; top: calc(5 * var(--u)); }
.stat--artists { left: calc(70 * var(--u)); }
.stat--galleries { left: calc(956 * var(--u)); }
.stat__num { display: block; font-size: max(22px, calc(40 * var(--u))); line-height: 1.15; }
.stat__label { display: block; margin-top: calc(0 * var(--u)); font-weight: 300; font-size: max(11px, calc(15 * var(--u))); line-height: 2; text-transform: uppercase; }
.stat--artists .stat__label { margin-left: calc(22 * var(--u)); }
.stat--galleries .stat__label { margin-left: calc(4 * var(--u)); }
/* quote Anek Light 25 at (223,121) w701, line height 100% */
.info-panel blockquote {
  position: absolute;
  left: calc(223 * var(--u));
  top: calc(121 * var(--u));
  width: calc(701 * var(--u));
  font-family: var(--serif);
  font-weight: 300;
  font-size: max(13px, calc(25 * var(--u)));
  line-height: 1;
}
.info-panel blockquote p + p, .info-panel blockquote footer { margin-top: 1em; }
.quote__name { font-weight: 400; }
.quote__lead { font-weight: 700; font-size: 1.6em; color: var(--quote-blue); }
.quote__comma { font-weight: 400; font-size: 1.2em; }
.quote__role { display: block; font-size: 0.4em; }
/* tagline Bold Italic 40 centred in (401,500) w466 */
.info-panel__tagline {
  position: absolute;
  left: calc(401 * var(--u));
  top: calc(500 * var(--u));
  width: calc(466 * var(--u));
  text-align: center;
  font-weight: 700;
  font-style: italic;
  font-size: max(20px, calc(40 * var(--u)));
  line-height: 1;
}

/* ----- contacts (Frame 8) ----- */
/* CONTACTS 50 at (42,100); line y 165 from x 42, w 1826; banner 1826x170 at (42,190) */
.wrap--contact { padding-bottom: 0; }
.contact-rule { width: calc(1826 * var(--u)); margin: calc(15 * var(--u)) 0 0 0; border: none; border-top: 1px solid var(--ink); }
.banner {
  position: relative;
  display: block;
  width: calc(1826 * var(--u));
  height: calc(170 * var(--u));
  margin-top: calc(24 * var(--u)); /* 190 - 166 */
  overflow: hidden;
  text-decoration: none;
  background: #0e0e0d;
}
.banner__imgs { display: flex; height: 100%; }
.banner__imgs img { flex: 1; min-width: 0; height: 100%; object-fit: cover; filter: brightness(0.4) saturate(0.8); transition: filter 0.6s ease; }
.banner:hover .banner__imgs img { filter: brightness(0.55) saturate(0.9); }
.banner__text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: max(24px, calc(64 * var(--u)));
  color: #ededea; /* sits on darkened images in both themes */
}

/* KEEP IN TOUCH Bold 50 at (130,502); text 28 at (136,577) w462;
   form x 732..1830: inputs 50 at y 513 / 571, message 138 at y 629, submit 43 r40 at y 786 */
.touch { position: relative; height: calc(1074 * var(--u) - 360 * var(--u)); }
.touch__intro { position: absolute; left: calc(88 * var(--u)); top: calc(142 * var(--u)); }
.touch__title { max-width: calc(570 * var(--u)); font-weight: 700; font-size: max(28px, calc(50 * var(--u))); line-height: 1.2; text-transform: uppercase; } /* wraps before the form (x 690) in longer languages */
.touch__intro p { margin: calc(15 * var(--u)) 0 0 calc(6 * var(--u)); width: calc(462 * var(--u)); font-size: max(16px, calc(28 * var(--u))); line-height: 1; }

.form { position: absolute; left: calc(690 * var(--u)); top: calc(153 * var(--u)); width: calc(1098 * var(--u)); display: flex; flex-direction: column; gap: calc(8 * var(--u)); }
.form label { display: block; }
.form input, .form textarea {
  display: block;
  width: 100%;
  padding: 0 calc(26 * var(--u));
  border: none;
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: max(14px, calc(20 * var(--u)));
  resize: vertical;
}
.form input { height: calc(50 * var(--u)); min-height: 36px; }
.form textarea { height: calc(138 * var(--u)); min-height: 90px; padding-top: calc(14 * var(--u)); }
.form input::placeholder, .form textarea::placeholder { color: var(--ink); opacity: 1; }
.form input:focus, .form textarea:focus { outline: 1px solid var(--muted); }
.form__submit {
  height: calc(43 * var(--u));
  min-height: 32px;
  margin-top: calc(11 * var(--u));
  border: none;
  border-radius: calc(40 * var(--u));
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--serif);
  font-size: max(14px, calc(20 * var(--u)));
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.form__submit:hover { opacity: 0.85; }
.form__note { min-height: 1.4em; font-size: max(12px, calc(16 * var(--u))); color: var(--muted); }

/* footer 1920x755 (#222 in both themes), from the frame's footer image:
   NEWSLETTER ~72 at (107,80); line 26 at y 174; input 692x60 at (107,246); Subscribe 166x60 at x 817;
   column headings Bold 41 at x 1175 / 1585, y 66 and 416; links 24, every 44.5, from y 177 / 493;
   EMAIL / PHONE values 36 */
.sitefoot { position: relative; min-height: calc(755 * var(--u)); background: #222; color: #f2f2f0; }
.sitefoot__inner {
  display: grid;
  grid-template-columns: calc(1068 * var(--u)) calc(410 * var(--u)) 1fr;
  padding: calc(66 * var(--u)) 0 calc(83 * var(--u)) calc(107 * var(--u));
}
.news { grid-row: 1 / span 2; padding-top: calc(14 * var(--u)); }
.news__title { font-weight: 400; font-size: max(34px, calc(72 * var(--u))); line-height: 1; text-transform: uppercase; }
.news p { margin-top: calc(22 * var(--u)); font-size: max(15px, calc(26 * var(--u))); line-height: 1; color: #e8e6e1; }
.news__form { display: flex; gap: calc(18 * var(--u)); margin-top: calc(46 * var(--u)); }
.news__form input {
  width: calc(692 * var(--u));
  height: calc(60 * var(--u));
  min-height: 40px;
  padding: 0 calc(20 * var(--u));
  border: none;
  background: #ececec;
  color: #111;
  font: inherit;
  font-size: max(14px, calc(24 * var(--u)));
}
.news__form input::placeholder { color: #8a8a8a; }
.news__form button {
  width: calc(166 * var(--u));
  height: calc(60 * var(--u));
  min-height: 40px;
  border: none;
  background: #2f2f2f;
  color: #f2f2f0;
  font-family: var(--serif);
  font-size: max(15px, calc(26 * var(--u)));
  cursor: pointer;
}
.news__form button:hover { background: #3a3a3a; }
.news .news__note { min-height: 1.4em; margin-top: calc(10 * var(--u)); font-size: max(12px, calc(16 * var(--u))); color: #9a9893; }

.sitefoot__cols { display: contents; }
.sitefoot__col { display: flex; flex-direction: column; align-items: flex-start; }
/* two link columns (x 1175 / 1585), each a stack: second block at y 416 after 4 links */
.sitefoot__stack { display: flex; flex-direction: column; }
.sitefoot__stack > .sitefoot__col + .sitefoot__col { margin-top: calc(61 * var(--u)); }
.sitefoot__col h3 { font-weight: 700; font-size: max(22px, calc(41 * var(--u))); line-height: 1.22; text-transform: uppercase; margin-bottom: calc(53 * var(--u)); }
.sitefoot__stack:last-child > .sitefoot__col + .sitefoot__col h3 { margin-bottom: calc(19 * var(--u)); } /* tighter in the frame */
.sitefoot__col a, .sitefoot__col span {
  font-size: max(13px, calc(24 * var(--u)));
  line-height: calc(44.5 * var(--u));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #b4b2ad;
}
.sitefoot__col a:hover { color: #fff; }
.contact-block h3 { margin-bottom: calc(26 * var(--u)); }
.contact-block h3 + a { margin-bottom: calc(43 * var(--u)); }
.contact-block a { font-size: max(18px, calc(36 * var(--u))); line-height: 1; letter-spacing: 0; text-transform: none; color: #fff; }
.contact-block a:hover { color: #b4b2ad; }

/* ---------- artwork overlay (Frames 6, 6/1) ---------- */
/* image box 1107x1012 at (28,34); panel 694 wide at x 1184, 42 from the right.
   --du (set by main.js) is one frame pixel, sized so the whole frame fits the window. */
.detail { position: fixed; inset: 0; z-index: 30; --du: var(--u); font-variant-numeric: lining-nums; } /* the frame's panel uses lining figures (09 / 14, 2023) */
.detail[hidden] { display: none; }

.detail__backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg);
  opacity: 0;
  transition: opacity 0.5s ease;
  cursor: zoom-out;
}
.detail.is-open .detail__backdrop { opacity: 1; }

.detail__img {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  object-fit: cover;
  background: var(--frame);
  box-shadow: 0 50px 100px -40px var(--shadow);
  cursor: zoom-out;
  will-change: transform, opacity;
}
.detail__img.is-animating { transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), clip-path 0.7s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease; }

/* view switcher: bottom-right corner of the image box */
.detail__thumbs {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: calc(8 * var(--du));
  transform: translate(-100%, -100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.detail__thumbs[hidden] { display: none; }
.detail.is-open .detail__thumbs { opacity: 1; transition-delay: 0.3s; }
.detail__thumb {
  width: max(44px, calc(62 * var(--du)));
  height: max(44px, calc(62 * var(--du)));
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.detail__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; transition: opacity 0.2s ease; }
.detail__thumb:hover img { opacity: 1; }
.detail__thumb[aria-selected="true"] { border-color: #fff; }
.detail__thumb[aria-selected="true"] img { opacity: 1; }

.detail__panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.detail.is-open .detail__panel { opacity: 1; transform: none; transition-delay: 0.18s; }
.detail__panel.is-swapping { opacity: 0 !important; transition-delay: 0s !important; }

/* head: "← ALL WORKS" 15 at (20,26); "09 / 14" ~19, right edge 23 in */
.detail__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: calc(52 * var(--du));
  padding: calc(10 * var(--du)) calc(23 * var(--du)) 0 calc(20 * var(--du));
}
.detail__back { padding: 0; background: none; border: none; cursor: pointer; font-size: max(12px, calc(15 * var(--du))); letter-spacing: 0.04em; text-transform: uppercase; }
.detail__back:hover { color: var(--muted); }
.detail__count { font-size: max(14px, calc(19 * var(--du))); word-spacing: 0.3em; font-variant-numeric: tabular-nums; }

/* body from x 23: title ~88 with its box at y 199 (panel); facts from y 336, rows 77 apart,
   columns 310 + 29 + 313; labels 12 tracked, values 22; text 24 / 31 from y 588, max 560 wide */
.detail__body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 calc(19 * var(--du)) 0 calc(23 * var(--du));
}
.detail__artist { display: none; } /* not in the frame */
/* title 78, right under the head (the frame's empty band above it is dropped) */
.detail__title { margin-top: calc(26 * var(--du)); font-weight: 400; font-size: max(32px, calc(78 * var(--du))); line-height: 1.05; }
.detail__facts { display: grid; grid-template-columns: 310fr 313fr; column-gap: calc(29 * var(--du)); margin-top: calc(49 * var(--du)); }
.detail__facts div { height: calc(77 * var(--du)); min-height: 52px; padding-top: calc(17 * var(--du)); border-top: 1px solid var(--line); }
.detail__facts dt { font-size: max(10px, calc(12 * var(--du))); line-height: 1.2; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.detail__facts dd { margin-top: calc(6 * var(--du)); font-size: max(15px, calc(22 * var(--du))); line-height: 1.2; }
.detail__status { display: inline-flex; align-items: center; gap: calc(14 * var(--du)); }
.detail__status::before { content: ""; width: calc(10 * var(--du)); height: calc(10 * var(--du)); min-width: 8px; min-height: 8px; border-radius: 50%; background: #d23a2a; }
.detail__status.is-available::before { background: #3e9b5a; }
/* the text takes the space left above the price row; what doesn't fit fades out
   (it still scrolls), and it stops 44 above the price / cart */
.detail__desc {
  flex: 1 1 auto;
  min-height: 0;
  margin: calc(22 * var(--du)) 0 calc(44 * var(--du));
  max-width: calc(560 * var(--du));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.detail__desc::-webkit-scrollbar { display: none; }
.detail__desc.is-cut {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 110 * var(--du)), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 110 * var(--du)), transparent);
}
.detail__desc p { font-size: max(15px, calc(24 * var(--du))); line-height: 1.3; color: var(--soft); margin-bottom: calc(12 * var(--du)); }
.detail__desc p.is-placeholder { color: var(--muted); font-style: italic; }
.detail__credit { margin-top: calc(6 * var(--du)); font-size: max(11px, calc(13 * var(--du))); color: var(--muted); }
.detail__credit[hidden] { display: none; }

/* foot: bottom row lines up with the image bottom (y 1010..1046) */
.detail__foot {
  display: flex;
  align-items: center;
  gap: calc(16 * var(--du));
  height: calc(36 * var(--du));
  min-height: 30px;
}
.detail__nav { display: flex; align-items: center; gap: calc(10 * var(--du)); margin-left: auto; }

/* thin outlined pills: ON REQUEST is 160x28, 0.5 border, radius 25, bag 18x22 13 in, text 15 at 45 */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(12 * var(--du, var(--u)));
  height: max(24px, calc(28 * var(--du, var(--u))));
  padding: 0 calc(18 * var(--du, var(--u)));
  border: 0.5px solid var(--ink);
  border-radius: 25px;
  background: none;
  font-family: var(--serif);
  font-size: max(12px, calc(15 * var(--du, var(--u))));
  letter-spacing: 0.06em;
  word-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.pill:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.pill:disabled { opacity: 0.3; cursor: default; }
.pill--icon { width: max(24px, calc(28 * var(--du))); padding: 0; letter-spacing: 0; }
.bag {
  width: 18px; height: 22px; flex-shrink: 0;
  background: currentColor;
  -webkit-mask: url(images/ui-bag.png) center / contain no-repeat;
  mask: url(images/ui-bag.png) center / contain no-repeat;
}

.detail__buy { margin-left: calc(-4 * var(--du)); }
.detail__buy[hidden], .detail__bag[hidden] { display: none; }
.detail__buy:not(.is-price) { width: max(130px, calc(160 * var(--du))); justify-content: flex-start; padding-left: calc(13 * var(--du)); gap: calc(14 * var(--du)); }
.detail__buy:not(.is-price) .bag { width: calc(18 * var(--du)); height: calc(22 * var(--du)); min-width: 14px; min-height: 17px; }
/* priced work: "€ 1.200" 30, no outline; its bag 29x35 sits at the far right */
.detail__buy.is-price { margin-left: 0; height: auto; padding: 0; border: none; font-size: max(20px, calc(30 * var(--du))); letter-spacing: 0; text-transform: none; }
.detail__buy.is-price:hover { background: none; color: var(--muted); }
.detail__buy.is-price .bag { display: none; }
.detail__bag { display: inline-flex; transition: opacity 0.2s ease; }
.detail__bag:hover { opacity: 0.6; }
.detail__bag .bag { width: calc(29 * var(--du)); height: calc(35 * var(--du)); min-width: 20px; min-height: 24px; }

/* ---------- narrow screens: same pieces, stacked ---------- */
@media (max-width: 760px) {
  :root { --u: 0.5px; }
  .topbar { height: 56px; }
  .topbar__left { left: 16px; top: 18px; gap: 10px; }
  .topbar__right { right: 16px; top: 18px; gap: 16px; }
  .theme-toggle__label { display: none; }
  .theme-toggle { min-width: 0; padding: 0 6px; }
  .to-start { left: 16px; bottom: 16px; }
  .wrap { padding: 64px 16px 48px; }

  .label__works { display: none; }
  .label,
  .label--left,
  .label--right {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 0;
    width: auto;
    padding: 48px 0 40px;
    background: linear-gradient(to bottom, transparent, var(--bg) 22%);
  }
  .label__title { font-size: 34px; }

  .wrap--artists { padding: 64px 16px 40px; }
  .wrap { padding-top: 64px; }
  .artists__title { margin-left: 0; }
  .acards { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }

  .wrap--artist { padding: 64px 16px 40px; }
  .arow { grid-template-columns: 1fr; height: auto; row-gap: 10px; }
  .arow > * { grid-column: 1 !important; }
  .arow__img { aspect-ratio: 3 / 4; }
  .acol { height: 768px; }
  .acol--statement, .acol--works, .acol--collections { --u: 1px; } /* cards at their frame size, 346 wide fits a phone */
  .acol--works, .acol--statement, .acol--collections { max-width: 350px; width: 100%; justify-self: center; }

  .wrap--works { padding: 64px 16px 0; }
  .whead, .whead.is-ruled { height: auto; margin: 0 0 16px; padding-bottom: 12px; }
  .whead__title, .whead__name { position: static; display: block; }
  .works--strip { margin-top: 0; }
  .switch, .whead.is-ruled .switch { position: static; margin-top: 12px; }
  .works--strip { padding: 0 16px 24px; gap: 12px; }
  .works--strip .wcard { flex-basis: 70vw; }
  .works--strip .wcard__img { height: 60vh; }
  .works--grid { grid-template-columns: repeat(2, 1fr); padding: 0 16px 48px; gap: 12px; }

  .wrap--info { --u: 0.5px; width: auto; height: auto; overflow: visible; padding-bottom: 48px; }
  .page:has(.wrap--info) { display: block; }
  .info-hero { margin-top: 12px; }
  .wrap--info .ptitle { position: static; }
  .artists__title { white-space: normal; }
  .artists__rule { width: auto; margin-left: 0; }
  .info-hero, .info-rule, .info-panel { width: auto; margin-left: 0; }
  .info-panel { height: auto; display: flex; flex-direction: column; gap: 24px; padding: 20px 18px 28px; margin-top: 20px; }
  .stat, .info-panel blockquote, .info-panel__tagline { position: static; width: auto; }
  .info-panel blockquote { font-size: 16px; line-height: 1.25; }

  .contact-rule, .banner { width: auto; margin-left: 0; }
  .touch { height: auto; display: flex; flex-direction: column; gap: 32px; margin: 40px 0 56px; }
  .touch__intro, .form { position: static; width: auto; }
  .touch__intro p { width: auto; margin-left: 0; }
  .sitefoot__inner { display: flex; flex-direction: column; gap: 36px; padding: 40px 16px 48px; }
  .sitefoot__stack { gap: 36px; }
  .sitefoot__stack > .sitefoot__col + .sitefoot__col { margin-top: 0; }
  .sitefoot__col h3 { margin-bottom: 12px; }
  .sitefoot__col a, .sitefoot__col span { line-height: 1.9; }
  .news__form { flex-direction: column; }
  .news__form input, .news__form button { width: 100%; height: 50px; }

  .detail.is-stacked { overflow-y: auto; --du: 0.6px; }
  .detail.is-stacked .detail__thumbs { transform: none; }
  .detail.is-stacked .detail__panel { left: 16px; right: 16px; padding-bottom: 0; }
  .detail.is-stacked .detail__head { position: fixed; top: 0; left: 0; right: 0; z-index: 3; height: auto; padding: 12px 16px; background: var(--bg); }
  .detail.is-stacked .detail__body { overflow: visible; padding: 0 0 24px; }
  .detail.is-stacked .detail__desc { overflow: visible; margin-bottom: 0; -webkit-mask-image: none; mask-image: none; }
  .detail.is-stacked .detail__artist { margin-top: 8px; }
  .detail.is-stacked .detail__foot { position: sticky; bottom: 0; flex-wrap: wrap; height: auto; padding: 10px 0 14px; background: var(--bg); }
}
