/* PAWN SHOP. One counter, one lamp, and the goods are the only bright thing.
   Palette and type: site/NOTE.md. Every visible object is a generated photograph;
   the only vector on the page is an official brand mark on the brass plate. */

:root {
  --room: #121212;
  --counter: #1d1b19;
  --ink: #17140f;
  --lamp: #f2ece1;
  --paper: #e8dcc0;
  --paper-ink: #2a221a;
  --rule: #8a3a2a;
  --brass: #b98d3f;
  --brass-lit: #e4c179;
  --cobalt: #1b3fa0;
  --cyan: #2f7fd0;
  --mint: #6fd9a0;
  --violet: #a23ec8;
  --lavender: #a9b0e8;

  --display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: 16px;
  --stage: 1120px;
  font-synthesis: none;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100svh;
  background: var(--room);
  color: var(--lamp);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* --- the room ---------------------------------------------------------- */

.room {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100svh;
  background: #0c0c0c url("art/room.jpg") center top / cover no-repeat;
  z-index: 0;
  overflow: hidden;
}

/* The room breathes: the bulb sways, the dust turns, the counter waits. The
   still above is the poster, so a blocked or dead video changes nothing. */
.room__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.scrim {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 70% at 50% 18%, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.86) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 26%);
  z-index: 1;
  pointer-events: none;
}

.shop {
  position: relative;
  z-index: 2;
  max-width: var(--stage);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 40px);
  padding-top: clamp(18px, 4vh, 44px);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--paper);
  color: var(--paper-ink);
  padding: 12px 18px;
  font-family: var(--mono);
  font-size: 16px;
}
.skip:focus { left: var(--gutter); top: 8px; }

:focus-visible {
  outline: 3px solid var(--brass-lit);
  outline-offset: 3px;
}

/* --- the rack of pigeonholes ------------------------------------------- */

.rack {
  position: relative;
  aspect-ratio: 2642 / 712;
  width: min(100%, 760px);
  margin: 0 auto;
  background: url("art/rack.jpg") center / 100% 100% no-repeat;
  border-radius: 3px;
  box-shadow: 0 18px 40px rgba(0,0,0,.55);
}

.rack__row {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 3.4%;
  bottom: 5.6%;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3.7%;
}
.rack__row li { display: flex; }

.hole {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 0 2%;
  background: linear-gradient(to bottom, rgba(0,0,0,.62), rgba(0,0,0,.14));
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: transform .12s ease, background .18s ease;
}
.hole:hover { background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,.18)); }
.hole:active { transform: translateY(2px); }

.hole__card {
  display: block;
  min-width: 78%;
  padding: 7px 8px;
  background: linear-gradient(to bottom, #d8c08a, #b3913f);
  color: #2a1f0c;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
  text-transform: uppercase;
  border-radius: 1px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35);
}

.hole[aria-current="true"] { background: linear-gradient(to bottom, rgba(0,0,0,.2), rgba(233,201,132,.18)); }
.hole[aria-current="true"] .hole__card {
  background: linear-gradient(to bottom, #ffe9b4, #e0bb63);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.45), 0 0 18px rgba(228,193,121,.4);
}

/* --- the stage --------------------------------------------------------- */

.stage { position: relative; }

.panel { display: none; }
.panel.is-on { display: block; }

.panel--paper, .panel--drawer {
  position: relative;
  width: min(100%, 860px);
  margin: 0 auto;
  padding: clamp(22px, 3vw, 38px);
  color: var(--paper-ink);
  background: var(--paper) url("art/paper.jpg") center / cover no-repeat;
  box-shadow: 0 24px 50px rgba(0,0,0,.6);
  border-radius: 2px;
}

.panel--drawer {
  color: var(--lamp);
  background: #0f0d0b url("art/drawer.jpg") center / cover no-repeat;
  text-shadow: 0 2px 12px rgba(0,0,0,.95);
  overflow: hidden;
}
/* the lamp does not reach the back of the drawer: the text sits in that shadow */
.panel--drawer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(8,6,4,.9) 0%, rgba(8,6,4,.72) 48%, rgba(8,6,4,.34) 100%);
}
.panel--drawer > * { position: relative; z-index: 1; }

