/* ================================================================
   Desi Disco Arcade — style.css
   Tokens + components + screens. Design space: 1280×600 stage.
   ================================================================ */

:root {
  --bg: #160A24;
  --panel: #241238;
  --ink: #F5E9D6;
  --pink: #FF2E88;
  --gold: #FFD23F;
  --orange: #FF8C1A;
  --teal: #2EE6D6;
  --muted: #6A5589;
  --body: #8F7AB0;
  --light: #C9B8E0;
  --stripe: #2E1A48;
  --s: 1; /* stage scale, set by JS */
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
}

body {
  font-family: 'VT323', monospace;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
canvas { image-rendering: pixelated; }

.px { font-family: 'Press Start 2P', monospace; text-transform: uppercase; }

/* ---------------- Chrome: marquee / tab bar / footer ---------------- */

#marquee {
  display: none;
  flex: none;
  gap: 10px;
  padding: 6px 10px;
  background: var(--panel);
  overflow: hidden;
}
body.on-home #marquee { display: flex; }
#marquee .bulb { width: 12px; height: 12px; flex: none; }
#marquee .bulb:nth-child(4n+1) { background: var(--gold); }
#marquee .bulb:nth-child(4n+2) { background: var(--pink); }
#marquee .bulb:nth-child(4n+3) { background: var(--gold); }
#marquee .bulb:nth-child(4n+4) { background: var(--teal); }
#marquee .bulb:nth-child(2n) { animation: bulb 1s steps(2, start) infinite; }
#marquee .bulb:nth-child(2n+1) { animation: bulb 1s steps(2, start) infinite .5s; }
@keyframes bulb { 0% { opacity: 1; } 100% { opacity: .25; } }

#tabbar {
  flex: none;
  display: flex;
  align-items: stretch;
  background: var(--panel);
  border-bottom: 4px solid var(--ink);
}
#tabbar .tab {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--ink);
  padding: 16px 20px;
  border-right: 4px solid var(--ink);
  white-space: nowrap;
}
#tabbar .tab:hover { background: var(--stripe); }
#tabbar .tab[aria-current="page"] { background: var(--pink); color: var(--bg); }
#mute {
  margin-left: auto;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--gold);
  padding: 16px 20px;
  white-space: nowrap;
}

#footer {
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--panel);
  border-top: 4px solid var(--ink);
  padding: 12px 24px;
}
#footer button {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--gold);
  padding: 8px 10px;
}
#footer button:hover:not(:disabled) { color: var(--pink); }
#footer button:disabled { color: var(--muted); cursor: default; }

/* ---------------- Strip + stages ---------------- */

#viewport { flex: 1; overflow: hidden; position: relative; }

#strip {
  display: flex;
  height: 100%;
  width: 700%;
}

.screen {
  width: 100vw;
  height: 100%;
  flex: none;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stage {
  width: 1280px;
  height: 600px;
  flex: none;
  position: relative;
  transform: scale(var(--s));
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------------- Scanlines ---------------- */

#scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  background: repeating-linear-gradient(0deg,
    rgba(255,255,255,.04) 0px, rgba(255,255,255,.04) 2px,
    transparent 2px, transparent 4px);
}

/* ---------------- Pixel wipe overlay ---------------- */

#wipe {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  pointer-events: none;
}
#wipe .col { flex: 1; background: var(--bg); transform: scaleY(0); transform-origin: top; }
#wipe .col.on { transform: scaleY(1); }

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  text-transform: uppercase;
  padding: 16px 24px;
  border: 4px solid var(--ink);
  line-height: 1;
}
.btn-primary { background: var(--gold); color: var(--bg); box-shadow: 6px 6px 0 var(--pink); }
.btn-secondary { background: var(--panel); color: var(--ink); box-shadow: 6px 6px 0 var(--muted); }
.btn:hover { transform: translate(2px, 2px); }
.btn-primary:hover { box-shadow: 4px 4px 0 var(--pink); }
.btn-secondary:hover { box-shadow: 4px 4px 0 var(--muted); }
.btn:active { transform: translate(6px, 6px); box-shadow: none !important; }

