/* ==================================================================
   wenomechainsama.com — "Maya in pieces"
   Layout after species-in-pieces.com, on a white page.
================================================================== */

@property --accent {
  syntax: '<color>';
  inherits: true;
  initial-value: #bf8d58;
}

@property --frame {
  syntax: '<length>';
  inherits: true;
  initial-value: 12px;
}

:root {
  transition: --accent .6s, --frame var(--frame-dur, .8s) var(--frame-ease, ease);
  --paper: #ffffff;
  --edge: #ffffff;
  --ink: #2d2d2d;
  --ink-soft: #6f655b;
  --slate: #2f3b3b;
  --accent: #bf8d58;
  --accent-ink: #ffffff;

  /* photo slot: placeholder clips are 672 × 992 */
  --ratio: 0.6774;
  --ph: min(60vh, 600px);
  --pw: calc(var(--ph) * var(--ratio));

  --gutter: 16px;
  --frame: 12px;

  /* one sans-serif family; titles use its condensed width */
  --f-title: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-round: var(--f-title);
  --f-body: var(--f-title);
  --line: #ece7e1;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--edge);
  color: var(--ink);
  font-family: var(--f-body);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
.defs { position: absolute; width: 0; height: 0; }

/* fan art collage around the page edge (after tiger.exposed) */
.collage { position: fixed; inset: 0; visibility: hidden; }
.collage.is-on { visibility: visible; }
.fan {
  position: absolute;
  padding: 5px;
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 6px 18px -8px rgba(40, 30, 20, .45);
  transition: translate .35s cubic-bezier(.34,1.56,.64,1), scale .35s cubic-bezier(.34,1.56,.64,1);
}
.fan img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 1px; }
.fan { cursor: zoom-in; }
.fan:hover { translate: 0 -8px; scale: 1.08; z-index: 99 !important; }

/* popped-up fan art: no frame, just the picture lifted off the page */
.fan-pop {
  position: fixed;
  z-index: 30;
  transform-origin: 50% 50%;
  will-change: transform;
  cursor: zoom-out;
}
.fan-pop img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
  box-shadow: 0 50px 90px -40px rgba(30, 20, 10, .5);
  transition: transform .4s cubic-bezier(.2, 0, 0, 1);
}

/* white page with a torn edge */
.frame-bg {
  position: fixed;
  inset: var(--frame);
  background: var(--paper);
  border-radius: 6px;
  filter: url(#rough);
}

.app {
  position: fixed;
  inset: var(--frame);
  overflow: hidden;
}

/* ---------------- top bar ---------------- */
.topbar {
  position: absolute;
  top: 18px; left: 28px; right: 28px;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 5;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.wordmark {
  font-family: var(--f-round);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--ink);
}
.menu-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-title);
  font-size: 18px; letter-spacing: .12em;
  padding: 8px 4px;
}
.menu-btn__lines { display: grid; gap: 5px; width: 22px; }
.menu-btn__lines i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.menu-btn__lines i:last-child { width: 70%; margin-left: auto; }
.menu-btn:hover .menu-btn__lines i:last-child { transform: scaleX(1.43) translateX(-15%); }

/* ---------------- stage ---------------- */
.stage { position: absolute; inset: 0; touch-action: none; }
.story-scroll { touch-action: pan-y; }

/* layout positions — FLIP animates between these, so no base transforms here */
.photo-slot {
  position: absolute;
  width: var(--pw);
  height: var(--ph);
  left: calc(50% - var(--pw) / 2);
  top: 6vh;
  z-index: 1;
  transform-origin: 0 0;
}
.is-story .photo-slot {
  left: calc(27% - var(--pw) / 2);
  top: calc(50% - var(--ph) / 2 - 2vh);
}

.photo-hop, .photo-float, .photo-squash { position: absolute; inset: 0; }
/* the photo layers stack normally and the group melts into the white page as one */
.photo-float { animation: breathe 5.2s ease-in-out infinite; mix-blend-mode: multiply; isolation: isolate; }
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-5px) scale(1.008); }
}
.photo-squash { transform-origin: 50% 85%; }

.media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.media--clip, .media--loop { opacity: 0; }
.media--loop { transition: opacity .5s; }
.media.is-on { opacity: 1; }


