@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --font-title: 'Press Start 2P', monospace;
  --font-body: 'VT323', monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: #000;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
}
/* one screen, no document scroll: fountain on top, details below */
body {
  height: 100vh;
  height: 100dvh; /* dynamic viewport so iOS URL bar doesn't crop the seam */
  display: flex; flex-direction: column;
}

/* ===== top: the live waterfall (fixed) ===== */
.wf-stage {
  position: relative;
  flex: 0 0 45dvh; height: 45dvh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 120% at 50% 30%, #07090c 0%, #000 70%);
  overflow: hidden;
}
.frame {
  position: relative;
  width: min(100vw, calc(45dvh * 2034 / 1136));
  aspect-ratio: 2034 / 1136;
}
.plate, #water { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plate { object-fit: contain; user-select: none; -webkit-user-drag: none; pointer-events: none; }

/* ===== bottom: party details that flood into view ===== */
.wf-details {
  position: relative;
  flex: 1 1 auto; min-height: 0;
  background: #000; /* black void — matches the fountain background */
  overflow: hidden;
}

/* the details panel itself (mirrors the homepage #info), internally scrollable */
.wf-doc {
  --info-bg: #000; --info-cream: #ebd2b4; --info-orange: #ff5500;
  --info-pad-t: 28px; --info-pad-x: 24px; --info-pad-b: 24px;
  position: absolute; inset: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--info-bg); color: var(--info-cream);
  font-family: var(--font-body);
  padding: var(--info-pad-t) var(--info-pad-x) var(--info-pad-b);
  display: flex; flex-direction: column; justify-content: flex-start; gap: 18px;
  /* reveal is driven per-frame by JS: clip-path polygon() following the water surface */
  clip-path: polygon(0px 0px, 0px 0px, 0px 0px); /* hidden until the pool sim reveals it */
}
.wf-doc > * { max-width: 680px; margin-left: auto; margin-right: auto; width: 100%; }
.wf-doc.wf-has-pill { padding-bottom: 72px; } /* reserve room for the floating "tap me to tilt" pill so it can't cover the footer */

.info-intro { text-align: center; font-size: 50px; line-height: 1.05; font-weight: normal; }
.info-subtitle { text-align: center; font-size: 18px; line-height: 1.2; font-style: italic; opacity: 0.9; margin-top: -14px; margin-bottom: -10px; }

.info-essentials { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 22px; line-height: 1.3; }
.info-essentials dt {
  background: var(--info-orange); color: var(--info-cream);
  font-weight: bold; letter-spacing: 1px; text-align: center; padding: 4px 10px;
  font-family: var(--font-title); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
}
.info-essentials dd { margin: 0; align-self: center; }

.info-schedule h3, .info-awards h3 {
  font-family: var(--font-title); font-size: 12px; color: var(--info-orange);
  letter-spacing: 2px; margin-bottom: 10px; text-align: center; font-weight: normal;
}
.info-awards h3 { font-size: 10px; }
.info-schedule ol {
  list-style: none; padding: 0; font-size: 18px; line-height: 1.3;
  display: flex; flex-wrap: wrap; justify-content: center; column-gap: 24px; row-gap: 4px;
}
.info-schedule li { display: inline-flex; gap: 8px; align-items: baseline; }
.info-schedule .time { color: var(--info-orange); }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; justify-content: center; }
.chips li { border: 2px solid var(--info-orange); border-radius: 999px; padding: 2px 10px; font-size: 13px; line-height: 1.25; color: var(--info-cream); }

#info-footer {
  text-align: center; font-family: var(--font-title); font-size: 7px; letter-spacing: 2px;
  color: var(--info-cream); opacity: 0.65; padding-top: 8px;
  border-top: 1px dashed rgba(235, 210, 180, 0.3);
}
.wf-back { text-align: center; }
.wf-back a { color: #7cb342; text-decoration: none; font-size: 0.9rem; }

/* tighter on phones so the first screenful of details reads well */
@media (max-width: 480px) {
  .wf-doc { --info-pad-t: 16px; --info-pad-x: 16px; --info-pad-b: 14px; gap: 12px; }
  .info-intro { font-size: 26px; }
  .info-subtitle { font-size: 14px; margin-top: -8px; margin-bottom: -7px; }
  .info-essentials { font-size: 17px; gap: 5px 12px; }
  .info-essentials dt { font-size: 9px; padding: 3px 8px; }
  .info-schedule h3, .info-awards h3 { font-size: 10px; margin-bottom: 6px; }
  .info-schedule ol { font-size: 15px; column-gap: 14px; }
  .chips { gap: 5px 7px; }
  .chips li { font-size: 11px; padding: 1px 8px; }
}

/* tappable "scroll down for more" button — shown while the details panel can scroll further */
.wf-scroll-btn {
  position: absolute; right: 12px; bottom: 16px; z-index: 4;
  width: 42px; height: 42px; border-radius: 999px; padding: 0;
  display: none; align-items: center; justify-content: center;
  background: rgba(10, 20, 30, 0.55); border: 1.5px solid rgba(170, 212, 240, 0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer; animation: wf-scroll-bob 1.6s ease-in-out infinite;
  transition: opacity 350ms ease;
}
.wf-scroll-btn.show { display: flex; }
.wf-scroll-btn.atbottom { opacity: 0; pointer-events: none; } /* nothing more below */
.wf-scroll-btn::before {
  content: ''; width: 11px; height: 11px; margin-top: -3px;
  border-right: 2.5px solid rgba(214, 236, 255, 0.95);
  border-bottom: 2.5px solid rgba(214, 236, 255, 0.95);
  transform: rotate(45deg);
}
@keyframes wf-scroll-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .wf-scroll-btn { animation: none; } }

/* the sloshing water, drawn on canvas over the details; the clip reveals the HTML beneath */
#pool { position: fixed; top: 0; left: 0; z-index: 3; pointer-events: none; } /* viewport overlay (size set in JS) so water can crash up over the fountain */

/* tap-to-enable-tilt pill (JS adds .show on touch devices, .hide once enabled) */
.tilt-enable {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  z-index: 5; display: none;
  font: inherit; font-size: 14px; color: #eaf4ff;
  background: rgba(10, 20, 30, 0.7); border: 1.5px solid rgba(120, 200, 255, 0.8);
  border-radius: 999px; padding: 10px 18px; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: opacity 500ms ease;
}
.tilt-enable.show { display: block; }
.tilt-enable.hide { opacity: 0; pointer-events: none; }
