/* the art — prototype stylesheet
   World: living-room gallery wall (top 10) + category-standard grid (#11+).
   Sampled from the approved comp (.impeccable/mocks/comp-a-wall-then-grid.webp). */

:root {
  /* wall */
  --wall: #32453a;
  --wall-deep: #2a3b31;
  --light-pool: #9e8e5e;
  --table: #3a2f22;
  /* strip + paper */
  --strip: #f7eee5;
  --paper: #fff8f2;
  --card: #ffffff;
  --ink: #251c17;
  --ink-2: #6b5f55;
  --ink-3: #766a5c;
  --line: #e9e0d6;
  --line-strong: #d8cdbf;
  --coral: #e57255;
  --coral-deep: #c95a3e;
  --coral-ink: #a9482f;
  /* materials */
  --mat: #f3efe6;
  --kraft: #c9a97f;
  --kraft-ink: #2b2016;
  --string: #d9c9a8;
  --black-frame: #1c1a17;
  --white-frame: #e8e3dc;
  --brass: #b08b47;
  --brass-hi: #e2c077;
  --ok: #3f9a5f;
  /* type */
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --shadow-card: 0 1px 2px rgba(37, 28, 23, .06), 0 8px 24px -12px rgba(37, 28, 23, .18);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--kraft) var(--paper); }
body {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01";
}
::selection { background: var(--kraft); color: var(--kraft-ink); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
.num { font-variant-numeric: tabular-nums lining-nums; letter-spacing: -0.01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sandbox notice -- sits above the strip, warm amber against the paper so it
   reads as a note about the site rather than an error in it. */
/* ---------- top strip ---------- */
.strip {
  background: var(--strip);
  border-bottom: 1px solid rgba(37, 28, 23, .08);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px 28px;
  min-height: 54px;
}
.strip-left { display: flex; align-items: baseline; gap: 26px; }
.wordmark { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; text-decoration: none; display: inline-flex; gap: 2px; align-items: baseline; }
.wordmark .tld { color: var(--ink-3); font-weight: 400; }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { text-decoration: none; color: var(--ink-2); padding: 4px 2px; border-radius: 4px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.live { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(63, 154, 95, .18); }
.live .sep { color: var(--ink-3); }
.live a { color: var(--ink-2); }
.live .num { font-weight: 500; color: var(--ink); }

/* ---------- the wall ---------- */
.wall {
  position: relative;
  /* No fixed height any more: the wall is the page and simply grows. It still
     has to cover a short viewport, hence the min-height. */
  min-height: calc(100vh - 54px);
  padding: 0 clamp(16px, 4vw, 56px) clamp(48px, 8vw, 110px);
  background:
    radial-gradient(42% 26% at 50% 0%, rgba(158, 142, 94, .55), rgba(158, 142, 94, .18) 45%, transparent 72%),
    var(--wall);
  container-type: inline-size;
}

/* picture light: raster tube + painted cone */
.picture-light {
  position: absolute; left: 50%; top: 8.2%; width: 19%; transform: translateX(-50%);
  pointer-events: none; z-index: 3;
}
.picture-light img { width: 100%; height: auto; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .35)); }
.light-cone {
  position: absolute; left: 50%; top: 11%; width: 58%; height: 82%; transform: translateX(-50%);
  background:
    radial-gradient(34% 40% at 50% 0%, rgba(255, 228, 160, .66), rgba(255, 228, 160, .24) 50%, transparent 80%),
    radial-gradient(50% 72% at 50% 16%, rgba(255, 228, 160, .36), rgba(255, 228, 160, .18) 42%, rgba(255, 228, 160, .09) 68%, rgba(255, 228, 160, .03) 86%, transparent 100%);
  pointer-events: none; z-index: 1; mix-blend-mode: screen;
}

/* ---------- the podium: #1, #2, #3 ---------- */
.podium {
  display: grid;
  /* Below the desktop breakpoint the podium is just the first rows of the
     grid, on the grid's own columns -- three tiny frames side by side on a
     phone read as nothing at all. The podium proper starts at 1000px, where
     the grid goes four-up and there is room for it. */
  grid-template-columns: 1fr;
  gap: clamp(72px, 8vw, 96px) clamp(18px, 3vw, 40px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 210px) 0 clamp(72px, 8vw, 96px);
}
@media (min-width: 620px) { .podium { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) {
  .podium {
    grid-template-columns: 1fr 1.34fr 1fr;
    align-items: end;
    gap: clamp(12px, 2.6vw, 40px);
    padding: clamp(120px, 15vw, 210px) 0 clamp(70px, 8vw, 120px);
  }
  /* Stepped like a winners' podium: #2 left, #1 centre and highest, #3 right.
     Source order stays 1-2-3, which is what a phone and a screen reader get. */
  .pic--step1 { order: 1; margin-bottom: clamp(18px, 3vw, 48px); }
  .pic--step2 { order: 2; }
  .pic--step3 { order: 3; margin-bottom: clamp(34px, 5vw, 78px); }
}

/* ---------- the grid: #4 onwards ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(72px, 8vw, 96px) clamp(18px, 3vw, 40px);
  max-width: 1180px;
  margin: 0 auto;
}
@media (min-width: 620px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.wall-status {
  max-width: 1180px;
  margin: clamp(34px, 6vw, 70px) auto 0;
  text-align: center; font-size: 13px;
  color: rgba(243, 239, 230, .5);
}

/* a hung picture */
.pic {
  position: relative;
  display: block;
  z-index: 2;
  text-decoration: none; color: inherit;
  transition: filter .35s var(--ease-out), transform .35s var(--ease-out);
  container-type: inline-size;
}
.pic:hover, .pic:focus-visible { filter: brightness(1.07); z-index: 30; }
.pic:focus-visible { outline-offset: 8px; }
.frame {
  /* Both frame and mat are spans; without an explicit display they are inline
     and width/aspect-ratio silently do nothing. */
  display: block;
  position: relative; width: 100%;
  border-style: solid; border-color: transparent;
  border-width: var(--bw, 7cqw);
  box-shadow: 0 22px 30px -14px rgba(0, 0, 0, .65), 0 3px 6px rgba(0, 0, 0, .25);
  background-clip: padding-box;
}
.frame--gilt { --bw: 8.5cqw; border-image: url("assets/frame-gilt.png") 122 123 119 123 / var(--bw) / 0 stretch; }
.frame--oak  { --bw: 6.5cqw; border-image: url("assets/frame-oak.png") 141 142 140 142 / var(--bw) / 0 stretch; }
.frame--black { --bw: 4.5cqw; border-color: var(--black-frame); background: var(--black-frame); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 22px 30px -14px rgba(0,0,0,.65), 0 3px 6px rgba(0,0,0,.25); }
.frame--white { --bw: 4.5cqw; border-color: var(--white-frame); background: var(--white-frame); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08), 0 22px 30px -14px rgba(0,0,0,.55), 0 3px 6px rgba(0,0,0,.22); }
/* The cream mat board inside every frame. It is what lets a frame keep a fixed
   size and shape while holding a picture of any proportions -- the mat takes up
   the slack instead of the picture being cropped. */
.mat {
  display: block;
  position: relative;
  aspect-ratio: var(--ar, 4 / 3);
  background: var(--mat);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), inset 0 1px 3px rgba(0, 0, 0, .10);
}