/* ---------------- title ---------------- */
.title-anchor {
  position: absolute;
  left: 0; right: 0;
  top: calc(6vh + var(--ph) + 4.5vh);
  display: flex; flex-direction: column; align-items: center;
  z-index: 2;
  pointer-events: none;
}
.title-anchor > * { pointer-events: auto; }
.is-story .title-anchor {
  left: 50%; right: max(9%, 190px);
  top: 11vh;
  align-items: flex-start;
}

.title-block {
  display: inline-flex;
  align-items: center;
  gap: clamp(10px, 1.4vw, 20px);
  transform-origin: 0 0;
}
.piece {
  display: grid;
  justify-items: end;
  padding-right: clamp(10px, 1.2vw, 18px);
  border-right: 3px solid var(--ink);
  line-height: .9;
}
.piece__label {
  font-family: var(--f-title);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--ink-soft);
}
.piece__num {
  display: block;
  overflow: hidden;
  font-family: var(--f-title);
  font-size: clamp(34px, 4.4vw, 56px);
  color: var(--accent);
  transition: color .6s;
}
.piece__num span { display: inline-block; }

.title {
  margin: 0;
  font-family: var(--f-title);
  font-weight: 400;
  font-size: clamp(44px, 7.4vw, 112px);
  line-height: .9;
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--ink);
  padding-top: .08em;
}
.is-story .title { font-size: clamp(40px, 4.6vw, 76px); }
.is-story .piece__num { font-size: clamp(30px, 3vw, 44px); }
.title .ch { display: inline-block; will-change: transform; }
.title .sp { display: inline-block; width: .26em; }

.title-tools { display: flex; gap: 10px; }
.is-story .title-tools { display: none; }
.dot-btn {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--slate);
  color: #fff;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background-color .3s;
}
.dot-btn:hover { transform: scale(1.1) rotate(-6deg); background: var(--accent); }
.dot-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.subtitle {
  margin: 14px 0 0;
  font-family: var(--f-round);
  font-weight: 500;
  font-size: clamp(13px, 1.2vw, 16px);
  letter-spacing: .06em;
  color: var(--ink-soft);
  min-height: 1.4em;
}
.subtitle.tbd::before {
  content: 'TBD';
  font-family: var(--f-title);
  letter-spacing: .14em;
  font-size: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 99px;
  padding: 3px 9px 2px;
  margin-right: 10px;
  vertical-align: 2px;
}
.is-story .subtitle { display: none; }

/* ---------------- story panel ---------------- */
.story {
  position: absolute;
  left: 50%; right: max(9%, 190px);
  top: calc(11vh + clamp(48px, 5.6vw, 92px));
  bottom: 13vh;
  z-index: 2;
  visibility: hidden;
}
.is-story .story { visibility: visible; }
.story-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 18px 40px 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 36px), transparent);
          mask-image: linear-gradient(to bottom, transparent 0, #000 18px, #000 calc(100% - 36px), transparent);
}
.story-scroll > * { max-width: 620px; }

.s-item { will-change: transform, opacity; }
.story h2 {
  font-family: var(--f-round);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
  margin: 0 0 14px;
}
.story h3 { font-family: var(--f-round); font-weight: 600; font-size: 20px; margin: 0 0 4px; }
.story p { font-size: clamp(15px, 1.12vw, 17px); line-height: 1.6; margin: 0 0 14px; color: #3b3632; }
.kicker {
  font-family: var(--f-title) !important;
  font-size: 15px !important;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent) !important;
  margin-bottom: 6px !important;
  transition: color .6s;
}

.chips { list-style: none; padding: 0; margin: 4px 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-family: var(--f-round); font-weight: 500;
  font-size: 14px;
  padding: 6px 13px;
  border-radius: 99px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, white);
  color: color-mix(in srgb, var(--accent) 70%, black);
}
.chips--sm { margin: 6px 0 10px; }
.chips--sm li { font-size: 12px; padding: 4px 10px; }

