/* Claude Monet, auction demo: the saleroom during the sale.
   Baize-green walls, one painting on the stand, a split-flap board beside it that flips to each
   lot, and a round paddle to enquire. One accent, the board's amber: digits, the current lot,
   the main button, the paddle ring, focus. Pictures are sharp-cornered; things you press are round
   (pills and the paddle); board cards have a small radius, like the real thing. */

:root {
  color-scheme: dark;
  --wall: #11241d;
  --wall-2: #183127;           /* raised: a panel, a pressed state */
  --wall-3: #21402f;           /* the secondary button */
  --slab: #0b1310;             /* the board's housing */
  --card-top: #1b2420;         /* flap cards: the top half sits in a little more light */
  --card-bottom: #151d19;
  --ink: #ebe8de;              /* 13.2:1 on --wall */
  --ink-2: #a8b6ad;            /* 7.7:1 on --wall, 6.6:1 on --wall-2 */
  --line: rgba(235, 232, 222, .12);
  --amber: #e9b44c;            /* 8.6:1 on --wall, 8.4:1 or better on the board cards */
  --on-amber: #13201a;         /* 8.9:1 on --amber */
  --paddle: #eeebe1;
  --on-paddle: #13201a;        /* 14.1:1 on --paddle */
  --shadow: 4, 10, 7;

  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", sans-serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-display: clamp(3.25rem, 6.4vw, 6.25rem);
  --fs-h2: clamp(1.75rem, 3vw, 2.75rem);
  --fs-body: 1.0625rem;
  --fs-small: .875rem;
  --fs-board: clamp(2.5rem, 3.9vw, 3.75rem);

  --gutter: clamp(16px, 4vw, 56px);
  --section: clamp(96px, 12vw, 160px);
  --nav-h: 72px;
  --ease: cubic-bezier(.16, 1, .3, 1);

  --z-nav: 20;
  --z-strike: 60;
}
@media (max-width: 719px) { :root { --nav-h: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
h1, h2, h3, p, figure, ol, dl, dd { margin: 0; }
ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

h2 {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: .005em;
  text-wrap: balance;
}
.muted { color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; padding: 8px 16px; background: var(--amber); color: var(--on-amber); border-radius: 999px; }
.skip:focus { top: 12px; }

/* ---------- buttons: pills, filled; the secondary one is a raised tone, never an outline ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--amber); color: var(--on-amber);
  font-weight: 600; font-size: 1rem; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), transform .14s var(--ease);
}
.pill:hover { background: #f1c56c; }
.pill:active { transform: translateY(1px) scale(.98); }
.pill--line { background: var(--wall-3); color: var(--ink); }
.pill--line:hover { background: #2a4d3a; }
.pill--sm { min-height: 40px; padding: 0 18px; font-size: .9375rem; }
.pill:disabled { opacity: .4; cursor: default; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: var(--z-nav);
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter);
  background: var(--wall);
}
.nav__name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: .01em; text-decoration: none; }
.nav__end { display: flex; align-items: center; gap: 8px; }
.nav__link { padding: 8px 12px; font-size: .9375rem; text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav__link:hover { color: var(--ink); }
.sound {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
  font-size: .9375rem; cursor: pointer; transition: background-color .2s, color .2s;
}
.sound:hover { background: var(--wall-2); color: var(--ink); }
.sound svg { width: 18px; height: 18px; fill: currentColor; }
.sound[aria-pressed="true"] { color: var(--amber); }
.sound[aria-pressed="true"] .sound__off, .sound[aria-pressed="false"] .sound__on { display: none; }
@media (max-width: 719px) {
  .nav__link { display: none; }
  .nav__name { font-size: 1.25rem; }
  .sound { padding: 0 11px; }
  .sound [data-sound-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- the rostrum (opening, pinned) ---------- */
.rostrum { position: relative; height: 100vh; height: 100svh; }
/* the room before the lights come up; only the board shows through */
.veil { position: absolute; inset: 0; z-index: 1; background: var(--slab); opacity: 0; pointer-events: none; }
.js .veil { opacity: .9; }
.board { position: relative; z-index: 2; }
.rostrum__stage {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: clamp(24px, 4vw, 72px);
  padding: calc(var(--nav-h) + 16px) var(--gutter) 32px;
}

/* the stand: lots sit on top of each other; the one on the stand is lit */
.stand { position: relative; min-height: 0; }
.stand::before {
  /* the lamp over the stand */
  content: ""; position: absolute; inset: -10% -5% 0; pointer-events: none;
  background: radial-gradient(50% 55% at 50% 42%, rgba(244, 226, 180, .075), transparent 70%);
}
.stand__lot {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  visibility: hidden;
}
.stand__lot.is-up { visibility: visible; }
.stand__open {
  position: relative; display: block; padding: 0; border: 0; background: none;
  cursor: var(--gavel-cursor, pointer);
  box-shadow: 0 40px 60px -30px rgba(var(--shadow), .9), 0 8px 18px rgba(var(--shadow), .35);
}
.stand__open img {
  max-height: calc(100svh - var(--nav-h) - 120px);
  width: auto;
  background-size: cover;
}

.desk { display: flex; flex-direction: column; gap: 24px; min-height: 0; padding-top: 8px; }
.desk__name {
  font-family: var(--display); font-weight: 800;
  font-size: var(--fs-display); line-height: .9; letter-spacing: -.005em;
}
.desk__lede { margin-top: 12px; color: var(--ink-2); max-width: 34ch; }

/* the board: a dark slab of flap cards */
.board, .lv__boards {
  display: grid; grid-template-columns: auto 1fr; gap: 12px 24px;
  padding: 16px 20px 18px;
  background: var(--slab); border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(235, 232, 222, .05), 0 18px 40px -24px rgba(var(--shadow), .9);
}
.board__key { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: 8px; }
.board__val { font-family: var(--display); font-weight: 700; font-size: var(--fs-board); color: var(--amber); line-height: 1; }

/* split-flap cells (flap.js builds four halves per cell) */
.flaps { display: inline-block; }
.flaps__row { display: inline-flex; gap: .07em; }
.flap { position: relative; display: inline-block; width: .6em; height: 1.18em; perspective: 3em; }
.flap__half {
  position: absolute; left: 0; right: 0; height: 50%; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.flap__top { top: 0; background: var(--card-top); border-radius: .07em .07em 0 0; transform-origin: 50% 100%; }
.flap__bottom { bottom: 0; background: var(--card-bottom); border-radius: 0 0 .07em .07em; transform-origin: 50% 0; box-shadow: inset 0 1px 0 rgba(0, 0, 0, .55); }
.flap__half > span { position: absolute; left: 0; right: 0; height: 200%; display: flex; align-items: center; justify-content: center; }
.flap__top > span { top: 0; }
.flap__bottom > span { bottom: 0; }

/* the lot on the stand, in words */
.entry { min-height: 9.5em; }
.entry__title { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.entry__title i { font-style: normal; }
.entry__meta { margin-top: 8px; color: var(--ink-2); font-size: .9375rem; }
.entry .actions { margin-top: 20px; }

.order { margin-top: auto; }
.order__key { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: 8px; }
.order__list { display: flex; gap: 6px; }
.order__btn {
  min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: 999px; background: var(--wall-2); color: var(--ink-2);
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.order__btn:hover { color: var(--ink); background: var(--wall-3); }
.order__btn[aria-current="true"] { background: var(--amber); color: var(--on-amber); }

@media (max-width: 899px) {
  .rostrum__stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 16px;
    padding: calc(var(--nav-h) + 8px) var(--gutter) 16px;
  }
  .stand__open img { max-height: min(40svh, 100%); }
  .desk { gap: 14px; padding-top: 0; }
  .desk__name { font-size: clamp(2.5rem, 11vw, 3.5rem); }
  .desk__lede { margin-top: 4px; font-size: .9375rem; }
  .board, .lv__boards { padding: 12px 14px 14px; gap: 8px 18px; }
  .board__key { margin-bottom: 4px; }
  .board__val { font-size: clamp(2rem, 9vw, 2.75rem); }
  .entry { min-height: 0; }
  .entry__title { font-size: 1.375rem; }
  .entry__meta { margin-top: 4px; font-size: .875rem; }
  .entry .actions { margin-top: 12px; }
  .order__key { display: none; }
  .order__btn { min-width: 40px; min-height: 40px; font-size: 1.125rem; }
}
@media (max-width: 899px) and (max-height: 740px) {
  .desk__lede { display: none; }
  .stand__open img { max-height: min(32svh, 100%); }
}

/* ---------- about ---------- */
.essay {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px;
  padding: var(--section) var(--gutter);
}
.essay h2 { grid-column: 1 / span 6; }
.essay__body { grid-column: 8 / span 5; display: grid; gap: 1em; color: var(--ink-2); max-width: 60ch; }
@media (max-width: 899px) {
  .essay { grid-template-columns: 1fr; }
  .essay h2, .essay__body { grid-column: auto; }
}

/* ---------- the wall: every lot hung at its real size relative to the others ---------- */
.wall { padding: 0 var(--gutter) var(--section); }
.wall__head { max-width: 640px; margin-bottom: clamp(48px, 6vw, 80px); }
.wall__head p { margin-top: 16px; color: var(--ink-2); }
.hang {
  --k: 2.1px;                  /* screen pixels per centimetre of canvas */
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 64px 56px;
}
@media (max-width: 1279px) { .hang { --k: 1.75px; gap: 56px 40px; } }
@media (max-width: 719px) { .hang { --k: 1.42px; gap: 40px 20px; } }
.hang__item { position: relative; width: calc(var(--w) * var(--k)); min-width: 7.25rem; }
.hang__open {
  position: relative; display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: var(--gavel-cursor, pointer);
  box-shadow: 0 26px 36px -22px rgba(var(--shadow), .95), 0 4px 10px rgba(var(--shadow), .3);
}
.hang__open img { width: 100%; background-size: cover; }
.hang__tag { margin-top: 14px; font-size: var(--fs-small); line-height: 1.45; }
.hang__tag b { font-family: var(--display); font-weight: 700; font-size: 1.125rem; color: var(--amber); margin-right: 6px; }
.hang__tag i { font-style: italic; }
.hang__tag span { display: block; color: var(--ink-2); }

/* sold: the hammer comes down and a stamp lands across the corner */
.stamp {
  position: absolute; right: -10px; top: -14px; z-index: 2;
  padding: 2px 10px 0;
  border: 3px solid var(--amber); border-radius: 6px;
  color: var(--amber); background: rgba(17, 36, 29, .82);
  font-family: var(--display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; letter-spacing: .04em;
  transform: rotate(-7deg);
  opacity: 0; pointer-events: none;
}
.is-stamped .stamp { opacity: 1; }

/* ---------- enquire, footer ---------- */
.enquire { padding: 0 var(--gutter) var(--section); max-width: calc(720px + 2 * var(--gutter)); }
.enquire p { margin: 16px 0 28px; color: var(--ink-2); }
.foot { padding: 32px var(--gutter) 48px; border-top: 1px solid var(--line); font-size: var(--fs-small); color: var(--ink-2); }
.foot p { max-width: 72ch; }

/* ---------- the lot view ---------- */
.lv {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: var(--wall); color: var(--ink);
  overflow: hidden;
}
.lv[open] { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr); }
.lv::backdrop { background: rgba(6, 14, 10, .7); }
.lv__fig {
  position: relative; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 32px;
}
.lv__img {
  max-width: 100%; max-height: calc(100svh - 64px);
  width: auto; height: auto;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  box-shadow: 0 30px 50px -30px rgba(var(--shadow), .9);
}
.lv__fig.is-looking .lv__img { cursor: none; }
.lv__entry {
  overflow: auto; overscroll-behavior: contain;
  padding: 40px 40px 120px;
  display: flex; flex-direction: column; gap: 20px;
  background: var(--wall-2);
}
.lv__title { font-size: clamp(1.75rem, 2.4vw, 2.25rem); }
.lv__meta { color: var(--ink-2); font-size: .9375rem; margin-top: -8px; }
.lv__range { font-size: .9375rem; }
.lv__notes { font-size: var(--fs-small); color: var(--ink-2); }
.lv__notes dt { color: var(--ink); margin-bottom: 4px; }
.lv__hint { font-size: var(--fs-small); color: var(--ink-2); }
.lv__bar {
  position: absolute; right: 24px; bottom: 24px;
  display: flex; gap: 8px;
}

/* the magnifier */
.loupe {
  position: absolute; left: 0; top: 0; z-index: 3;
  width: 200px; height: 200px; border-radius: 50%;
  border: 3px solid var(--paddle);
  background-color: var(--slab); background-repeat: no-repeat;
  background-origin: border-box; /* the magnified spot is measured from the outer edge, rim included */
  box-shadow: 0 20px 40px -10px rgba(var(--shadow), .8), inset 0 0 0 1px rgba(0, 0, 0, .4);
  pointer-events: none; will-change: transform;
}

/* the paddle: hold it, the ring fills, it goes up */
.paddle {
  position: relative; isolation: isolate; /* keeps the handle behind the face, not behind the panel */
  display: flex; align-items: center; gap: 22px;
  width: 100%; margin: 12px 0 8px; padding: 10px 0 30px;
  border: 0; background: none; text-align: left; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.paddle__ring {
  position: absolute; left: -6px; top: 4px;
  width: 108px; height: 108px; border-radius: 50%;
  background: conic-gradient(var(--amber) calc(var(--p, 0) * 360deg), rgba(235, 232, 222, .14) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
  transition: transform .45s var(--ease);
}
.paddle__face {
  position: relative; flex: none;
  width: 96px; height: 96px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paddle); color: var(--on-paddle);
  font-family: var(--display); font-weight: 800; font-size: 2.75rem; line-height: 1;
  box-shadow: 0 10px 20px -8px rgba(var(--shadow), .8);
  transition: transform .45s var(--ease);
}
.paddle__face::after {
  /* the handle */
  content: ""; position: absolute; left: 50%; top: 90%; z-index: -1;
  width: 16px; height: 40px; margin-left: -8px;
  background: #cfcabb; border-radius: 0 0 6px 6px;
}
.paddle__text { display: grid; gap: 4px; }
.paddle__label { font-weight: 600; font-size: 1.125rem; }
.paddle__note { color: var(--ink-2); font-size: var(--fs-small); max-width: 30ch; }
.paddle:hover .paddle__face { transform: translateY(-3px); }
.paddle.is-holding .paddle__face { transform: translateY(-6px) rotate(-3deg); }
.paddle.is-raised .paddle__face, .paddle.is-raised .paddle__ring { transform: translateY(-22px) rotate(-8deg); }
.paddle.is-raised .paddle__label { color: var(--amber); }

@media (max-width: 899px) {
  .lv[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 38svh minmax(0, 1fr); }
  .lv__fig { padding: 12px var(--gutter); }
  .lv__img { max-height: calc(38svh - 24px); }
  .lv__entry { padding: 16px var(--gutter) 96px; gap: 12px; }
  .lv__title { font-size: 1.625rem; }
  .lv__meta { margin-top: -4px; font-size: .875rem; }
  .paddle { margin: 4px 0 0; padding-bottom: 26px; }
  .lv__bar { left: 0; right: 0; bottom: 0; justify-content: flex-end; padding: 12px var(--gutter); background: var(--wall-2); box-shadow: 0 -1px 0 var(--line); }
  .loupe { width: 150px; height: 150px; }
}

/* ---------- the hammer (gavel.js) and the sheen (tilt.js) ---------- */
.strike-layer { position: fixed; inset: 0; z-index: var(--z-strike); pointer-events: none; overflow: hidden; }
.strike-layer--local { position: absolute; z-index: 3; overflow: visible; } /* a strike inside one lot */
.strike-gavel { position: absolute; color: var(--paddle); filter: drop-shadow(0 8px 10px rgba(var(--shadow), .55)); will-change: transform; }
.strike-gavel svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.strike-ring {
  position: absolute; width: 132px; height: 46px; margin: -23px 0 0 -66px;
  border: 2px solid var(--amber); border-radius: 50%;
}
.strike-spark {
  position: absolute; width: 14px; height: 2px; margin-top: -1px;
  background: var(--amber); border-radius: 2px; transform-origin: 0 50%;
}
.sheen {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 248, 228, .2), rgba(255, 248, 228, 0) 50%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.is-leaning .sheen { opacity: 1; }

/* ---------- before the lots load (no JS: the page still reads) ---------- */
.load-error { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
