/* Gallery at The Block's auction pages: the site's own look (~/websites/galleryattheblock/docs/design.md). White
   walls, the paper wall and charcoal take turns; Cormorant Garamond capitals for headings, italic for artwork
   titles; DM Sans for the rest; gold only where something must be pressed on charcoal; square corners, flat colors. */

@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(fonts/cormorant-garamond-latin-500.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url(fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 100 1000; font-style: normal; font-display: swap; src: url(fonts/dm-sans-latin-variable.woff2) format("woff2"); }

:root {
  --ink: #1a1a1a;
  --gold: #d8a12f;
  --gold-hover: #e3b346;
  --paper: #f5f1ea;
  --text: #4a4642;
  --muted: #6b665f;
  --line: #e4dfd6;
  --white: #ffffff;
  --good: #2f6b3a;
  --warn: #8a5a12;
  --bad: #9b2c22;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --heading: clamp(2.125rem, 4.2vw, 3.5rem);
  --gutter: clamp(1rem, 3vw, 2rem);
  --space: clamp(3.5rem, 7vw, 6.5rem);
  --shadow: 0 1px 2px rgb(26 26 26 / 0.1), 0 14px 26px -10px rgb(26 26 26 / 0.28);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--text); font: 400 1.0625rem/1.65 var(--sans); font-variant-numeric: lining-nums; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--gold); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 500; margin: 0; font-variant-numeric: lining-nums; }
p { margin: 0; }
p + p { margin-top: 0.9em; }
button, input, select, textarea { font: inherit; color: inherit; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: 0.75rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.wrap { width: min(80rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--space); }
.section.paper { background: var(--paper); }
.section.tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.heading { font: 500 var(--heading)/1.08 var(--serif); letter-spacing: 0.01em; text-transform: uppercase; color: var(--ink); }
.subheading { font: 500 clamp(1.5rem, 2.4vw, 1.75rem)/1.2 var(--serif); color: var(--ink); }
.lead { font: 500 clamp(1.375rem, 2.2vw, 1.75rem)/1.35 var(--serif); color: var(--ink); }
.title { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--ink); }
.data .title { font-size: 1.1875rem; line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: 0.9375rem; }
.narrow { max-width: 42rem; }
.intro { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.intro-copy { font: 500 clamp(1.25rem, 2vw, 1.5rem)/1.45 var(--serif); color: var(--ink); }
.draft-note { padding-top: 1.5rem; }
.lot-title { font: italic 500 clamp(2rem, 4vw, 3rem)/1.1 var(--serif); margin: 0.6rem 0 0; }

/* Buttons: one shape, charcoal on light, gold on charcoal. */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3.25rem; padding: 0.75rem 1.75rem; border: 1px solid var(--ink); border-radius: 0;
  background: var(--ink); color: var(--white); font: 500 0.9375rem/1.2 var(--sans); letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.button:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.button.outline { background: transparent; color: var(--ink); }
.button.outline:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.button.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.button.gold:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.button.white { background: var(--white); border-color: var(--white); color: var(--ink); }
.button.wide { width: 100%; }
.button.small { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.875rem; }
.button.danger { background: var(--white); color: var(--bad); border-color: var(--bad); }
.button.danger:hover { background: var(--bad); color: var(--white); }
.button[disabled] { opacity: 0.55; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; font-size: inherit; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.actions.no-print { margin-bottom: 1.75rem; }
.actions.no-print .button.small { min-height: 3.25rem; padding: 0.75rem 1.75rem; font-size: 0.9375rem; }
.arrow { text-decoration: underline; font-weight: 500; }
.arrow::after { content: " \2192"; }

/* Header: the gallery's logo at the left, the links and one button at the right. */
.top { border-bottom: 1px solid var(--line); background: var(--white); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.25rem; }
.logo img { width: clamp(8.25rem, 12vw, 10.875rem); }
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.6vw, 2.6rem); }
.nav a:not(.button) { font-weight: 500; text-decoration: none; color: var(--ink); padding-block: 0.4rem; border-bottom: 2px solid transparent; }
.nav a:not(.button):hover, .nav a[aria-current="page"] { border-bottom-color: var(--gold); }
.nav .button { min-height: 2.75rem; padding-inline: 1.25rem; }
@media (max-width: 40rem) {
  .nav .hide-small { display: none; }
}