.links { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center;
  font-family: var(--f-title);
  font-size: 16px; letter-spacing: .1em;
  padding: 11px 18px 9px;
  border-radius: 99px;
  background: var(--slate);
  color: #fff;
  text-decoration: none;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background-color .3s;
}
.btn:hover { transform: translateY(-2px) scale(1.04); background: var(--accent); }
.btn--ghost { background: transparent; color: var(--slate); box-shadow: inset 0 0 0 2px var(--slate); }
.btn--ghost:hover { color: #fff; }

.meme {
  display: grid; grid-template-columns: 58px 1fr; gap: 16px;
  padding: 18px 20px 14px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.meme__flag {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  font-family: var(--f-title);
  font-size: 15px;
  letter-spacing: .08em;
  transform: rotate(-8deg);
}
.meme__song { font-style: italic; color: var(--ink-soft) !important; margin: 0 !important; font-size: 14px !important; }
.more { font-family: var(--f-title); letter-spacing: .1em; text-decoration: none; color: var(--accent); }

.quote {
  margin: 0 0 14px;
  padding: 20px 22px 16px;
  border-radius: 22px 22px 22px 6px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  position: relative;
}
.quote--alt { border-radius: 22px 22px 6px 22px; margin-left: 28px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 45%, white); }
.quote p { font-family: var(--f-round); font-weight: 500; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.45; margin: 0 0 8px; color: var(--ink); }
.quote cite { font-style: normal; font-size: 13px; color: var(--ink-soft); }
.quote cite::before { content: '— '; }

.vcard { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: end; }
.vcard__frame {
  position: relative;
  height: min(54vh, 520px);
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 40px -18px rgba(40, 30, 20, .35);
}
.vcard__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcard__play {
  position: absolute; right: 14px; bottom: 14px;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.vcard__play:hover { transform: scale(1.12); }
.vcard__play svg { width: 22px; height: 22px; fill: currentColor; }
.vcard.is-sound .vcard__play { opacity: 0; pointer-events: none; }
.vcard figcaption { font-family: var(--f-round); font-weight: 600; font-size: clamp(20px, 2vw, 28px); line-height: 1.15; padding-bottom: 8px; max-width: 14ch; }
.vcard figcaption small { display: block; font-family: var(--f-title); font-weight: 400; font-size: 14px; letter-spacing: .14em; color: var(--accent); margin-bottom: 6px; }

/* kinetic typing headline (Projects) */
.kinetic {
  position: relative;
  display: inline-grid;
  padding: 2px 0 4px 26px;
  margin: 8px 0 26px;
  transform-origin: 0 60%;
}
.kinetic__bar {
  position: absolute;
  left: 0; top: 4px; bottom: 4px;
  width: 12px;
  background: var(--ink);
  transform-origin: 50% 100%;
  animation: k-blink 1s steps(1) infinite;
}
@keyframes k-blink { 50% { opacity: .15; } }
.kinetic__lead {
  font-family: var(--f-round); font-weight: 600;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
  min-height: 1.15em;
}
.kinetic__word {
  font-family: var(--f-round); font-weight: 600;
  font-size: clamp(42px, 4.8vw, 72px);
  line-height: 1;
  min-height: 1em;
  color: var(--accent);
}
.kinetic .k { display: inline-block; white-space: pre; }

/* toy box (Play) */
.toys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 6px 0 18px; max-width: 460px; }
.toy {
  position: relative;
  display: grid; justify-items: center; gap: 2px;
  padding: 14px 10px 12px;
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .25s, translate .35s cubic-bezier(.34,1.56,.64,1);
  -webkit-tap-highlight-color: transparent;
}
.toy:hover { translate: 0 -4px; box-shadow: inset 0 0 0 2px var(--accent); }
.toy svg { width: min(120px, 26vw); height: auto; overflow: visible; }
.toy__name { font-weight: 700; font-size: 15px; }
.toy kbd {
  position: absolute; top: 10px; right: 12px;
  font: 700 11px/1 var(--f-title);
  padding: 4px 6px 3px;
  border-radius: 6px;
  color: var(--ink-soft);
  box-shadow: inset 0 0 0 1px var(--line);
}
.toys-hint { font-size: 14px !important; color: var(--ink-soft) !important; }

/* reveal game (Who's hiding?): Maya steps aside and the board takes the whole stage */
.photo-slot { transition: opacity .45s, visibility 0s; }
.no-maya .photo-slot { opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }

/* heading sits on the title row */
.is-story.no-maya .title-anchor {
  left: 7%; right: max(9%, 190px);
  flex-direction: row; align-items: center; gap: 28px;
}
.is-story.no-maya .subtitle {
  display: block;
  margin: 0;
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--ink);
}
.is-story.no-maya .story { left: 7%; right: max(9%, 190px); top: calc(11vh + clamp(52px, 5.4vw, 88px)); bottom: 10vh; }
.no-maya .story-scroll { padding: 0; overflow: hidden; -webkit-mask-image: none; mask-image: none; }
.no-maya .story-scroll > * { max-width: none; }

