/* The glopsters.com teaser, in the game's own look (game/src/01-head.html): the tiled Glopton wall, the
   Concert Hall stage with its red curtains and boards, Luckiest Guy over Fredoka, ink outlines and drop
   shadows. Tokens are the game's :root values (bible/palette.tsv game.* and town.*); name plates wear the
   family colours (fam.*) and Miss Melody's staff colour (staff.melody). No script. */
@font-face { font-family: "Luckiest Guy"; src: url("/fonts/luckiest-guy-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-latin.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
:root {
  --wall: #cfefe3; --grout: #b4dccb; --ink: #3b2a4a; --cream: #fff6e2; --paper: #fff6e2; --lime: #8bd34a;
  --floor1: #e9d5b0; --floor2: #d4ba8e; --curtain: #b3313a; --curtain-2: #d94c55; --gold: #f2c12e;
  --genre: #2f7a5e; --fx: #1fa699;
  --display: "Luckiest Guy", "Arial Black", "Trebuchet MS", system-ui, sans-serif;
  --body: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --beat: .6s; /* 100 BPM */
  color-scheme: light;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--wall);
  background-image: linear-gradient(var(--grout) 2px, transparent 2px), linear-gradient(90deg, var(--grout) 2px, transparent 2px);
  background-size: 56px 56px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
}
img { display: block; }
#app {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 14px);
  padding: 12px max(clamp(16px, 3vw, 48px), env(safe-area-inset-right, 0px)) 16px max(clamp(16px, 3vw, 48px), env(safe-area-inset-left, 0px));
}

/* the wordmark's sway (it stands on the stage now; there is no header) */
@keyframes wobble { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg) translateY(-3px); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* the stage: the Hall's curtains down both sides, the boards across the foot */
.stage-wrap {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  border: 4px solid var(--ink);
  border-radius: 28px;
  background: var(--paper) url("/img/glopton-map.webp?v=4") center / cover no-repeat;   /* the town map, faded into the cream (tools/fade_map.py) */
  overflow: hidden;
  box-shadow: 0 6px 0 rgba(43, 29, 20, .25);
  container-type: inline-size;
  min-height: 440px;
}
.stage-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, var(--curtain) 0 14px, var(--curtain-2) 14px 22px, var(--curtain) 22px 36px),
    repeating-linear-gradient(90deg, var(--curtain) 0 14px, var(--curtain-2) 14px 22px, var(--curtain) 22px 36px);
  background-size: clamp(28px, 6%, 90px) 100%, clamp(28px, 6%, 90px) 100%;
  background-position: left top, right top;
  background-repeat: no-repeat;
  pointer-events: none;
}
.stage-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(40px, 7vh, 72px);
  background: repeating-linear-gradient(90deg, var(--floor1) 0 44px, var(--floor2) 44px 48px);
  border-top: 4px solid var(--ink);
  pointer-events: none;
}
/* the welcome banner spans the stage between the curtains (their width: clamp(28px, 6%, 90px)) */
.welcome {
  position: absolute;
  z-index: 2;
  top: 0;
  left: clamp(28px, 6%, 90px);
  width: calc(100% - 2 * clamp(28px, 6%, 90px));
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 5px 0 rgba(43, 29, 20, .25));
  transform-origin: 50% 0;
  animation: swing 3.2s ease-in-out infinite alternate;
}
.welcome text { font-family: var(--display); fill: var(--cream); stroke: var(--ink); stroke-width: 9px; stroke-linejoin: round; paint-order: stroke fill; letter-spacing: .02em; }
@keyframes swing { from { transform: rotate(-.6deg); } to { transform: rotate(.6deg); } }
.welcome-phone { display: none; }
.hint { position: absolute; top: 12px; left: 14px; right: 14px; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; padding-inline: clamp(20px, 5%, 80px); }
.hint span { background: #fff; border: 2.5px solid var(--ink); border-radius: 999px; padding: 5px 12px; font-weight: 500; font-size: clamp(12px, 1.05vw, 15px); }
.hint .sign { background: var(--genre); color: #fff; font-family: var(--display); font-weight: 400; letter-spacing: .04em; }
.stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  /* clears the ribbon exactly: its height is .195 of its width (viewBox 1000 x 195), and its width is the
     stage less the two curtains; a % in padding is of the stage's width, as the curtains' 6% is */
  padding: calc(.195 * (100cqi - 2 * clamp(28px, 6%, 90px)) + 16px) clamp(32px, 7%, 100px) clamp(10px, 2vh, 20px);
}

/* the call: a bonus-card title over a tip bubble */
.call { text-align: center; max-width: 76em; }
.big {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6.5cqi, 84px);
  line-height: 1;
  letter-spacing: .02em;
  color: var(--gold);
  text-shadow: 3px 0 var(--ink), -3px 0 var(--ink), 0 3px var(--ink), 0 -3px var(--ink), 2px 2px var(--ink), -2px -2px var(--ink), 2px -2px var(--ink), -2px 2px var(--ink), 0 7px 0 var(--ink);
  animation: cardIn .6s cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes cardIn { 0% { transform: scale(.3) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.05) rotate(2deg); opacity: 1; } 100% { transform: none; } }
