/* Landing page: centred cinematic layout over a night city sky with a drifting blimp */
.landing {
  --cine-red: #ff2a2a;
  --cream: #e9e5dc;
  --cream-ink: #141210;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #0b0b0b;
}

/* ---------- background ---------- */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: #0b0b0b url('/brand/city-sky.webp') center bottom / cover no-repeat;
  animation: sky-in 2s ease-out both;
}
@keyframes sky-in { from { opacity: 0; } to { opacity: 1; } }

/* The blimp: positioned and moved by blimp.js */
.blimp {
  position: fixed; top: 0; left: 0; z-index: 1; pointer-events: none;
  width: clamp(180px, 20vw, 340px); height: auto;
  transform-origin: 50% 50%; will-change: transform;
  /* faint moonlit rim so the dark hull reads against the night sky, and a glow on the lit sign */
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.28)) drop-shadow(0 0 26px rgba(255, 255, 255, 0.08));
  opacity: 0; transition: opacity 2.5s ease-out;
}
.blimp.is-flying { opacity: 1; }
/* Softly darkens behind the title, and vignettes the edges like a film still */
.shade {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(42% 20% at 50% 50%, rgba(8, 8, 8, 0.6), rgba(8, 8, 8, 0.22) 60%, transparent 100%),
    radial-gradient(125% 100% at 50% 40%, transparent 60%, rgba(0, 0, 0, 0.6) 100%);
}

/* ---------- corner details ---------- */
.corner {
  position: fixed; z-index: 3; display: grid; gap: 3px;
  font-size: 10.5px; line-height: 1.35; color: #9a9a9a;
  text-shadow: 0 0 6px #000, 0 0 2px #000;
}
.corner-tl { top: 24px; left: 28px; }
.corner-tr { top: 18px; right: 22px; }
.corner-bl { bottom: 26px; left: 28px; }
.corner-br { bottom: 26px; right: 28px; text-align: right; }
.corner-link {
  padding: 8px 12px; border-radius: 999px; background: none;
  border: 1px solid rgba(255, 255, 255, 0.16); color: #d6d6d6; font-size: 11px;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), background-color 0.3s;
}
.corner-link:hover { border-color: rgba(255, 255, 255, 0.4); color: #fff; background: rgba(255, 255, 255, 0.04); }

/* ---------- centre stage ---------- */
.stage {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 20px 4vh; text-align: center;
}

.wordmark {
  position: relative; margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 0.32em;
  font: 700 clamp(30px, 6.4vw, 92px)/1 'Orbitron', var(--font-display);
  letter-spacing: 0.02em; text-transform: uppercase; color: #f2f2f2;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.22), 0 0 2px rgba(255, 255, 255, 0.5);
  opacity: 0; animation: title-in 1.4s var(--ease-out) 0.5s forwards;
}
.wordmark-logo {
  width: 1.12em; height: 1.12em; flex: none;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.25));
}
.wordmark-text { position: relative; isolation: isolate; white-space: nowrap; }
/* The red light streak behind the title */
.wordmark-text::before {
  content: ''; position: absolute; z-index: -1;
  left: 0.08em; top: -0.95em; bottom: -0.95em; width: 2px;
  background: linear-gradient(transparent, var(--cine-red) 30%, var(--cine-red) 70%, transparent);
  box-shadow: 0 0 18px 3px rgba(255, 42, 42, 0.55), 0 0 60px 12px rgba(255, 42, 42, 0.18);
  opacity: 0.85; animation: streak 6s ease-in-out infinite;
}
@keyframes streak {
  0%, 100% { opacity: 0.85; }
  46% { opacity: 0.85; }
  48% { opacity: 0.35; }
  50% { opacity: 0.95; }
  53% { opacity: 0.55; }
  56% { opacity: 0.85; }
}
@keyframes title-in {
  from { opacity: 0; letter-spacing: 0.16em; filter: blur(8px); }
  to { opacity: 1; letter-spacing: 0.02em; filter: blur(0); }
}

.tagline {
  margin: clamp(22px, 3.2vh, 34px) 0 0;
  font-size: clamp(10px, 1vw, 12.5px); letter-spacing: 0.34em; color: #c4c4c4;
  text-shadow: 0 0 10px #000, 0 0 3px #000;
  opacity: 0; animation: fade-up 1s var(--ease-out) 1.05s forwards;
}

