/* ==========================================================================
   Bumper Stickers — honk at a red light, collect stickers on a truck bumper
   ========================================================================== */

.label--spaced { letter-spacing: 0.32em; }

.stickers-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); }
.stickers-head__title { margin-top: 0.75rem; font-size: clamp(3.25rem, 11vw, 8.5rem); line-height: 0.88; }
.stickers-head__lead {
  max-width: 44rem;
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.7;
}
.stickers-head__intro { margin-top: 0.75rem; color: var(--muted); font-size: 0.9375rem; }

/* ---------- The scene ---------- */

.redlight {
  --wheel-w: 50%;
  --dash-ratio: 1000 / 220;
  --hub-bottom: 30.3%;
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 1rem;
  background: #0A0D14;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.5);
}
.redlight__windshield {
  position: relative;
  aspect-ratio: 1000 / 620;
  box-shadow: inset 0 0 0 0.6rem #0B0B0B, inset 0 0 60px rgba(0, 0, 0, 0.7);
}
.redlight__art { position: absolute; inset: 0; width: 100%; height: 100%; }

.redlight__tailglow { opacity: 0.75; }
.redlight.is-amen .redlight__tailglow { animation: tail-flash 0.32s ease-in-out 5 alternate; }
.redlight.is-amen .redlight__tail { animation: tail-bright 0.32s ease-in-out 5 alternate; }
@keyframes tail-flash { to { opacity: 1; transform-box: fill-box; } from { opacity: 0.2; } }
@keyframes tail-bright { from { filter: brightness(1); } to { filter: brightness(1.8); } }

.redlight__amen {
  position: absolute;
  top: 9%;
  left: 50%;
  z-index: 60;
  padding: 0.3em 0.9em 0.2em;
  border-radius: 0.2em;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 3rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  box-shadow: 0 0 30px rgba(200, 16, 46, 0.7);
  transform: translate(-50%, -150%);
  opacity: 0;
  pointer-events: none;
}
.redlight__amen.is-shown { animation: amen-banner 2.6s var(--ease) both; }
@keyframes amen-banner {
  0%   { opacity: 0; transform: translate(-50%, -150%); }
  15%, 80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -40%); }
}