/* ---------------- Slots (placeholders) ---------------- */

.slot-img {
  background: repeating-linear-gradient(45deg, var(--stripe) 0 12px, var(--panel) 12px 24px);
  border: 4px dashed var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  font-size: 20px;
  letter-spacing: 2px;
  overflow: hidden;
}
.slot-img img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.slot-img.filled { border-style: solid; border-color: var(--ink); }

.slot-text {
  border: 2px dashed var(--muted);
  padding: 14px 20px;
  color: var(--light);
  font-size: 22px;
  line-height: 1.35;
  text-align: center;
}
.slot-text.filled { border-color: transparent; color: var(--ink); font-size: 24px; }

/* ================================================================
   HOME
   ================================================================ */

#home .stage { justify-content: flex-start; }

.ball-wrap { display: flex; flex-direction: column; align-items: center; height: 96px; flex: none; }
.ball-chain { width: 4px; height: 36px; background: var(--muted); }
#ball { width: 56px; height: 56px; }

.home-date {
  font-family: 'Press Start 2P', monospace;
  font-size: 12px;
  color: var(--gold);
  margin-top: 12px;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-top: 20px;
}
.player { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.player canvas { width: 108px; height: 144px; }
.player .plabel { font-family: 'Press Start 2P', monospace; font-size: 10px; }
.player .plabel.p1 { color: var(--pink); }
.player .plabel.p2 { color: var(--teal); }

.names { text-align: center; }
.name-bride {
  font-family: 'Press Start 2P', monospace;
  font-size: 44px;
  color: var(--pink);
  text-shadow: 4px 4px 0 #4A1040;
}
.name-weds {
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  color: var(--gold);
  margin: 16px 0;
}
.name-groom {
  font-family: 'Press Start 2P', monospace;
  font-size: 44px;
  color: var(--teal);
  text-shadow: 4px 4px 0 #0E4A44;
}

#home .slot-text { width: 620px; margin-top: 26px; }

#press-start { margin-top: 26px; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 0% { opacity: 1; } 100% { opacity: .35; } }

.dance-floor {
  position: absolute;
  bottom: 0;
  left: -9999px;
  right: -9999px;
  height: 36px;
  background: repeating-conic-gradient(rgba(255,46,136,.45) 0% 25%, rgba(46,230,214,.3) 0% 50%) 0 0/36px 36px;
}

/* ================================================================
   INFO
   ================================================================ */

#info .stage { align-items: flex-start; padding: 8px 40px 20px; }

.info-h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 24px;
  color: var(--gold);
}
.info-sub { font-size: 26px; color: var(--ink); margin-top: 14px; }
.info-sub .venue { color: var(--pink); }

.event-cards {
  display: flex;
  gap: 24px;
  margin-top: 22px;
  width: 100%;
  flex: 1;
  min-height: 0;
}
.ecard {
  flex: 1;
  background: var(--panel);
  border: 4px solid var(--ink);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ecard-header {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--bg);
  padding: 10px 12px;
  border-bottom: 4px solid var(--ink);
}
.ecard-date {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--gold);
  line-height: 1.7;
  padding: 12px 14px 4px;
}
.ecard .slot-img { height: 140px; flex: none; margin: 10px 14px 0; font-size: 16px; }
.ecard .slot-text { margin: 12px 14px; font-size: 20px; text-align: left; flex: 1; }
.ecard.c-pink   { box-shadow: 8px 8px 0 rgba(255,46,136,.4); }
.ecard.c-gold   { box-shadow: 8px 8px 0 rgba(255,210,63,.4); }
.ecard.c-orange { box-shadow: 8px 8px 0 rgba(255,140,26,.4); }
.ecard.c-teal   { box-shadow: 8px 8px 0 rgba(46,230,214,.4); border-color: var(--teal); }
.ecard.c-pink .ecard-header   { background: var(--pink); }
.ecard.c-gold .ecard-header   { background: var(--gold); }
.ecard.c-orange .ecard-header { background: var(--orange); }
.ecard.c-teal .ecard-header   { background: var(--teal); }