.reveal { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.reveal__stage { position: relative; }
.reveal__board, .reveal__photo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.reveal__board { touch-action: none; cursor: crosshair; }
.reveal__photo { pointer-events: none; }
.reveal__photo[hidden], .reveal__done[hidden] { display: none; }
.reveal__done {
  position: absolute; left: 50%; bottom: 14px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
  margin: 0 !important;
  padding: 6px 6px 6px 18px;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 12px 30px -14px rgba(40, 30, 20, .4);
  font-weight: 800;
  white-space: nowrap;
  color: var(--ink) !important;
}

.fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 15; }

.stickers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 18px; }
.stickers img { width: 100%; aspect-ratio: 1; object-fit: contain; transition: transform .35s cubic-bezier(.34,1.56,.64,1); }
.stickers img:hover { transform: scale(1.18) rotate(-8deg); }
.packs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pack {
  display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  text-decoration: none;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.pack:hover { transform: translateY(-3px) rotate(-1deg); }
.pack img { width: 56px; height: 56px; object-fit: contain; }
.pack b { display: block; font-family: var(--f-round); font-weight: 600; font-size: 17px; }
.pack small { display: block; font-size: 12px; color: var(--ink-soft); line-height: 1.3; }
.pack em { display: inline-block; margin-top: 6px; font-style: normal; font-family: var(--f-title); letter-spacing: .1em; color: var(--accent); }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 18px; }
.gallery__item { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: block; }
.gallery__item img, .gallery__item video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.2,0,0,1); }
.gallery__item:hover img { transform: scale(1.08); }

/* ---------------- rails ---------------- */
.rail {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  z-index: 4;
}
.rail--left { left: 34px; }
.rail--right { right: 34px; gap: 18px; }