/* Page banner: the trail and the page's name on charcoal, the gallery beside it. */
.banner { display: grid; background: var(--ink); color: var(--white); }
.banner .panel { padding: clamp(2rem, 6vw, 3.5rem) var(--gutter) clamp(2rem, 5vw, 3rem); display: flex; flex-direction: column; justify-content: flex-end; gap: 0.75rem; min-width: 0; }
.banner h1 { font: 500 var(--heading)/1.08 var(--serif); letter-spacing: 0.01em; text-transform: uppercase; color: var(--white); max-width: 13em; overflow-wrap: anywhere; }
.banner .trail { font-size: 0.875rem; color: rgb(255 255 255 / 0.72); }
.banner .trail a { color: inherit; }
.banner .status { color: #e2ddd3; font-size: 1.0625rem; max-width: 34rem; }
.banner .status strong { color: var(--white); }
.banner .photo { position: relative; min-height: 12rem; background: #7f6a5b; overflow: hidden; }
.banner .photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 48rem) {
  .banner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: clamp(15rem, 24vw, 19rem); }
  .banner .panel { padding-left: max(var(--gutter), calc(100% - 40rem)); padding-right: clamp(2rem, 4vw, 4rem); }
  .banner .photo { order: 2; }
}

/* A message after an action. */
.notice { border-left: 3px solid var(--ink); background: var(--paper); padding: 0.9rem 1.1rem; margin-bottom: 1.5rem; }
.notice.good { border-color: var(--good); }
.notice.bad { border-color: var(--bad); }
.notice.warn { border-color: var(--gold); }
.notice p + p { margin-top: 0.4rem; }

/* The grid of lots: pieces hung on the paper wall with their labels lined up. */
.lots { display: grid; gap: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 3vw, 2.5rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr)); list-style: none; margin: 0; padding: 0; }
.lot-card { display: flex; flex-direction: column; gap: 0.9rem; }
.lot-card .wall { display: grid; place-items: center; aspect-ratio: 4 / 5; background: var(--paper); padding: 12%; text-decoration: none; }
.lot-card .wall img { max-height: 100%; width: auto; object-fit: contain; box-shadow: var(--shadow); }
.lot-card .wall .no-photo { color: var(--muted); font-size: 0.9375rem; }
.lot-card .by { font-size: 0.9375rem; color: var(--muted); }
.lot-card .title { font-size: 1.4375rem; line-height: 1.2; text-decoration: none; }
.lot-card .title:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.lot-card .bid { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; align-items: baseline; border-top: 1px solid var(--line); padding-top: 0.7rem; }
.lot-card .amount { font-size: 1.25rem; font-weight: 500; color: var(--ink); }
.lot-card .meta { font-size: 0.9375rem; color: var(--muted); }
.paper .lot-card .wall { background: var(--white); }