/* display:block matters: an inline <img> sits on a text baseline and leaves
   descender space under it, which shows as a sliver of mat along the bottom
   edge now that the mat has no padding. */
/* Positioned out of flow, inset by the mat's width. Absolute placement is what
   keeps the picture from contributing to any ancestor's height -- an <img> in
   normal flow carries its own intrinsic size into the frame's content-based
   minimum and pushes the frame out of shape. contain, not cover: the mat exists
   precisely so a picture is never cropped to a frame it does not match. */
/* The picture is taken out of flow so it can never grow the mat and knock the
   frame off its ratio. It hangs in a plain span, not directly: an absolutely
   positioned <img> with width:auto uses its intrinsic size and ignores the
   insets, while a non-replaced box with all four insets set is definite -- and
   a percentage size inside that box then resolves reliably. */
.art-box { position: absolute; inset: 7cqw; display: block; }
.frame--gilt .art-box { inset: 8cqw; }
.art {
  display: block;
  width: 100%; height: 100%;
  /* cover, not contain: the mat is a border of even width, and the picture
     fills the window it leaves. contain left ragged mat down two sides of any
     picture whose proportions did not match the frame's. */
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}


/* kraft tag on a string */
.tag {
  position: absolute; left: 58%; top: calc(100% + 6px);
  display: block; width: max-content;
  transform: rotate(-7deg); transform-origin: 0 0;
  z-index: 5; pointer-events: none;
}
.tag .string {
  position: absolute; left: -4px; top: calc(-6px - 3cqw); width: 28px; height: calc(6px + 3cqw + 14px); overflow: visible;
}
.tag .string path { fill: none; stroke: var(--string); stroke-width: 1.6; stroke-linecap: round; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.tag-body {
  position: relative; display: block;
  min-width: 64px; max-width: 210px;
  padding: 6px 10px 6px 16px;
  background: linear-gradient(rgba(205, 174, 132, .74), rgba(205, 174, 132, .74)), url("assets/kraft.jpg") center / 180px repeat;
  color: var(--kraft-ink);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
  box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .6);
  font-size: 12px; line-height: 1.25;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35));
}
.tag-body::before { /* punched hole + eyelet */
  content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; border-radius: 50%;
  background: var(--wall); box-shadow: 0 0 0 1.5px rgba(43, 32, 22, .35); transform: translateY(-50%);
}
.tag .price { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.tag .cap { display: block; font-size: 11px; color: rgba(43, 32, 22, .9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.pic--lg .tag .price { font-size: 15px; }
.pic--lg .tag .cap { font-size: 12px; max-width: 220px; }
.pic--lg .tag-body { max-width: 260px; padding: 8px 14px 8px 18px; }

/* the empty frame = the one action */
.pic--empty { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }

.pic--empty .drop {
  position: absolute; inset: 9cqw;
  border: 1.5px dashed rgba(37, 28, 23, .35); border-radius: 2px;
  display: grid; place-items: center; color: rgba(37, 28, 23, .45);
  transition: border-color .25s, color .25s, background .25s;
}
.pic--empty .drop svg { width: 38%; height: auto; }
.pic--empty:hover .drop, .pic--empty:focus-visible .drop { border-color: var(--coral); color: var(--coral); background: rgba(229, 114, 85, .06); }
.pic--empty .tag { pointer-events: none; }
.pic--empty .tag .price { font-size: 12px; font-family: var(--display); font-weight: 600; letter-spacing: 0; }

/* further-down empty ranks: quiet, unclaimed -- still open the hang dialog, no CTA tag */
.pic--placeholder { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; opacity: .5; transition: opacity .25s var(--ease-out), filter .35s var(--ease-out), transform .35s var(--ease-out); }

.pic--placeholder .placeholder-icon {
  position: absolute; inset: 9cqw;
  display: grid; place-items: center;
  color: rgba(37, 28, 23, .3);
}
.pic--placeholder .placeholder-icon svg { width: 34%; height: auto; }
.pic--placeholder:hover, .pic--placeholder:focus-visible { opacity: .85; }


.under {
  background: var(--strip);
  border-top: 1px solid rgba(37, 28, 23, .08);
  display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap;
  padding: 22px 28px;
}
.under p { margin: 0; color: var(--ink-2); font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 999px;
  background: var(--ink); color: var(--strip); border: 0; text-decoration: none;
  font-weight: 500; font-size: 14px; line-height: 1;
  transition: transform .25s var(--ease-out), background .2s;
}
.btn:hover { background: #3a2e27; transform: translateY(-1px); }
.btn svg { width: 16px; height: 16px; }
.btn--coral { background: var(--coral); color: var(--ink); }
.btn--coral:hover { background: var(--coral-deep); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn--ghost:hover { background: rgba(37, 28, 23, .05); }

/* ---------- footer ---------- */
.foot { display: flex; justify-content: center; gap: 18px; padding: 30px 28px 40px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; }
.foot .sep { color: var(--ink-3); }
.foot .note { width: 100%; text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 6px; }

/* ---------- overlay: hang a picture ---------- */
.overlay { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; }
.overlay::backdrop { background: rgba(26, 22, 18, .55); backdrop-filter: blur(2px); }
.overlay[open] { display: grid; place-items: end center; }
.overlay[open] .sheet { animation: rise .32s var(--ease-out); }
@keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet {
  width: min(520px, 100%);
  background: var(--paper); color: var(--ink);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, .5);
  padding: 22px 24px 28px;
  display: flex; flex-direction: column; gap: 14px;
  margin: 0;
}
@media (min-width: 720px) {
  .overlay[open] { place-items: center; }
  .sheet { border-radius: 18px; padding: 26px 28px 28px; }
}
.sheet header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sheet form { display: flex; flex-direction: column; gap: 16px; }
.sheet .field label { margin-top: 2px; }
.sheet .fine { margin-top: 4px; line-height: 1.5; }
.sheet h2 { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.sheet .top-price { color: var(--ink-2); font-size: 13px; }
.close { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink-2); }
.close:hover { background: rgba(37, 28, 23, .06); color: var(--ink); }
.sheet { position: relative; }
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: 12px;
  padding: 22px 16px; text-align: center; color: var(--ink-2); font-size: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--card); cursor: pointer; position: relative; overflow: hidden;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--coral); background: rgba(229, 114, 85, .05); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone strong { color: var(--ink); font-weight: 500; }
.dropzone small { color: var(--ink-3); font-size: 12px; }
.dropzone svg { width: 26px; height: 26px; color: var(--ink-3); }
.dropzone.has-file { padding: 0; border-style: solid; }
/* The prompt is hidden rather than removed -- the <input> is a sibling of it and
   must survive, or there is nothing left to tap to choose a different picture. */
.dropzone.has-file > svg, .dropzone.has-file > strong, .dropzone.has-file > small { display: none; }
.dropzone .preview { width: 100%; max-height: 180px; object-fit: contain; background: #eee5da; border-radius: inherit; }
.file-msg { margin: 0; font-size: 13px; color: var(--coral); }
.dropzone .preview-name { position: absolute; left: 10px; bottom: 8px; background: rgba(37,28,23,.8); color: #fff; font-size: 11px; padding: 3px 7px; border-radius: 999px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--ink-2); }
.input {
  width: 100%; border: 1px solid var(--line-strong); background: var(--card); border-radius: 10px;
  padding: 11px 12px; font: inherit; font-size: 15px; color: var(--ink); caret-color: var(--coral);
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: 2px solid var(--coral); outline-offset: 0; border-color: transparent; }
.price-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; }
.price-wrap { position: relative; }
.price-wrap .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-weight: 500; }
.price-wrap .input { padding-left: 26px; font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }
.chip { border: 1px solid var(--line-strong); background: var(--card); border-radius: 10px; padding: 0 12px; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; min-height: 44px; }
.chip:hover { border-color: var(--ink-3); }
.hint { font-size: 13px; color: var(--ink-2); min-height: 1.4em; }
.hint b { color: var(--ink); font-weight: 600; }
.hint.is-error { color: var(--coral-ink); }
.cta { width: 100%; min-height: 48px; border-radius: 12px; border: 0; background: var(--coral); color: var(--ink); font-weight: 500; font-size: 16px; transition: background .2s, transform .25s var(--ease-out); }
.cta:hover { background: var(--coral-deep); }
.cta:disabled { background: var(--line-strong); color: var(--ink-2); cursor: not-allowed; }
.fine { font-size: 12px; color: var(--ink-3); margin: 0; }
.fine a { color: var(--ink-2); }
.done { display: none; text-align: center; padding: 10px 0 4px; }
.sheet.is-done form { display: none; }
.sheet.is-done .done { display: block; }
.done .big { font-size: 22px; font-weight: 500; margin: 0 0 6px; }
.done p { margin: 0 0 14px; color: var(--ink-2); }

/* ---------- lightbox: view a picture ---------- */
.viewer { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; }
.viewer::backdrop { background: rgba(20, 18, 15, .78); backdrop-filter: blur(3px); }
.viewer[open] { display: grid; place-items: center; }
.viewer .stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: min(1100px, 94vw); max-height: 94vh; margin: 0; animation: rise .32s var(--ease-out); }
.viewer .stage img { max-width: 100%; max-height: calc(94vh - 110px); width: auto; height: auto; object-fit: contain; box-shadow: 0 30px 60px -20px rgba(0,0,0,.8), 0 0 0 10px var(--mat); background: var(--mat); }
.viewer .plate { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; justify-content: center; color: var(--strip); text-align: center; }
.viewer .plate .rank { color: var(--ink-3); font-size: 13px; }
.viewer .plate .price { font-size: 22px; font-weight: 600; }
.viewer .plate .cap { font-size: 16px; color: #e6dccb; }
.viewer .plate .cap:empty { display: none; }
.viewer .close { position: fixed; right: 16px; top: 16px; color: var(--strip); background: rgba(255,255,255,.08); }
.viewer .close:hover { background: rgba(255,255,255,.18); color: #fff; }
.viewer .meta { font-size: 12px; color: var(--ink-3); margin: 0; }

/* ---------- rules page ---------- */
.band {
  background:
    radial-gradient(38% 70% at 50% 0%, rgba(158, 142, 94, .42), rgba(158, 142, 94, .12) 45%, transparent 75%),
    var(--wall);
  color: var(--strip);
  padding: 56px 28px 52px;
}
.band-inner { max-width: 68ch; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.band h1 { font-size: 34px; line-height: 1.1; letter-spacing: -0.025em; font-weight: 500; margin: 0; color: #f1ebdd; }
.band .lede { font-size: 17px; line-height: 1.5; margin: 0; color: #cfc5b0; max-width: 56ch; text-wrap: pretty; }
.prose { max-width: 68ch; margin: 0 auto; padding: 36px 28px 60px; }
.prose .num {
  display: inline-block; padding: 0 6px; border-radius: 2px; line-height: 1.35;
  background: linear-gradient(rgba(205, 174, 132, .74), rgba(205, 174, 132, .74)), url("assets/kraft.jpg") center / 180px repeat;
  color: var(--kraft-ink); box-shadow: 0 1px 1px rgba(37, 28, 23, .18);
}
.prose h2 { font-size: 19px; font-weight: 600; margin: 30px 0 8px; letter-spacing: -0.01em; }
.prose p, .prose li { font-size: 15px; line-height: 1.6; margin: 0 0 10px; }
.prose ul { padding-left: 18px; margin: 0 0 10px; }
.prose .num { font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .strip { padding: 12px 18px; }
  .strip-left { gap: 16px; }
  .nav { display: none; }
  .live .hide-s { display: none; }
  .wall .picture-light, .wall .light-cone { display: none; }
  .tag { left: 50%; top: calc(100% + 4px); transform: translateX(-40%) rotate(-5deg); transform-origin: 40% 0; }
  .tag .cap { max-width: 140px; }
  .pic--lg .tag-body { max-width: 220px; }
  .price-row { grid-template-columns: 1fr 1fr 1fr; }
  .price-row .price-wrap { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .tag .cap { max-width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.cf-turnstile { margin: 4px 0 2px; }