.ring-btn {
  position: relative;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  color: var(--slate);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.ring-btn::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 4px solid var(--slate);
  filter: url(#rough-ring);
}
.ring-btn:hover { transform: scale(1.1); }
.ring-btn:active { transform: scale(.92); }
.ring-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ring-btn svg.fill { fill: currentColor; stroke: none; }
.ring-btn[disabled] { opacity: .25; pointer-events: none; }
#soundBtn .snd-on { display: none; }
#soundBtn[aria-pressed="true"] .snd-on { display: block; }
#soundBtn[aria-pressed="true"] .snd-off { display: none; }

/* up / down: black paw prints with a small arrow in the pad */
.paw-btn {
  width: 62px; height: 62px;
  display: grid; place-items: center;
  color: #161616;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.paw-btn svg { width: 100%; height: 100%; fill: currentColor; overflow: visible; }
.paw-btn .paw__arrow { fill: #fff; }
.paw-btn--down svg { transform: rotate(180deg); }
.paw-btn--up:hover { transform: translateY(-4px) rotate(-8deg); }
.paw-btn--down:hover { transform: translateY(4px) rotate(8deg); }
.paw-btn:active { transform: scale(.88); }
.paw-btn[disabled] { opacity: .25; pointer-events: none; }

.cta {
  width: 118px; height: 118px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: grid; place-content: center;
  text-align: center;
  line-height: .95;
  font-family: var(--f-title);
  transition: background-color .6s;
  animation: cta-breathe 3.6s ease-in-out infinite;
}
.cta[hidden] { display: grid; visibility: hidden; }
@keyframes cta-breathe {
  0%, 100% { scale: 1; }
  50%      { scale: 1.045; }
}
.cta__small { font-size: 16px; letter-spacing: .12em; opacity: .85; }
.cta__big { font-size: 25px; letter-spacing: .04em; }

.counter {
  font-family: var(--f-title);
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--ink-soft);
}

/* ---------------- footer ---------------- */
.footnav {
  position: absolute;
  left: 0; right: 0; bottom: 22px;
  display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 14px;
  font-family: var(--f-title);
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  z-index: 4;
}
.footnav button, .footnav a { text-decoration: none; transition: color .2s; }
.footnav button:hover, .footnav a:hover { color: var(--ink); }
.footnav i { font-style: normal; opacity: .5; }
.footnav .pill {
  margin-left: 6px;
  padding: 8px 18px 6px;
  border-radius: 99px;
  background: var(--slate);
  color: #fff;
}
.footnav .pill:hover { background: var(--accent); color: #fff; }

/* ---------------- overlays ---------------- */
.overlay {
  position: fixed;
  inset: var(--frame);
  z-index: 20;
  background: #fff;
  border-radius: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.overlay[hidden] { display: none; }
.close-btn {
  position: sticky; top: 22px;
  float: right; margin: 22px 28px 0 0;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--slate); color: #fff;
  display: grid; place-items: center;
  z-index: 2;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), background-color .3s;
}
.close-btn:hover { transform: rotate(90deg) scale(1.06); background: var(--accent); }
.close-btn svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; fill: none; }

.grid-head {
  font-family: var(--f-title);
  font-size: clamp(40px, 6vw, 84px);
  line-height: 1;
  padding: 40px 0 0 6vw;
}
.grid-head span { color: var(--accent); }
.grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 22px 18px;
  padding: 34px 6vw 70px;
}
.grid-card { text-align: left; display: grid; gap: 8px; }
.grid-card__img {
  aspect-ratio: .78;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
  display: grid; place-items: end center;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.grid-card__img img { width: 92%; mix-blend-mode: multiply; }
.grid-card:hover .grid-card__img { transform: translateY(-4px) rotate(-1.5deg); }
.grid-card.is-current .grid-card__img { box-shadow: inset 0 0 0 3px var(--c); }
.grid-card__meta { font-family: var(--f-title); letter-spacing: .08em; display: flex; gap: 10px; align-items: baseline; }
.grid-card__meta b { font-weight: 400; color: var(--c); font-size: 22px; }
.grid-card__meta span { font-size: 20px; }
.grid-card__meta small { display: block; font-size: 11px; letter-spacing: .16em; color: var(--ink-soft); }

.menu-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 6vw;
  padding: 10vh 8vw 8vh;
  min-height: 100%;
  align-items: center;
}
.menu-list { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.menu-list li { overflow: hidden; }
.menu-list button {
  display: flex; gap: 18px; align-items: baseline;
  font-family: var(--f-title);
  font-size: clamp(30px, 4.4vw, 58px);
  line-height: 1.02;
  text-align: left;
  transition: color .2s, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.menu-list button small { font-size: .38em; letter-spacing: .1em; color: var(--ink-soft); width: 2.4em; }
.menu-list button:hover { color: var(--accent); transform: translateX(10px); }
.menu-list .is-current button { color: var(--accent); }
.menu-side { display: grid; gap: 14px; align-content: center; }
.menu-side__big {
  font-family: var(--f-round); font-weight: 600;
  font-size: clamp(22px, 2.2vw, 30px);
  text-align: left;
  padding: 20px 24px;
  border-radius: 22px;
  background: var(--slate); color: #fff;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), background-color .3s;
}
.menu-side__big:hover { transform: rotate(-1.5deg) scale(1.03); background: var(--accent); }
.menu-side__link { font-family: var(--f-title); font-size: 18px; letter-spacing: .1em; text-decoration: none; color: var(--ink-soft); }
.menu-side__link:hover { color: var(--ink); }

.doc {
  max-width: 680px;
  margin: 0 auto;
  padding: 12vh 24px 12vh;
}
.doc h2 { font-family: var(--f-title); font-weight: 400; font-size: clamp(40px, 5vw, 68px); line-height: .95; margin: 0 0 22px; }
.doc h3 { font-family: var(--f-round); font-weight: 600; font-size: 24px; margin: 48px 0 10px; }
.doc p { font-size: 17px; line-height: 1.65; margin: 0 0 14px; }
.doc__lead { font-family: var(--f-round); font-size: 19px !important; color: var(--ink-soft); }
.doc__actions { margin-top: 24px !important; }
.doc__links { display: flex; gap: 18px; font-family: var(--f-title); letter-spacing: .1em; }
.doc__links a { text-decoration: none; color: var(--accent); }
.doc__small { font-size: 14px !important; color: var(--ink-soft); }

.overlay--lightbox { display: grid; place-items: center; }
.overlay--lightbox[hidden] { display: none; }
.overlay--lightbox .close-btn { position: absolute; right: 0; top: 0; }
.overlay--lightbox img { max-width: 86vw; max-height: 84vh; border-radius: 14px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.4); }

.toast {
  position: fixed; left: 50%; bottom: 70px;
  transform: translate(-50%, 30px);
  opacity: 0;
  padding: 10px 18px 8px;
  border-radius: 99px;
  background: var(--slate); color: #fff;
  font-family: var(--f-title); letter-spacing: .12em; font-size: 15px;
  z-index: 40;
  pointer-events: none;
  transition: transform .45s cubic-bezier(.34,1.56,.64,1), opacity .25s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

.boot {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: var(--paper);
  z-index: 50;
  font-family: var(--f-round);
  font-size: 15px; letter-spacing: .08em;
  color: var(--ink-soft);
  transition: opacity .5s;
}
.boot span::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.boot.is-gone { opacity: 0; pointer-events: none; }

/* ---------------- small screens ---------------- */
@media (max-width: 860px) {
  :root { --frame: 6px; --ph: min(50vh, 128vw); }
  .topbar { left: 18px; right: 14px; top: 12px; }
  .rail--left { display: none; }
  .rail--right { right: 12px; top: auto; bottom: 64px; transform: none; gap: 10px; }
  .ring-btn, .paw-btn { width: 44px; height: 44px; }
  .ring-btn::before { border-width: 3px; }
  .cta { width: 84px; height: 84px; }
  .cta__small { font-size: 12px; }
  .cta__big { font-size: 18px; }
  .counter { display: none; }
  .photo-slot { top: 8vh; }
  .title-anchor { top: calc(8vh + var(--ph) + 3vh); padding: 0 var(--gutter); }
  .title { font-size: clamp(36px, 12vw, 64px); }
  .title-tools { display: none; }
  .footnav { bottom: 14px; font-size: 11px; gap: 4px 10px; padding: 0 var(--gutter); }
  .footnav i, .footnav a:not(.pill) { display: none; }

  /* story: small photo top-left, title beside it, text below */
  .is-story .photo-slot {
    width: calc(24vh * var(--ratio));
    height: 24vh;
    left: var(--gutter);
    top: 7vh;
  }
  .is-story .title-anchor {
    left: calc(var(--gutter) + 24vh * var(--ratio) + 14px);
    right: var(--gutter);
    top: 15vh;
    padding: 0;
  }
  .is-story .title { font-size: clamp(28px, 8.4vw, 44px); white-space: normal; line-height: .92; }
  .is-story .piece { display: none; }
  .story { left: var(--gutter); right: var(--gutter); top: calc(7vh + 24vh + 2vh); bottom: 150px; }
  .vcard { grid-template-columns: 1fr; }
  .vcard__frame { height: 46vh; }
  .stickers { grid-template-columns: repeat(4, 1fr); }
  .packs { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .menu-cols { grid-template-columns: 1fr; padding: 90px 24px 50px; gap: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-float, .cta { animation: none; }
}

/* ---------------- type: condensed bold capitals for titles and labels ---------------- */
.menu-btn, .piece__label, .piece__num, .subtitle.tbd::before, .kicker, .btn, .more,
.vcard figcaption small, .pack em, .cta, .counter, .footnav, .grid-card__meta,
.menu-side__link, .doc__links, .toast, .meme__flag {
  font-stretch: 75%;
  font-weight: 700;
  text-transform: uppercase;
}
.title, .grid-head, .menu-list button, .doc h2 {
  font-stretch: 62.5%;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.005em;
}
.piece__num, .cta__big { font-weight: 800; }

@media (max-width: 860px) {
  .is-story.no-maya .title-anchor { left: var(--gutter); right: var(--gutter); top: 8vh; flex-direction: column; align-items: flex-start; gap: 6px; }
  .is-story.no-maya .story { left: var(--gutter); right: var(--gutter); top: calc(8vh + 100px); bottom: 150px; }
}