/* the counter, top right */
.tally {
  position: absolute;
  top: 3%;
  right: 2.5%;
  z-index: 50;
  padding: 0.5rem 0.7rem 0.45rem;
  border-radius: 0.4rem;
  background: rgba(10, 13, 20, 0.72);
  color: #F4EDE2;
  text-align: right;
}
.tally__total {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tally__tiers { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.15rem 0.6rem; margin-top: 0.15rem; }
.tally__tiers li { font-size: clamp(0.65rem, 1.2vw, 0.75rem); color: #CFC8BC; }
.tally__tiers b { color: #fff; font-weight: 400; }

/* the bumper zone: tailgate + chrome bumper */
.bumper {
  position: absolute;
  top: 51.5%;   /* engine lid, bumper and rear valance of the convertible */
  left: 30%;
  width: 40%;
  height: 29%;
  container-type: inline-size;
}
.bumper .sticker {
  position: absolute;
  width: max-content;
  font-size: max(6px, calc(3.9cqw * var(--len, 1)));
  max-width: 56cqw;
  transform: translate(-50%, -50%) rotate(var(--r, 0deg));
  cursor: pointer;
}
.bumper .sticker:focus-visible { outline: 3px solid #FFE6BE; outline-offset: 3px; }
.bumper .sticker.is-slapping { animation: slap 0.5s cubic-bezier(0.2, 0.8, 0.25, 1.15) both, wobble 0.6s ease-out 0.5s; }
@keyframes slap {
  from {
    opacity: 0;
    transform: translate(calc(-50% + var(--fx, 0px)), calc(-50% + var(--fy, 0px))) rotate(var(--r0, 0deg)) scale(2.6);
  }
  55% { opacity: 1; }
  to { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(1); }
}
@keyframes wobble {
  0%   { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
  25%  { transform: translate(-50%, -50%) rotate(calc(var(--r) + 4deg)) scale(1.05); }
  55%  { transform: translate(-50%, -50%) rotate(calc(var(--r) - 2.5deg)) scale(0.99); }
  80%  { transform: translate(-50%, -50%) rotate(calc(var(--r) + 1deg)) scale(1); }
  100% { transform: translate(-50%, -50%) rotate(var(--r)) scale(1); }
}

/* the dash and steering wheel */
.redlight__dash {
  position: relative;
  z-index: 40;
  aspect-ratio: var(--dash-ratio);
  background: linear-gradient(180deg, #17120E, #0B0806);
  box-shadow: inset 0 3px 0 #2A221B;
}
.wheel {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: var(--wheel-w);
  transform: translateX(-50%);
  overflow: visible;
}
.horn {
  position: absolute;
  bottom: var(--hub-bottom);
  left: 50%;
  z-index: 2;
  width: clamp(5.5rem, 12vw, 7.5rem);
  aspect-ratio: 1;
  border: 4px solid #A7ADB5;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #3E3E3E, #121212 70%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transform: translate(-50%, 50%);
  transition: transform 0.08s ease, background 0.2s;
}
.horn:hover { background: radial-gradient(circle at 40% 35%, #E3243F, #8E0A1F 70%); }
.horn:active,
.horn.is-pressed { transform: translate(-50%, 50%) scale(0.93); }
.horn:focus-visible { outline: 3px solid #FFE6BE; outline-offset: 4px; }

.redlight-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  max-width: 72rem;
  margin-top: 1rem;
}

.found-amen {
  max-width: 72rem;
  margin-top: 1rem;
}
.found-amen p {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  border-radius: 0.4rem;
  background: #FFF4F5;
  font-size: 1.125rem;
}
.found-amen a { color: var(--accent); font-weight: 400; }

/* ---------- Stickers (shared by the bumper, the sheet, and the card) ---------- */

.sticker {
  --bg: #FFFFFF;
  --fg: #111111;
  --edge: #FFFFFF;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 15em;
  padding: 0.95em 1.05em 0.6em;
  border: 0.16em solid var(--edge);
  border-radius: 0.25em;
  background: var(--bg);
  box-shadow: 0 0.12em 0.25em rgba(0, 0, 0, 0.4);
  color: var(--fg);
  font-size: calc(var(--fs, 1rem) * var(--len, 1));
  font-weight: 400;
  line-height: 1.05;
  text-align: center;
  text-wrap: balance;
  overflow: hidden;
}
button.sticker { margin: 0; }
.sticker__text { position: relative; z-index: 1; }
.sticker__tag {
  position: absolute;
  top: 0.22em;
  right: 0.35em;
  z-index: 2;
  padding: 0.25em 0.4em 0.15em;
  border-radius: 0.2em;
  background: rgba(0, 0, 0, 0.72);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.36em;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

/* longer sayings: smaller type, wider sticker */
.sticker--long  { --len: 0.78; max-width: 20em; }
.sticker--xlong { --len: 0.6;  max-width: 27em; line-height: 1.1; }
.bumper .sticker--long  { max-width: 64cqw; }
.bumper .sticker--xlong { max-width: 72cqw; }

/* fonts and shapes */
.sticker--block   { font-family: "Bungee", Impact, sans-serif; text-transform: uppercase; border-radius: 0.12em; }
.sticker--bubble  { font-family: "Titan One", "Arial Rounded MT Bold", sans-serif; border-radius: 999px; padding-inline: 1.4em; }
.sticker--marker  { font-family: "Permanent Marker", "Comic Sans MS", cursive; border-radius: 0.5em 0.3em 0.6em 0.35em; }
.sticker--retro   { font-family: "Shrikhand", Georgia, serif; border-radius: 0.7em; }
.sticker--slab    { font-family: "Alfa Slab One", Georgia, serif; text-transform: uppercase; border-radius: 0; box-shadow: inset 0 0 0 0.16em var(--bg), inset 0 0 0 0.24em var(--fg), 0 0.12em 0.25em rgba(0, 0, 0, 0.4); }
.sticker--round   { font-family: "Righteous", sans-serif; text-transform: uppercase; border-radius: 0.9em; }
.sticker--painted { font-family: "Caveat Brush", "Caveat", cursive; font-size: calc(var(--fs, 1rem) * 1.2 * var(--len, 1)); border-radius: 0.4em 0.8em 0.5em 0.7em; }

/* HYMN: fresh vinyl */
.sticker--hymn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
}
.sticker--hymn.sticker--block  { --bg: #FFD23F; --fg: #111111; }
.sticker--hymn.sticker--bubble { --bg: #1E5AA8; --fg: #FFFFFF; }
.sticker--hymn.sticker--marker { --bg: #FFFFFF; --fg: #111111; --edge: #111111; }
.sticker--hymn.sticker--retro  { --bg: #F6A23B; --fg: #3A1600; }
.sticker--hymn.sticker--slab   { --bg: #111111; --fg: #FFFFFF; }
.sticker--hymn.sticker--round  { --bg: #1F6B43; --fg: #FFFFFF; }

/* SERMON: bold, glossy */
.sticker--sermon { border-width: 0.2em; }
.sticker--sermon::after {
  content: "";
  position: absolute;
  inset: 0 0 48% 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.08));
  border-radius: inherit;
  pointer-events: none;
}
.sticker--sermon.sticker--block  { --bg: #C8102E; --fg: #FFFFFF; }
.sticker--sermon.sticker--bubble { --bg: #111111; --fg: #FFD23F; }
.sticker--sermon.sticker--marker { --bg: #0F3D7A; --fg: #FFFFFF; }
.sticker--sermon.sticker--retro  { --bg: #5B1A86; --fg: #FFFFFF; }
.sticker--sermon.sticker--slab   { --bg: #FFFFFF; --fg: #C8102E; --edge: #C8102E; }
.sticker--sermon.sticker--round  { --bg: #111111; --fg: #FFFFFF; --edge: #C8102E; }

/* TESTIMONY: sun-faded vintage with a red border */
.sticker--testimony {
  --bg: #EADFC6;
  --fg: #5A4634;
  --edge: #C8102E;
  border-width: 0.2em;
  box-shadow: inset 0 0 0 0.14em #F7F0E1, 0 0.12em 0.25em rgba(0, 0, 0, 0.4);
  filter: saturate(0.8);
  background-image:
    radial-gradient(rgba(120, 90, 50, 0.12) 1px, transparent 1.5px),
    linear-gradient(160deg, rgba(255, 255, 255, 0.3), rgba(0, 0, 0, 0.06));
  background-size: 5px 5px, 100% 100%;
}
.sticker--testimony.sticker--bubble,
.sticker--testimony.sticker--round { --bg: #C9D8CF; --fg: #3F4F48; }
.sticker--testimony.sticker--retro { --bg: #E8C9A8; --fg: #5A3420; }

/* AMEN: hand-painted with a soft glow */
.sticker--amen {
  --bg: #FFF7E6;
  --fg: #7A0E22;
  --edge: #E8C78A;
  box-shadow: 0 0 0.6em rgba(245, 185, 113, 0.85), 0 0 1.4em rgba(245, 185, 113, 0.45), 0 0.12em 0.25em rgba(0, 0, 0, 0.3);
  background-image: linear-gradient(170deg, rgba(255, 255, 255, 0.6), rgba(245, 185, 113, 0.15));
}
.sticker--amen .sticker__tag { background: var(--accent); }

/* not found yet */
.sticker--ghost {
  --bg: #E4E4E4;
  --fg: transparent;
  --edge: #D2D2D2;
  box-shadow: none;
  filter: none;
  background-image: none;
}
.sticker--ghost::after { display: none; }
.sticker--ghost .sticker__text { color: transparent; text-shadow: none; user-select: none; }
.sticker--ghost .sticker__tag { background: #BDBDBD; }

/* ---------- Sticker of the Day ---------- */

.sotd { max-width: 72rem; padding-top: clamp(3rem, 7vw, 4.5rem); }
.sotd__box {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--hairline);
  border-left: 4px solid var(--accent);
  border-radius: 0.6rem;
  background: #FFFBF2;
}
.sotd__date { margin-top: 0.5rem; font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1; text-transform: uppercase; }
.sotd__story { margin-top: 0.6rem; color: var(--muted); }
.sotd__sticker { display: flex; justify-content: center; padding: 1rem 0; }
.sotd__sticker .sticker { --fs: clamp(1.1rem, 2.6vw, 1.6rem); transform: rotate(-3deg); cursor: pointer; }

/* ---------- My Bumper (collection) ---------- */

.collection { max-width: 72rem; padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem); }
.collection__title { font-size: clamp(2.5rem, 7vw, 4.5rem); line-height: 0.9; }
.collection__intro { margin-top: 0.75rem; color: var(--muted); }
.collection__tier { margin-top: 2rem; }
.collection__tier h3 {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 1.6rem;
}
.collection__tier h3 span { color: var(--muted); font-family: var(--font-body); font-size: 0.875rem; letter-spacing: 0; text-transform: none; }
.sheet {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.9rem 0.75rem;
  padding: 1.25rem;
  margin-top: 1rem;
  border-radius: 0.6rem;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.025) 0 6px, transparent 6px 12px),
    #F6F4EF;
}
.sheet li { display: flex; align-items: center; justify-content: center; min-height: 5rem; }
.sheet .sticker { --fs: 0.8rem; max-width: 100%; min-height: 3.2rem; }
.sheet .sticker--ghost { min-width: 7.5rem; }
.sheet button.sticker { cursor: pointer; transition: transform 0.2s var(--ease); }
.sheet button.sticker:hover,
.sheet button.sticker:focus-visible { transform: rotate(-3deg) scale(1.05); }

/* ---------- Sticker card ---------- */

.sticker-card {
  width: min(92vw, 30rem);
  padding: 2.5rem 1.75rem 1.75rem;
  border: 0;
  border-radius: 0.8rem;
  background: #FFFFFF;
  color: var(--text);
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.sticker-card::backdrop { background: rgba(10, 13, 20, 0.75); }
.sticker-card[open] { animation: card-in 0.25s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.sticker-card__close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  width: 2.75rem;
  height: 2.75rem;
  border: 0;
  background: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}
.sticker-card__sticker { display: flex; justify-content: center; padding: 0.5rem 0 1.25rem; }
.sticker-card__sticker .sticker { --fs: clamp(1.25rem, 5vw, 1.75rem); transform: rotate(-2deg); }
.sticker-card__tier { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.sticker-card__story { margin-top: 0.5rem; color: #333; }
.sticker-card__share { width: 100%; margin-top: 1.5rem; }
.sticker-card__hint { margin-top: 0.5rem; color: var(--muted); font-size: 0.8125rem; }

/* ---------- Sizes ---------- */

@media (min-width: 48em) {
  .sotd__box { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 40em) {
  .redlight { --wheel-w: 88%; --dash-ratio: 1000 / 430; --hub-bottom: 27.5%; border-radius: 0; }
  .tally { padding: 0.35rem 0.5rem; }
  .tally__tiers { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bumper .sticker.is-slapping,
  .redlight.is-amen .redlight__tailglow,
  .redlight.is-amen .redlight__tail { animation: none !important; }
  .redlight__amen.is-shown { animation: none; opacity: 1; transform: translate(-50%, 0); }
}