.panel h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
  text-transform: uppercase;
}

.lede { margin: 0 0 22px; max-width: 62ch; font-size: 17px; }
.panel--drawer .lede { max-width: 46ch; }

/* --- the ticket -------------------------------------------------------- */

.panel--ticket {
  display: none;
  grid-template-columns: minmax(0, 560px) minmax(0, 400px);
  justify-content: center;
  gap: clamp(18px, 3vw, 46px);
  align-items: start;
}
.panel--ticket.is-on { display: grid; }

.ticket {
  position: relative;
  padding: clamp(20px, 2.4vw, 30px) clamp(72px, 9%, 96px) clamp(22px, 2.6vw, 32px) clamp(20px, 2.4vw, 30px);
  color: var(--paper-ink);
  background: var(--paper) url("art/paper.jpg") center / cover no-repeat;
  box-shadow: 0 26px 60px rgba(0,0,0,.66);
  border-radius: 2px;
}

.ticket__stub {
  position: absolute;
  top: 0; bottom: 0;
  right: clamp(56px, 7.2%, 78px);
  width: 0;
  border-left: 2px dashed rgba(42,34,26,.45);
}

.ticket__head {
  border-bottom: 3px solid var(--rule);
  padding-bottom: 10px;
  margin-bottom: 18px;
}
.ticket__shop {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 46px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: .92;
  text-transform: uppercase;
}
.ticket__terms {
  margin: 6px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--rule);
}

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b5a44;
  margin-bottom: 5px;
}
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--paper-ink);
  background: rgba(255,255,255,.35);
  border: 0;
  border-bottom: 2px solid rgba(138,58,42,.55);
  border-radius: 0;
}
.field input::placeholder { color: #9a8b73; }

.note {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.45;
  color: #6b5a44;
}

.written { margin: 0 0 16px; border-top: 1px solid rgba(138,58,42,.35); }
.written__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(138,58,42,.22);
}
.written dt {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b5a44;
}
.written dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.written__row--big dd {
  font-family: var(--display);
  font-size: clamp(30px, 4.4vw, 52px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1;
}

.verdict {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.45;
  color: var(--rule);
}

.cta {
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}
.cta:hover:not(:disabled) { background: #2d2418; }
.cta:active:not(:disabled) { transform: translateY(2px); }
.cta:disabled { opacity: .45; cursor: not-allowed; }

.goods {
  margin: 0;
  padding: 6%;
  background: radial-gradient(closest-side, rgba(0,0,0,.72) 40%, rgba(0,0,0,0) 100%);
  align-self: start;
  justify-self: center;
  margin-top: clamp(10px, 4vh, 48px);
  text-align: center;
}
.goods img {
  width: clamp(180px, 22vw, 300px);
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.8));
}

/* --- rows, figures ----------------------------------------------------- */

.rows { display: grid; gap: 10px; }