.bubble {   /* doubled on the operator's word, 2026-11-02: type, padding, corners and shadow */
  margin: 22px auto 0;
  background: var(--cream);
  border: 5px solid var(--ink);
  border-radius: 44px;
  box-shadow: 0 10px 0 var(--ink);
  padding: 24px 40px 22px;
  font-weight: 600;
  font-size: clamp(26px, 2.8vw, 38px);
  line-height: 1.3;
  text-wrap: balance;
}

/* the wordmark fills the open space between the bubble and the band: the slot takes whatever height
   is left (flex: 1 1 0), and size containment lets the picture size itself to the slot (cqh, cqw) */
.mark-big {
  flex: 1 1 0;
  width: 100%;
  min-height: clamp(70px, 12vh, 120px);
  container-type: size;
  display: grid;
  place-items: center;
}
.mark-big img {
  height: 94cqh;
  width: auto;
  max-width: min(1200px, 92cqw);
  object-fit: contain;
  transform-origin: 50% 80%;
  animation: wobble 2.4s ease-in-out infinite;
}

/* the band: heights are bible heights times --u; the row fits the stage and the screen height */
.band {
  --u: min(2.6px, calc(100cqi * .84 / 520), max(1.6px, calc((100svh - 640px) / 140)));   /* never so small the band disappears; a short screen scrolls a little instead */
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: calc(2 * var(--u));
  margin-bottom: clamp(30px, 3.4vw, 40px);   /* room on the boards for the name plates */
}
.member { position: relative; }
.char { position: relative; }
.char::after { content: ""; position: absolute; left: 24%; right: 24%; bottom: 0; height: 5%; border-radius: 50%; background: rgba(43, 29, 20, .2); z-index: -1; }
.char img { width: auto; transform-origin: 50% 100%; animation: bop var(--beat) ease-in-out infinite alternate; }
.member:nth-child(even) .char img { animation-delay: calc(var(--beat) * -1); }
.h40 { height: calc(40 * var(--u)); } .h48 { height: calc(48 * var(--u)); } .h56 { height: calc(56 * var(--u)); }
.h66 { height: calc(66 * var(--u)); } .h72 { height: calc(72 * var(--u)); } .h76 { height: calc(76 * var(--u)); }
.h86 { height: calc(86 * var(--u)); } .h88 { height: calc(88 * var(--u)); }
@keyframes bop { from { transform: scale(1.035, .955); } to { transform: translateY(-5%) scale(.975, 1.03); } }
.name {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--display);
  font-size: clamp(10px, 1vw, 15px);
  letter-spacing: .03em;
  line-height: 1.1;
  padding: .35em .6em .15em;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--c);
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}
.puddle { --c: #5fb3e6; } .stickle { --c: #f2b134; } .boingle { --c: #8bd34a; } .twinkle { --c: #c79bf2; }
.trembley { --c: #e8484a; } .stringle { --c: #f5e05a; } .glomp { --c: #6fa85a; } .staff { --c: #d9a3b0; }
.note { position: absolute; bottom: 70%; font-size: clamp(18px, 2.6cqi, 28px); color: var(--ink); opacity: 0; pointer-events: none; animation: float 3.6s ease-out infinite; }
.n1 { left: 18%; --dx: -18px; } .n2 { left: 48%; --dx: 22px; animation-delay: 1.2s; } .n3 { left: 74%; --dx: -10px; animation-delay: 2.4s; }
@keyframes float { 0% { opacity: 0; transform: translate(0, 0) rotate(-10deg); } 15% { opacity: .9; } 70%, 100% { opacity: 0; transform: translate(var(--dx), -140px) rotate(12deg); } }

.foot { font-size: 12px; color: #2f4a4c; text-align: center; line-height: 1.4; }
.foot p { margin: 0; }

@media (max-width: 760px) {
  .stage { padding-inline: 36px; }
  .bubble { padding: 16px 18px 14px; border-radius: 30px; }   /* the doubled type keeps its size; less padding gives it width */
  .welcome-wide { display: none; }
  .welcome-phone { display: block; }
  .stage { padding-top: calc(.325 * (100cqi - 2 * clamp(28px, 6%, 90px)) + 14px); }   /* the phone ribbon: viewBox 800 x 260 */
  .band .wide { display: none; }
  .band { --u: min(2.2px, calc(100cqi * .84 / 245)); }   /* four on a phone: Drizzle, Miss Melody, Quinn, Budge */
  .note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .note { display: none; }
}