/* ================================================================
   OUR STORY
   ================================================================ */

#story .stage { flex-direction: row; justify-content: center; gap: 56px; padding: 0 40px; }

#story .slot-img { width: 520px; height: 420px; flex: none; box-shadow: 8px 8px 0 rgba(255,46,136,.4); }

.story-col { width: 520px; display: flex; flex-direction: column; justify-content: center; }
.story-h1 { font-family: 'Press Start 2P', monospace; font-size: 24px; color: var(--pink); }
.story-sub { font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--teal); margin-top: 16px; }
.story-box { border: 2px dashed var(--muted); padding: 16px 20px; margin-top: 22px; }
.story-warn { font-family: 'Press Start 2P', monospace; font-size: 11px; color: var(--orange); line-height: 1.6; }
.story-tag { font-size: 24px; color: var(--gold); line-height: 1.3; margin-top: 14px; }

/* ================================================================
   RSVP
   ================================================================ */

#rsvp .stage { justify-content: center; }

.rsvp-h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 34px;
  color: var(--gold);
  text-shadow: 4px 4px 0 #4A3505;
}
.rsvp-sub { font-family: 'Press Start 2P', monospace; font-size: 13px; color: var(--pink); margin-top: 16px; }
#rsvp .slot-img { width: 480px; height: 270px; margin-top: 22px; box-shadow: 8px 8px 0 rgba(255,46,136,.4); }
#rsvp .slot-text { width: 480px; margin-top: 20px; }
.rsvp-continue { font-family: 'Press Start 2P', monospace; font-size: 11px; color: var(--teal); margin-top: 20px; }
.rsvp-buttons { display: flex; gap: 28px; margin-top: 18px; }

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  z-index: 85;
  pointer-events: none;
  animation: fall 1.2s steps(10, end) forwards;
}
@keyframes fall {
  to { transform: translate(var(--dx), 78vh); opacity: 0; }
}

/* ================================================================
   REGISTRY
   ================================================================ */

#registry .stage { flex-direction: row; justify-content: center; gap: 56px; padding: 0 40px; }

.reg-col { width: 520px; display: flex; flex-direction: column; justify-content: center; }
.reg-h1 { font-family: 'Press Start 2P', monospace; font-size: 24px; color: var(--gold); }
.reg-line1 { font-family: 'Press Start 2P', monospace; font-size: 13px; color: var(--pink); margin-top: 20px; line-height: 1.8; }
.reg-line2 { font-family: 'Press Start 2P', monospace; font-size: 13px; color: var(--teal); margin-top: 6px; line-height: 1.8; }
#registry .slot-text { margin-top: 26px; text-align: left; }
#registry .slot-img { width: 520px; height: 400px; flex: none; box-shadow: 8px 8px 0 rgba(255,210,63,.4); }

/* ================================================================
   PLAYLIST
   ================================================================ */

#playlist .stage { align-items: flex-start; padding: 8px 40px 20px; }

.pl-top { display: flex; width: 100%; align-items: baseline; }
.pl-h1 { font-family: 'Press Start 2P', monospace; font-size: 22px; color: var(--teal); }
.pl-note { margin-left: auto; font-size: 20px; color: var(--body); }

