/* ===========================================================================
   THE MOONION VAULT — styles
   Aesthetic: toy-like maximalism. Denim + banana yellow + steel rivets.
   =========================================================================== */

:root {
  --yellow: #ffd23f;
  --yellow-deep: #f5b700;
  --yellow-shadow: #c98a00;
  --denim: #2f5d8a;
  --denim-deep: #1f3f5e;
  --denim-light: #4a7cae;
  --steel: #aab6c4;
  --steel-dark: #6b7888;
  --ink: #14110f;
  --cream: #fff6dc;
  --coral: #ff5a4d;
  --coral-deep: #e0392c;
  --leaf: #6bbf59;

  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-soft: 0 18px 40px -18px rgba(20, 17, 15, 0.55);
  --radius: 22px;

  --display: "Luckiest Guy", system-ui, sans-serif;
  --comic: "Bangers", system-ui, sans-serif;
  --body: "Nunito", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background-color: var(--denim);
  background-image:
    radial-gradient(circle at 20% -10%, rgba(255,255,255,.08), transparent 40%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.035) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, var(--denim-light), var(--denim) 30%, var(--denim-deep));
  background-attachment: fixed;
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ============================== LOCK SCREEN =============================== */
.lock {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 30%, #2c2c34, #131319 70%);
  transition: opacity .6s ease, transform .6s ease;
}
.lock.blown {
  opacity: 0;
  transform: scale(1.25);
  pointer-events: none;
}
.lock-bananas { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* the vault door */
.vault {
  position: relative;
  width: min(340px, 74vw);
  aspect-ratio: 1;
}
.vault-frame {
  position: absolute; inset: -16px;
  border-radius: 30px;
  background: linear-gradient(145deg, #3a3f48, #1c1f25);
  box-shadow: inset 0 0 0 6px #11141a, 0 30px 60px -20px #000;
  z-index: 0;
}
.vault-door {
  position: absolute; inset: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 35% 30%, #5a6470, #2c333d 65%, #1b2027);
  box-shadow: inset 0 0 0 4px #0c0f14, inset 0 8px 20px rgba(255,255,255,.12);
  z-index: 2;
  display: grid;
  place-items: center;
  transition: transform 1s cubic-bezier(.7,-0.2,.3,1.4), opacity .8s ease;
  transform-origin: left center;
}
.vault-door.open {
  transform: perspective(1200px) rotateY(-115deg);
}
.vault-ring {
  position: absolute;
  border-radius: 50%;
  border: 3px dashed rgba(255,255,255,.18);
}
.vault-ring.r1 { inset: 14%; }
.vault-ring.r2 { inset: 26%; border-style: dotted; }
.vault-dial {
  position: relative;
  width: 42%; height: 42%;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, var(--steel), var(--steel-dark) 70%, #3c454f);
  box-shadow: inset 0 0 0 6px #20262e, 0 6px 14px rgba(0,0,0,.5);
  transition: transform 1.1s cubic-bezier(.4,1.4,.5,1);
}
.vault-dial.spin { transform: rotate(1080deg); }
.dial-mark {
  position: absolute;
  top: 8%; left: 50%;
  width: 6px; height: 26%;
  background: var(--coral);
  border-radius: 4px;
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--coral);
}
.vault-bolts { position: absolute; inset: 0; }
.vault-bolts i {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #cfd6de, #5a636e);
  box-shadow: inset 0 0 2px #000;
}
.vault-bolts i:nth-child(1){top:8%;left:8%}
.vault-bolts i:nth-child(2){top:8%;right:8%}
.vault-bolts i:nth-child(3){bottom:8%;left:8%}
.vault-bolts i:nth-child(4){bottom:8%;right:8%}
.vault-bolts i:nth-child(5){top:8%;left:50%;transform:translateX(-50%)}
.vault-bolts i:nth-child(6){bottom:8%;left:50%;transform:translateX(-50%)}
.vault-bolts i:nth-child(7){top:50%;left:8%;transform:translateY(-50%)}
.vault-bolts i:nth-child(8){top:50%;right:8%;transform:translateY(-50%)}

.lock-panel { text-align: center; max-width: 460px; z-index: 3; }
.lock-title {
  font-family: var(--display);
  color: var(--yellow);
  font-size: clamp(2rem, 7vw, 3.4rem);
  margin: 0;
  letter-spacing: 1px;
  text-shadow: 3px 3px 0 #000, 0 0 24px rgba(255,210,63,.4);
}
.lock-sub { color: #d7dde6; font-weight: 800; margin: 8px 0 22px; }
#loginForm { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#passwordInput {
  font-family: var(--display);
  font-size: 1.4rem;
  letter-spacing: .3em;
  text-align: center;
  padding: 14px 20px;
  width: 240px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: var(--cream);
  color: var(--ink);
  outline: none;
}
#passwordInput:focus { box-shadow: 0 0 0 4px var(--yellow); }
.lock-error { color: var(--coral); font-weight: 900; min-height: 22px; margin-top: 12px; }

/* shared chunky button */
button, .big-btn {
  font-family: var(--display);
  cursor: pointer;
}
#unlockBtn, .big-btn, .chat-input-row button, #chatForm button {
  font-size: 1.05rem;
  letter-spacing: 1px;
  padding: 14px 22px;
  border: 4px solid var(--ink);
  border-radius: 16px;
  background: var(--coral);
  color: #fff;
  box-shadow: var(--shadow-hard);
  transition: transform .12s ease, box-shadow .12s ease;
  text-decoration: none;
  display: inline-block;
}
#unlockBtn:hover, .big-btn:hover, #chatForm button:hover {
  transform: translate(-2px,-2px);
  box-shadow: 8px 8px 0 var(--ink);
}
#unlockBtn:active, .big-btn:active { transform: translate(3px,3px); box-shadow: 2px 2px 0 var(--ink); }

