/* index.html: the open stall */

/* ---------- the stall (first viewport) ---------- */
.stall {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-top: clamp(20px, 3vw, 40px);
  padding-bottom: 0;
}
.stall__logo {
  width: min(380px, 80%);
  height: auto;
  margin: 0 0 6px -10px;
  filter: drop-shadow(0 10px 0 rgba(15, 43, 42, .6));
}
.stall__pitch { font-size: clamp(2.3rem, 4.6vw, 4.2rem); margin-bottom: 18px; }
.stall__lede { max-width: 46ch; margin: 0 0 30px; color: #f4e6c8; font-size: 1.12rem; }
.stall__lede strong { color: var(--gold); font-weight: 900; }

.stall__screen-wrap { position: relative; padding-top: 18px; }

.screen { padding: 18px 18px 12px; transform: rotate(.6deg); }
.screen__nails {
  position: absolute;
  inset: 7px;
  pointer-events: none;
  background:
    radial-gradient(circle, #e8e0d0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px) 0 0 / 12px 12px no-repeat,
    radial-gradient(circle, #e8e0d0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px) 100% 0 / 12px 12px no-repeat,
    radial-gradient(circle, #e8e0d0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px) 0 100% / 12px 12px no-repeat,
    radial-gradient(circle, #e8e0d0 0 3px, var(--ink) 3.5px 5px, transparent 5.5px) 100% 100% / 12px 12px no-repeat;
}
.screen__glass {
  position: relative;
  aspect-ratio: 16 / 9;
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  background: #0b1a19;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, .25);
}
.screen__video { width: 100%; height: 100%; object-fit: cover; }
.screen__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  border: 0;
  background: radial-gradient(closest-side, rgba(15, 30, 28, .15), rgba(15, 30, 28, .55));
  cursor: pointer;
  transition: opacity .3s var(--ease-out);
}
.screen__play-btn { font-size: 1.5rem; pointer-events: none; }
.screen__play:hover .screen__play-btn { transform: translateY(-2px) scale(1.04); box-shadow: inset 0 -5px 0 rgba(59, 35, 20, .18), 0 8px 0 var(--ink); }
.screen__play-note {
  font: 800 .85rem/1 "Nunito", sans-serif;
  color: var(--cream);
  background: rgba(59, 35, 20, .78);
  padding: .4em .7em;
  border-radius: 99px;
}
.screen.playing .screen__play { opacity: 0; pointer-events: none; }
.screen__plaque {
  margin: 10px auto 0;
  width: fit-content;
  font: 400 .95rem/1 "Lilita One", sans-serif;
  letter-spacing: .03em;
  color: var(--ink);
  background: var(--gold);
  border: var(--line) solid var(--ink);
  border-radius: 8px;
  padding: .45em .9em .4em;
  box-shadow: var(--lip-sm);
}

/* Gribble stands behind the counter, leaning on it */
.gribble {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 4px;
  margin: -4px 4% 0 0;
  pointer-events: none;
  z-index: 1;
}
.gribble__img {
  width: clamp(120px, 10.5vw, 150px);
  transform-origin: 50% 100%;
  animation: lean 3.2s ease-in-out infinite;
  filter: drop-shadow(0 8px 0 rgba(15, 43, 42, .5));
  margin-bottom: -64px;
}
@keyframes lean { 0%, 100% { transform: rotate(-3deg); } 45% { transform: rotate(2deg) translateY(-3px); } }
.gribble__bubble {
  max-width: 330px;
  margin-bottom: 40px;
  pointer-events: auto;
}
.gribble__bubble::after { right: -13px; bottom: 26px; transform: rotate(-45deg); }

/* the stall front: a plank counter with a painted sign, and two posts holding up the awning */
.counter {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 64px;
  margin: 0 -14px;
  border: var(--line) solid var(--ink);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 255, 255, .22) 0 4px, transparent 4px),
    repeating-linear-gradient(90deg, transparent 0 118px, rgba(59, 35, 20, .4) 118px 121px),
    linear-gradient(var(--oak), var(--oak-dark));
  box-shadow: 0 8px 0 var(--ink), var(--drop);
}
.counter__sign {
  font: 400 1.1rem/1 "Lilita One", sans-serif;
  letter-spacing: .03em;
  color: var(--cream);
  background: var(--oak-deep);
  border: var(--line) solid var(--ink);
  border-radius: 8px;
  padding: .4em .9em .35em;
  transform: rotate(-1.5deg);
}
.stall__post {
  position: absolute;
  top: -40px;
  bottom: 30px;
  width: 26px;
  background: linear-gradient(90deg, var(--oak-dark), var(--oak) 40%, var(--oak-dark));
  border: var(--line) solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 8px 0 rgba(0, 0, 0, .25);
  z-index: 0;
}
.stall__post--l { left: calc(-1 * clamp(8px, 2.4vw, 34px) - 13px); }
.stall__post--r { right: calc(-1 * clamp(8px, 2.4vw, 34px) - 13px); }

/* the awning logo stays tucked away while the big stall logo is on screen */
.shop .awning__brand { opacity: 0; transform: translateY(-10px); transition: opacity .3s var(--ease-out), transform .4s var(--ease-spring); }
.shop.past-hero .awning__brand { opacity: 1; transform: none; }

@media (max-width: 920px) {
  .stall { grid-template-columns: 1fr; gap: 26px; }
  .stall__copy { order: 2; display: flex; flex-direction: column; }
  .stall__screen-wrap { order: 1; }
  .stall__logo { display: none; }
  .shop .awning__brand { opacity: 1; transform: none; }
  .gribble__bubble { max-width: 240px; font-size: .95rem; }
  .stall__post { display: none; }
  /* phones: the slip right under the headline, the pitch after it */
  .stall__pitch { order: 1; }
  .stall__copy .slip { order: 2; margin-bottom: 26px; }
  .stall__lede { order: 3; margin-bottom: 0; }
}
@media (max-width: 600px) {
  /* phones: a small Gribble peeks over the end of the counter; his heckles pop up as a bubble at the bottom of the screen */
  .gribble { position: absolute; right: -2px; bottom: 30px; margin: 0; }
  .gribble__img { width: 70px; margin-bottom: 0; }
  .screen__plaque { font-size: .8rem; margin-left: 0; }
  .gribble__bubble {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
    margin: 0;
    z-index: 60;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .25s var(--ease-out), transform .45s var(--ease-spring);
    pointer-events: none;
  }
  .gribble__bubble.talking { opacity: 1; transform: none; }
  .gribble__bubble::after { display: none; }
  .counter { height: 52px; margin-top: 10px; }
  .counter__sign { font-size: .92rem; }
  .stall__pitch { font-size: 2.1rem; margin-bottom: 14px; }
}

/* ---------- ticker ---------- */
.ticker {
  margin-top: 54px;
  background: var(--ink);
  border-block: var(--line) solid var(--ink);
  overflow: hidden;
  transform: rotate(-1.2deg);
  box-shadow: 0 8px 0 rgba(0, 0, 0, .25);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: tick 38s linear infinite;
}
.ticker span {
  font: 400 1.3rem/1 "Lilita One", sans-serif;
  letter-spacing: .04em;
  color: var(--gold);
  padding: .7em 1.2em;
  white-space: nowrap;
}
.ticker span::after { content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 2.4em; vertical-align: .15em; background: var(--red); border: 2px solid var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 2px var(--ink); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- wares ---------- */
.wares { padding: clamp(80px, 9vw, 130px) 0 40px; }
.wares__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 40px; margin-bottom: 56px; }
.wares__title { font-size: clamp(2.6rem, 6vw, 5rem); }
.wares__sub { max-width: 40ch; margin: 0; color: #f4e6c8; }

.shelf { display: grid; gap: clamp(22px, 3vw, 40px); align-items: end; position: relative; z-index: 1; }
.shelf--a { grid-template-columns: 7fr 4fr; }
.shelf--b { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shelf--c { grid-template-columns: 7fr 4fr; }
.shelf__plank {
  height: 30px;
  margin: -6px -14px 70px;
  border: var(--line) solid var(--ink);
  border-radius: 8px;
  background: linear-gradient(var(--oak), var(--oak-dark));
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, .25), 0 14px 0 rgba(0, 0, 0, .25);
  position: relative;
}
.shelf__plank::before, .shelf__plank::after { /* brackets */
  content: "";
  position: absolute;
  top: 100%;
  width: 26px;
  height: 34px;
  background: var(--oak-deep);
  border: var(--line) solid var(--ink);
  border-top: 0;
  border-radius: 0 0 0 26px;
}
.shelf__plank::before { left: 8%; }
.shelf__plank::after { right: 8%; border-radius: 0 0 26px 0; }

.ware { position: relative; transition: transform .45s var(--ease-spring); }
.ware:hover, .ware:focus-within { transform: translateY(-8px) rotate(-.6deg); }
.ware:hover .tag, .ware:focus-within .tag { transform: rotate(calc(var(--tilt, 8deg) * -1.6)); }
.ware__frame {
  position: relative;
  border: var(--line) solid var(--ink);
  border-radius: var(--r);
  overflow: hidden;
  background: #0b1a19;
  aspect-ratio: 16 / 10;
  box-shadow: 0 0 0 6px var(--oak), 0 0 0 9px var(--ink), 0 14px 0 9px rgba(0, 0, 0, .2);
  margin: 9px 9px 0;
}
.ware--hero .ware__frame { aspect-ratio: 16 / 9; }
.ware--tall .ware__frame { aspect-ratio: 4 / 4.2; }
.ware--wide .ware__frame { aspect-ratio: 21 / 9; }
.ware__vid { width: 100%; height: 100%; object-fit: cover; }
.ware__label { position: relative; margin: -22px 0 0 22px; padding: 16px 20px 16px; width: calc(100% - 22px); }
.ware__label h3 { font-size: 1.5rem; margin-bottom: 6px; color: var(--ink); }
.ware__label p { margin: 0; font-size: .97rem; color: var(--ink-soft); line-height: 1.45; }
.ware--hero .ware__label h3 { font-size: 2rem; }

@media (max-width: 920px) {
  .shelf--a, .shelf--c { grid-template-columns: 1fr; }
  .shelf--b { grid-template-columns: 1fr 1fr; }
  .shelf--b .ware:last-child { grid-column: 1 / -1; }
  .ware--tall .ware__frame { aspect-ratio: 16 / 10; }
  .shelf__plank { margin-bottom: 56px; }
}
@media (max-width: 600px) {
  .shelf--b { grid-template-columns: 1fr; }
  .ware--wide .ware__frame { aspect-ratio: 16 / 10; }
  .shelf { gap: 48px; }
}

/* ---------- wanted board ---------- */
.wanted { padding: 70px 0 90px; }
.noticeboard { padding: clamp(24px, 4vw, 48px); }
.noticeboard__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 32px; margin-bottom: 34px; }
.noticeboard__head h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.noticeboard__head p { margin: 0; max-width: 40ch; color: var(--ink); font-weight: 800; background: var(--cream); border: var(--line) solid var(--ink); border-radius: 10px; padding: 10px 14px; box-shadow: var(--lip-sm); transform: rotate(1deg); }
.posters {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(26px, 3vw, 40px) clamp(18px, 2.4vw, 30px);
  align-items: start;
}
.poster {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: var(--line) solid var(--ink);
  border-radius: 4px;
  padding: clamp(50px, 4.4vw, 60px) 14px 16px;
  transform: rotate(var(--rot, 0deg));
  box-shadow: 0 5px 0 var(--ink), 0 16px 24px -10px rgba(0, 0, 0, .5);
  transition: transform .4s var(--ease-spring);
  background-image: linear-gradient(rgba(192, 122, 62, .08), rgba(192, 122, 62, .16));
}
.poster:hover { transform: rotate(0deg) scale(1.05); z-index: 2; }
.poster::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 18px;
  height: 18px;
  margin-left: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff8a7a, var(--red-dark) 65%);
  border: var(--line) solid var(--ink);
}
.poster::after {
  content: "WANTED";
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  text-align: center;
  font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1 "Lilita One", sans-serif;
  letter-spacing: .06em;
  color: var(--red-dark);
}
.poster img { width: 100%; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(59, 35, 20, .2)); }
.poster h3 { font-size: 1.35rem; margin: 6px 0 4px; }
.poster p { margin: 0; font-size: .9rem; line-height: 1.4; color: var(--ink-soft); }
.noticeboard__foot { margin: 34px auto 0; width: fit-content; font: 400 1.15rem/1 "Lilita One", sans-serif; color: var(--cream); background: var(--ink); padding: .55em 1em; border-radius: 10px; }
@media (max-width: 920px) { .posters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- receipt ---------- */
.also { padding: 40px 0 100px; }
.also__grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.also__copy h2 { font-size: clamp(2.4rem, 5vw, 4.2rem); margin-bottom: 14px; }
.also__copy p { max-width: 36ch; color: #f4e6c8; margin: 0 0 20px; }
.also__troll { width: clamp(150px, 18vw, 230px); height: auto; filter: drop-shadow(0 10px 0 rgba(15, 43, 42, .6)); animation: lean 3.6s ease-in-out infinite; transform-origin: 50% 100%; }
.receipt {
  position: relative;
  background: #fffdf6;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  padding: 28px 28px 34px;
  transform: rotate(1.4deg);
  box-shadow: 0 20px 30px -12px rgba(0, 0, 0, .55);
  border-inline: var(--line) solid var(--ink);
  border-top: var(--line) solid var(--ink);
  -webkit-mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 14px) no-repeat, conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) 0 100% / 22px 14px repeat-x;
  mask: linear-gradient(#000 0 0) 0 0 / 100% calc(100% - 14px) no-repeat, conic-gradient(from -45deg at 50% 100%, #000 90deg, transparent 0) 0 100% / 22px 14px repeat-x;
}
.receipt__shop { margin: 0; text-align: center; font: 400 1.3rem/1.1 "Lilita One", sans-serif; letter-spacing: .04em; }
.receipt__meta { margin: 4px 0 18px; text-align: center; font-size: .8rem; color: var(--ink-soft); border-bottom: 2px dashed var(--ink); padding-bottom: 14px; }
.receipt__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 5px 0;
  font-weight: 800;
  font-size: .98rem;
}
.receipt__row span:first-child { flex: 1; display: flex; gap: 8px; align-items: baseline; }
.receipt__row span:first-child::after { content: ""; flex: 1; border-bottom: 2px dotted rgba(59, 35, 20, .45); transform: translateY(-4px); }
.receipt__row span:last-child { font-variant-numeric: tabular-nums; color: #1d5f6c; font-weight: 900; }
.receipt__total {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 2px dashed var(--ink);
  font: 400 1.5rem/1 "Lilita One", sans-serif;
}
.receipt__total span:last-child { color: var(--red); }
.receipt__thanks { margin: 18px 0 0; text-align: center; font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 920px) {
  .also__grid { grid-template-columns: 1fr; }
  .also__troll { display: none; }
}

/* ---------- close ---------- */
.close {
  padding: 60px 0 110px;
  background: linear-gradient(transparent, rgba(255, 204, 51, .08));
}
.close__inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 60px); align-items: end; }
.close__goblin { width: clamp(140px, 16vw, 220px); height: auto; filter: drop-shadow(0 10px 0 rgba(15, 43, 42, .6)); animation: lean 3s ease-in-out infinite; transform-origin: 50% 100%; }
.close__title { font-size: clamp(2.3rem, 5vw, 4.4rem); margin-bottom: 34px; }
.slip--wide { max-width: 620px; transform: rotate(.8deg); }
@media (max-width: 700px) {
  .close__inner { grid-template-columns: 1fr; }
  .close__goblin { width: 120px; order: 2; justify-self: end; margin-top: -10px; }
}

/* ---------- footer ---------- */
.foot { border-top: var(--line) solid var(--ink); background: var(--night-2); padding: 26px 0 34px; }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: #cfe0d6; font-size: .92rem; }
.foot__inner img { width: 84px; height: auto; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.45)); }
.foot__inner p { margin: 0; }
.foot__inner p:last-child { margin-left: auto; }
.foot a { color: var(--gold); }
