/* Movies I've Missed, v09: window cards in a shop window */

:root {
  --paper: #f7f2e7;
  --paper2: #e8dcc4;
  --ink: #2d2a26;
  --teal: #305a62;
  --teal-d: #1f3c42;
  --teal-l: #4b7f89;
  --red: #c0392b;
  --gilt: #ecd28e;
  --rule: rgba(96, 86, 72, .30);
  --gap: 46px;
  --pad: 46px;
  --cw: min(296px, calc(100vw - 96px));
  --ph: 312px;
  --hand: 26px;
  --noise: 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 .32 0 0 0 0 .27 0 0 0 0 .2 0 0 0 .10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--teal-d);
  color: var(--ink);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
}
main { overflow-x: clip; }
a { color: inherit; }
:focus-visible { outline: 3px solid #f2c94c; outline-offset: 3px; }
button { font: inherit; color: inherit; }

/* ---------- stage ---------- */

.shop { position: relative; background: var(--teal-d); }
.stage {
  display: flex;
  flex-direction: column;
  background: var(--teal);
}
html.wide .stage { position: sticky; top: 0; height: 100vh; }

/* fascia with gilt sign writing */
.fascia {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-areas: "home title no";
  align-items: center;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 40px) 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(0, 0, 0, .16)),
    var(--teal);
  border-bottom: 6px solid var(--teal-d);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .14);
}
.fascia::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -12px;
  height: 6px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0));
  pointer-events: none;
}
.home {
  grid-area: home;
  justify-self: start;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gilt);
  text-decoration: none;
  padding: 10px 0 6px;
  border-bottom: 1px solid rgba(236, 210, 142, .5);
}
.home:hover { border-bottom-color: var(--gilt); }
.gilt {
  grid-area: title;
  margin: 0;
  font-family: Gloock, Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 4.3vw, 62px);
  line-height: 1.04;
  letter-spacing: .01em;
  text-align: center;
  background: linear-gradient(176deg, #fdf3cf 0%, #e6c473 34%, #9d7226 51%, #d8b05a 63%, #fff4cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .4));
}
.fascia-no {
  grid-area: no;
  justify-self: end;
  margin: 0;
  font-family: Gloock, Georgia, serif;
  font-size: 22px;
  color: var(--gilt);
  opacity: .9;
}

/* window and interior */
.window {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 clamp(10px, 2vw, 28px);
  border: clamp(8px, 1.1vw, 16px) solid var(--teal-d);
  border-bottom: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), inset 0 0 0 1px rgba(0, 0, 0, .4);
  background: #2c2621;
  overflow: hidden;
}
.interior {
  --lx: 30%;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 560px 150% at var(--lx) 34%, rgba(255, 204, 138, .44), rgba(255, 204, 138, 0) 70%),
    radial-gradient(130% 80% at 50% 118%, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0) 62%),
    linear-gradient(180deg, #4f453b, #3b332c 62%, #2a241f);
}
/* shadows of the glazing bars, moving with the sun */
.interior::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg,
      transparent calc(var(--lx) - 360px), rgba(14, 10, 6, .32) calc(var(--lx) - 346px),
      rgba(14, 10, 6, .32) calc(var(--lx) - 316px), transparent calc(var(--lx) - 302px),
      transparent calc(var(--lx) + 282px), rgba(14, 10, 6, .30) calc(var(--lx) + 296px),
      rgba(14, 10, 6, .30) calc(var(--lx) + 324px), transparent calc(var(--lx) + 338px));
}
/* a glint travelling along the frame */
.glint {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  pointer-events: none;
  background: radial-gradient(160px 3px at var(--gx, 30%) 50%, rgba(255, 240, 200, .9), rgba(255, 240, 200, 0));
}

.track {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: var(--gap);
}
html.wide .track {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: max-content;
  padding: clamp(18px, 3vh, 34px) var(--pad) 0;
  will-change: transform;
}

/* ---------- window card ---------- */

.card {
  --lx: 50%;
  position: relative;
  flex: 0 0 var(--cw);
  width: var(--cw);
  display: flex;
  flex-direction: column;
  background-color: var(--paper);
  background-image: var(--noise), linear-gradient(180deg, #fbf7ee, var(--paper) 30%, #efe6d4);
  color: var(--ink);
  border-radius: 2px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .6),
    0 1px 0 rgba(0, 0, 0, .12),
    0 24px 34px -18px rgba(0, 0, 0, .7);
  transform-origin: 50% 100%;
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), box-shadow .55s ease;
  scroll-snap-align: center;
  isolation: isolate;
}
/* sun and glazing bar shadows on the card stock; sits under the text and the poster */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  background:
    linear-gradient(90deg,
      transparent calc(var(--lx) - 360px), rgba(60, 44, 26, .26) calc(var(--lx) - 346px),
      rgba(60, 44, 26, .26) calc(var(--lx) - 316px), transparent calc(var(--lx) - 302px),
      transparent calc(var(--lx) + 282px), rgba(60, 44, 26, .24) calc(var(--lx) + 296px),
      rgba(60, 44, 26, .24) calc(var(--lx) + 324px), transparent calc(var(--lx) + 338px)),
    radial-gradient(ellipse 380px 130% at var(--lx) 30%, rgba(255, 236, 200, 0) 30%, rgba(92, 70, 46, .30) 100%);
}
html.wide .card { height: 100%; transform: translateY(12px) scale(.955); }
html.wide .card.on {
  transform: translateY(0) scale(1);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .6),
    0 1px 0 rgba(0, 0, 0, .12),
    0 40px 50px -22px rgba(0, 0, 0, .85);
}