/* ============================== NAV ===================================== */
.app { position: relative; z-index: 1; }
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: var(--yellow);
  border-bottom: 5px solid var(--ink);
  box-shadow: 0 6px 0 var(--yellow-shadow);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display);
  font-size: 1.3rem; color: var(--ink);
  text-decoration: none;
  text-shadow: 2px 2px 0 #fff3;
}
.nav-mascot { width: 34px; height: 40px; display: inline-block; }
.nav-mascot svg { width: 100%; height: 100%; }
.nav-links { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--body); font-weight: 900;
  color: var(--denim-deep);
  text-decoration: none;
  padding: 8px 12px; border-radius: 10px;
  border: 3px solid transparent;
  transition: all .15s ease;
}
.nav-links a:hover { background: var(--ink); color: var(--yellow); transform: rotate(-2deg); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; margin-left: auto; }

/* ============================== LAYOUT ================================== */
.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px clamp(16px, 4vw, 30px) 60px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
  align-items: start;
}
.content { min-width: 0; display: flex; flex-direction: column; gap: 64px; }
.sidebar { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 20px; }

section { scroll-margin-top: 90px; }
.section-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--cream);
  margin: 0 0 6px;
  text-shadow: 3px 3px 0 var(--ink);
}
.section-title span { color: var(--yellow); }
.section-note { color: #dfe7f0; font-weight: 800; margin: 0 0 22px; }

.card {
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 22px;
}

/* ============================== HERO ==================================== */
.hero {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 30px;
  align-items: center;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255,210,63,.18) 0 18px, transparent 18px 36px);
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero-photo {
  aspect-ratio: 4/5;
  border-radius: 18px;
  border: 5px solid var(--ink);
  background: var(--yellow);
  overflow: hidden;
  box-shadow: var(--shadow-hard);
  transform: rotate(-2deg);
  display: grid; place-items: center;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo svg { width: 78%; height: 78%; }
.kicker {
  font-family: var(--comic);
  letter-spacing: 2px;
  font-size: 1.2rem;
  color: var(--coral-deep);
  margin: 0 0 4px;
}
.hero-text h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 6vw, 3.4rem);
  margin: 0 0 6px; line-height: 1;
  color: var(--denim-deep);
}
.hero-tagline { font-weight: 900; font-size: 1.1rem; color: var(--coral-deep); margin: 0 0 14px; }
.hero-blurb { font-weight: 700; line-height: 1.5; margin: 0 0 20px; }

