/* ============ POSTERWALA — street scene edition ============ */

:root {
  --cream: #f3e8cf;
  --ink: #2c2620;
  --red: #c1443a;
  --red-deep: #8f2f27;
  --haldi: #ffc21e;
  --frame-w: min(64vw, 48dvh, 380px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  background: #b8bfae;
  color: var(--cream);
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ---------- full-bleed illustrated scene ---------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.scene svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* centered "gyaan ki dukaan" painting only exists on mobile */
.wall-note-center { display: none; }

/* swinging bulb */
#bulb {
  transform: translate(432px, 206px);
  animation: sway 4.5s ease-in-out infinite alternate;
}

@keyframes sway {
  from { transform: translate(432px, 206px) rotate(-6deg); }
  to   { transform: translate(432px, 206px) rotate(6deg); }
}

/* print-grain over everything */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 40;
}

/* ---------- floating chips (saloon style) ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  z-index: 20;
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.clock {
  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.04em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}

.chip--count {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.chip--count .dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #d23c30;
  animation: blink 2.2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.chip--dark {
  background: rgba(28, 24, 20, 0.72);
  color: #fff;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
}

.chip--dark:hover {
  background: rgba(28, 24, 20, 0.92);
  transform: translateY(-1px);
}

.chip-arrow { opacity: 0.65; font-size: 11px; }

/* ---------- stage: title + poster ---------- */

.stage {
  position: relative;
  z-index: 10;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: clamp(44px, 8.5dvh, 84px);
}

.title {
  font-family: "Yatra One", serif;
  font-weight: 400;
  font-size: clamp(56px, 11vw, 132px);
  line-height: 1.1;
  color: #fdf6e6;
  text-shadow:
    0 4px 0 rgba(120, 26, 18, 0.55),
    0 10px 28px rgba(0, 0, 0, 0.25);
  transform: rotate(-1deg);
  letter-spacing: 0.01em;
}

/* poster pasted on the wall */
.poster-frame {
  margin-top: clamp(6px, 1.6dvh, 18px);
}

.poster-paper {
  position: relative;
  width: var(--frame-w);
  background: var(--cream);
  padding: 9px 9px 12px;
  border-radius: 2px;
  box-shadow:
    0 18px 40px -12px rgba(40, 10, 6, 0.55),
    0 4px 10px -4px rgba(40, 10, 6, 0.4);
  transform: rotate(var(--tilt, -1.4deg));
}

.poster-paper img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1; /* the collection is square 1200x1200 — never crop the suvichar text */
  object-fit: cover;
  border-radius: 1px;
  background: #ddd2bd;
}

.poster-tape {
  position: absolute;
  width: 68px;
  height: 22px;
  background: rgba(255, 230, 140, 0.55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.poster-tape--tl { top: -9px; left: -18px; transform: rotate(-36deg); }
.poster-tape--tr { top: -9px; right: -18px; transform: rotate(36deg); }

/* paste-slap animation: poster slapped onto the wall */
@keyframes pasteSlap {
  0%   { transform: scale(1.18) rotate(calc(var(--tilt, -1.4deg) * 3)); opacity: 0; }
  55%  { transform: scale(0.97) rotate(var(--tilt, -1.4deg)); opacity: 1; }
  75%  { transform: scale(1.015) rotate(var(--tilt, -1.4deg)); }
  100% { transform: scale(1) rotate(var(--tilt, -1.4deg)); }
}

.poster-paper.pasting {
  animation: pasteSlap 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

/* little wall-shake when the button is hit */
@keyframes wallShake {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-3px) rotate(-0.2deg); }
  60% { transform: translateX(3px) rotate(0.2deg); }
}

.stage.shaking { animation: wallShake 0.28s ease; }

/* ---------- bottom floating card (saloon player style) ---------- */

.deck {
  position: fixed;
  left: 0;
  right: 0;
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  z-index: 30;
  padding: 0 14px;
}

.deck-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 253, 247, 0.96);
  border-radius: 20px;
  padding: 12px 14px;
  width: min(440px, 100%);
  box-shadow:
    0 20px 50px -12px rgba(30, 15, 8, 0.45),
    0 4px 14px -6px rgba(30, 15, 8, 0.3);
  backdrop-filter: blur(8px);
}

.deck-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: #e4d8bd;
  flex-shrink: 0;
}

.deck-meta {
  flex: 1;
  min-width: 0;
}

.deck-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-sub {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10.5px;
  color: #9a8b74;
  margin-top: 3px;
  letter-spacing: 0.06em;
}

.big-btn {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(180deg, #d24d3f, #b23428);
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow:
    0 4px 0 #7c1f16,
    0 10px 22px -8px rgba(178, 52, 40, 0.55);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.big-btn:hover { transform: translateY(-1px) rotate(-0.6deg); }

.big-btn:active {
  transform: translateY(4px);
  box-shadow:
    0 0 0 #7c1f16,
    0 6px 14px -8px rgba(178, 52, 40, 0.55);
}

/* ---------- small screens ---------- */

@media (max-width: 560px) {
  :root { --frame-w: min(84vw, 44dvh, 360px); }
  .title { font-size: clamp(48px, 15vw, 76px); }
  .clock { display: none; }
  .chip { font-size: 11.5px; padding: 6px 11px; }
  .deck-sub { display: none; }
  .deck-thumb { width: 44px; height: 44px; }

  /* center the poster in the wall instead of leaving dead space below */
  .poster-frame { margin-top: clamp(20px, 9dvh, 90px); }

  /* the portrait crop slices the left wall paintings mid-word — hide them,
     and show the centered "gyaan ki dukaan" in the gap under the poster instead */
  .wall-note-left { display: none; }
  .wall-note-center { display: unset; }

  /* the bigger poster leaves no room beside it — the bulb sits out mobile */
  #bulb { display: none; }
}