.tape {
  position: absolute;
  z-index: 3;
  top: -8px;
  width: 66px;
  height: 22px;
  background: rgba(252, 247, 230, .58);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  pointer-events: none;
}
.tape.tl { left: -16px; transform: rotate(-31deg); }
.tape.tr { right: -16px; transform: rotate(33deg); }

/* the blank band, filled in by hand */
.band {
  position: relative;
  z-index: 1;
  padding: .42em .7em .55em;
  font-family: "Reenie Beanie", "Comic Sans MS", cursive;
  font-size: var(--hand);
  line-height: 1.06;
  color: #35312c;
  background-image: repeating-linear-gradient(180deg, transparent 0 calc(1.06em - 1px), var(--rule) calc(1.06em - 1px) 1.06em);
  background-position: 0 calc(.42em + .06em);
  border-bottom: 2px solid rgba(45, 42, 38, .55);
}
.band p, .band h2, .band h3 { margin: 0; font: inherit; }
.times {
  display: flex;
  align-items: baseline;
  gap: .35em;
  white-space: nowrap;
}
.printed {
  font-family: "Public Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: 11px;
  line-height: 1;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--teal);
}
.red {
  display: inline-block;
  color: var(--red);
  font-size: 1.12em;
  transform: rotate(-3deg);
}
.head { color: #24535b; }
.band ul { list-style: none; margin: 0; padding: 0; }

/* handwriting reveal, word by word */
.w {
  display: inline-block;
  padding: .12em .06em;
  margin: -.12em -.06em;
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--l, 200ms) linear var(--d, 0ms);
}
.card.written .w { clip-path: inset(0 0 0 0); }

.art {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px 8px;
}
.art img {
  display: block;
  height: var(--ph);
  max-height: 100%;
  width: auto;
  max-width: 100%;
  aspect-ratio: 290 / 507;
  object-fit: contain;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 0 0 1px rgba(0, 0, 0, .06);
}