.row {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(42,34,26,.07);
  border-left: 3px solid var(--rule);
}
.row img { width: 46px; height: 46px; mix-blend-mode: multiply; image-rendering: pixelated; }
.row__what { font-family: var(--mono); font-size: 13px; font-weight: 600; word-break: break-all; }
.row__sub { font-size: 13px; color: #6b5a44; }
.row__num {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.empty {
  margin: 0;
  padding: 18px 0;
  font-family: var(--mono);
  font-size: 14px;
  color: #6b5a44;
}
.panel--drawer .empty { color: #b9ae9a; }

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 22px 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(138,58,42,.3);
}
.panel--drawer .figures { border-top-color: rgba(233,201,132,.3); }
.figures dt {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b5a44;
}
.panel--drawer .figures dt { color: #cbbfa6; }
.figures dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.figure {
  margin: 0 0 14px;
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .9;
}

.rules { margin: 0; padding-left: 1.3em; display: grid; gap: 11px; max-width: 68ch; }
.rules li { padding-left: 4px; }
.rules li::marker { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--rule); }

/* --- the counter ------------------------------------------------------- */

.counter { margin: 0 calc(var(--gutter) * -1); }

.counter__glass {
  position: relative;
  min-height: 108px;
  display: flex;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 54px);
  background: #14120f url("art/glass.jpg") center / 100% 100% no-repeat;
  box-shadow: inset 0 14px 34px rgba(0,0,0,.6);
}

.licence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  max-width: 100%;
  padding: 12px 16px;
  color: var(--paper-ink);
  background: var(--paper) url("art/paper.jpg") center / cover no-repeat;
  box-shadow: 0 10px 24px rgba(0,0,0,.6);
  border-radius: 2px;
}
.licence__label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b5a44;
}
.licence__addr {
  margin: 0;
  flex: 1 1 260px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
  user-select: all;
}
.licence__copy {
  min-height: 44px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}
.licence__copy:active:not(:disabled) { transform: translateY(2px); }
.licence__copy:disabled { opacity: .4; cursor: not-allowed; }

.counter__front {
  min-height: clamp(120px, 15vh, 190px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px var(--gutter) 28px;
  background: #100d0a url("art/front.jpg") center top / 100% 100% no-repeat;
}

/* the brass plate screwed to the counter front */
.plate {
  display: flex;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  background: #3a2c16 url("art/plate.jpg") center / 100% 100% no-repeat;
  border-radius: 2px;
  box-shadow: 0 10px 26px rgba(0,0,0,.65);
}

.plate__buy, .plate__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 18px;
  color: #f4e7c4;
  background: linear-gradient(to bottom, rgba(18,13,6,.9), rgba(34,25,11,.8));
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,236,190,.26), inset 0 0 0 1px rgba(0,0,0,.65);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform .1s ease, filter .15s ease;
}
.plate__mark { min-width: 52px; padding: 10px 14px; }
.plate__buy img { width: 22px; height: 22px; }
.plate__buy:hover, .plate__mark:hover { filter: brightness(1.35); }
.plate__buy:active, .plate__mark:active { transform: translateY(2px); }
.plate__buy[aria-disabled="true"], .plate__mark[aria-disabled="true"] {
  opacity: .42;
  cursor: not-allowed;
  filter: grayscale(.6);
}

/* --- phone ------------------------------------------------------------- */

@media (max-width: 900px) {
  .panel--ticket.is-on { grid-template-columns: 1fr; }
  .goods { order: -1; }
  .goods img { width: clamp(110px, 30vw, 170px); }
  .ticket { padding-right: clamp(54px, 15%, 72px); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  /* The rack is photographed wide; on a phone it is stretched a little taller so
     the brass cards stay readable rather than shrinking to nothing. */
  .rack { aspect-ratio: 2642 / 980; }
  .rack__row { gap: 2.4%; }
  .hole__card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    width: 100%;
    min-width: 0;
    padding: 4px 2px;
    font-size: 11px;
    line-height: 1.15;
    letter-spacing: 0;
  }
  .field input { font-size: 14px; }
  .ticket { padding-right: clamp(40px, 12%, 60px); }
  .ticket__stub { right: clamp(30px, 8%, 46px); }
  .counter__glass { min-height: 96px; padding: 12px var(--gutter); }
  .licence { width: 100%; }
  .plate { flex-wrap: wrap; justify-content: center; width: 100%; }
  .plate__buy { flex: 1 1 100%; }
  .plate__mark { flex: 1 1 calc(50% - 5px); }
}

@media (max-width: 440px) {
  .hole__card { font-size: 10px; padding: 4px 1px; }
}

@media (max-width: 360px) {
  .hole__card { font-size: 9px; }
  .ticket { padding-left: 14px; padding-right: 48px; }
}

/* --- motion ------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  /* A stable, meaningful scene: the same room, holding still. */
  .room__film { display: none; }
}
