:root {
  --ink: #131111;
  --paper: #f3f0ea;
  --tile: #e2ddd4;
  --red: #d8141f;
  --night: #0d0b0b;
  --wrap: 1180px;
  --pad: clamp(16px, 4vw, 40px);
  --sans: "Archivo", system-ui, sans-serif;
  --hand: "Gochi Hand", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.45 var(--sans); overflow-x: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- top bar ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  padding: 0 var(--pad);
  display: flex;
  align-items: center;
  gap: 28px;
  background: rgba(13, 11, 11, .92);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 600;
  font-stretch: 88%;
  letter-spacing: .02em;
}
.bar-logo img { height: 46px; filter: invert(1); }
.bar-nav { display: flex; gap: 24px; margin-right: auto; }
.bar-nav a, .bar-tools > button:not(.cart-btn) { opacity: .78; transition: opacity .15s, color .15s; }
.bar-nav a:hover, .bar-tools > button:hover { opacity: 1; color: #ff5a63; }
.bar-tools { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.cart-btn { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--ink); }
.cart-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.cart-btn span { position: absolute; right: -6px; top: -6px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; background: var(--red); color: #fff; font: 700 12px/21px var(--sans); text-align: center; }
.cart-btn.bump { animation: bump .35s; }
@keyframes bump { 40% { scale: 1.2; } }

/* ---------- hero ---------- */
.hero { position: relative; height: min(100vw * 672 / 1584, 84vh); min-height: 460px; overflow: hidden; background: var(--night); color: #fff; }
/* the stage keeps the photo's shape, so the bubble and the door stay glued to Ad and the door at any screen size */
.stage { position: absolute; top: 0; left: 50%; height: 100%; aspect-ratio: 1584 / 672; translate: -52% 0; }
.stage > img { width: 100%; height: 100%; }
.bubble {
  position: absolute;
  left: 67.5%;
  top: 7%;
  padding: 10px 18px 12px;
  max-width: 150px;
  background: #fff;
  color: var(--ink);
  border-radius: 50% 46% 52% 44% / 56% 50% 50% 46%;
  font: 21px/1 var(--hand);
  text-align: center;
  rotate: 3deg;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .5);
  animation: bob 4s ease-in-out infinite;
}
.bubble::after { content: ""; position: absolute; left: 6px; bottom: -8px; width: 18px; height: 18px; background: #fff; clip-path: polygon(0 100%, 30% 0, 100% 30%); }
@keyframes bob { 50% { translate: 0 -5px; } }
.door { position: absolute; left: 82%; top: 37%; width: 9.5%; height: 56%; border-radius: 3px; }
.door:hover { box-shadow: 0 0 0 2px #fff, 0 0 40px rgba(255, 255, 255, .5); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13, 11, 11, .72), rgba(13, 11, 11, 0) 46%), linear-gradient(0deg, rgba(13, 11, 11, .7), rgba(13, 11, 11, 0) 30%); pointer-events: none; }
.hero-copy { position: absolute; z-index: 1; left: max(var(--pad), (100% - var(--wrap)) / 2); bottom: clamp(28px, 8%, 80px); width: min(400px, 78%); }
.hero-copy h1 img { width: 100%; filter: invert(1) drop-shadow(0 4px 24px rgba(0, 0, 0, .6)); margin: 0 0 14px -2%; }
.hero-copy p { font-size: 18px; margin-bottom: 20px; text-shadow: 0 1px 12px #000; }

.btn { display: inline-block; padding: 13px 34px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 800; font-stretch: 88%; letter-spacing: .04em; text-align: center; transition: background .15s, transform .15s; }
.btn:hover { background: #fff; color: var(--ink); transform: translateY(-2px); }
.btn.wide { width: 100%; }
.btn.wide:hover { background: var(--ink); color: #fff; }
.btn:disabled { background: #b9b4ab; cursor: not-allowed; transform: none; }

/* ---------- shop ---------- */
.block { max-width: calc(var(--wrap) + 2 * var(--pad)); margin: 0 auto; padding: clamp(44px, 7vw, 84px) var(--pad) 0; position: relative; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.block h2 { font: 900 clamp(34px, 5.4vw, 60px)/1 var(--sans); font-stretch: 78%; letter-spacing: -.01em; display: flex; align-items: center; gap: 14px; }
.star { width: .8em; aspect-ratio: 1; background: var(--red); clip-path: polygon(50% 0, 61% 26%, 85% 15%, 76% 40%, 100% 50%, 76% 60%, 85% 85%, 61% 74%, 50% 100%, 39% 74%, 15% 85%, 24% 60%, 0 50%, 24% 40%, 15% 15%, 39% 26%); animation: spin 14s linear infinite; }
@keyframes spin { to { rotate: 1turn; } }
.deal-sign { padding: 8px 16px 9px; border: 2px solid var(--ink); border-radius: 6px; background: #fff; font: 21px/1 var(--hand); rotate: 2deg; white-space: nowrap; }
.more { margin-top: 14px; text-align: right; font: 20px var(--hand); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2.4vw, 30px); }
.card { position: relative; display: flex; flex-direction: column; text-align: left; }
.card-art { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--tile); display: grid; place-items: center; }
.card-art > img { width: 100%; height: 100%; object-fit: cover; transition: scale .5s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-art > img { scale: 1.05; }
.card-name { margin-top: 14px; font-weight: 700; font-size: 18px; line-height: 1.2; }
.card-price { margin-top: 3px; font-size: 17px; opacity: .7; }
.card-price.soon { color: var(--red); opacity: 1; font-weight: 700; }
.tag { position: absolute; top: 12px; left: 12px; padding: 5px 12px; border-radius: 999px; background: var(--red); color: #fff; font: 800 13px/1.2 var(--sans); letter-spacing: .05em; z-index: 2; }

/* a printed comic, built around the real cover */
.book { position: relative; display: block; height: 80%; aspect-ratio: 0.65; transform: perspective(900px) rotateY(-20deg) rotateX(3deg); transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .7, .2, 1); filter: drop-shadow(18px 22px 18px rgba(40, 30, 20, .38)); }
.book img { width: 100%; height: 100%; object-fit: cover; border-radius: 1px 3px 3px 1px; background: #fff; }
.book::before { content: ""; position: absolute; inset: 0; border-radius: 1px 3px 3px 1px; background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(255, 255, 255, .22) 3.5%, rgba(0, 0, 0, .1) 6%, transparent 12%, transparent 70%, rgba(255, 255, 255, .12)); z-index: 1; }
.book::after { content: ""; position: absolute; top: 1%; bottom: 1%; right: -3.5%; width: 4%; background: repeating-linear-gradient(90deg, #fff 0 1px, #cfc9bd 1px 2px); transform: skewY(-28deg); transform-origin: left; z-index: -1; }
.card:hover .book { transform: perspective(900px) rotateY(-6deg) rotateX(0deg) scale(1.03); }
.book.sketch { background: #151212; border-radius: 1px 3px 3px 1px; }
.book.sketch img { object-fit: contain; padding: 12%; background: none; filter: invert(1); opacity: .9; }
.card-art > .book, .pm-art > .book { position: absolute; top: 10%; left: 50%; translate: -50% 0; }
.pm-art { position: relative; }
.fan { position: relative; width: 100%; height: 100%; display: grid; place-items: center; }
.fan .book { position: absolute; height: 62%; }
.fan .book:nth-child(1) { translate: -42% 3%; rotate: -9deg; }
.fan .book:nth-child(2) { translate: 0 -5%; z-index: 1; }
.fan .book:nth-child(3) { translate: 42% 5%; rotate: 9deg; }

/* ---------- way down ---------- */
.chev { display: block; margin: clamp(60px, 9vw, 110px) auto 0; width: 70px; }
.chev svg { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 0 7px; } }

.outside { position: relative; padding-top: 130px; background: linear-gradient(var(--paper), #e9e9e9 520px); }
.more-soon { width: min(230px, 50vw); margin: 0 auto; translate: 14vw 0; opacity: .9; }
.deadend { position: relative; margin-top: -40px; }
.deadend img { width: 100%; min-height: 420px; object-fit: cover; -webkit-mask-image: linear-gradient(transparent, #000 22%); mask-image: linear-gradient(transparent, #000 22%); }
.deadend::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, var(--night)); }

/* ---------- the long nothing ---------- */
.void { position: relative; background: var(--night); }
.void img { position: absolute; width: 56px; opacity: 0; transition: opacity 1.4s; filter: drop-shadow(0 0 10px rgba(216, 20, 31, .8)); }
.void img.seen { opacity: .85; }

.bottom { position: relative; height: 100vh; height: 100svh; background: var(--night); }
#bottomMark { position: absolute; left: 0; right: 0; bottom: 0; height: 35%; pointer-events: none; }
.esc { position: absolute; right: clamp(12px, 8vw, 140px); bottom: clamp(18px, 8vh, 90px); width: clamp(210px, 30vw, 340px); aspect-ratio: 1; pointer-events: none; cursor: default; filter: drop-shadow(0 0 14px rgba(216, 20, 31, .75)); }
.esc img { position: absolute; opacity: 0; }
.esc-hey { left: 0; top: 4%; width: 74%; transform-origin: 80% 90%; scale: .6; transition: opacity .5s, scale .5s cubic-bezier(.3, 1.6, .5, 1); }
.esc-mouth { right: 0; bottom: 4%; width: 50%; transition: opacity 2.5s 3s; }
.esc-name { left: 12%; bottom: 8%; width: 22%; rotate: -6deg; transition: opacity 2s 7s; }
.awake .esc { pointer-events: auto; cursor: pointer; }
.awake .esc-hey { opacity: 1; scale: 1; }
.awake .esc-mouth { opacity: 1; animation: breathe 2.6s ease-in-out 5.5s infinite; }
.awake .esc-name { opacity: 1; }
@keyframes breathe { 50% { scale: 1.07 1.16; rotate: -3deg; } }
/* down there with esc, the bar switches off too */
.bar { transition: opacity 3s; }
.awake.at-bottom .bar { opacity: 0; pointer-events: none; }

/* ---------- drawer + modals ---------- */
.drawer, .modal { position: fixed; inset: 0; z-index: 20; background: rgba(13, 11, 11, .55); backdrop-filter: blur(3px); display: flex; }
.drawer { justify-content: flex-end; }
.drawer-panel { width: min(420px, 100%); height: 100%; background: var(--paper); display: flex; flex-direction: column; padding: 22px 24px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h2, .modal-card h2 { font: 900 32px/1.05 var(--sans); font-stretch: 80%; }
.x { width: 40px; height: 40px; border-radius: 50%; font-size: 30px; line-height: 1; }
.x:hover { background: var(--ink); color: #fff; }
.cart-list { list-style: none; padding: 0; margin: 16px 0 0; overflow-y: auto; flex: 1; }
.cart-list li { display: grid; grid-template-columns: 68px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #d6d0c5; }
.cart-thumb { width: 68px; height: 68px; border-radius: 10px; object-fit: cover; background: var(--tile); }
.cart-name { font-weight: 700; line-height: 1.2; }
.cart-meta { font-size: 15px; opacity: .65; }
.qty { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--ink); font-weight: 700; line-height: 1; }
.qty button:hover { background: var(--ink); color: #fff; }
.cart-empty { flex: 1; display: grid; place-items: center; opacity: .55; }
.total { display: flex; justify-content: space-between; font-size: 22px; margin: 16px 0; }
.fine { font-size: 15px; margin-top: 10px; color: var(--red); }

.modal { align-items: center; justify-content: center; padding: 16px; }
.modal-card { position: relative; width: min(860px, 100%); max-height: 100%; overflow-y: auto; background: var(--paper); border-radius: 20px; padding: 22px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
.modal-card.small { width: min(430px, 100%); display: block; padding: 28px; }
.modal-card > .x { position: absolute; top: 10px; right: 10px; z-index: 3; }
.pm-art { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--tile); display: grid; place-items: center; }
.pm-art > img { width: 100%; height: 100%; object-fit: cover; }
.pm-info { display: flex; flex-direction: column; gap: 12px; padding: 30px 8px 6px 0; }
.pm-price { font-size: 24px; }
.pm-note { opacity: .75; }
.sizes { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.pm-info .btn { margin-top: auto; }
.sizes + .btn { margin-top: 6px; }
.size { min-width: 50px; height: 46px; padding: 0 10px; border: 1.5px solid var(--ink); border-radius: 10px; font-weight: 700; }
.size:hover { background: #fff; }
.size[aria-pressed="true"] { background: var(--ink); color: #fff; }
.help-list { padding-left: 22px; margin: 16px 0; display: grid; gap: 6px; }
#talkForm { display: grid; gap: 14px; margin-top: 16px; }
#talkForm label { display: grid; gap: 5px; font-weight: 600; }
#talkForm input, #talkForm textarea { font: 17px var(--sans); padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 10px; background: #fff; }

@media (max-width: 720px) {
  .bar { gap: 14px; height: 58px; }
  .bar-nav { display: none; }
  .bar-logo img { height: 40px; }
  .bar-tools { gap: 16px; }
  html { scroll-padding-top: 66px; }
  .hero { height: 78svh; }
  .stage { translate: -61% 0; }
  .bubble { left: 66%; top: 4%; font-size: 18px; max-width: 120px; padding: 8px 12px 10px; }
  .hero::after { background: linear-gradient(0deg, rgba(13, 11, 11, .92), rgba(13, 11, 11, 0) 52%); }
  .hero-copy { width: min(230px, 62%); bottom: 26px; }
  .hero-copy p { font-size: 16px; margin-bottom: 14px; }
  .block-head { flex-wrap: wrap; }
  /* rows you can swipe sideways, like the arrows in the sketch */
  .grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 68%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--pad)); padding: 0 var(--pad); }
  .grid::-webkit-scrollbar { display: none; }
  .card { scroll-snap-align: center; }
  .modal-card { grid-template-columns: 1fr; gap: 14px; }
  .pm-info { padding: 0; }
  .pm-art { aspect-ratio: 1.25; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
}
