/* Bleeding Eye: page layer. The 3D stage (#stage) sits behind everything. */

:root {
  color-scheme: dark;

  /* palette */
  --stage: #0e0d0d;
  --charcoal: #171515;
  --charcoal-2: #1f1c1c;
  --bone: #e8e2d6;
  --ash: #9a948a;
  --blood: #c22a31;
  --blood-hi: #e2393f;
  --hair: rgba(232, 226, 214, 0.14);
  --hair-strong: rgba(232, 226, 214, 0.32);
  --scrim: rgba(14, 13, 13, 0.9);

  /* per-suit accent: red suits bleed red, black suits bleed bone */
  --accent: var(--blood);
  --line: var(--blood);

  /* type */
  --f-display: "Libre Caslon Display", "Libre Caslon Text", "Big Caslon", "Adobe Caslon Pro", "Caslon", Georgia, serif;
  --f-text: "Libre Caslon Text", "Big Caslon", "Adobe Caslon Pro", Georgia, "Times New Roman", serif;
  --f-ui: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;

  /* layout */
  --gut-l: max(16px, env(safe-area-inset-left, 0px));
  --gut-r: max(16px, env(safe-area-inset-right, 0px));
  --pad-x: clamp(16px, 5.5vw, 96px);
  --head-h: 60px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
}

@media (min-width: 900px) {
  :root {
    --gut-l: max(clamp(28px, 5.5vw, 104px), env(safe-area-inset-left, 0px));
    --gut-r: max(clamp(24px, 4vw, 72px), env(safe-area-inset-right, 0px));
  }
}

[data-suit="hearts"], [data-suit="diamonds"] { --accent: var(--blood); }
[data-suit="clubs"], [data-suit="spades"] { --accent: var(--bone); }
html[data-suit="clubs"], html[data-suit="spades"] { --line: var(--bone); }

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--stage);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--head-h);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--stage);
  color: var(--bone);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

img { max-width: 100%; height: auto; display: block; }
p, h1, h2, h3, figure, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }

::selection { background: var(--blood); color: var(--bone); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--blood-hi);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}