.foot {
  position: relative;
  z-index: 1;
  margin: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 12px;
  border-top: 1px solid rgba(45, 42, 38, .25);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.foot .pr { font-family: Gloock, Georgia, serif; font-weight: 400; font-size: 17px; letter-spacing: .02em; text-transform: none; }

/* box set card */
.box .mini {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 10px 6px;
}
.box .mini img {
  display: block;
  width: min(60px, calc((100% - 24px) / 5));
  height: auto;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.boxbuy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  padding: 10px 14px 14px;
  border-top: 1px solid rgba(45, 42, 38, .25);
}
.boxbuy .price { margin: 0; font-family: Gloock, Georgia, serif; font-size: 42px; line-height: 1; }
.boxbuy .ed { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.buy {
  appearance: none;
  border: 0;
  border-radius: 2px;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .2s ease;
}
.buy:hover { background: var(--teal); }
.buy.done { background: var(--teal); }
.bought {
  margin: 0;
  min-height: 1.1em;
  font-family: "Reenie Beanie", cursive;
  font-size: 30px;
  line-height: 1.1;
  color: var(--red);
  transform: rotate(-2deg);
  transform-origin: 0 50%;
}

/* ---------- sill ---------- */

.sill {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 8px clamp(14px, 3vw, 40px);
  background: linear-gradient(180deg, #5f949e 0, #41747e 5px, var(--teal) 6px, var(--teal-d) 100%);
  box-shadow: 0 -8px 16px rgba(0, 0, 0, .4);
}
.pager { display: flex; align-items: center; gap: 10px; justify-self: start; }
.arrow {
  appearance: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(236, 210, 142, .6);
  background: transparent;
  color: var(--gilt);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
}
.arrow:hover { background: rgba(236, 210, 142, .14); }
.arrow:disabled { opacity: .35; cursor: default; }
.count {
  margin: 0;
  min-width: 5.2em;
  text-align: center;
  font-family: "Reenie Beanie", cursive;
  font-size: 27px;
  line-height: 1;
  color: var(--paper);
}
.tent {
  margin: 0;
  justify-self: center;
  transform: rotate(-2deg) translateY(-3px);
}
.tent span {
  display: inline-block;
  padding: 6px 16px 4px;
  background: var(--paper);
  background-image: var(--noise);
  color: var(--red);
  font-family: "Reenie Beanie", cursive;
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 6px 10px -4px rgba(0, 0, 0, .55), inset 0 -3px 0 rgba(0, 0, 0, .08);
  border-radius: 1px;
}
.sound {
  appearance: none;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(236, 210, 142, .5);
  border-radius: 999px;
  background: transparent;
  color: var(--gilt);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
}
.sound::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(236, 210, 142, .35);
}
.sound[aria-pressed="true"]::before { background: #f2c94c; box-shadow: 0 0 6px #f2c94c; }

/* ---------- typed text ---------- */

.typed {
  background-color: var(--paper);
  background-image: var(--noise);
  padding: clamp(56px, 8vw, 112px) 20px clamp(56px, 8vw, 100px);
  border-top: 10px solid var(--teal-d);
}
.typed-in { max-width: 980px; margin: 0 auto; }
.typed h2 {
  margin: 0 0 .5em;
  font-family: Gloock, Georgia, serif;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  color: var(--teal-d);
}
.typed-list { list-style: none; margin: 0; padding: 0; }
.typed-list > li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-top: 1px solid rgba(45, 42, 38, .2);
}
.typed-list > li:last-child { border-bottom: 1px solid rgba(45, 42, 38, .2); }
.tno {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal);
  padding-top: .55em;
}
.typed-list h3 {
  margin: 0 0 .3em;
  font-family: Gloock, Georgia, serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
}
.typed-list p { margin: 0; font-size: 19px; line-height: 1.6; max-width: 34em; }
.typed-list ul { margin: 0; padding: 0 0 0 1.1em; font-size: 19px; }
.typed-list .tline {
  margin-top: .8em;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6a6258;
}
.typed-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 18px; }
.typed-buy .price { margin: 0; font-family: Gloock, Georgia, serif; font-size: 40px; line-height: 1; }
.typed-buy .ed { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

.wall {
  position: relative;
  margin: clamp(48px, 7vw, 90px) auto 0;
  max-width: 900px;
  padding: 12px 12px 14px;
  background: #fffdf8;
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .06);
  transform: rotate(-.6deg);
}
.wall img { display: block; width: 100%; height: auto; aspect-ratio: 1536 / 1024; background: #d9cdb6; }

/* ---------- footer ---------- */

.street {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 48px 20px 64px;
  background: var(--teal);
  border-top: 6px solid var(--teal-d);
  text-align: center;
}
.next { display: grid; gap: 6px; text-decoration: none; color: var(--gilt); }
.next-k { font-size: 12px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; }
.next-t {
  font-family: Gloock, Georgia, serif;
  font-size: clamp(28px, 4.2vw, 50px);
  line-height: 1.1;
  background: linear-gradient(176deg, #fdf3cf 0%, #e6c473 34%, #9d7226 51%, #d8b05a 63%, #fff4cc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.next:hover .next-t { text-decoration: underline; text-decoration-color: var(--gilt); }
.home2 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gilt);
  text-decoration: none;
  border-bottom: 1px solid rgba(236, 210, 142, .5);
  padding: 6px 0 4px;
}

/* ---------- phone and narrow screens ---------- */

html.wide {
  --cw: clamp(296px, 24vw, 350px);
  --ph: clamp(190px, calc(100vh - 560px), 400px);
  --hand: clamp(23px, 3.1vh, 31px);
}

html:not(.wide) { --gap: 16px; }
html:not(.wide) .window { margin: 0 10px; border-width: 8px; }
html:not(.wide) .interior { position: relative; }
html:not(.wide) .track {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  padding: 26px calc(50% - var(--cw) / 2) 26px;
  scrollbar-width: none;
}
html:not(.wide) .track::-webkit-scrollbar { display: none; }
html:not(.wide) .card { transform: scale(.97); }
html:not(.wide) .card.on { transform: scale(1); }

@media (max-width: 640px) {
  .fascia {
    grid-template-columns: 1fr auto;
    grid-template-areas: "home no" "title title";
    gap: 6px 12px;
    padding: 10px 16px 14px;
  }
  .gilt { font-size: clamp(32px, 9vw, 44px); }
  .fascia-no { font-size: 18px; }
  .sill { grid-template-columns: 1fr auto; padding: 8px 14px; }
  .tent { display: none; }
  .pager { gap: 8px; }
  .count { min-width: 4.4em; font-size: 24px; }
  .typed-list > li { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .tno { padding-top: 0; }
  .typed-list h3 { font-size: 25px; }
  .typed-list p, .typed-list ul { font-size: 18px; }
  .wall { padding: 8px 8px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .w { clip-path: none !important; transition: none !important; }
  .card, html.wide .card, html:not(.wide) .card { transition: none; }
  html.wide .card, html:not(.wide) .card { transform: none; }
}