.pl-cards { display: flex; gap: 24px; margin-top: 20px; width: 100%; flex: 1; min-height: 0; }
.pcard {
  flex: 1;
  background: var(--panel);
  border: 4px solid var(--ink);
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.pcard .badge {
  align-self: flex-start;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--bg);
  padding: 6px 8px;
}
.pcard .ptitle {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.7;
  margin-top: 14px;
}
.eq {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
  border: 2px solid var(--muted);
  background: var(--bg);
  padding: 6px;
  margin-top: 14px;
}
.eq span { flex: 1; height: 30%; animation: eq .9s steps(3, end) infinite alternate; }
.eq span:nth-child(1) { animation-duration: .7s; }
.eq span:nth-child(2) { animation-duration: 1.1s; }
.eq span:nth-child(3) { animation-duration: .8s; animation-delay: .2s; }
.eq span:nth-child(4) { animation-duration: 1.3s; }
.eq span:nth-child(5) { animation-duration: .9s; animation-delay: .35s; }
.eq span:nth-child(6) { animation-duration: .75s; }
.eq span:nth-child(7) { animation-duration: 1.05s; animation-delay: .15s; }
@keyframes eq { 0% { height: 20%; } 50% { height: 85%; } 100% { height: 45%; } }

.pcard .blurb { font-size: 20px; color: var(--light); margin-top: 12px; line-height: 1.3; flex: 1; }
.pcard .btn { font-size: 10px; padding: 14px 16px; text-align: center; margin-top: 12px; }
.pcard .btn[aria-disabled="true"] { opacity: .55; cursor: default; }
.pcard .btn[aria-disabled="true"]:hover { transform: none; }

.pcard.c-gold   { border-color: var(--gold); box-shadow: 8px 8px 0 rgba(255,210,63,.4); }
.pcard.c-pink   { box-shadow: 8px 8px 0 rgba(255,46,136,.4); }
.pcard.c-orange { box-shadow: 8px 8px 0 rgba(255,140,26,.4); }
.pcard.c-teal   { box-shadow: 8px 8px 0 rgba(46,230,214,.4); }
.pcard.c-gold .badge   { background: var(--gold); }
.pcard.c-pink .badge   { background: var(--pink); }
.pcard.c-orange .badge { background: var(--orange); }
.pcard.c-teal .badge   { background: var(--teal); }
.pcard.c-gold .eq span   { background: var(--gold); }
.pcard.c-pink .eq span   { background: var(--pink); }
.pcard.c-orange .eq span { background: var(--orange); }
.pcard.c-teal .eq span   { background: var(--teal); }

/* ================================================================
   VISA
   ================================================================ */

#visa .stage { justify-content: center; }

.visa-sub { font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--teal); }
.visa-h1 {
  font-family: 'Press Start 2P', monospace;
  font-size: 28px;
  color: var(--gold);
  text-shadow: 4px 4px 0 #4A3505;
  text-align: center;
  line-height: 1.6;
  margin-top: 18px;
  max-width: 720px;
}
#visa .slot-img { width: 520px; height: 280px; margin-top: 24px; box-shadow: 8px 8px 0 rgba(46,230,214,.4); }

.visa-f-row { display: flex; align-items: center; gap: 20px; margin-top: 26px; }
#fkey {
  font-family: 'Press Start 2P', monospace;
  font-size: 24px;
  color: var(--bg);
  background: var(--pink);
  border: 4px solid var(--ink);
  box-shadow: 6px 6px 0 var(--gold);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#fkey:active { transform: translate(6px, 6px); box-shadow: none; }
.visa-f-label { font-family: 'Press Start 2P', monospace; font-size: 12px; color: var(--pink); }
.visa-counter { font-size: 24px; color: var(--light); margin-top: 18px; }

/* ================================================================
   MOBILE (≤820px) — stacked layout, swipe between screens,
   vertical scroll allowed INSIDE a screen. Desktop untouched.
   ================================================================ */