.skip {
  position: fixed; z-index: 100;
  left: var(--gut-l); top: calc(env(safe-area-inset-top, 0px) + 8px);
  padding: 10px 14px;
  background: var(--bone); color: var(--stage);
  font: 600 12px/1 var(--f-ui); letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

/* ---------- stage, grain ---------- */

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: pan-y;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.91 0 0 0 0 0.89 0 0 0 0 0.84 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- custom scroll: two blood rails ---------- */

/* the native scrollbar goes; scrolling itself stays */
html.view-deck { scrollbar-width: none; }
html.view-deck::-webkit-scrollbar, html.view-deck body::-webkit-scrollbar { display: none; width: 0; height: 0; }

.rail {
  --p: 0;
  --drop-y: 0px;
  --drop-s: 1;
  --drop-stretch: 1;
  position: fixed;
  z-index: 30;
  top: calc(env(safe-area-inset-top, 0px) + var(--head-h) + 14px);
  bottom: calc(env(safe-area-inset-bottom, 0px) + 30px);
  width: 28px;
}
.rail--left { left: env(safe-area-inset-left, 0px); pointer-events: none; }
.rail--right { right: env(safe-area-inset-right, 0px); touch-action: pan-y; cursor: pointer; }
.rail--right:focus-visible { outline: none; }
.rail--right:focus-visible .rail__track { background: rgba(232, 226, 214, 0.45); }

/* the visual line sits 8px in from the edge */
.rail__track, .rail__fill, .rail__ticks { position: absolute; top: 0; bottom: 0; }
.rail--left .rail__track, .rail--left .rail__fill, .rail--left .rail__ticks { left: 8px; }
.rail--right .rail__track, .rail--right .rail__fill, .rail--right .rail__ticks { right: 8px; }
.rail__track { width: 1px; background: rgba(232, 226, 214, 0.16); transition: background-color 0.2s; }
.rail--left .rail__track { margin-left: 1px; }
.rail--right .rail__track { margin-right: 1px; }
.rail__fill {
  width: 3px;
  background: var(--line);
  transform-origin: 50% 0;
  transform: scaleY(var(--p));
  transition: background-color 0.6s ease;
  border-radius: 0 0 2px 2px;
}
.rail__ticks { width: 3px; }
.rail__tick {
  position: absolute;
  width: 9px;
  height: 1px;
  margin-top: -0.5px;
  background: rgba(232, 226, 214, 0.42);
}
.rail--left .rail__tick { left: -3px; }
.rail--right .rail__tick { right: -3px; }

.rail__drop {
  display: block;
  width: 15px;
  height: 22px;
  fill: var(--line);
  transition: fill 0.6s ease;
  filter: drop-shadow(0 0 7px rgba(194, 42, 49, 0.55)) drop-shadow(0 0 2px rgba(194, 42, 49, 0.6));
}
html[data-suit="clubs"] .rail__drop, html[data-suit="spades"] .rail__drop {
  filter: drop-shadow(0 0 7px rgba(232, 226, 214, 0.35)) drop-shadow(0 0 2px rgba(232, 226, 214, 0.4));
}
.rail--left > .rail__drop, .rail__thumb {
  position: absolute;
  top: -4px;
  transform: translateY(var(--drop-y));
}
.rail--left > .rail__drop { left: 2.5px; }
.rail--left > .rail__drop, .rail__thumb .rail__drop {
  transform-origin: 50% 15%;
}
.rail--left > .rail__drop { transform: translateY(var(--drop-y)) scale(var(--drop-s)) scaleY(var(--drop-stretch)); }
.rail__thumb .rail__drop { transform: scale(var(--drop-s)) scaleY(var(--drop-stretch)); }
.rail__thumb {
  right: 2.5px;
  width: 15px;
  height: 22px;
  touch-action: none;
  cursor: grab;
}
/* generous grab area around the tear */
.rail__thumb::before { content: ""; position: absolute; left: -11px; right: -9px; top: -10px; bottom: -10px; }
.rail.is-dragging .rail__thumb { cursor: grabbing; }

.rail__label {
  position: absolute;
  right: 26px;
  top: 0;
  transform: translateY(calc(var(--label-y, 0px) - 50%));
  padding: 4px 8px;
  background: rgba(14, 13, 13, 0.82);
  font: 500 10px/1.2 var(--f-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.rail.show-label .rail__label, .rail--right:hover .rail__label, .rail--right:focus-visible .rail__label { opacity: 1; }

@media (max-width: 899px) {
  .rail { width: 16px; }
  .rail--left .rail__track, .rail--left .rail__fill, .rail--left .rail__ticks { left: 6px; }
  .rail--right .rail__track, .rail--right .rail__fill, .rail--right .rail__ticks { right: 6px; }
  .rail--left > .rail__drop { left: 0.5px; }
  .rail__thumb { right: 0.5px; }
  .rail__label { right: 20px; }
}

/* ---------- header ---------- */

.site-head {
  position: fixed;
  z-index: 40;
  left: 0; right: 0;
  top: env(safe-area-inset-top, 0px);
  height: var(--head-h);
  pointer-events: none;
}
.site-head::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: calc(-1 * env(safe-area-inset-top, 0px));
  bottom: -18px;
  background: linear-gradient(to bottom, rgba(14, 13, 13, 0.92) 0%, rgba(14, 13, 13, 0.6) 60%, rgba(14, 13, 13, 0) 100%);
  pointer-events: none;
}
.site-head__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  padding-left: var(--gut-l);
  padding-right: var(--gut-r);
  pointer-events: auto;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--f-display);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
  color: var(--bone);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark__drop {
  width: 0.62em;
  height: 0.95em;
  fill: var(--blood);
  margin-right: 0.34em;
  flex: none;
  transform: translateY(-0.04em);
}
.site-nav {
  display: flex;
  gap: clamp(16px, 2.4vw, 36px);
  margin-left: auto;
}
.site-nav a {
  position: relative;
  font: 500 11.5px/1 var(--f-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--bone); }
.site-nav a[aria-current="true"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0.18em; bottom: 2px;
  height: 1px;
  background: var(--accent);
}
.site-head .btn { margin-left: 8px; }

/* brand (house) wordmark with the current collection under it */
.brandbar { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.wordmark--brand { text-transform: uppercase; }
.crumb {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  margin: 0;
  font: 500 9.5px/1 var(--f-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
}
.crumb a { color: var(--ash); text-decoration: none; }
.crumb a:hover { color: var(--bone); }
.crumb__sep { color: #5f5a53; }
.crumb [aria-current] { color: var(--bone); }

/* the Bleeding Eye lockup: a drop between the words, as on the box */
.h1-drop {
  display: inline-block;
  width: 0.2em;
  height: 0.3em;
  margin: 0 0.06em 0 0.12em;
  fill: var(--blood);
  vertical-align: 0.12em;
}

@media (max-width: 1099px) {
  .site-nav { display: none; }
  .site-head .btn { margin-left: auto; }
}
@media (max-width: 899px) {
  :root { --head-h: 56px; }
  .wordmark { font-size: 13px; letter-spacing: 0.28em; margin-right: -0.28em; }
  .wordmark__drop { margin-right: 0.28em; }
  .crumb { font-size: 9px; letter-spacing: 0.16em; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--hair-strong);
  border-radius: 0;
  background: transparent;
  color: var(--bone);
  font: 600 11px/1 var(--f-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn--line:hover { border-color: var(--bone); }
.btn--solid { background: var(--blood); border-color: var(--blood); }
.btn--solid:hover { background: var(--blood-hi); border-color: var(--blood-hi); }
.btn--quiet { border-color: transparent; color: var(--ash); padding: 0 10px; }
.btn--quiet:hover { color: var(--bone); }

/* ---------- type ---------- */

.eyebrow, .kicker, .sub, .hint, .specs, .deckbar__kicker, .loader__label, .buy__product {
  font-family: var(--f-ui);
  font-weight: 500;
  font-size: 11.5px;
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}

.display {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.005em;
  color: var(--bone);
}
.display--hero {
  font-size: clamp(3.4rem, 12.5vw, 10.5rem);
  letter-spacing: -0.015em;
  margin: 0.12em 0 0.18em -0.04em;
}
.display--section {
  font-size: clamp(2.3rem, 5.6vw, 4.6rem);
  margin-bottom: 0.32em;
}

.lede {
  font-style: italic;
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  line-height: 1.35;
  max-width: 24em;
}
.intro {
  font-style: italic;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--bone);
  margin-bottom: clamp(20px, 4vh, 44px);
}
.body {
  font-size: clamp(15.5px, 1.15vw, 17.5px);
  line-height: 1.6;
  color: #cfc9bd;
  max-width: 34em;
}
.card-title {
  font-family: var(--f-text);
  font-style: italic;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.02;
  margin: 0.18em 0 0.3em;
  color: var(--bone);
}
.note {
  font-size: clamp(15.5px, 1.15vw, 17.5px);
  line-height: 1.6;
  color: #cfc9bd;
  max-width: 30em;
}
.kicker .glyph, .legend .glyph {
  color: var(--accent);
  font-family: var(--f-text);
  letter-spacing: 0;
  font-size: 1.15em;
  margin-right: 0.25em;
}
.sub { margin-top: -0.2em; margin-bottom: 1.4em; letter-spacing: 0.4em; }

.rule {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--hair);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ash);
  max-width: 30em;
}
.rule strong { color: var(--bone); font-weight: 400; font-style: italic; }

.specs { margin: 18px 0 22px; color: var(--bone); letter-spacing: 0.16em; }

/* ---------- main and scenes ---------- */

main {
  position: relative;
  z-index: 2;
  pointer-events: none;
}
/* only real text blocks and controls catch the pointer */
main .copy, main .ctl, main .fb { pointer-events: auto; }

.scene { position: relative; }

.pin {
  position: relative;
  padding-left: var(--gut-l);
  padding-right: var(--gut-r);
}
.copy { position: relative; }

/* hero */
.scene--hero { min-height: 100vh; min-height: 100svh; }
.scene--hero .pin {
  min-height: 100vh; min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: max(9vh, calc(env(safe-area-inset-bottom, 0px) + 32px));
  padding-top: calc(var(--head-h) + 24px);
}
.copy--hero { max-width: min(46rem, 52vw); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(22px, 4vh, 40px);
  font: 500 11px/1 var(--f-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  padding: 6px 0;
}
.scroll-cue:hover { color: var(--bone); }
.scroll-cue__line {
  position: relative;
  width: 1px; height: 28px;
  background: var(--hair-strong);
  overflow: hidden;
}
.scroll-cue__line::after {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 1px; height: 12px;
  background: var(--blood);
}
@media (prefers-reduced-motion: no-preference) {
  .scroll-cue__line::after { animation: cue 2.4s var(--ease) infinite; }
}
@keyframes cue {
  0% { transform: translateY(-12px); }
  60%, 100% { transform: translateY(28px); }
}

/* unbox */
.copy--unbox {
  font-family: var(--f-display);
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  line-height: 1.2;
  max-width: 19em;
}
@media (min-width: 900px) {
  html.be-3d .copy--unbox { max-width: min(19em, 34vw); }
}
.copy--unbox em { font-family: var(--f-text); font-style: italic; color: var(--ash); font-size: 0.86em; display: block; margin-top: 0.3em; }

/* legend */
.legend {
  margin-top: 26px;
  border-top: 1px solid var(--hair);
  max-width: 22rem;
}
.legend > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--hair);
}
.legend dt { font: 500 12px/1.4 var(--f-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone); }
.legend dd { font-style: italic; color: var(--ash); }

/* deck */
.hint { margin-top: 2px; }
.hint--3d { display: none; }

.deckbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  flex-wrap: wrap;
  padding: 14px 0 0;
  border-top: 1px solid var(--hair-strong);
}
.deckbar__info { min-width: 0; flex: 1 1 18rem; }
.deckbar__kicker { color: var(--ash); }
.deckbar__kicker .glyph { color: var(--accent); }
.deckbar__name {
  font-family: var(--f-text);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.2;
  margin-top: 4px;
}
.deckbar__name em { color: var(--ash); }
.deckbar__note { font-size: 14.5px; line-height: 1.5; color: #cfc9bd; margin-top: 6px; max-width: 44em; }
.deckbar__actions { display: flex; gap: 8px; flex: none; }
.deckbar__actions[hidden] { display: none; }

/* finale: buy panel (checkout happens on Stripe's hosted page) */
.buy {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  max-width: 30rem;
}
.buy__product {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  color: var(--bone);
}
.buy__price {
  font-family: var(--f-text);
  font-size: 1.25rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--bone);
}
.buy__price[hidden] { display: none; }
.buy .specs { margin: 6px 0 16px; color: var(--ash); }
.buy__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn--buy { min-height: 46px; padding: 0 26px; }
.btn--buy[aria-disabled="true"] { cursor: default; }
.btn--buy[aria-disabled="true"]:hover { background: var(--blood); border-color: var(--blood); }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--hair-strong);
  font: 600 9.5px/1 var(--f-ui);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
  white-space: nowrap;
}
.tag[hidden] { display: none; }
.tag--quiet { border-color: var(--hair); color: #6f6a62; min-height: 18px; font-size: 9px; }
.buy__line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--f-ui);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ash);
  max-width: 28rem;
}
.buy__line .lock { flex: none; margin-top: 2px; color: var(--bone); }

