/* =========================================================
   MHLLA · styles
   One typeface (Archia Regular), pure black and white.
   With a single weight, emphasis comes from size, tracking
   and inversion: attention turns black into white, and
   type opens up (letter-spacing) when you point at it.
   ========================================================= */

@font-face {
  font-family: "Archia";
  src: url("fonts/archia-regular-webfont.woff2") format("woff2"),
       url("fonts/archia-regular-webfont.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #000000;
  --paper: #ffffff;
  --ash-on-ink: #8f8f8f;     /* secondary text on black, 6.9:1 */
  --ash-on-paper: #595959;   /* secondary text on white, 7:1 */
  --rule-on-ink: rgba(255, 255, 255, 0.2);
  --rule-on-paper: rgba(0, 0, 0, 0.16);

  --font: "Archia", "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.3125rem;
  --step-2: clamp(1.5rem, 2.4vw, 2.1rem);
  --step-3: clamp(2.4rem, 5.4vw, 5rem);
  --step-4: clamp(3rem, 8vw, 7.5rem);

  --gutter: clamp(18px, 3.2vw, 44px);
  --section-pad: clamp(88px, 13vw, 184px);
  --header-h: 72px;
  --ease: cubic-bezier(0.2, 0.7, 0, 1);
  --ease-curtain: cubic-bezier(0.7, 0, 0.1, 1);
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-locked { overflow: hidden; }

/* static film grain; drawn once, costs nothing per frame */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { font-weight: 400; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 600;
  padding: 10px 16px;
  background: var(--paper);
  color: var(--ink);
}
.skip-link:focus { top: 12px; }

main > section { scroll-margin-top: var(--header-h); }

/* ---------- shared ---------- */

.section { padding: var(--section-pad) var(--gutter); }
.section--dark { background: var(--ink); color: var(--paper); }
.section--light { background: var(--paper); color: var(--ink); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 20px;
  align-items: end;
  margin-bottom: clamp(48px, 7vw, 96px);
}
.section-head h2 {
  grid-column: 1 / 7;
  font-size: var(--step-3);
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.section-head p { grid-column: 7 / 11; max-width: 40ch; color: var(--ash-on-ink); }
.section--light .section-head p { color: var(--ash-on-paper); }
.section-head .text-link { grid-column: 11 / 13; justify-self: end; }

.text-link {
  padding-bottom: 3px;
  white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
.text-link:hover { background-size: 0% 1px; background-position: right bottom; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 28px;
  border: 1px solid currentColor;
  background: transparent;
  font-size: var(--step-0);
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), letter-spacing 0.5s var(--ease), transform 0.6s var(--ease);
}
.button--ink { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.button--ink:hover { background: var(--paper); color: var(--ink); letter-spacing: 0.08em; }
.button--paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.button--paper:hover { background: var(--ink); color: var(--paper); letter-spacing: 0.08em; }
.button[disabled] { opacity: 0.5; cursor: progress; }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  padding: 0 var(--gutter);
  color: var(--paper);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: transform 0.6s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease);
}
.site-header.is-solid { background: var(--ink); border-bottom-color: var(--rule-on-ink); }
.site-header.is-hidden { transform: translateY(-101%); }

.site-header__mark { font-size: 1.5rem; letter-spacing: -0.04em; line-height: 1; transition: letter-spacing 0.5s var(--ease); }
.site-header__mark:hover { letter-spacing: 0.1em; }
.site-header__nav { margin-left: auto; }
.site-header__nav ul { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.site-header__nav a,
.site-header__cta { font-size: 0.9375rem; }
.site-header__cta {
  padding: 10px 18px;
  border: 1px solid currentColor;
  transition: transform 0.6s var(--ease), background-color 0.3s, color 0.3s;
}
.site-header__cta:hover { background: var(--paper); color: var(--ink); }
.site-header__toggle {
  display: none;
  margin-left: auto;
  padding: 10px 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: flex-end;
  padding: var(--header-h) var(--gutter) 48px;
  background: var(--ink);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.6s var(--ease-curtain);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { clip-path: inset(0 0 0 0); }
.mobile-menu nav { width: 100%; }
.mobile-menu li + li { border-top: 1px solid var(--rule-on-ink); }
.mobile-menu li { opacity: 0; transform: translateY(40px); transition: opacity 0.5s, transform 0.8s var(--ease); }
.mobile-menu.is-open li { opacity: 1; transform: none; transition-delay: calc(0.2s + var(--i) * 0.06s); }
.mobile-menu a { display: block; padding: 14px 0; font-size: clamp(2rem, 9vw, 3rem); line-height: 1.05; letter-spacing: -0.03em; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  --x: 62%;
  --y: 46%;
  --r: 0px;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  background: var(--ink);
  touch-action: pan-y;
}
.hero__layer {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto auto;
  column-gap: var(--gutter);
  padding: calc(var(--header-h) + 24px) var(--gutter) var(--gutter);
}
.hero__layer--dark { color: var(--paper); }
.hero__layer--light {
  background: var(--paper);
  color: var(--ink);
  clip-path: circle(var(--r) at var(--x) var(--y));
  pointer-events: none;
}
.hero__lede {
  grid-column: 8 / 13;
  grid-row: 1;
  align-self: start;
  max-width: 30ch;
  font-size: var(--step-1);
  line-height: 1.35;
}
.hero__hint { grid-column: 1 / 6; grid-row: 2; margin-bottom: 22px; font-size: var(--step--1); color: var(--ash-on-ink); }
.hint-touch { display: none; }
@media (pointer: coarse) {
  .hint-pointer { display: none; }
  .hint-touch { display: inline; }
}
.hero__word {
  grid-column: 1 / -1;
  grid-row: 3;
  display: block;
  margin-left: -0.05em;
  font-size: clamp(6rem, 31vw, 32rem);
  line-height: 0.76;
  letter-spacing: -0.06em;
  white-space: nowrap;
  translate: 0 calc(var(--sy, 0) * 0.32px);      /* parallax: sinks slower than the page */
}
.hero__word .ch { will-change: transform; }
.hero__note {
  position: absolute;
  left: var(--nx);
  top: var(--ny);
  max-width: 20ch;
  font-size: var(--step-2);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero__ring {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  transform: translate(calc(var(--x) - var(--r)), calc(var(--y) - var(--r)));
  border: 1px solid var(--ash-on-ink);
  border-radius: 50%;
  pointer-events: none;
}

/* =========================================================
   DOORS
   ========================================================= */
.doors { border-top: 1px solid var(--rule-on-ink); }
.door {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: baseline;
  padding: clamp(32px, 5vw, 64px) var(--gutter);
  border-bottom: 1px solid var(--rule-on-ink);
  transition: color 0.5s var(--ease);
}
.door::before {        /* white fill wipes up from below */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.7s var(--ease);
}
.door:hover::before,
.door:focus-visible::before { transform: scaleY(1); transform-origin: bottom; }
.door__meta { grid-column: 1 / 3; font-size: var(--step--1); color: var(--ash-on-ink); transition: color 0.5s var(--ease); }
.door__title {
  grid-column: 3 / 10;
  font-size: clamp(2.4rem, 5.8vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  white-space: nowrap;
  transition: letter-spacing 0.8s var(--ease), transform 0.8s var(--ease);
}
.door__desc { grid-column: 10 / 13; max-width: 34ch; color: var(--ash-on-ink); transition: color 0.5s var(--ease); }
.door:hover,
.door:focus-visible { color: var(--ink); outline: none; }
.door:hover .door__title,
.door:focus-visible .door__title { letter-spacing: 0.02em; transform: translateX(1.2vw); }
.door:hover .door__meta,
.door:hover .door__desc,
.door:focus-visible .door__meta,
.door:focus-visible .door__desc { color: var(--ash-on-paper); }

/* =========================================================
   TICKER
   ========================================================= */
.ticker {
  overflow: hidden;
  padding: clamp(22px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--rule-on-ink);
  white-space: nowrap;
}
.ticker__track { display: flex; width: max-content; will-change: transform; }
.ticker__set {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  font-size: clamp(1.6rem, 3.4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.ticker__set span { padding: 0 0.7em; }
.ticker__set i {
  width: 0.42em;
  height: 0.42em;
  border: 1px solid currentColor;
  border-radius: 50%;
  flex-shrink: 0;
}
.ticker__set i:nth-of-type(2n) { background: currentColor; }

/* =========================================================
   SIGNED ARTISTS
   ========================================================= */
.roster { border-bottom: 1px solid var(--rule-on-ink); }
.roster a {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: baseline;
  padding: clamp(14px, 1.8vw, 22px) 0;
  border-top: 1px solid var(--rule-on-ink);
  transition: color 0.4s var(--ease);
}
.roster__name {
  grid-column: 1 / 8;
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  transition: letter-spacing 0.7s var(--ease), transform 0.7s var(--ease);
}
.roster__medium { grid-column: 8 / 11; color: var(--ash-on-ink); }
.roster__count { grid-column: 11 / 13; justify-self: end; color: var(--ash-on-ink); }
.roster:hover a { color: var(--ash-on-ink); }
.roster a:hover,
.roster a:focus-visible { color: var(--paper); }
.roster a:hover .roster__name,
.roster a:focus-visible .roster__name { letter-spacing: 0.03em; transform: translateX(1.5vw); }

.roster-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  width: clamp(200px, 20vw, 300px);
  aspect-ratio: 4 / 5;
  pointer-events: none;
  clip-path: inset(50% 0 50% 0);
  transition: clip-path 0.55s var(--ease);
  will-change: transform;
}
.roster-preview.is-visible { clip-path: inset(0 0 0 0); }
.roster-preview .art { width: 100%; height: 100%; }
@media (hover: none) { .roster-preview { display: none; } }

/* =========================================================
   OPEN GALLERY
   ========================================================= */
.works {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(48px, 7vw, 112px);
  align-items: start;
}
.work:nth-child(1) { grid-column: 1 / 6; }
.work:nth-child(1) .art { aspect-ratio: 4 / 5; }
.work:nth-child(2) { grid-column: 7 / 10; margin-top: clamp(80px, 14vw, 220px); }
.work:nth-child(2) .art { aspect-ratio: 3 / 4; }
.work:nth-child(3) { grid-column: 10 / 13; margin-top: clamp(20px, 4vw, 60px); }
.work:nth-child(3) .art { aspect-ratio: 2 / 3; }
.work:nth-child(4) { grid-column: 2 / 6; }
.work:nth-child(4) .art { aspect-ratio: 1 / 1; }
.work:nth-child(5) { grid-column: 7 / 13; margin-top: clamp(40px, 8vw, 120px); }
.work:nth-child(5) .art { aspect-ratio: 16 / 11; }

.work a, .card a { display: block; }
.art { width: 100%; background: currentColor; overflow: hidden; }
.art svg { width: 100%; height: 100%; }
.work .art { transition: transform 0.9s var(--ease), clip-path 1.3s var(--ease); }
.work a:hover .art { transform: scale(0.975); }

.work__caption {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 16px;
  padding-top: 14px;
}
.work__title { font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.02em; }
.work__artist { grid-row: 2; color: var(--ash-on-paper); font-size: 0.9375rem; }
.work__price { grid-row: 1 / 3; grid-column: 2; align-self: start; font-variant-numeric: tabular-nums; }

.submit-band {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 32px;
  align-items: end;
  margin-top: clamp(96px, 12vw, 180px);
  padding-top: 40px;
  border-top: 1px solid var(--ink);
}
.submit-band__line { grid-column: 1 / 8; font-size: var(--step-3); line-height: 1; letter-spacing: -0.04em; }
.submit-band__action { grid-column: 9 / 13; }
.submit-band__action p { margin-top: 16px; max-width: 36ch; color: var(--ash-on-paper); font-size: 0.9375rem; }

/* =========================================================
   EVENTS
   ========================================================= */
.event {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: baseline;
  padding: clamp(22px, 3vw, 40px) var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  border-top: 1px solid var(--rule-on-ink);
  transition: color 0.45s var(--ease);
}
.event:last-child { border-bottom: 1px solid var(--rule-on-ink); }
.event::before {      /* white fill wipes in from the left */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.65s var(--ease);
}
.event:hover::before,
.event:focus-within::before { transform: scaleX(1); transform-origin: left; }
.event__date { grid-column: 1 / 3; display: flex; align-items: baseline; gap: 10px; }
.event__day {
  display: inline-block;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  font-variant-numeric: lining-nums;
  transition: transform 0.6s var(--ease);
}
.event:hover .event__day { transform: translateX(10px); }
.event__month { font-size: var(--step-0); }
.event__when { grid-column: 3 / 5; color: var(--ash-on-ink); font-size: 0.9375rem; }
.event__body { grid-column: 5 / 10; }
.event__title { font-size: var(--step-2); line-height: 1.15; letter-spacing: -0.03em; }
.event__title a::after { content: ""; position: absolute; inset: 0; }   /* whole row is the link */
.event__title a:focus-visible { outline: none; }
.event__body p { margin-top: 6px; max-width: 48ch; color: var(--ash-on-ink); }
.event__action {
  grid-column: 10 / 13;
  justify-self: end;
  font-size: 0.9375rem;
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
}
.event:hover,
.event:focus-within { color: var(--ink); }
.event:hover .event__when,
.event:hover .event__body p,
.event:focus-within .event__when,
.event:focus-within .event__body p { color: var(--ash-on-paper); }

/* =========================================================
   NEWSLETTER
   ========================================================= */
.newsletter {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 48px;
  align-items: end;
}
.newsletter h2 { grid-column: 1 / 7; font-size: var(--step-3); line-height: 0.98; letter-spacing: -0.04em; }
.newsletter__form { grid-column: 8 / 13; }
.newsletter__intro { max-width: 42ch; margin-bottom: 36px; color: var(--ash-on-paper); }
.newsletter label { display: block; margin-bottom: 8px; font-size: var(--step--1); }
.newsletter__row { display: flex; align-items: stretch; border-bottom: 2px solid var(--ink); }
.newsletter input {
  flex: 1;
  min-width: 0;
  padding: 0 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: var(--step-2);
  line-height: 1.2;
}
.newsletter input::placeholder { color: #a6a6a6; }
.newsletter input:focus { outline: none; }
.newsletter__row:focus-within { outline: 2px solid var(--ink); outline-offset: 6px; }
.newsletter__row .button { margin-bottom: 6px; }
.newsletter__status { min-height: 1.6em; margin-top: 14px; font-size: 0.9375rem; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { padding: clamp(64px, 9vw, 120px) var(--gutter) 28px; border-top: 1px solid var(--rule-on-ink); }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 40px;
}
.site-footer__mark { grid-column: 1 / 6; font-size: clamp(3rem, 9vw, 8rem); line-height: 0.85; letter-spacing: -0.06em; }
.site-footer__mark .ch { display: inline-block; transform-origin: 50% 100%; transition: transform 0.6s var(--ease); }
.site-footer__grid > div:nth-child(2) { grid-column: 7 / 9; }
.site-footer__grid > div:nth-child(3) { grid-column: 9 / 11; }
.site-footer__grid > div:nth-child(4) { grid-column: 11 / 13; }
.site-footer h2 { margin-bottom: 12px; font-size: var(--step--1); color: var(--ash-on-ink); }
.site-footer li + li { margin-top: 6px; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__legal { margin-top: clamp(64px, 8vw, 120px); font-size: var(--step--1); color: var(--ash-on-ink); }

/* =========================================================
   PANEL · the in-page "pages" (artist, work, event, forms)
   ========================================================= */
.panel {
  position: fixed;
  inset: 0;
  z-index: 300;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  color: var(--ink);
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.85s var(--ease-curtain);
}
.panel[hidden] { display: none; }
.panel.is-open { clip-path: inset(0 0 0 0); }
.panel__bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid var(--rule-on-paper);
}
.panel__mark { font-size: 1.5rem; letter-spacing: -0.04em; line-height: 1; }
.panel__close {
  padding: 10px 18px;
  border: 1px solid var(--ink);
  background: none;
  cursor: pointer;
  transition: transform 0.6s var(--ease), background-color 0.3s, color 0.3s;
}
.panel__close:hover { background: var(--ink); color: var(--paper); }
.panel__body { padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(80px, 10vw, 140px); transition: opacity 0.3s, transform 0.5s var(--ease); }
.panel__body.is-leaving { opacity: 0; transform: translateY(18px); }
.panel__body > * { animation: rise 0.9s var(--ease) both; animation-delay: calc(0.25s + var(--i, 0) * 0.07s); }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }

.panel__back { display: inline-block; margin-bottom: 28px; font-size: 0.9375rem; color: var(--ash-on-paper); }
.panel__back:hover { color: var(--ink); }
.panel__title { font-size: var(--step-4); line-height: 0.92; letter-spacing: -0.055em; max-width: 14ch; }
.panel__lede { margin-top: 18px; max-width: 46ch; font-size: var(--step-1); line-height: 1.4; color: var(--ash-on-paper); }
.panel__section { margin-top: clamp(48px, 7vw, 96px); }
.panel__section > h2 { margin-bottom: 28px; padding-top: 16px; border-top: 1px solid var(--ink); font-size: var(--step-1); }
.prose p + p { margin-top: 1em; }
.prose { max-width: 62ch; }

/* card grid used for lists of works and artists */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(28px, 3vw, 44px) var(--gutter);
}
.card .art { aspect-ratio: 4 / 5; transition: transform 0.9s var(--ease); }
.card a:hover .art { transform: scale(0.97); }
.card__meta { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; padding-top: 12px; }
.card__title { font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.02em; }
.card__sub { grid-row: 2; color: var(--ash-on-paper); font-size: 0.9375rem; }
.card__aside { grid-row: 1 / 3; grid-column: 2; font-variant-numeric: tabular-nums; }

/* single artwork */
.piece { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 40px; align-items: start; }
.piece__art { grid-column: 1 / 8; }
.piece__art .art { aspect-ratio: 4 / 5; }
.piece__info { grid-column: 9 / 13; position: sticky; top: calc(var(--header-h) + 32px); }
.piece__info .panel__title { font-size: var(--step-3); }
.facts { margin: 28px 0; border-top: 1px solid var(--rule-on-paper); }
.facts div { display: grid; grid-template-columns: 9rem 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-on-paper); }
.facts dt { color: var(--ash-on-paper); }
.facts dd { margin: 0; }
.price { font-size: var(--step-2); letter-spacing: -0.02em; margin-bottom: 20px; }
.note { margin-top: 14px; font-size: 0.9375rem; color: var(--ash-on-paper); max-width: 44ch; }

/* event page */
.event-page__date { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.event-page__day { font-size: var(--step-4); line-height: 0.85; letter-spacing: -0.06em; }
.split2 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 40px; margin-top: clamp(40px, 6vw, 80px); }
.split2 > :first-child { grid-column: 1 / 7; }
.split2 > :last-child { grid-column: 8 / 13; }

/* event list in panel */
.plain-list li { border-top: 1px solid var(--rule-on-paper); }
.plain-list li:last-child { border-bottom: 1px solid var(--rule-on-paper); }
.plain-list a { display: grid; grid-template-columns: 10rem 1fr auto; gap: 20px; align-items: baseline; padding: 22px 0; transition: padding 0.5s var(--ease); }
.plain-list a:hover { padding-left: 14px; }
.plain-list strong { font-weight: 400; font-size: var(--step-2); letter-spacing: -0.03em; }
.plain-list span { color: var(--ash-on-paper); }

.steps { counter-reset: s; max-width: 62ch; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 3rem 1fr; padding: 18px 0; border-top: 1px solid var(--rule-on-paper); }
.steps li::before { content: counter(s); color: var(--ash-on-paper); }

/* =========================================================
   FORMS (submission, reservation, sign in)
   ========================================================= */
.form { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 30px; max-width: 1100px; }
.field { grid-column: span 6; display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field--third { grid-column: span 4; }
.field label,
.field legend { font-size: var(--step--1); }
.field .hint { font-size: var(--step--1); color: var(--ash-on-paper); }
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="password"],
.field select,
.field textarea {
  width: 100%;
  padding: 8px 0 10px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-size: var(--step-1);
  transition: border-color 0.3s, box-shadow 0.3s;
  appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; font-size: var(--step-0); }
.field select { background: linear-gradient(45deg, transparent 50%, var(--ink) 50%) right 6px center / 8px 8px no-repeat; padding-right: 24px; }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; box-shadow: 0 1px 0 0 var(--ink); }
.field .count { align-self: flex-end; font-size: var(--step--1); color: var(--ash-on-paper); font-variant-numeric: tabular-nums; }
.field .error { min-height: 1.3em; font-size: var(--step--1); color: var(--ink); }
.field .error:not(:empty)::before { content: "× "; }
.field [aria-invalid="true"] { border-bottom-width: 2px; }

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  border: 1px solid var(--ink);
  text-align: center;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
}
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone__big { font-size: var(--step-2); letter-spacing: -0.03em; line-height: 1.1; }
.dropzone__small { margin-top: 8px; font-size: var(--step--1); color: var(--ash-on-paper); transition: color 0.35s; }
.dropzone.is-over,
.dropzone:focus-within { background: var(--ink); color: var(--paper); }
.dropzone.is-over .dropzone__small,
.dropzone:focus-within .dropzone__small { color: var(--ash-on-ink); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; margin-top: 16px; }
.thumbs figure { position: relative; animation: rise 0.6s var(--ease) both; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee; }
.thumbs figcaption { margin-top: 6px; font-size: var(--step--1); color: var(--ash-on-paper); }
.thumbs figure.is-bad figcaption { color: var(--ink); }
.thumbs button {
  position: absolute;
  top: 6px;
  right: 6px;
  padding: 4px 8px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--step--1);
  cursor: pointer;
}

.check { grid-column: 1 / -1; display: flex; gap: 14px; align-items: flex-start; }
.check input { appearance: none; flex-shrink: 0; width: 22px; height: 22px; margin: 2px 0 0; border: 1px solid var(--ink); border-radius: 0; background: transparent; cursor: pointer; transition: background-color 0.25s; }
.check input:checked { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Cpath d='M5 11.5l4 4 8-9' fill='none' stroke='white' stroke-width='1.6'/%3E%3C/svg%3E") center / 100% no-repeat; }
.check .error { display: block; }
.form__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.form__status { font-size: 0.9375rem; }

.confirm { max-width: 60ch; }
.confirm .facts { max-width: 560px; }

/* =========================================================
   MOTION LAYER (only with JS, switched off for reduced motion)
   ========================================================= */

/* opening sequence */
.loader { display: none; }
.js .loader {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  animation: loader-failsafe 0s 4s forwards;    /* hides itself if JS stalls */
}
@keyframes loader-failsafe { to { visibility: hidden; } }
.loader__lid { position: absolute; left: 0; right: 0; height: 50.5%; background: var(--ink); transition: transform 1.1s var(--ease-curtain); }
.loader__lid--top { top: 0; }
.loader__lid--bottom { bottom: 0; }
.loader__line { position: absolute; left: var(--gutter); right: var(--gutter); top: 50%; height: 1px; background: var(--paper); transform: scaleX(var(--p, 0)); transform-origin: left; }
.loader__count { position: absolute; right: var(--gutter); top: calc(50% + 14px); color: var(--paper); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.loader.is-open .loader__lid--top { transform: translateY(-100%); }
.loader.is-open .loader__lid--bottom { transform: translateY(100%); }
.loader.is-open .loader__line,
.loader.is-open .loader__count { opacity: 0; transition: opacity 0.3s; }
.loader.is-done { display: none; }

/* letters */
.ch { display: inline-block; }
.hero__layer--light .hero__word .ch { transform: scaleX(-1); }   /* mirror world inside the lens */
.js .hero .ch { clip-path: inset(0 -10% 100% -10%); translate: 0 35%; }
.is-ready .hero .ch {
  clip-path: inset(-40% -20% -20% -20%);
  translate: 0 0;
  transition: clip-path 1.3s var(--ease), translate 1.3s var(--ease);
  transition-delay: calc(0.12s + var(--i) * 0.09s);
}
.hero__layer--dark .hero__lede,
.hero__layer--dark .hero__hint { opacity: calc(1 - var(--sy, 0) / 380); }
.js .hero__lede,
.js .hero__hint { transition: opacity 1s var(--ease) 0.9s; }
.js:not(.is-ready) .hero__lede,
.js:not(.is-ready) .hero__hint { opacity: 0; }
.is-settled .hero__lede,
.is-settled .hero__hint { transition: none; }

/* headings rise word by word */
.split-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.split-w > span { display: inline-block; transform: translateY(110%) rotate(4deg); transform-origin: left bottom; transition: transform 1.15s var(--ease); transition-delay: calc(var(--i) * 0.06s); }
.is-in .split-w > span { transform: none; }

/* artworks unveil from below */
.js .work .art { clip-path: inset(100% 0 0 0); }
.js .work.is-in .art { clip-path: inset(0 0 0 0); }
.js .work .art svg { transform: scale(1.22); transition: transform 1.8s var(--ease); }
.js .work.is-in .art svg { transform: scale(1); }
.js .work:nth-child(2n) .art { transition-delay: 0.12s; }

[data-scramble].is-scrambling { display: inline-block; white-space: nowrap; }
[data-magnetic] { will-change: transform; }

/* custom cursor */
.cursor { display: none; }
@media (pointer: fine) {
  .has-cursor,
  .has-cursor a,
  .has-cursor button,
  .has-cursor label,
  .has-cursor select,
  .has-cursor .dropzone input,
  .has-cursor .check input { cursor: none; }
  .has-cursor input[type="text"],
  .has-cursor input[type="email"],
  .has-cursor input[type="number"],
  .has-cursor input[type="password"],
  .has-cursor textarea { cursor: text; }
  .has-cursor .cursor { display: block; }
}
.cursor { position: fixed; left: 0; top: 0; z-index: 450; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot,
.cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; translate: -50% -50%; will-change: transform; }
.cursor__dot { width: 6px; height: 6px; background: var(--paper); transition: opacity 0.25s; }
.cursor__ring {
  width: 34px;
  height: 34px;
  border: 1px solid var(--paper);
  transition: width 0.45s var(--ease), height 0.45s var(--ease), background-color 0.3s var(--ease), opacity 0.25s;
}
.cursor.is-link .cursor__ring { width: 64px; height: 64px; }
.cursor.is-lens .cursor__ring { width: 150px; height: 150px; background: var(--paper); }
.cursor.is-lens .cursor__dot { opacity: 0; }
.cursor.is-text .cursor__ring { opacity: 0; }
.cursor.is-hero .cursor__ring { opacity: 0; }     /* in the hero the lens is the ring */
.cursor.is-press .cursor__ring { width: 22px; height: 22px; }
.cursor.is-away { opacity: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1080px) {
  .section-head h2 { grid-column: 1 / -1; }
  .section-head p { grid-column: 1 / 9; }
  .section-head .text-link { grid-column: 9 / 13; }
  .door__meta { grid-column: 1 / -1; margin-bottom: 8px; }
  .door__title { grid-column: 1 / -1; }
  .door__desc { grid-column: 1 / 9; margin-top: 16px; }
  .roster__name { grid-column: 1 / 9; }
  .roster__medium { grid-column: 9 / 13; justify-self: end; text-align: right; }
  .roster__count { display: none; }
  .event__date { grid-column: 1 / 4; }
  .event__when { grid-column: 4 / 7; }
  .event__body { grid-column: 4 / 13; grid-row: 2; margin-top: 10px; }
  .event__action { grid-column: 7 / 13; grid-row: 1; }
  .newsletter h2, .newsletter__form { grid-column: 1 / -1; }
  .newsletter__form { max-width: 640px; }
  .piece__art, .piece__info { grid-column: 1 / -1; }
  .piece__info { position: static; }
  .split2 > :first-child, .split2 > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .site-header__nav, .site-header__cta { display: none; }
  .site-header__toggle { display: block; }

  .hero__lede { grid-column: 1 / -1; font-size: var(--step-0); max-width: 26ch; }
  .hero__hint { grid-column: 1 / -1; }
  .hero__note { font-size: 1.3rem; }
  .hero__note:nth-of-type(2) { --nx: 6%  !important; --ny: 30% !important; }
  .hero__note:nth-of-type(3) { --nx: 30% !important; --ny: 42% !important; }
  .hero__note:nth-of-type(4) { --nx: 8%  !important; --ny: 54% !important; }
  .hero__note:nth-of-type(5) { --nx: 40% !important; --ny: 22% !important; }

  .door__title { white-space: normal; }
  .door__desc { grid-column: 1 / -1; }
  .section-head p, .section-head .text-link { grid-column: 1 / -1; justify-self: start; }
  .roster__name { grid-column: 1 / -1; }
  .roster__medium { grid-column: 1 / -1; justify-self: start; text-align: left; font-size: 0.9375rem; }

  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work:nth-child(n) { grid-column: auto; margin-top: 0; }
  .work:nth-child(1), .work:nth-child(5) { grid-column: 1 / -1; }
  .work:nth-child(3) { margin-top: 48px; }
  .work__caption { grid-template-columns: 1fr; }
  .work__price { grid-row: auto; grid-column: 1; margin-top: 4px; }
  .submit-band__line, .submit-band__action { grid-column: 1 / -1; }

  .event__date { grid-column: 1 / 5; }
  .event__when { grid-column: 5 / 13; justify-self: end; }
  .event__body { grid-column: 1 / -1; }
  .event__action { grid-column: 1 / -1; grid-row: 3; justify-self: start; margin-top: 14px; }

  .newsletter__row { flex-direction: column; border-bottom: 0; }
  .newsletter input { border-bottom: 2px solid var(--ink); margin-bottom: 16px; }
  .newsletter__row:focus-within { outline: none; }
  .newsletter input:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

  .site-footer__mark { grid-column: 1 / -1; }
  .site-footer__grid > div:nth-child(n) { grid-column: span 6; }

  .field, .field--third { grid-column: 1 / -1; }
  .plain-list a { grid-template-columns: 1fr; gap: 4px; }
  .facts div { grid-template-columns: 7rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0s !important; }
  .js .loader { display: none; }
  .js .hero .ch, .is-ready .hero .ch { clip-path: none; translate: none; }
  .split-w > span { transform: none; }
  .js .work .art { clip-path: none; }
  .js .work .art svg { transform: none; }
  .js:not(.is-ready) .hero__lede, .js:not(.is-ready) .hero__hint { opacity: 1; }
}

/* =========================================================
   ACCOUNTS, AUCTIONS AND SHOP (added with the backend)
   ========================================================= */
.hero__word { font-size: clamp(calc(6rem * var(--wk, 1)), calc(31vw * var(--wk, 1)), 32rem); }   /* longer gallery names shrink to fit */

/* uploaded photographs take the place of the generated stand-ins */
.art img { width: 100%; height: 100%; object-fit: cover; }
.js .work .art img { transform: scale(1.22); transition: transform 1.8s var(--ease); }
.js .work.is-in .art img { transform: scale(1); }
.piece__art .art:has(img) { aspect-ratio: auto; background: none; }
.piece__art .art img { height: auto; }
.piece__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.piece__thumbs button { width: 72px; height: 72px; padding: 0; border: 1px solid var(--rule-on-paper); background: none; cursor: pointer; }
.piece__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.piece__sale { margin-top: 28px; }

/* header: cart and account */
.site-header__link { font-size: 0.9375rem; white-space: nowrap; }
[data-cart-count] {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.45em;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: var(--step--1);
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.panel__tools { display: flex; align-items: center; gap: clamp(14px, 2vw, 28px); font-size: 0.9375rem; }
.events__empty { max-width: 48ch; color: var(--ash-on-ink); }
.plain-list .row { display: grid; grid-template-columns: 10rem 1fr auto; gap: 20px; align-items: baseline; padding: 22px 0; }
button.text-link { padding: 0 0 3px; border: 0; cursor: pointer; }

/* auction */
.auction__label { margin-bottom: 4px; font-size: var(--step--1); color: var(--ash-on-paper); }
.auction .price { margin-bottom: 0; }
.auction .facts { margin: 20px 0; }
.auction__you { margin: 0 0 20px; padding: 12px 16px; border: 1px solid var(--ink); }
.auction__you + .button { margin-bottom: 8px; }
.auction__form { row-gap: 18px; }
[data-auc-history] { margin-top: 28px; }
.auction__bids { margin-top: 8px; border-top: 1px solid var(--rule-on-paper); }
.auction__bids li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--rule-on-paper); font-variant-numeric: tabular-nums; }

/* cart, checkout, order */
.cart-item { display: grid; grid-template-columns: 96px 1fr auto auto; gap: 20px; align-items: center; padding: 18px 0; border-top: 1px solid var(--rule-on-paper); }
.cart-item:last-child { border-bottom: 1px solid var(--rule-on-paper); }
.cart-item__art .art { aspect-ratio: 1; }
.cart-item__title { font-size: var(--step-1); line-height: 1.2; letter-spacing: -0.02em; }
.cart-item__price { font-variant-numeric: tabular-nums; }
.choice { min-width: 0; margin: 0; padding: 0; border: 0; gap: 12px; }
.choice legend { margin-bottom: 12px; padding: 0; }
.choice .check { align-items: center; }
.choice .check label { font-size: var(--step-0); }
.bank { padding: 16px; border: 1px solid var(--ink); white-space: pre-line; }

@media (max-width: 900px) {
  .site-header__nav, .site-header__cta, .site-header__link { display: none; }
  .site-header__link[href="#/cart"] { display: block; margin-left: auto; }
  .site-header__toggle { display: block; margin-left: 0; }
  .door__desc { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .plain-list .row { grid-template-columns: 1fr; gap: 4px; }
  .cart-item { grid-template-columns: 72px 1fr auto; }
  .cart-item > :last-child { grid-column: 2 / -1; justify-self: start; }
}
[hidden] { display: none !important; }
#panel-title:focus { outline: none; }              /* focused by script for screen readers, not a control */