@media (max-width: 820px) {
  /* 2 rows of 4 — every tab always visible */
  #tabbar {
    flex-wrap: wrap;
    border-top: 3px solid var(--ink);
    border-left: 3px solid var(--ink);
  }
  #tabbar .tab {
    flex: 1 0 25%;
    max-width: 25%;
    font-size: 8px;
    padding: 12px 4px;
    text-align: center;
    border-right-width: 3px;
    border-bottom: 3px solid var(--ink);
  }
  #mute {
    flex: 1 0 25%;
    max-width: 25%;
    margin-left: 0;
    font-size: 8px;
    padding: 12px 4px;
    text-align: center;
    border-right: 3px solid var(--ink);
    border-bottom: 3px solid var(--ink);
  }
  #marquee .bulb { width: 8px; height: 8px; }
  #footer { padding: 8px 10px; }
  #footer button { font-size: 10px; padding: 12px 10px; }

  .stage {
    width: 100%;
    height: 100%;
    transform: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 16px 28px;
    justify-content: flex-start !important;
    align-items: stretch;
  }

  /* HOME */
  #home .stage { align-items: center; }
  .ball-wrap { height: 64px; }
  .ball-chain { height: 20px; }
  #ball { width: 44px; height: 44px; }
  .home-date { font-size: 9px; text-align: center; line-height: 1.8; margin-top: 10px; }
  .lockup { gap: 12px; margin-top: 14px; }
  .player canvas { width: 60px; height: 80px; }
  .player .plabel { font-size: 7px; }
  .name-bride, .name-groom { font-size: clamp(20px, 7vw, 34px); text-shadow: 3px 3px 0 #4A1040; }
  .name-groom { text-shadow: 3px 3px 0 #0E4A44; }
  .name-weds { font-size: 11px; margin: 10px 0; }
  #home .slot-text { width: 100%; margin-top: 18px; font-size: 18px; }
  #press-start { margin-top: 18px; }
  .dance-floor { position: static; width: 100%; flex: none; margin-top: auto; padding-top: 24px; background-clip: content-box; }

  /* INFO */
  .info-h1 { font-size: 16px; line-height: 1.5; }
  .info-sub { font-size: 19px; }
  .event-cards { flex-direction: column; flex: none; gap: 20px; margin-top: 16px; }
  .ecard { flex: none; }
  .ecard .slot-text { min-height: 56px; }

  /* OUR STORY + REGISTRY — stack */
  #story .stage, #registry .stage { flex-direction: column; gap: 0; align-items: center; }
  #story .slot-img, #registry .slot-img { width: 100%; height: 56vw; max-height: 340px; }
  #story .slot-img { margin-top: 14px; }
  .story-col, .reg-col { width: 100%; margin-top: 20px; }
  .story-h1, .reg-h1 { font-size: 18px; }
  .story-sub { font-size: 10px; line-height: 1.6; }
  .story-warn { font-size: 9px; line-height: 1.6; }
  .story-tag { font-size: 20px; }
  .reg-line1, .reg-line2 { font-size: 10px; line-height: 1.8; }

  /* RSVP */
  #rsvp .stage { align-items: center; }
  .rsvp-h1 { font-size: clamp(18px, 6.5vw, 28px); text-align: center; line-height: 1.4; }
  .rsvp-sub { font-size: 10px; line-height: 1.6; text-align: center; }
  #rsvp .slot-img { width: 100%; height: 52vw; max-height: 270px; }
  #rsvp .slot-text { width: 100%; }
  .rsvp-buttons { flex-direction: column; align-items: stretch; gap: 16px; width: 100%; }
  .rsvp-buttons .btn { font-size: 11px; text-align: center; }

  /* PLAYLIST */
  .pl-top { flex-direction: column; align-items: flex-start; gap: 6px; }
  .pl-h1 { font-size: 18px; }
  .pl-note { margin-left: 0; font-size: 18px; }
  .pl-cards { flex-direction: column; flex: none; gap: 20px; }
  .pcard { flex: none; }
  .pcard .blurb { flex: none; }

  /* VISA */
  #visa .stage { align-items: center; }
  .visa-sub { font-size: 9px; line-height: 1.6; text-align: center; }
  .visa-h1 { font-size: clamp(15px, 5.5vw, 24px); }
  #visa .slot-img { width: 100%; height: 54vw; max-height: 280px; }
  .visa-f-row { gap: 12px; }
  .visa-f-label { font-size: 10px; line-height: 1.6; }
}

/* ---------------- Reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
  #marquee .bulb, #press-start, .eq span, .confetti { animation: none !important; }
}
