/* Home: the press sheet, and the deck of nine cards that follows the reader down it. */

/* ---------- the deck ---------- */
.deck { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; }
.dc { position: absolute; left: 0; top: 0; width: 220px; --sh: 1; opacity: 0; pointer-events: auto; cursor: zoom-in; will-change: transform; background: #0D1215;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6), calc(8px * var(--sh)) calc(10px * var(--sh)) 0 var(--offset); }
.deck--on .dc { opacity: 1; }
.dc img { display: block; width: 100%; height: 100%; }
.over { position: relative; z-index: 3; }
/* invisible card-sized placeholders say where the deck sits in each section */
[data-slot] i[data-c] { display: block; aspect-ratio: 5 / 7; }

/* ---------- hero ---------- */
.hero { position: relative; }
.hero .ht { top: -90px; left: 0; width: min(54vw, 620px); aspect-ratio: 1; }
.hero .wrap { padding-top: clamp(16px, 4vh, 44px); }
.hero__row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(20px, 4vw, 64px); align-items: start; }
.hero h1 { font-size: clamp(3rem, 7vw, 6.4rem); margin: .24em 0 .3em; }
.hero .lede { font-size: clamp(1.08rem, 1.55vw, 1.42rem); max-width: 31em; }
/* three ways in, one per tool, ruled like a press sheet's index: the tool's name small, what you get under it,
   an arrow at the end of the row. In the markup the outcome comes first, so the link reads outcome, then name. */
.hero .paths { margin-top: clamp(20px, 3.2vh, 34px); max-width: 34em; border-top: 2px solid var(--ink); }
.hero .paths a { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name go" "what go"; align-items: center; gap: 3px 18px; min-height: 62px; padding: 10px 2px 11px; text-decoration: none; border-bottom: 1px solid var(--line-2); transition: border-color .15s; }
.hero .paths b { grid-area: what; font: 700 clamp(1.05rem, 1.5vw, 1.3rem)/1.22 var(--display); text-wrap: balance; }   /* when it takes two lines, split them evenly: never one word left on its own */
.hero .paths .label { grid-area: name; color: var(--ink-3); white-space: nowrap; font-size: .66rem; transition: color .15s; }
.hero .paths .arrow { grid-area: go; font-size: 1.1rem; }
.hero .paths a:hover { border-bottom-color: var(--ink); }
.hero .paths a:hover .label { color: var(--ink); }
.proof { margin-top: clamp(22px, 3.2vh, 34px); display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-3); }
.proof span { white-space: nowrap; }
.cross--hero { height: clamp(130px, 14vw, 190px); }
.pile { position: relative; width: min(100%, 460px); aspect-ratio: 1 / .98; margin: -4% 0 -110px auto; }
.pile i { position: absolute; width: 36%; left: var(--x); top: var(--y); }
.pile__btn { position: absolute; z-index: 3; right: 0; bottom: -34px; background: var(--stock); color: var(--ink); border: 1.5px solid var(--line-2); border-radius: 99px; padding: .8em 1.1em; font-size: .62rem; }
.pile__btn:hover { border-color: var(--ink); }

/* ---------- tools ---------- */
.tool { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 32px); align-items: center; padding: clamp(28px, 5vw, 64px) 0; min-height: min(86vh, 820px); }
.tool .copy { grid-column: 1 / span 5; }
.tool .plate { grid-column: 7 / span 6; display: flex; justify-content: center; }
.tool--flip .copy { grid-column: 8 / span 5; grid-row: 1; }
.tool--flip .plate { grid-column: 1 / span 6; grid-row: 1; }
.tool h2 { font-size: clamp(2.3rem, 4.5vw, 3.9rem); margin: .22em 0 .3em; }
.tool .lede { font-size: clamp(1.1rem, 1.5vw, 1.36rem); margin-bottom: .7em; }
.tool .body { max-width: 30em; color: var(--ink-2); margin-bottom: 1.6em; }
.tool .fine { margin-top: -.4em; }

/* nine-pocket page */
.frame { width: min(100%, 520px); }
.nine { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(6px, 1vw, 12px); }
.nine::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(112deg, transparent 22%, rgba(255, 255, 255, .09) 34%, transparent 46%, transparent 62%, rgba(255, 255, 255, .05) 72%, transparent 82%); }
.pocket { background: var(--stock-3); box-shadow: inset 0 0 0 1px var(--line); }