/* ---------- views: the collections shelf vs the deck story ---------- */

/* until the deck is chosen, the story, footer and bleed do not exist */
html:not(.view-deck) main,
html:not(.view-deck) .site-foot,
html:not(.view-deck) .rail,
html:not(.view-deck) .deck-only { display: none !important; }
html.view-deck #collections-home { display: none; }

/* the shelf is exactly one screen */
html:not(.view-deck), html:not(.view-deck) body { height: 100%; }
html:not(.view-deck):not(.be-static), html:not(.view-deck):not(.be-static) body { overflow: hidden; }

/* hero copy waits for the engine to finish its move into the story */
html.hero-wait .copy--hero { animation: none; opacity: 0; }
.shelf-item__cap, .shelf-hit { transition: opacity 0.4s var(--ease); }
html.shelf-wait .shelf-item__cap, html.shelf-wait .shelf-hit { opacity: 0; pointer-events: none; transition-duration: 0s; }

.home {
  --live-h: min(42vh, 440px);
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(var(--head-h) + clamp(20px, 5vh, 56px)) var(--gut-r) clamp(28px, 6vh, 64px) var(--gut-l);
  pointer-events: none;
}
.home__head, .shelf-item__cap, .shelf-hit, .shelf-item__media { pointer-events: auto; }
.home__title { margin-bottom: 0.12em; }
.home__line { font-style: italic; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: #cfc9bd; }

.shelf {
  display: flex;
  align-items: flex-end;
  gap: clamp(24px, 4.5vw, 72px);
  margin-top: auto;
  padding-top: clamp(28px, 5vh, 56px);
}
.shelf-item { position: relative; display: flex; flex-direction: column; }
.shelf-item--live { width: calc(var(--live-h) * 0.8); }
.shelf-item__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(232, 226, 214, 0.08);
}
.sealed {
  display: block;
  height: calc(var(--live-h) * 0.78);
  aspect-ratio: 640 / 896;
  border-radius: 6px;
  background: var(--charcoal);
  border: 1px solid rgba(232, 226, 214, 0.42);
  box-shadow: inset 0 0 0 7px var(--charcoal), inset 0 0 0 8px rgba(232, 226, 214, 0.12);
}
.shelf-hit {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: var(--live-h);
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  z-index: 1;
}
.shelf-hit:focus-visible { outline-offset: 6px; }
.shelf-item__cap { margin-top: 18px; max-width: 19rem; }
.shelf-item__name { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.5rem, 2.2vw, 1.9rem); line-height: 1.05; }
.shelf-item__line { margin-top: 6px; font-style: italic; font-size: 15px; line-height: 1.45; color: #cfc9bd; }
.shelf-open { margin-top: 16px; min-height: 44px; padding: 0 20px; }
.shelf-item__status {
  font: 500 11px/1.4 var(--f-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}
.shelf-item__more { display: none; margin-top: 14px; font: 500 11px/1.4 var(--f-ui); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ash); }

@media (max-width: 899px) {
  .home { --live-h: min(46vh, 420px); }
  .shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 9rem)); align-items: end; gap: 28px 16px; }
  .shelf-item--live { grid-column: 1 / -1; width: min(100%, calc(var(--live-h) * 0.8)); }
  .shelf-item--live .shelf-hit { height: auto; aspect-ratio: 4 / 5; }
  .shelf-item--sealed { min-width: 0; }
  .shelf-item--sealed .sealed { height: auto; width: 100%; }
  .shelf-item--sealed .shelf-item__cap { margin-top: 10px; }
}