.enter-btn {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: clamp(28px, 4.5vh, 44px); height: 44px; padding: 0 20px;
  border: 0; border-radius: 4px;
  background: var(--cream); color: var(--cream-ink);
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 10px 40px -10px rgba(0, 0, 0, 0.9);
  opacity: 0; animation: fade-up 1s var(--ease-out) 1.25s forwards;
  transition: background-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.enter-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--cine-red);
  box-shadow: 0 0 8px rgba(255, 42, 42, 0.9);
  animation: blink-dot 2.4s ease-in-out infinite;
}
@keyframes blink-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (hover: hover) and (pointer: fine) {
  .enter-btn:hover { background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 0 40px -6px rgba(255, 255, 255, 0.35); }
}
.enter-btn:active { transform: scale(0.98); }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Bottom status pill */
.status-pill {
  position: fixed; z-index: 3; left: 0; right: 0; bottom: 24px;
  width: max-content; max-width: calc(100vw - 32px); margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  overflow: hidden; text-overflow: ellipsis;
  padding: 7px 12px; border-radius: 4px;
  background: rgba(233, 229, 220, 0.92); color: var(--cream-ink);
  font-size: 10.5px; white-space: nowrap;
  animation: fade-up 1s var(--ease-out) 1.6s both;
}
.status-pill .live-dot { width: 6px; height: 6px; background: #1aa36b; }
.pill-sep { width: 1px; height: 11px; background: rgba(20, 18, 16, 0.25); margin: 0 2px; }
/* Thin track that fills red as the free spots go */
.pill-bar {
  --fill: 0%;
  position: relative; width: 56px; height: 3px; flex: none; border-radius: 2px;
  background: rgba(20, 18, 16, 0.16); overflow: hidden;
}
.pill-bar::after {
  content: ''; position: absolute; inset: 0 auto 0 0; width: var(--fill);
  background: var(--accent-bg); border-radius: inherit;
  transition: width 1.2s var(--ease-out);
}
.pill-count { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- sign-up dialog ---------- */
.join-dialog {
  width: min(440px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow-y: auto;
  padding: 28px; border-radius: 14px; color: var(--text);
  background: rgba(17, 17, 19, 0.94); border: 1px solid var(--line-2);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.join-dialog::backdrop { background: rgba(0, 0, 0, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.join-dialog[open] { animation: dialog-in 0.5s var(--ease-out); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
.dialog-close {
  position: absolute; top: 14px; right: 14px; width: 36px; height: 36px;
  display: grid; place-items: center; border: 0; border-radius: 10px;
  background: none; color: var(--text-3);
}
.dialog-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.card-pane { animation: pane-in 0.45s var(--ease-out); }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card-head { padding-right: 32px; }
.card-head h2 { margin: 0; font: 700 19px/1.2 var(--font-display); letter-spacing: 0.03em; text-transform: uppercase; }
.card-head p { margin: 8px 0 22px; color: var(--text-2); font-size: 14px; }
.join-dialog form { display: grid; gap: 14px; }
.join-dialog .btn-primary { margin-top: 6px; }
.switch { margin: 18px 0 0; text-align: center; font-size: 13.5px; color: var(--text-3); }
.text-btn {
  background: none; border: 0; padding: 2px 0; color: var(--text); font-weight: 500;
  text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px;
}
.text-btn:hover { text-decoration-color: var(--accent); }

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .stage { padding-bottom: 8vh; }
  .wordmark { flex-direction: column; gap: 14px; font-size: clamp(26px, 8.6vw, 44px); }
  .wordmark-logo { width: 64px; height: 64px; }
  .wordmark-text::before { top: -0.7em; bottom: -0.7em; }
  .tagline { max-width: 26em; line-height: 1.9; letter-spacing: 0.26em; }
  .corner-bl, .corner-br { display: none; }
  .corner-tl { top: 20px; left: 20px; }
  .corner-tr { top: 14px; right: 14px; }
  .shade {
    background:
      radial-gradient(80% 24% at 50% 46%, rgba(8, 8, 8, 0.7), rgba(8, 8, 8, 0.25) 65%, transparent 100%),
      radial-gradient(140% 90% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
  }
  .join-dialog { padding: 22px 20px; }
  .status-pill { gap: 7px; }
  .pill-bar { width: 32px; }
}
@media (max-width: 350px) {
  .pill-bar, .pill-sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .wordmark, .tagline, .enter-btn, .status-pill { opacity: 1; animation: none; }
  .wordmark-text::before, .enter-dot { animation: none; }
}
