/* ============================================================
   LEVI STUDIOS — DESIGN SYSTEM + SPARKLE SYSTEM (Ship 1, v352)
   The one shared sheet for the redesign. Built once, here:
   nav, footer, cards, buttons, type — the system every door
   inherits as it is rebuilt. Apps and Games are the proof pages.

   Base layer stays style.css (tokens, shell). This sheet loads
   AFTER it and carries the system refinements + all sparkle.

   SPARKLE HARD RULES (plan §4 — none negotiable):
   - Pure CSS + one small vanilla JS file (sparkle.js). No frameworks.
   - Nothing moves before content is readable: sparkle is paint
     and pseudo-elements only; layout never waits on it.
   - transform / opacity only — compositor work, never layout.
   - Sparkle pauses off-screen (sparkle.js toggles .ls-paused
     via IntersectionObserver; the starfield also pauses hidden).
   - prefers-reduced-motion gets the full calm site: every
     animation below is disabled inside the reduce block.
   - If it costs a tap or a stutter on modest hardware, it
     does not ship.
   ============================================================ */

/* ---- System tokens (mirror of the style.css shell palette) ---- */
:root {
  --ls-bg: #0a0a18;
  --ls-bg2: #101024;
  --ls-ink: #e8e8f0;
  --ls-dim: #9a9ab0;
  --ls-cyan: #00f0ff;
  --ls-magenta: #ff2fd6;
  --ls-gold: #ffd700;
  --ls-lime: #7dff5e;
  --ls-card: #141428;
  --ls-line: #2a2a4a;
  --ls-type-display: "Press Start 2P", "Courier New", monospace;
  --ls-type-body: "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ---- Type scale (the system voice) ---- */
body { font-family: var(--ls-type-body); }
h1, h2.sec, .hero .logo { font-family: var(--ls-type-display); }

/* ---- Nav: the five doors, one URL form (extensionless) ---- */
.doors a { transition: border-color .18s ease, color .18s ease, box-shadow .18s ease; }
.doors a:hover, .doors a:focus-visible {
  box-shadow: inset -2px -2px 0 rgba(0,0,0,.55), inset 2px 2px 0 rgba(255,255,255,.08),
              0 0 14px rgba(0,240,255,.35);
}

/* ---- Footer ---- */
.ln-footer nav a, footer nav a { transition: color .18s ease, text-shadow .18s ease; }
.ln-footer nav a:hover, footer nav a:hover { text-shadow: 0 0 10px rgba(0,240,255,.55); }

/* ---- Cards: one pattern — hover lift + glow (transform only) ---- */
.card, .app-card, .sh-tile {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover, .app-card:hover, .sh-tile:hover,
.card:focus-visible, .app-card:focus-visible, .sh-tile:focus-visible {
  transform: translateY(-3px);
  border-color: var(--ls-cyan);
  box-shadow: 0 6px 18px rgba(0,0,0,.5), 0 0 16px rgba(0,240,255,.28),
              inset -3px -3px 0 rgba(0,0,0,.4), inset 3px 3px 0 rgba(255,255,255,.05);
}

/* ---- Buttons ---- */
.btn, .btn-sh, .w95-btn { transition: box-shadow .15s ease, filter .15s ease; }
.btn:hover, .btn-sh:hover, .w95-btn:hover { filter: brightness(1.1); }

/* ============================================================
   SPARKLE SYSTEM
   ============================================================ */

/* Page fade-in: content is readable from the first frame —
   the fade is opacity paint over already-laid-out content. */
@keyframes ls-fadein { from { opacity: 0; } to { opacity: 1; } }
body { animation: ls-fadein .35s ease-out; }

/* Animated neon frame: a fixed gradient border that breathes.
   Pointer-events none, z-index below the sticky nav's plane of
   interaction (it never covers a tap target — it is 3px of edge). */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none;
  border: 3px solid transparent;
  border-image: linear-gradient(120deg, var(--ls-cyan), var(--ls-magenta), var(--ls-gold), var(--ls-cyan)) 1;
  opacity: .5;
  animation: ls-frame 7s ease-in-out infinite alternate;
}
@keyframes ls-frame { from { opacity: .28; } to { opacity: .62; } }

/* Twinkling starfield: JS (sparkle.js) drops .ls-star dots into
   the page's .stars layer; each twinkles on its own delay. */
.stars { overflow: hidden; }
.ls-star {
  position: absolute; border-radius: 50%; background: #fff;
  animation: ls-twinkle 3.2s ease-in-out infinite alternate;
}
.ls-star.c { background: var(--ls-cyan); }
.ls-star.g { background: var(--ls-gold); }
.ls-star.m { background: var(--ls-magenta); }
@keyframes ls-twinkle { from { opacity: .15; } to { opacity: .95; } }

/* Shimmer on prices and stars: a soft glow that breathes around
   gold/pink text and the PLAY pills. Text-shadow and box-shadow
   only — the words themselves are never repainted, so nothing
   can ever render invisible. */
.price, .odo, .sect-kicker, .sh-n { animation: ls-glow 4.5s ease-in-out infinite alternate; }
@keyframes ls-glow {
  from { text-shadow: 0 0 2px rgba(255,215,0,.15); }
  to   { text-shadow: 0 0 12px rgba(255,215,0,.5); }
}
.sh-pill { animation: ls-pillglow 3.8s ease-in-out infinite alternate; }
@keyframes ls-pillglow {
  from { box-shadow: 0 0 3px rgba(0,240,255,.2); }
  to   { box-shadow: 0 0 13px rgba(0,240,255,.55); }
}

/* Off-screen pause (sparkle.js toggles this on animated roots) */
.ls-paused, .ls-paused *, .ls-paused::before, .ls-paused::after {
  animation-play-state: paused !important;
}

/* ---- The calm site: reduced motion gets everything still ---- */
@media (prefers-reduced-motion: reduce) {
  body { animation: none; }
  body::before { animation: none; opacity: .35; }
  .ls-star { animation: none; opacity: .6; }
  .price, .odo, .sect-kicker, .sh-n, .sh-pill { animation: none; }
  .card, .app-card, .sh-tile, .btn, .btn-sh, .w95-btn, .doors a { transition: none; }
  .card:hover, .app-card:hover, .sh-tile:hover { transform: none; }
}

/* ============================================================
   SHIP 2 (v353) — COMMUNITY ROOMS
   The owner's phone-first rule: content spreads over pages and
   doors; no page is a bottomless scroll on a phone, and the
   important things sit high enough to actually reach.
   ============================================================ */
.ls-front-hero { padding-top: 10px; }
.ls-front-video { padding-top: 6px; }
.ls-room-grid {
  display: grid; gap: 12px; grid-template-columns: 1fr;
  margin: 0 0 4px; text-align: left;
}
@media (min-width: 700px) { .ls-room-grid { grid-template-columns: 1fr 1fr; } }
.ls-room-card { position: relative; display: flex; flex-direction: column; gap: 8px; }
.ls-room-num {
  position: absolute; top: 10px; right: 14px;
  font-family: "Press Start 2P", "Courier New", monospace;
  font-size: 20px; color: #ffd75e; opacity: .85;
}
.ls-room-card h3 { margin: 0; color: var(--cyan); font-size: 1.05em; }
.ls-room-card p { margin: 0; color: var(--dim); font-size: .95em; line-height: 1.55; }
.ls-room-btn { margin-top: auto; align-self: flex-start; }
.ls-room-top { padding-bottom: 0; }
.ls-back-row { margin: 0; }
.ls-back-link {
  display: inline-block; min-height: 44px; line-height: 44px;
  color: var(--gold); font-weight: 700; text-decoration: none;
}
.ls-back-link:hover { color: var(--cyan); }
.ls-repair-panel {
  border-color: rgba(255, 215, 94, .55);
  background: linear-gradient(180deg, rgba(255, 215, 94, .06), rgba(0, 0, 0, .18)), var(--card);
  text-align: center;
}
.ls-repair-panel h2 {
  font-family: "Press Start 2P", "Courier New", monospace;
  color: #fff; line-height: 1.5; font-size: clamp(15px, 4.4vw, 21px);
  margin: 0 0 6px;
}
.ls-repair-panel .ln-form { text-align: left; margin-top: 12px; }
.ls-repair-points { display: grid; gap: 10px; text-align: left; margin: 14px 0; }
.ls-repair-points p { margin: 0; color: var(--dim); line-height: 1.55; }
.ls-repair-points strong { color: var(--ink); }
.ls-room-focus { text-align: center; }
.ls-room-focus h3 { color: var(--cyan); }