/* 3D shelf: the engine draws the boxes; the page only adds captions */
html.be-3d:not(.view-deck) .home,
html.be-loading:not(.view-deck) .home { position: fixed; inset: 0; min-height: 0; }
html.be-3d .shelf-item__media, html.be-loading .shelf-item__media { display: none; }
html.be-3d .shelf, html.be-loading .shelf {
  position: absolute;
  left: var(--gut-l); right: var(--gut-r); bottom: clamp(28px, 9vh, 96px);
  justify-content: space-around;
  align-items: flex-start;
  padding: 0;
}
html.be-3d .shelf-item, html.be-loading .shelf-item { width: auto; align-items: center; text-align: center; }
html.be-3d .shelf-item__cap { margin-top: 0; width: 17rem; max-width: calc(100vw - 32px); }
html.be-3d .shelf-hit, html.be-loading .shelf-hit { display: none; }
html.be-3d.shelf-placed .shelf { position: fixed; inset: 0; }
html.be-3d.shelf-placed .shelf-item:not(.is-placed) { display: none; }
html.be-3d.shelf-placed .shelf-item__cap { position: fixed; }
html.be-3d.shelf-placed .shelf-hit { display: block; position: fixed; }
@media (max-width: 899px) {
  html.be-loading .shelf-item--sealed { display: none !important; }
  html.be-3d .shelf, html.be-loading .shelf { display: flex; justify-content: center; }
  html.be-3d .shelf-item--live { flex-basis: auto; }
}

/* On the table: three ad photos, scrolls up over the stage */
.table {
  position: relative;
  z-index: 4;
  background: var(--stage);
  pointer-events: auto;
  border-top: 1px solid var(--hair);
}
.table__inner {
  padding: clamp(72px, 13vh, 150px) var(--gut-r) clamp(72px, 12vh, 140px) var(--gut-l);
}
.table .display--section { margin-bottom: clamp(28px, 5vh, 56px); }
.ads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 32px);
}
.ad figure { margin: 0; }
.ad img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.ad figcaption {
  margin-top: 12px;
  font: 500 11px/1.4 var(--f-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
}
@media (max-width: 720px) {
  .ads {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin-left: calc(-1 * var(--gut-l));
    margin-right: calc(-1 * var(--gut-r));
    padding: 0 var(--gut-r) 8px var(--gut-l);
    scroll-padding-left: var(--gut-l);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ads::-webkit-scrollbar { display: none; }
  .ad { flex: 0 0 80%; scroll-snap-align: start; }
}

.note--second { margin-top: 0.8em; }
.crumb__back {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: var(--ash);
  cursor: pointer;
}
.crumb__back:hover { color: var(--bone); }
.site-foot__back { padding: 0; min-height: 32px; }

/* footer */
.site-foot {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--hair);
  background: var(--stage);
}
.site-foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px var(--gut-r) max(28px, calc(env(safe-area-inset-bottom, 0px) + 20px)) var(--gut-l);
}
.wordmark--foot { font-size: 13px; text-transform: uppercase; }
.site-foot__brand { display: inline-flex; align-items: center; gap: 12px; margin: 0; }
.site-foot__note { font: 500 11px/1 var(--f-ui); letter-spacing: 0.2em; text-transform: uppercase; color: var(--ash); }

/* ---------- reveal (only hidden when JS has opted in) ---------- */

@media (prefers-reduced-motion: no-preference) {
  html.motion .reveal {
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  }
  html.motion .reveal:not(.is-in) {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* =================================================================
   3D MODE (html.be-3d, and while loading: html.be-loading)
   Tall scroll sections, sticky copy, fallback art hidden.
   ================================================================= */

html.be-3d .fb, html.be-loading .fb { display: none; }

html.be-3d .scene--unbox, html.be-loading .scene--unbox { min-height: 200vh; }
html.be-3d .scene--court, html.be-loading .scene--court { min-height: 250vh; }
html.be-3d .scene--deck, html.be-loading .scene--deck { min-height: 300vh; }
html.be-3d .scene--backs, html.be-loading .scene--backs { min-height: 200vh; }
html.be-3d .scene--finale, html.be-loading .scene--finale { min-height: 220vh; }
html.be-3d .step, html.be-loading .step { min-height: 100vh; }

html.be-3d .scene:where(:not(.scene--hero):not(.scene--aces)) > .pin,
html.be-loading .scene:where(:not(.scene--hero):not(.scene--aces)) > .pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
}

html.be-3d .scene--unbox > .pin { align-items: flex-end; padding-bottom: 11vh; }
html.be-3d .scene--finale > .pin { align-items: flex-end; padding-bottom: max(8vh, calc(env(safe-area-inset-bottom, 0px) + 28px)); }

html.be-3d .scene--deck > .pin {
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding-top: calc(var(--head-h) + 26px);
  padding-bottom: max(22px, calc(env(safe-area-inset-bottom, 0px) + 14px));
}
html.be-3d .scene--deck .copy--deckhead { align-self: flex-start; }
html.be-3d .scene--deck .display--section { font-size: clamp(1.9rem, 3.4vw, 2.9rem); margin-bottom: 0.2em; }
html.be-3d .hint--3d { display: block; }
html.be-3d .hint--static { display: none; }
html.be-3d .deckbar { display: flex; }
html.be-3d .deckbar::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 190px;
  z-index: -1;
  background: linear-gradient(to top, rgba(14, 13, 13, 0.85), rgba(14, 13, 13, 0));
  pointer-events: none;
}

/* desktop copy column: left ~40% */
html.be-3d .copy--side, html.be-3d .copy--step, html.be-3d .copy--finale {
  width: min(33vw, 31rem);
}
html.be-3d .copy--hero { max-width: min(44rem, 50vw); }

/* aces: each step is ~100vh of scroll; the active step's copy is held in
   place over the stage (fixed), the others fade out */