.letter { position: relative; aspect-ratio: 8.5 / 11; padding: 8.5% 9% 7%; box-shadow: 0 0 0 1px rgba(8, 11, 13, .12), 11px 11px 0 var(--gray); font-size: clamp(.58rem, .98vw, .78rem); line-height: 1.5; display: flex; flex-direction: column; }
.letter .label { font-size: .78em; }
.letter h3 { font: 700 2.4em/1 var(--display); margin: .32em 0 .22em; }
.letter__by { font-size: .86em; color: var(--gray); padding-bottom: 1.1em; border-bottom: 2px solid var(--carbon); }
.letter ol { list-style: none; margin: 1em 0 0; padding: 0; display: grid; gap: .9em; }
.letter li { display: grid; grid-template-columns: 1.9em 1fr; opacity: 0; transform: translateX(-8px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i) * 130ms + 300ms); }
.letter.in li, .no-js .letter li { opacity: 1; transform: none; }
.letter li b { font: 700 1.25em/1.1 var(--display); }
.letter li span { display: block; font: 800 .78em/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.letter li em { display: block; font-style: normal; font-family: var(--display); font-weight: 400; font-size: 1.02em; margin-top: .15em; }
.letter__legal { margin-top: auto; padding-top: .9em; border-top: 1px solid var(--silver); font-size: .8em; color: var(--gray); }

/* a small corner of the Heat Check studio */
.mini { position: relative; width: min(100%, 470px); border: 1px solid var(--line-2); border-radius: 16px; overflow: hidden; background: var(--stock-2); box-shadow: 11px 11px 0 var(--offset); }
.mini__bar { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.mini__tc { font: 600 .74rem/1 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .06em; color: var(--ink-2); }
.mini__view { position: relative; aspect-ratio: 4 / 5; background: #080B0D; overflow: hidden; margin: 12px 12px 0; box-shadow: 0 0 0 1px var(--line); }
.mini__view .ht { right: 0; bottom: 0; width: 80%; aspect-ratio: 1; transform: scale(-1, -1); }
.mini__view svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mini__hero { position: absolute; left: 8%; top: 9%; width: 49%; }
.stat { position: absolute; right: 5%; top: 11%; width: 35%; text-align: left; }
.stat b { display: block; font: 700 clamp(2.6rem, 5.6vw, 4rem)/.86 var(--display); }
.stat b small { display: block; margin-top: .45em; font: 800 .24em/1 var(--sans); letter-spacing: .2em; text-shadow: none; }
.stat span { display: block; margin-top: 8px; font-size: .62rem; }
.stat .rule-pill { margin: 14px 0 12px; height: 6px; }
.mini__strip { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; padding: 12px; margin-top: 12px; border-top: 1px solid var(--line); background: var(--stock-3); }
.mini__head { position: absolute; top: 5px; bottom: 5px; left: 37.2%; width: 2px; background: var(--teal); z-index: 3; }
.mini__head::before { content: ""; position: absolute; left: -5px; top: -1px; border: 6px solid transparent; border-top-color: var(--teal); }
.mini__fmt { display: flex; align-items: center; gap: 7px; padding: 12px 12px 14px; color: var(--ink-2); }
.mini__fmt span { border: 1.5px solid var(--line-2); border-radius: 99px; padding: .5em .8em; font-size: .6rem; letter-spacing: .12em; }
.mini__fmt .on { background: var(--ink); color: var(--stock); border-color: var(--ink); }
.mini__fmt .mini__go { margin-left: auto; border: 0; padding-right: 0; color: var(--ink-3); }

.tool .acts { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

/* a picture of the tool itself, framed like the studio corner */
.shot { margin: 0; width: min(100%, 470px); background: #0C1214; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 11px 11px 0 var(--offset); }
.shot img { display: block; width: 100%; height: auto; }

/* the letter */
.letterbox { width: min(100%, 420px); }

/* what a seller can change on a post: a selected stat with handles, the style bar, and the brand strip */
.sel { position: absolute; inset: -10px -9px -9px -10px; border: 1.5px dashed var(--teal); pointer-events: none; }
.sel i { position: absolute; width: 9px; height: 9px; background: #080B0D; border: 1.5px solid var(--teal); }
.sel i:nth-child(1) { left: -5px; top: -5px; }
.sel i:nth-child(2) { right: -5px; top: -5px; }
.sel i:nth-child(3) { left: -5px; bottom: -5px; }
.sel i:nth-child(4) { right: -5px; bottom: -5px; }
.mini__style { position: absolute; right: 5%; top: 49%; display: flex; align-items: center; gap: 3px; padding: 4px; background: rgba(8, 11, 13, .82); border: 1px solid rgba(174, 182, 188, .35); border-radius: 7px; }
.mini__style > span { display: grid; place-items: center; width: 26px; height: 22px; border-radius: 4px; color: #F2F4F3; font: 700 .78rem/1 var(--display); }
.mini__style .ms__font { background: rgba(22, 167, 184, .22); box-shadow: inset 0 0 0 1px var(--teal); }
.mini__style .ms__size small { font-size: .62em; margin-left: 1px; }
.mini__style .ms__color::before, .mini__style .ms__grad::before { content: ""; width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(242, 244, 243, .7); }
.mini__style .ms__color::before { background: #16A7B8; }
.mini__style .ms__grad::before { background: linear-gradient(135deg, #F2F4F3, #16A7B8 55%, #080B0D); }
.mini__brand { position: absolute; left: 5%; right: 5%; bottom: 4.5%; display: flex; align-items: center; gap: 3%; padding-top: 3%; border-top: 1px solid rgba(174, 182, 188, .3); color: #F2F4F3; }
.mb__logo { flex: 0 0 12%; outline: 1.5px dashed rgba(22, 167, 184, .9); outline-offset: 3px; }
.mb__logo img { display: block; width: 100%; height: auto; }
.mb__name { display: grid; gap: 2px; min-width: 0; }
.mb__name b { font: 700 clamp(.78rem, 1.5vw, 1rem)/1.1 var(--display); white-space: nowrap; }
.mb__name i { font: italic 400 clamp(.6rem, 1.05vw, .74rem)/1.2 var(--display); color: #AEB6BC; white-space: nowrap; }
.mb__handle { margin-left: auto; font: 700 clamp(.56rem, 1vw, .68rem)/1 var(--sans); letter-spacing: .06em; color: #AEB6BC; }
/* the callouts: small teal flags with a tick down (or up) to what they name */
.mini__tags { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.mt { position: absolute; background: var(--teal); color: #041316; font: 800 clamp(.5rem, .9vw, .6rem)/1 var(--sans); letter-spacing: .04em; padding: .5em .65em; border-radius: 3px; white-space: nowrap; }
.mt::after { content: ""; position: absolute; left: 12px; top: 100%; width: 1.5px; height: var(--tick, 8px); background: var(--teal); }
.mt--move { right: 5%; top: 3%; }
.mt--move::after { left: auto; right: 14px; height: 7px; }
.mt--style { right: 5%; top: calc(49% + 38px); }
.mt--style::after { top: auto; bottom: 100%; left: auto; right: 14px; height: 9px; }
.mt--logo { left: 5%; bottom: 17.5%; }
.mt--name { left: 25%; bottom: 17.5%; }
.mt--handle { right: 5%; bottom: 17.5%; }
.mt--handle::after { left: auto; right: 14px; }

/* Set Builder: a live corner of its board. The cards fall into their places as it scrolls in; the ring fills and the
   count goes up with them (home.js). Colors are fixed: the board is dark in both themes, like the studio. */
.sbx { --pct: 66; width: min(100%, 470px); padding: clamp(16px, 3vw, 26px); background: #0D1316; color: #F2F4F3; border: 1px solid rgba(174, 182, 188, .3); border-radius: 18px; box-shadow: 11px 11px 0 var(--offset); }
.sbx__head { display: flex; align-items: center; gap: clamp(14px, 3vw, 24px); }
.sbx__ring { position: relative; flex: 0 0 clamp(84px, 12vw, 116px); aspect-ratio: 1; }
.sbx__ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.sbx__ring circle { fill: none; stroke: #263034; stroke-width: 11; }
.sbx__ring .sbx__arc { stroke: #16A7B8; stroke-dasharray: calc(var(--pct) * 1px) 100px; }
.sbx__ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 clamp(1.45rem, 2.6vw, 2rem)/1 var(--display); }
.sbx__ring small { font: 800 .48em/1 var(--sans); margin: .5em 0 0 .08em; }
.sbx__name .label { margin: 0; color: #AEB6BC; font-size: .62rem; }
.sbx__title { margin: .2em 0 .12em; font: 700 clamp(1.3rem, 2.4vw, 1.75rem)/1.08 var(--display); }
.sbx__of { margin: 0; color: #AEB6BC; font: 400 1.05rem/1.1 var(--display); }
.sbx__of b { color: #F2F4F3; font: 700 1.75rem/1 var(--display); }
.sbx__stats { display: flex; gap: clamp(18px, 4vw, 36px); margin: clamp(14px, 2vw, 20px) 0 clamp(12px, 1.8vw, 18px); color: #AEB6BC; font-size: .6rem; }
.sbx__stats span { display: grid; gap: 7px; }
.sbx__stats b { color: #F2F4F3; font: 700 1.65rem/1 var(--display); letter-spacing: 0; }
.sbx__wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.4vw, 12px); }
.sbt { position: relative; aspect-ratio: 5 / 7; container-type: inline-size; display: flex; flex-direction: column; padding: 9% 9% 10%; border: 1.5px dashed rgba(174, 182, 188, .5); }
.sbt b { display: block; max-width: 100%; color: #AEB6BC; font: 400 max(14px, 27cqw)/.95 var(--display); white-space: nowrap; }
.sbt[data-len="4"] b { font-size: max(13px, 22cqw); }
.sbt[data-len="5"] b { font-size: max(12px, 18cqw); }
.sbt[data-len="6"] b, .sbt[data-len="7"] b { font-size: max(11px, 14cqw); }
.sbt i { position: absolute; top: 9%; right: 9%; padding: .28em .38em; border: 1.5px solid #16A7B8; color: #F2F4F3; font: 800 max(8px, 9.5cqw)/1 var(--sans); font-style: normal; }
.sbt--need b { max-width: 58%; }
.sbt em { margin-top: auto; color: #D8DDE0; font: 700 max(10px, 12cqw)/1.15 var(--sans); font-style: normal; }
.sbt__card { position: absolute; left: -1.5px; top: -1.5px; width: calc(100% + 3px); height: calc(100% + 3px); object-fit: cover; background: #0D1316; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), 0 6px 14px rgba(0, 0, 0, .45); }

/* Show Case's two cases in 3D, its own models (showcase/case3d.js, the aluminum display case with the shop's 18 cards at
   their prices; showcase/slabcase3d.js, the tall hard case of 20 with six PSA slabs), fetched as each comes near. Each
   waits closed; when it is half on the screen its lid lifts and the cards drop in. Drag to turn it; zoom with the
   buttons, a trackpad's pinch or Ctrl + scroll, or two fingers on a phone; the page still scrolls over it. Until the 3D
   is live (and with no WebGL) the row of cards under it is the picture; then the row stays for keys and screen readers. */
.tool--case { display: block; min-height: 0; }
.tool--case .copy { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: clamp(20px, 4vw, 64px); align-items: end; margin-bottom: clamp(16px, 3vw, 32px); }
.tool--case .body { margin-bottom: 1.3em; }
.slabs { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(20px, 4vw, 64px); align-items: center; margin-top: clamp(36px, 6vw, 84px); }
.slabs h3 { font-size: clamp(1.5rem, 2.3vw, 2.05rem); line-height: 1.08; margin: .3em 0 .45em; text-wrap: balance; }
.slabs .body { color: var(--ink-2); max-width: 28em; }
.hcase { position: relative; width: min(100%, 980px); margin: 0 auto; }
.hcase--slabs { width: 100%; }
.hcase__stage { position: relative; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden; background: radial-gradient(70% 70% at 50% 40%, #2a333b, #080b0d); box-shadow: 0 0 0 1px var(--line-2), 11px 11px 0 var(--offset); }
.hcase--slabs .hcase__stage { aspect-ratio: 16 / 11; }
.hcase__stage:empty::after { content: ""; position: absolute; inset: 0; background: url(../img/ir-badge-192.webp) center / 64px no-repeat; opacity: .18; }
.hcase__stage canvas { display: block; width: 100%; height: 100%; outline: none; cursor: grab; }
.hcase__stage canvas:active { cursor: grabbing; }
.hcase__ctl { position: absolute; right: 12px; bottom: 12px; z-index: 2; display: flex; align-items: center; gap: 6px; }
.hcase__ctl button { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 99px; border: 1px solid rgba(242, 244, 243, .28);
  background: rgba(8, 11, 13, .72); color: #F2F4F3; font: 800 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; backdrop-filter: blur(6px); }
.hcase__ctl button:hover { border-color: #F2F4F3; }
.hcase__ctl button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hcase__ctl .hcase__z { font-size: 1.3rem; letter-spacing: 0; padding: 0; width: 40px; }
.hcase__hint { position: absolute; left: 14px; bottom: 16px; z-index: 2; color: rgba(242, 244, 243, .7); font: 800 .62rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; pointer-events: none; transition: opacity .4s; }
.hcase--used .hcase__hint { opacity: 0; }
.hcase__row { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.hcase--slabs .hcase__row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.hcase__pick { display: grid; gap: 4px; width: 100%; padding: 0; border: 0; background: none; color: var(--ink-2); font: 800 .62rem/1 var(--sans); cursor: zoom-in; }
.hcase__pick img { display: block; width: 100%; height: auto; }
.hcase__pick:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.hcase--live .hcase__row { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hcase--live .hcase__row:focus-within { position: static; width: auto; height: auto; margin: 14px 0 0; clip: auto; }   /* a keyboard user sees what they're on */

/* ---------- strips: shop binders, Relics Unearthed ---------- */
.strip { padding: clamp(36px, 6vw, 84px) 0 clamp(8px, 2vw, 20px); }
.strip__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px 32px; margin-bottom: clamp(18px, 2.6vw, 30px); }
.strip h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); margin: .22em 0 .2em; }
.strip__lede { color: var(--ink-2); max-width: 34em; margin: .3em 0 0; }
.films { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(10px, 1.8vw, 22px); }
.films a { display: grid; gap: 10px; color: var(--ink); text-decoration: none; }
.films img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; box-shadow: 0 0 0 1px var(--line-2), 7px 7px 0 var(--offset); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.films a:hover img { transform: translate(-2px, -2px); box-shadow: 0 0 0 1.5px var(--ink), 9px 9px 0 var(--offset); }
.films span { font: 800 .7rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.films a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
/* the shop's binders, written in by tools/make_vault.py as covers (binder-cover.css) */
.strip .vstrip { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .hero__row { grid-template-columns: 1fr; gap: 8px; }
  .hero h1 { font-size: clamp(2.7rem, 13.2vw, 3.6rem); margin-bottom: .4em; }
  .br-d { display: none; }
  .pile { width: min(84%, 330px); margin: 26px auto -70px; }
  .pile__btn { right: 50%; transform: translateX(50%); bottom: -44px; white-space: nowrap; }
  .cross--hero { height: 150px; }
  .tool { display: block; padding: 22px 0; min-height: 0; }
  .tool .plate { margin-top: 34px; }
  .letter { box-shadow: 0 0 0 1px rgba(8, 11, 13, .12), 7px 7px 0 var(--gray); font-size: clamp(.56rem, 2.7vw, .76rem); }
  .mini { box-shadow: 0 0 0 1px rgba(8, 11, 13, .12), 7px 7px 0 var(--offset); }
  .stat .quiet { display: none; }
  .films { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip .vstrip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 14px 18px 4px; margin: -4px -14px 0 -4px; scrollbar-width: none; }
  .strip .vstrip > li { scroll-snap-align: start; }
  .strip__head .textlink { order: 2; }
  .shot { box-shadow: 0 0 0 1px var(--line-2), 7px 7px 0 var(--offset); }
  .sbx { box-shadow: 0 0 0 1px rgba(8, 11, 13, .12), 7px 7px 0 var(--offset); }
  .letterbox { width: min(100%, 360px); margin: 0 auto; }
  .tool--case .copy { display: block; }
  .slabs { grid-template-columns: 1fr; }
  .hcase__stage, .hcase--slabs .hcase__stage { aspect-ratio: 5 / 4; }
  .hcase--slabs .hcase__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hcase__hint { display: none; }
}