/* ============================== CREW =================================== */
.crew-lineup {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 14px;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  padding: 24px 18px;
}
.moonion {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 16px;
  transition: transform .18s ease, background .18s ease;
}
.moonion:hover { background: #fff; transform: translateY(-6px) scale(1.04); }
.char-holder { height: 108px; display: grid; place-items: center; }
.char-holder svg { width: 84px; height: 108px; }
.moonion img.char { height: 108px; width: auto; max-width: 100%; object-fit: contain; }
.moonion svg, .moonion img.char { filter: drop-shadow(3px 4px 0 rgba(20,17,15,.25)); }
.moonion:hover svg, .moonion:hover img.char { animation: wiggle .5s ease infinite; }
.moonion .tag {
  font-family: var(--body); font-weight: 900; font-size: .82rem;
  color: var(--denim-deep); text-align: center;
}
@keyframes wiggle {
  0%,100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}

/* floating info card */
.moonion-card {
  position: fixed;
  z-index: 400;
  width: 250px;
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: 18px;
  box-shadow: var(--shadow-hard);
  padding: 16px;
  pointer-events: none;
  transition: opacity .12s ease;
}
.moonion-card .mc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.moonion-card .mc-pic {
  width: 52px; height: 52px; border-radius: 12px; border: 3px solid var(--ink);
  overflow: hidden; flex: 0 0 auto; background: var(--yellow); display:grid; place-items:center;
}
.moonion-card .mc-pic img { width: 100%; height: 100%; object-fit: cover; }
.moonion-card .mc-pic svg { width: 80%; height: 80%; }
.moonion-card h4 { font-family: var(--display); margin: 0; font-size: 1.1rem; color: var(--denim-deep); line-height: 1; }
.moonion-card .mc-role { font-weight: 900; font-size: .78rem; color: var(--coral-deep); }
.moonion-card dl { margin: 0; font-size: .86rem; }
.moonion-card dt { font-weight: 900; color: var(--denim); margin-top: 8px; }
.moonion-card dd { margin: 0; font-weight: 700; }
.moonion-card dd a { color: var(--coral-deep); text-decoration: none; }
.moonion-card dd a:hover { text-decoration: underline; }

/* ============================== TIMELINE =============================== */
.timeline { display: flex; flex-direction: column; gap: 18px; }
.tl-day {
  background: var(--cream);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
}
.tl-day-head {
  background: var(--denim);
  color: var(--yellow);
  font-family: var(--display);
  padding: 12px 20px;
  display: flex; gap: 12px; align-items: baseline;
  border-bottom: 4px solid var(--ink);
}
.tl-day-head .d { font-size: 1.3rem; }
.tl-day-head .t { font-family: var(--body); font-weight: 900; color: #fff; }
.tl-item {
  display: grid; grid-template-columns: 96px 1fr; gap: 14px;
  padding: 12px 20px; align-items: center;
  border-bottom: 2px dashed #e6c97a;
}
.tl-item:last-child { border-bottom: none; }
.tl-time {
  font-family: var(--comic); font-size: 1.1rem; color: var(--coral-deep);
}
.tl-what { font-weight: 800; }

/* ============================== THE TAPE =============================== */
.tape-card { padding: 14px; }
.tape-screen {
  position: relative;
  border: 4px solid var(--ink);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 6px #1b1b1b inset, var(--shadow-hard);
}
.tape-screen video { display: block; width: 100%; height: auto; }

/* ============================== STAY =================================== */
.stay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lair-card h3, .arrivals-card h3, .playlist-card h3, .chat-card h3 {
  font-family: var(--display); color: var(--denim-deep); margin: 0 0 14px; font-size: 1.4rem;
}
.lair-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 2px dashed #e6c97a; font-weight: 800; }
.lair-row:last-child { border-bottom: none; }
.lair-row .k { color: var(--denim); }
.lair-row .v { text-align: right; }
.lair-note { margin-top: 14px; font-weight: 700; font-style: italic; color: #6b5a2a; }
.arrival {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px;
  padding: 10px 0; border-bottom: 2px dashed #e6c97a;
}
.arrival:last-child { border-bottom: none; }
.arrival .who { font-family: var(--display); color: var(--denim-deep); }
.arrival .eta { font-family: var(--comic); color: var(--coral-deep); }
.arrival .mode, .arrival .note { font-weight: 700; font-size: .85rem; grid-column: 1 / -1; color: #555; }

/* ============================== CHAT =================================== */
.chat-name-row input, .chat-input-row input {
  font-family: var(--body); font-weight: 800;
  width: 100%; padding: 12px 14px;
  border: 3px solid var(--ink); border-radius: 12px;
  background: #fff; outline: none;
}
.chat-name-row { margin-bottom: 12px; }
.chat-log {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 12px;
  height: 280px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
}
.chat-msg { background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 8px 12px; }
.chat-msg .who { font-family: var(--display); color: var(--denim-deep); font-size: .95rem; }
.chat-msg .when { font-size: .7rem; color: #8a7a40; font-weight: 800; margin-left: 6px; }
.chat-msg .body { font-weight: 700; word-break: break-word; }
.chat-empty { color: #999; font-weight: 800; text-align: center; margin: auto; }
.chat-input-row { display: flex; gap: 10px; margin-top: 12px; }
.chat-input-row input { flex: 1; }
.chat-input-row button { padding: 12px 18px; }

/* ============================== SIDEBAR ================================ */
.playlist-card .pl-btn {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--body); font-weight: 900;
  padding: 14px 16px; margin-bottom: 12px;
  border: 3px solid var(--ink); border-radius: 14px;
  text-decoration: none; color: #fff;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease;
}
.playlist-card .pl-btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.pl-btn.spotify { background: #1db954; }
.pl-btn.apple { background: #fa243c; }
.pl-btn .ico { font-size: 1.4rem; }
.pl-missing { font-weight: 800; color: #8a7a40; font-style: italic; }
.bello-card { background: var(--yellow); text-align: center; }
.bello { font-family: var(--display); font-size: 2.4rem; color: var(--denim-deep); margin: 0; text-shadow: 2px 2px 0 #fff6; }
.bello-sub { font-weight: 800; margin: 4px 0 0; }

/* ============================== FOOTER ================================= */
.footer {
  text-align: center; padding: 30px 20px 50px;
  color: #cfe; font-weight: 800;
}
.link-btn {
  font-family: var(--body); font-weight: 900;
  background: none; border: 3px solid var(--cream);
  color: var(--cream); padding: 8px 16px; border-radius: 12px;
  margin-top: 10px; cursor: pointer;
}
.link-btn:hover { background: var(--cream); color: var(--denim-deep); }

/* ============================== BANANAS / CONFETTI ===================== */
.banana, .confetti-bit {
  position: fixed; pointer-events: none; z-index: 300; user-select: none;
}
.float-banana { position: fixed; z-index: 0; opacity: .5; pointer-events: auto; cursor: pointer; }

/* ============================== REVEAL ================================= */
.reveal { opacity: 0; transform: translateY(30px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }

/* ============================== RESPONSIVE ============================= */
@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; flex-direction: column; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { max-width: 240px; margin: 0 auto; }
  .stay-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; margin-left: 0; gap: 4px;
  }
  .nav-links.open { display: flex; }
  .nav { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, .vault-door, .vault-dial { transition: none !important; animation: none !important; }
}