html.be-3d .step { position: relative; }
html.be-3d .copy--step {
  position: fixed;
  z-index: 3;
  left: var(--gut-l);
  top: 50%;
  translate: 0 -50%;
  padding-top: calc(var(--head-h) * 0.4);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease), visibility 0s linear 0s;
}
html.be-3d.steps-live .step:not(.is-active) .copy--step {
  opacity: 0;
  transform: translateY(10px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0s linear 0.4s;
}

/* soft scrim to the left of the copy, so it never fights the art */
@media (min-width: 900px) {
  html.be-3d .scene--aces::before,
  html.be-3d .scene--court > .pin::before,
  html.be-3d .scene--backs > .pin::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 50vw;
    background: linear-gradient(to right, rgba(14, 13, 13, 0.55), rgba(14, 13, 13, 0));
    pointer-events: none;
  }
  html.be-3d .scene--aces::before { position: sticky; display: block; height: 100vh; margin-bottom: -100vh; top: 0; }
}

/* narrow 3D: subject in top ~55%, copy in bottom ~45% on a soft dark ground */
@media (max-width: 899px) {
  html.be-3d .scene:not(.scene--hero):not(.scene--aces):not(.scene--deck) > .pin {
    align-items: flex-end;
    padding-bottom: max(26px, calc(env(safe-area-inset-bottom, 0px) + 18px));
  }
  html.be-3d .scene > .pin::after,
  html.be-3d .copy--step::before {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 52%;
    z-index: -1;
    background: linear-gradient(to top, rgba(14, 13, 13, 0.94) 0%, rgba(14, 13, 13, 0.82) 55%, rgba(14, 13, 13, 0) 100%);
    pointer-events: none;
  }
  html.be-3d .copy--step::before {
    left: calc(-1 * var(--gut-l));
    right: calc(-1 * var(--gut-r));
    top: -8rem;
    bottom: -60px;
    height: auto;
    background: linear-gradient(to top, rgba(14, 13, 13, 0.97) 0%, rgba(14, 13, 13, 0.93) calc(100% - 8rem), rgba(14, 13, 13, 0) 100%);
  }
  html.be-3d .scene--hero > .pin::after { height: 46%; }
  html.be-3d .scene--deck > .pin::after { display: none; }

  html.be-3d .copy--side, html.be-3d .copy--step, html.be-3d .copy--finale,
  html.be-3d .copy--hero { width: auto; max-width: 34rem; }

  html.be-3d .copy--step {
    isolation: isolate;
    top: auto;
    translate: none;
    right: var(--gut-r);
    bottom: max(26px, calc(env(safe-area-inset-bottom, 0px) + 18px));
    padding-top: 0;
  }
  html.be-3d .scene--aces .display--section { font-size: 1.9rem; }
  html.be-3d .scene--aces .intro { margin-bottom: 14px; font-size: 1rem; }
  html.be-3d .card-title { font-size: 1.85rem; }
  html.be-3d .note, html.be-3d .body { font-size: 15px; line-height: 1.5; }
  html.be-3d .rule { margin-top: 12px; padding-top: 10px; font-size: 13.5px; }

  html.be-3d .scene--court .display--section,
  html.be-3d .scene--backs .display--section,
  html.be-3d .scene--finale .display--section { font-size: 2.1rem; }
  html.be-3d .sub { margin-bottom: 0.8em; }
  html.be-3d .legend { display: flex; flex-wrap: wrap; gap: 4px 16px; border: 0; margin-top: 14px; }
  html.be-3d .legend > div { border: 0; padding: 0; gap: 6px; }
  html.be-3d .legend dt { font-size: 11px; }
  html.be-3d .legend dd { font-size: 14px; }
  html.be-3d .scene--backs .card-title { font-size: 1.7rem; }
  html.be-3d .buy { margin-top: 12px; padding-top: 12px; }
  html.be-3d .buy .specs { margin: 4px 0 10px; }
  html.be-3d .buy__line { margin-top: 8px; font-size: 12px; }
  html.be-3d .specs { margin: 10px 0 14px; }
  html.be-3d .scene--unbox > .pin { padding-bottom: 9vh; }
  html.be-3d .copy--unbox { font-size: 1.35rem; }

  html.be-3d .scene--deck .display--section { font-size: 1.7rem; }
  html.be-3d .deckbar { gap: 12px; }
  html.be-3d .deckbar__actions { width: 100%; }
  html.be-3d .deckbar__actions .btn { flex: 1; }
}

/* =================================================================
   STATIC MODE (default without JS, html.be-static on failure / ?nogl)
   Real card images in every section.
   ================================================================= */

html:not(.be-3d):not(.be-loading) #stage { display: none; }
html:not(.be-3d):not(.be-loading) main { pointer-events: auto; }

html:not(.be-3d):not(.be-loading) .scene:not(.scene--hero) {
  padding-block: clamp(72px, 14vh, 160px);
}