.tag { display: inline-block; font-size: 0.8125rem; font-weight: 600; padding: 0.15rem 0.5rem; background: var(--paper); color: var(--ink); }
.tag.good { background: #e3efe4; color: var(--good); }
.tag.bad { background: #f6e3e0; color: var(--bad); }
.tag.dark { background: var(--ink); color: var(--white); }
.paper .tag { background: var(--white); }

/* One lot: the piece on the wall, its label and the bid box beside it. */
.trail { font-size: 0.9375rem; color: var(--muted); margin-bottom: clamp(1.25rem, 3vw, 2.5rem); overflow-wrap: anywhere; }
.trail a { color: var(--muted); }
.trail a:hover { color: var(--ink); }
.lot-layout { display: grid; gap: clamp(1.5rem, 4vw, 4.5rem); }
@media (min-width: 56rem) { .lot-layout { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: start; } .lot-side { position: sticky; top: 1.5rem; } }
.lot-photos { display: grid; gap: 1rem; }
.lot-photo { background: var(--paper); display: grid; place-items: center; padding: clamp(1.5rem, 6%, 3.5rem); margin: 0; }
.lot-photo img { max-height: 80vh; width: auto; box-shadow: var(--shadow); }
.lot-photo.missing { aspect-ratio: 4 / 3; color: var(--muted); }
.lot-by { font-size: 1rem; color: var(--ink); }
.lot-by span { border-bottom: 2px solid var(--gold); padding-bottom: 0.1rem; }
.lot-side h1 { font: italic 500 clamp(2.25rem, 4vw, 3.25rem)/1.1 var(--serif); margin-top: 0.6rem; }
.facts { margin: 1.25rem 0 0; padding: 0.9rem 0; border-block: 1px solid var(--line); display: grid; gap: 0.35rem; }
.facts div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; align-items: baseline; }
.facts dt { color: var(--ink); font-weight: 500; font-size: 0.9375rem; }
.facts dd { margin: 0; }
.about { margin-top: 1.5rem; }
.visit { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9375rem; }

.bidbox { margin-top: 1.5rem; display: grid; gap: 1rem; }
.bidstate { display: grid; gap: 0.55rem; }
.bidstate p + p { margin-top: 0; }
.bidstate .price { margin-top: 0.15rem; }
.bidbox .price-label { font-size: 0.9375rem; color: var(--muted); }
.bidbox .price { font-size: clamp(2rem, 4vw, 2.5rem); line-height: 1.1; font-weight: 500; color: var(--ink); }
.bidbox .counts { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; font-size: 0.9375rem; }
.bidbox .clock { font-size: 1.0625rem; color: var(--ink); font-weight: 500; }
.bidbox .clock.soon { color: var(--bad); }
.bidbox .closes { font-size: 0.9375rem; color: var(--muted); }
.you { padding: 0.75rem 1rem; background: var(--paper); border-left: 3px solid var(--ink); }
.you.leading { border-color: var(--good); }
.you.outbid { border-color: var(--bad); }
.you strong { color: var(--ink); }
.bid-form { display: grid; gap: 0.6rem; }
.bid-form .row { display: flex; gap: 0.6rem; }
.bid-form .row .money { flex: 1; }
.or { font-size: 0.9375rem; color: var(--muted); }
.note { font-size: 0.9375rem; color: var(--muted); }
.confirm { border: 1px solid var(--ink); padding: 1rem 1.1rem; display: grid; gap: 0.8rem; background: var(--white); }
.confirm[hidden] { display: none; }
.history { margin-top: 1.75rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.history summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.history ol { list-style: none; margin: 0.75rem 0 0; padding: 0; font-size: 0.9375rem; }
.history li { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; padding: 0.45rem 0; border-top: 1px solid var(--line); }
.history li .when { grid-column: 1 / -1; color: var(--muted); font-size: 0.8125rem; }
.history li .amt { font-weight: 500; color: var(--ink); }

/* Forms. */
.form { display: grid; gap: 1.1rem; max-width: 34rem; }
.field { display: grid; gap: 0.35rem; }
.field label, .label { font-weight: 500; color: var(--ink); font-size: 0.9375rem; }
.field .hint { font-size: 0.875rem; color: var(--muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="datetime-local"], input[type="file"], textarea, select, .money input {
  width: 100%; min-height: 3.25rem; padding: 0.7rem 0.9rem; border: 1px solid #b9b2a6; border-radius: 0; background: var(--white); font-size: 1.0625rem;
}
textarea { min-height: 8rem; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.money { position: relative; display: block; }
.money::before { content: "$"; position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money input { padding-left: 1.75rem; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9375rem; }
.check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--ink); flex: none; }
.code-input { font-size: 1.75rem !important; letter-spacing: 0.4em; text-align: center; max-width: 14rem; }
.error { color: var(--bad); font-size: 0.9375rem; }
fieldset { border: 0; padding: 0; margin: 0; }

/* Panels: a charcoal call to action, steps, the account. */
.cta { background: var(--ink); color: #e2ddd3; }
.cta .wrap { display: grid; gap: clamp(1.5rem, 4vw, 4rem); padding-block: clamp(3rem, 6vw, 5rem); }
.cta h2 { font: 500 var(--heading)/1.08 var(--serif); text-transform: uppercase; color: var(--white); }
.cta strong { color: var(--white); }
@media (min-width: 56rem) { .cta .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; } }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; gap: 0 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); font: 500 1.75rem/1 var(--serif); color: var(--ink); grid-row: span 2; }
.steps h3 { font-size: 1.5rem; line-height: 1.2; }
.cta .steps li { border-color: rgb(255 255 255 / 0.18); }
.cta .steps li::before, .cta .steps h3 { color: var(--white); }
.how { display: grid; gap: clamp(1.5rem, 3vw, 2rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-top: 2rem; }
.how > div { background: var(--white); padding: 1.4rem 1.5rem 1.5rem; }
.how h3 { font-size: 1.5rem; line-height: 1.2; margin-bottom: 0.4rem; }
.section-head { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: end; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head .heading { font-size: clamp(1.875rem, 3.4vw, 2.75rem); }
.split { display: grid; gap: clamp(2rem, 5vw, 5rem); }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.box { background: var(--paper); padding: clamp(1.25rem, 3vw, 2rem); }
.box h2 { font-size: 1.75rem; line-height: 1.2; margin-bottom: 0.6rem; }
.box * + h2 { margin-top: 1.75rem; }
.box .actions { margin-top: 1rem; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; padding: 0.9rem 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows.stacked li { flex-direction: column; }
.prose h2 { font-size: 1.75rem; line-height: 1.2; margin: 2rem 0 0.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }

/* Footer: the gallery's details. */
.foot { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem; font-size: 0.9375rem; }
.foot .cols { display: grid; gap: 2rem; }
@media (min-width: 48rem) { .foot .cols { grid-template-columns: 1.2fr 1fr 1fr; } }
.foot img { width: 11rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.foot .fine { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.foot .fine a { color: var(--muted); }

/* The gallery's own pages. */
.manage .top { background: var(--paper); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
table.data th, table.data td { text-align: left; padding: 0.65rem 0.75rem 0.65rem 0; border-top: 1px solid var(--line); vertical-align: top; }
table.data th { font-weight: 600; color: var(--ink); border-top: 0; white-space: nowrap; }
table.data td.num, table.data th.num { text-align: right; }
table.data tfoot td { border-top: 2px solid var(--ink); font-weight: 600; color: var(--ink); }
.thumb { width: 4rem; height: 4rem; object-fit: contain; background: var(--paper); }
.photos-edit { display: flex; flex-wrap: wrap; gap: 1.5rem; list-style: none; margin: 0 0 2rem; padding: 0; }
.photos-edit li { display: grid; gap: 0.4rem; width: 9rem; }
.photos-edit img { width: 9rem; height: 9rem; object-fit: contain; background: var(--paper); }
.grid-2 { display: grid; gap: 1.1rem; }
@media (min-width: 40rem) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.statement { break-inside: avoid; border: 1px solid var(--line); padding: 1.25rem; margin-top: 1.25rem; }
.statement h3 { font-size: 1.5rem; }
@media print {
  .top, .foot, .no-print { display: none !important; }
  .section { padding-block: 1rem; }
  .statement { page-break-inside: avoid; }
}