/* hero */
html:not(.be-3d):not(.be-loading) .scene--hero { overflow: hidden; }
.fb-hero {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 3vw;
  height: min(94vh, 1100px);
  aspect-ratio: 1200 / 1607;
  transform: translateY(-48%);
  pointer-events: none !important;
}
.fb-hero img {
  width: 100%; height: 100%;
  object-fit: cover;
  -webkit-mask-image: radial-gradient(ellipse 52% 50% at 50% 52%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 52% 50% at 50% 52%, #000 58%, transparent 100%);
  filter: saturate(0.9);
}

/* unbox fan */
.fb-unbox {
  display: flex;
  justify-content: flex-start;
  padding-left: calc(var(--gut-l) + 24px);
  padding-right: var(--gut-r);
  margin-top: 48px;
}
.fb-unbox img {
  width: clamp(110px, 16vw, 210px);
  border-radius: 9px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.fb-unbox img:nth-child(1) { transform: rotate(-9deg) translateY(14px); }
.fb-unbox img:nth-child(2) { transform: rotate(0deg); margin-left: -6%; position: relative; z-index: 1; }
.fb-unbox img:nth-child(3) { transform: rotate(9deg) translateY(14px); margin-left: -6%; }

/* card art shared */
.fb-ace img, .fb-back img, .deck-card img, .court-card img {
  border-radius: 3.6% / 2.6%;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.5);
}

@media (min-width: 900px) {
  html:not(.be-3d):not(.be-loading) .scene--court,
  html:not(.be-3d):not(.be-loading) .scene--backs,
  html:not(.be-3d):not(.be-loading) .scene--finale,
  html:not(.be-3d):not(.be-loading) .step {
    display: grid;
    grid-template-columns: minmax(0, 40fr) minmax(0, 60fr);
    align-items: center;
    column-gap: 2vw;
  }
  html:not(.be-3d):not(.be-loading) .step {
    min-height: 92vh;
    padding-left: var(--gut-l);
    padding-right: var(--gut-r);
    padding-block: 6vh;
  }
  html:not(.be-3d):not(.be-loading) .fb-ace,
  html:not(.be-3d):not(.be-loading) .fb-back,
  html:not(.be-3d):not(.be-loading) .fb-finale { justify-self: center; padding-right: var(--gut-r); }
  .fb-ace img, .fb-back img { width: min(26vw, 380px, 58vh); }
  html:not(.be-3d):not(.be-loading) .fb-court { padding-right: var(--gut-r); }
  html:not(.be-3d):not(.be-loading) .fb-unbox { margin-top: 64px; }
}

@media (max-width: 899px) {
  html:not(.be-3d):not(.be-loading) .scene--hero .pin { padding-top: 58vh; padding-top: 58svh; }
  .fb-hero { top: calc(var(--head-h) - 2vh); right: 50%; transform: translateX(50%); height: 64vh; height: 64svh; }
  .copy--hero { max-width: none; }
  html:not(.be-3d):not(.be-loading) .step { padding: 56px var(--gut-r) 56px var(--gut-l); display: flex; flex-direction: column; gap: 30px; }
  .fb-ace img, .fb-back img { width: min(72vw, 320px); }
  html:not(.be-3d):not(.be-loading) .fb-back, html:not(.be-3d):not(.be-loading) .fb-court, html:not(.be-3d):not(.be-loading) .fb-finale {
    margin-top: 36px; padding-left: var(--gut-l); padding-right: var(--gut-r);
  }
  .fb-back img { margin-inline: auto; }
}

/* court grid */
.fb-court {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(8px, 1vw, 14px);
}
@media (max-width: 899px) {
  .fb-court { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.court-card, .deck-card button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 6px;
  transition: transform 0.35s var(--ease);
}
.court-card:hover, .deck-card button:hover { transform: translateY(-4px) rotate(-0.6deg); }
.court-card img, .deck-card img { width: 100%; height: auto; aspect-ratio: 256 / 358; }
.court-card:nth-child(n+4) { } /* ranks repeat per suit */

/* whole deck */
html:not(.be-3d):not(.be-loading) .scene--deck .pin { margin-bottom: 26px; }
.fb-deck { padding-left: var(--gut-l); padding-right: var(--gut-r); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  background: transparent;
  font: 500 11px/1 var(--f-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.chip .glyph { color: var(--accent); font-family: var(--f-text); font-size: 1.2em; letter-spacing: 0; margin-right: 6px; }
.chip:hover { color: var(--bone); border-color: var(--hair-strong); }
.chip[aria-pressed="true"] { color: var(--bone); border-color: var(--bone); }

.deck-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 12px 8px;
}
@media (min-width: 900px) {
  .deck-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 22px 14px; }
}
@media (min-width: 1100px) {
  /* one suit per row: thirteen across */
  .deck-grid { grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 22px clamp(6px, 0.8vw, 14px); }
}
.deck-card[hidden] { display: none; }
.deck-card__cap {
  display: block;
  margin-top: 8px;
  font: 500 9.5px/1.3 var(--f-ui);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  text-align: left;
}
.deck-group {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  font: 500 11.5px/1.3 var(--f-ui);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone);
}
.deck-group:first-child { padding-top: 0; border-top: 0; }
.deck-group .glyph { color: var(--accent); font-family: var(--f-text); font-size: 1.25em; letter-spacing: 0; }
.deck-group em { font-family: var(--f-text); font-style: italic; text-transform: none; letter-spacing: 0; color: var(--ash); font-size: 14px; }
.deck-group[hidden] { display: none; }

/* finale box face */
.boxface {
  width: min(30vw, 400px, 62vh);
  aspect-ratio: 860 / 1204;
  overflow: hidden;
  border-radius: 4px;
  transform: rotate(3deg);
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(232, 226, 214, 0.08);
}
.boxface img {
  width: 139.6%;
  max-width: none;
  margin-left: -36.3%;
  margin-top: -36.3%;
}
@media (max-width: 899px) {
  .boxface { width: min(70vw, 300px); margin-inline: auto; }
}

/* ---------- inspect dialog (static deck) ---------- */

.inspect {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--bone);
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: auto;
}
.inspect::backdrop { background: rgba(8, 7, 7, 0.96); }
.inspect[open] { background: rgba(8, 7, 7, 0.6); }
.inspect__inner {
  min-height: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 26rem);
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 5vw, 72px);
  padding: max(24px, env(safe-area-inset-top, 0px)) var(--gut-r) max(24px, env(safe-area-inset-bottom, 0px)) var(--gut-l);
}
.inspect__card {
  position: relative;
  width: min(36vw, 420px, calc((100svh - 64px) * 0.714));
  aspect-ratio: 640 / 896;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease);
  perspective: none;
}
.inspect__card.is-flipped { transform: rotateY(180deg); }
.inspect__face {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 3.6% / 2.6%;
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.95);
}
.inspect__face--back { transform: rotateY(180deg); }
.inspect__name { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; margin: 10px 0 6px; }
.inspect .card-title { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
.inspect__actions { display: flex; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.inspect__nav { display: flex; gap: 4px; margin-top: 14px; margin-left: -10px; }
@media (max-width: 720px) {
  .inspect__inner { grid-template-columns: minmax(0, 1fr); justify-items: start; align-content: center; gap: 22px; }
  .inspect__card { width: min(62vw, 280px, calc((100svh - 330px) * 0.714)); min-width: 160px; }
  .inspect__name { font-size: 1.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .inspect__card { transition: none; }
}

/* ---------- loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: flex-end;
  background: var(--stage);
  padding: 0 var(--gut-r) max(12vh, 48px) var(--gut-l);
  transition: opacity 0.7s var(--ease), visibility 0s linear 0.7s;
}
html.be-loading .loader, .loader.is-leaving { display: flex; }
.loader.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { width: min(28rem, 100%); }
.wordmark--loader { font-size: clamp(15px, 2vw, 20px); }
.loader__track { display: block; position: relative; height: 1px; margin: 22px 0 12px; background: var(--hair); overflow: hidden; }
.loader__fill { position: absolute; inset: 0; background: var(--blood); transform-origin: 0 50%; transform: scaleX(0.04); transition: transform 0.3s ease; }

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

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

/* hero copy rises once on load (ends visible even if animations are off) */
@media (prefers-reduced-motion: no-preference) {
  .copy--hero { animation: rise 1.1s var(--ease) 0.1s both; }
  html.be-3d .copy--hero { animation-delay: 0.2s; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* header scrim: keeps the header legible when opaque sections scroll beneath it */
html.view-deck .site-head { background: linear-gradient(to bottom, var(--stage) 0%, rgba(14, 13, 13, 0.86) 62%, rgba(14, 13, 13, 0) 100%); }

/* deck scene: the helix must receive the pointer everywhere except real controls */
html.be-3d .scene--deck .copy--deckhead,
html.be-3d .scene--deck .deckbar { pointer-events: none; }
html.be-3d .scene--deck .deckbar button { pointer-events: auto; }

/* owner round 5: single scroll rail on the right only */
.rail--left { display: none !important; }

/* brand mark (Cut Card logo) beside the wordmark */
.brandmark { width: 30px; height: 30px; flex: none; color: var(--bone); margin: -8px 0; }
.brandmark .ac { color: var(--blood); }
.wordmark--brand, .wordmark--foot { gap: 0.75em; }
@media (max-width: 720px) { .brandmark { width: 26px; height: 26px; } }
@media (max-width: 720px) {
  /* deck view on phones: the mark stands for the brand so the Buy button has room */
  html.view-deck .wordmark--brand [data-brand-name] { display: none; }
  html.view-deck .brandbar { flex-direction: row; align-items: center; gap: 10px; }
}

/* ---------- legal links (footer, shelf) and the buy-panel terms line ---------- */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 18px;
  font: 500 10.5px/1 var(--f-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.legal-links a, .legal-links button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ash);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  cursor: pointer;
}
.legal-links a:hover, .legal-links button:hover { color: var(--bone); }
.site-foot__legal { flex-basis: 100%; padding-top: 14px; border-top: 1px solid var(--hair); }
.home__legal {
  margin-top: auto;
  padding-top: 16px;
  pointer-events: auto;
  position: relative;
  z-index: 3;
}
@media (min-width: 900px) {
  /* wide shelf: bottom-right corner, clear of the live collection's caption */
  html:not(.be-static) .home__legal { position: fixed; right: var(--gut-r); bottom: max(14px, env(safe-area-inset-bottom, 0px)); margin: 0; padding: 0; justify-content: flex-end; }
}
@media (max-width: 899px) {
  .home__legal { gap: 2px 14px; letter-spacing: 0.12em; }
}
html.cc-open .home__legal { visibility: hidden; }
.buy__terms {
  margin-top: 8px;
  font: 400 11.5px/1.45 var(--f-ui);
  color: var(--ash);
  max-width: 28rem;
}
.buy__terms a { color: var(--bone); text-decoration: underline; text-decoration-color: var(--hair-strong); text-underline-offset: 2px; }
.buy__terms a:hover { text-decoration-color: var(--bone); }
@media (max-width: 899px) {
  html.be-3d .buy__terms { margin-top: 6px; font-size: 11px; }
}

/* final logo: tilted aces, bone front card + blood back card */
.brandmark { width: 34px; height: 34px; margin: -10px 0; color: var(--bone); }
.brandmark .ac { fill: var(--blood); color: var(--blood); }
@media (max-width: 720px) { .brandmark { width: 30px; height: 30px; } }

/* ---------- round 12 fixes ---------- */
/* focus ring only while the keyboard is in use; headings never show one */
html:not(.kbd) :focus-visible { outline: none; }
h1:focus, h1:focus-visible, h2:focus, h2:focus-visible, [tabindex="-1"]:focus-visible { outline: none; }

/* header: the mark sits to the left of the name + breadcrumb instead of overlapping them */
.brandbar { position: relative; padding-left: 48px; min-height: 34px; justify-content: center; gap: 7px; }
.wordmark--brand .brandmark { position: absolute; left: 0; top: 50%; margin: 0; transform: translateY(-50%); }
@media (max-width: 720px) {
  .brandbar { padding-left: 40px; min-height: 30px; }
  html.view-deck .brandbar { flex-direction: column; align-items: flex-start; gap: 0; }
}

/* shelf captions are positioned by their centre, so width changes cannot push them off the box */
html.be-3d.shelf-placed .shelf-item.is-placed .shelf-item__cap { transform: translateX(-50%); text-align: center; }

/* round 13: the full ace logo (white front card, red back card), larger in the header */
.brandmark { width: 46px; height: 46px; color: #ffffff; }
.brandmark .ac { fill: var(--blood); }
.brandbar { padding-left: 58px; min-height: 46px; }
.wordmark--foot .brandmark { margin: -14px 0; }
@media (max-width: 720px) {
  .brandmark { width: 40px; height: 40px; }
  .brandbar { padding-left: 50px; min-height: 40px; }
}

/* ---------- collections carousel ---------- */
/* one deck at the centre, the others behind it to either side; swipe, drag, wheel, arrows or dots */
.shelf-item--sealed .shelf-item__name, .shelf-item--sealed .shelf-item__line { display: none; }
html.be-3d .shelf-item--sealed .shelf-item__name, html.be-3d .shelf-item--sealed .shelf-item__line { display: block; }
html.be-3d .shelf-item--sealed .shelf-item__status { display: none; }
html.be-3d .shelf-item--sealed .shelf-item__name { color: #cfc9bd; }
html.be-3d.shelf-placed .shelf-item.is-placed:not(.is-current) .shelf-item__cap { opacity: 0; visibility: hidden; pointer-events: none; transition: none; }
html.be-3d.shelf-placed .shelf-item.is-current .shelf-item__cap { animation: capIn 0.45s var(--ease) both; }
@keyframes capIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html.be-3d.shelf-placed .shelf-item.is-current .shelf-item__cap { animation: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.shelf-nav { display: none; }
html.be-3d.shelf-placed .shelf-nav {
  display: flex; align-items: center; gap: 6px;
  position: fixed; left: 50%; transform: translateX(-50%);
  z-index: 3; pointer-events: auto;
  transition: opacity 0.4s var(--ease);
}
html.shelf-wait .shelf-nav { opacity: 0; pointer-events: none; transition-duration: 0s; }
.shelf-nav__btn {
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--bone); cursor: pointer;
  transition: background 0.2s var(--ease), opacity 0.2s var(--ease);
}
.shelf-nav__btn svg { width: 22px; height: 22px; }
.shelf-nav__btn:hover { background: rgba(232, 226, 214, 0.08); }
.shelf-nav__btn:disabled { opacity: 0.25; cursor: default; background: transparent; }
.shelf-nav__dots { display: flex; align-items: center; }
.shelf-nav__dot { width: 26px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.shelf-nav__dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgba(232, 226, 214, 0.3); transition: background 0.25s var(--ease), transform 0.25s var(--ease); }
.shelf-nav__dot.is-on::before { background: var(--blood); transform: scale(1.35); }
#stage { touch-action: pan-y; }
/* the engine handles taps and swipes on the boxes; the button stays for keyboard and screen readers */
html.be-3d.shelf-placed .shelf-hit { pointer-events: none; }
html.be-3d.shelf-placed .shelf-item:not(.is-current) .shelf-hit { display: none; }

/* ---------- phone pass ---------- */
@media (max-width: 899px) {
  /* section names beside the scroll rail sat on top of the art and the copy */
  .rail__label { display: none !important; }
}
@media (max-width: 720px) {
  /* header: a single back link on the left, a compact buy button on the right; nothing overlaps */
  html.view-deck .crumb__sep, html.view-deck .crumb [aria-current] { display: none; }
  html.view-deck .crumb__back::before { content: "\2039\00a0"; font-size: 1.35em; line-height: 0; position: relative; top: 0.06em; }
  html.view-deck .crumb { font-size: 10px; letter-spacing: 0.18em; }
  html.view-deck .crumb__back { min-height: 40px; padding: 0 6px 0 0; }
  .site-head .btn--solid { min-height: 40px; padding: 0 14px; font-size: 11px; letter-spacing: 0.14em; white-space: nowrap; }
  .site-head__inner { gap: 10px; }
}

/* ---------- phone pass 2: nothing smaller than 12.5px, larger body copy ---------- */
@media (max-width: 720px) {
  .eyebrow, .kicker, .sub, .hint, .specs, .deckbar__kicker, .loader__label, .buy__product { font-size: 13px; letter-spacing: 0.14em; }
  .sub { letter-spacing: 0.34em; }
  .lede { font-size: 1.32rem; line-height: 1.3; }
  .intro { font-size: 1.12rem; }
  .body, .note { font-size: 17px; line-height: 1.5; }
  .rule { font-size: 15.5px; line-height: 1.5; }
  .legend dt { font-size: 13px; }
  .legend dd { font-size: 17px; }
  .btn { font-size: 13px; letter-spacing: 0.14em; }
  .site-head .btn--solid { font-size: 12.5px; min-height: 42px; padding: 0 14px; }
  html.view-deck .crumb { font-size: 12.5px; letter-spacing: 0.14em; }
  .scroll-cue { font-size: 13px; }
  .legal-links a, .legal-links button { font-size: 12.5px; }
  .buy__terms, html.be-3d .buy__terms { font-size: 12.5px; line-height: 1.5; }
  .buy__line, .buy__note { font-size: 13px; }
  .ads figcaption { font-size: 13px; }
  .home__line { font-size: 1.2rem; }
  .shelf-item__name { font-size: 1.8rem; }
  .shelf-item__line { font-size: 17px; }
  .shelf-open { min-height: 48px; padding: 0 24px; }
  .deckbar__name { font-size: 1.5rem; }
  .wordmark--brand span { font-size: 14px; }
}
/* short phones: keep the last screen's text clear of the box */
@media (max-width: 720px) and (max-height: 720px) {
  .copy--finale .body { display: none; }
  .shelf-item__line { font-size: 15.5px; }
  .shelf-item__name { font-size: 1.55rem; }
  .home__legal { padding-top: 8px; }
}

/* ---------- back from checkout ---------- */
.thanks {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  display: flex; justify-content: center; pointer-events: none;
}
.thanks[hidden] { display: none; }
.thanks__inner {
  pointer-events: auto; width: min(100%, 34rem);
  background: #171515; border: 1px solid var(--hair-strong); border-top: 2px solid var(--blood);
  padding: 20px 22px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}
.thanks__title { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.1; color: var(--bone); }
.thanks__line { margin-top: 8px; font-size: 16px; line-height: 1.5; color: #cfc9bd; }
.thanks__line a { color: var(--bone); text-underline-offset: 2px; }
.thanks__close { margin-top: 14px; min-height: 44px; padding: 0 20px; }

/* ---------- paged swiping on touch screens ---------- */
/* while a swipe carries the stage to the next scene the text is hidden, then the new text fades in */
html.be-3d.paged #main .copy, html.be-3d.paged #main .deckbar { transition: opacity 0.45s var(--ease) 0.04s; }
html.be-3d.paging #main .copy, html.be-3d.paging #main .deckbar {
  opacity: 0 !important; transition: opacity 0.14s linear !important;
}
html.be-3d.paged.view-deck, html.be-3d.paged.view-deck body { overscroll-behavior-y: none; }

/* ---------- phones only: scene text is fixed over the stage and only fades ---------- */
/* Desktop keeps its original scrolling text and animations untouched. */
@media (max-width: 899px) {
  html.be-3d .scene > .pin {
    position: fixed; top: 0; left: 0; right: 0;
    height: 100vh; height: 100svh; min-height: 0;
    z-index: 2;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
  }
  html.be-3d .scene.is-on > .pin {
    opacity: 1; visibility: visible;
    transition: opacity 0.5s var(--ease) 0.14s, visibility 0s linear 0s;
  }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  html.be-3d .scene > .pin, html.be-3d .scene.is-on > .pin { transition: none; }
}
