/* ==========================================================================
   HOLLOW SLIP WP — Shared stylesheet
   --------------------------------------------------------------------------
   One stylesheet for every page of the fan network.
   Palette (owner's brand): black, red, white — carried over from the
   original site's nightclub theme. System fonts only: the site must never
   depend on an outside service to look right.
   Sections:
     1. Base            5. Hero stage + disco ball   9.  Cards & catalog
     2. Ambience beams  6. Lights-off (blackout)     10. Story demo
     3. Header & nav    7. Hero text                 11. Footer
     4. Controls        8. Room doors                12. Reduced motion
   ========================================================================== */

/* ---------- 1. Base ---------- */
:root {
  color-scheme: dark;
  --bg: #050306;
  --panel: #140a10;
  --panel-2: #1c0a11;
  --line: #8d1a29;
  --red: #ff2030;
  --red-bright: #ff2637;
  --red-deep: #a70017;
  --txt: #ffffff;
  --muted: #e8dde2;
  --dark-btn: #070407;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top right, #2b0a12, var(--bg) 55%);
  color: var(--txt);
  line-height: 1.55;
}

a { color: inherit; }

.wrap {
  max-width: 1050px;
  margin: auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

h1 {
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 1.06;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
}
h1 .line-b { color: var(--red-bright); }
h2 { font-size: 1.7rem; margin: 0 0 10px; }
p { color: var(--muted); }

.eyebrow {
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  font-weight: 800;
}

.small { font-size: 0.87rem; }

.credit-line {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--txt);
  margin: 0 0 12px;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.btn {
  display: inline-block;
  background: linear-gradient(180deg, #27060b, var(--dark-btn));
  color: #fff;
  padding: 13px 20px;
  border: 2px solid var(--red-bright);
  border-radius: 17px;
  text-decoration: none;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(255, 17, 43, 0.62), inset 0 0 9px rgba(167, 0, 23, 0.6);
}
.btn.secondary {
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255, 20, 38, 0.53);
}
.btn:hover, .btn:focus-visible { box-shadow: 0 0 25px #ff223a; }

/* ---------- 2. Ambience — sweeping club beams behind everything ---------- */
.ambience {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  opacity: 0.16;
}
.beam {
  position: absolute;
  top: -20vh;
  left: 50%;
  width: 7vw;
  min-width: 22px;
  height: 140vh;
  transform-origin: 50% 16%;
  clip-path: polygon(48% 0, 52% 0, 100% 100%, 0 100%);
  mix-blend-mode: screen;
  animation: beam-sweep 6s ease-in-out infinite alternate;
}
.beam.b1 { background: linear-gradient(to bottom, rgba(255, 32, 48, 0.9), transparent); animation-duration: 4.6s; }
.beam.b2 { background: linear-gradient(to bottom, rgba(255, 255, 255, 0.85), transparent); left: 25%; top: -8vh; animation-duration: 5.8s; animation-delay: -2s; }
.beam.b3 { background: linear-gradient(to bottom, rgba(255, 32, 48, 0.7), transparent); left: 78%; top: -12vh; animation-duration: 5.1s; animation-delay: -1.4s; }
.beam.b4 { background: linear-gradient(to bottom, rgba(255, 255, 255, 0.55), transparent); left: 63%; animation-duration: 6.4s; animation-delay: -3s; }
@keyframes beam-sweep {
  from { transform: rotate(-42deg) scaleX(0.8); }
  to   { transform: rotate(42deg) scaleX(1.25); }
}

/* ---------- 3. Header & nav ---------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.brand {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-decoration: none;
}
.brand span { color: var(--red-bright); }
.site-nav { display: flex; gap: 15px; flex-wrap: wrap; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 6px 2px; }
.site-nav a:hover { color: #fff; }
.site-nav a[aria-current="page"] {
  color: #fff;
  font-weight: 800;
  border-bottom: 2px solid var(--red-bright);
}

/* ---------- 4. Controls (Lights / Reduce flashing / Language) ---------- */
.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
}
.ctl {
  border: 2px solid var(--red-bright);
  background: #080408;
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  font: 700 0.95rem system-ui, -apple-system, "Segoe UI", sans-serif;
  box-shadow: 0 0 12px rgba(245, 19, 55, 0.55), inset 0 0 10px rgba(106, 5, 20, 0.65);
  cursor: pointer;
  touch-action: manipulation;
}
.ctl[aria-pressed="true"] { border-color: #ffffff; }

/* ---------- 5. Hero stage + disco ball (Lobby) ---------- */
.hero-stage {
  position: relative;
  max-width: 560px;
  margin: 18px auto 8px;
  aspect-ratio: 852 / 1513;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.club-ball {
  position: absolute;
  left: 61%;
  top: 0.6%;
  width: 30%;
  aspect-ratio: 1;
  border-radius: 50%;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
  background: #080408;
  box-shadow: 0 0 14px rgba(255, 235, 239, 0.42), 0 0 34px rgba(250, 20, 59, 0.38);
}
.club-ball .sphere {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-image: url("club-graphic.png");
  background-size: 100% 100%;
  animation: ball-turn 16s linear infinite;
  will-change: transform;
}
.club-ball::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 28% 24%, rgba(255, 255, 255, 0.44), transparent 26%),
    radial-gradient(ellipse at 76% 72%, rgba(250, 9, 44, 0.5), transparent 44%),
    radial-gradient(ellipse at 50% 50%, transparent 56%, rgba(9, 0, 8, 0.65) 100%);
  pointer-events: none;
}
@keyframes ball-turn {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

/* ---------- 6. Lights-off (blackout) — dark room, portrait shown ----------
   Spec behavior: Lights OFF = pure black, club art and ball hidden, the
   owner's approved studio portrait shown whole (object-fit: contain —
   never cropped). The portrait file is the original byte-for-byte. */
.blackout {
  display: none;
  position: absolute;
  inset: 0;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  z-index: 20;
}
.blackout-brand {
  position: absolute;
  top: 2.2%;
  left: 6%;
  font-size: clamp(16px, 5vw, 30px);
  font-weight: 950;
  letter-spacing: 0.02em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  z-index: 30;
}
.blackout-brand em { font-style: normal; }
.blackout-nav {
  position: absolute;
  top: 7.5%;
  left: 6%;
  font-size: clamp(12px, 3.2vw, 18px);
  z-index: 30;
  display: flex;
  gap: 14px;
}
.blackout-nav a { text-decoration: none; color: #fff; padding: 4px 0; }
.blackout-portrait {
  position: absolute;
  top: 14%;
  left: 8%;
  width: 84%;
  height: 63%;
  object-fit: contain;
  object-position: center;
  border-radius: 12px;
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.14);
  z-index: 24;
}
.blackout-actions {
  position: absolute;
  top: 80%;
  left: 9%;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: clamp(13px, 3.4vw, 19px);
  font-weight: 850;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}
.blackout-actions a { text-decoration: none; padding: 5px 0; }

body.lights-off { background: #000; }
body.lights-off .ambience { display: none; }
body.lights-off .hero-img,
body.lights-off .club-ball { display: none; }
body.lights-off .blackout { display: block; }

/* ---------- 7. Hero text (Lobby) ---------- */
.hero-text { text-align: left; padding: 26px 0 6px; }

/* ---------- 8. Room doors (Lobby navigation) ---------- */
.doors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 18px 0 10px;
}
.door {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 104px;
  justify-content: center;
  padding: 20px 22px;
  text-decoration: none;
  background: linear-gradient(130deg, var(--panel-2), #09070d);
  border: 2px solid var(--red-bright);
  border-radius: 18px;
  box-shadow: 0 0 12px rgba(255, 17, 43, 0.45), inset 0 0 12px rgba(167, 0, 23, 0.45);
}
.door:hover, .door:focus-visible { box-shadow: 0 0 26px #ff223a; }
.door-glyph { font-size: 1.5rem; color: var(--red-bright); }
.door-name { font-size: 1.25rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.03em; }
.door-sub { color: var(--muted); font-size: 0.95rem; }

/* ---------- 9. Cards & catalog ---------- */
section { margin: 35px 0 55px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 16px;
}
.card {
  background: linear-gradient(130deg, var(--panel-2), #09070d);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}
.card h3 { margin: 4px 0 8px; }
.card p { margin: 0 0 18px; }
.chip {
  font-size: 0.73rem;
  color: var(--red-bright);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.chip-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 20px; }
.filter-btn {
  border: 2px solid var(--line);
  background: #080408;
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font: 800 0.95rem system-ui, -apple-system, "Segoe UI", sans-serif;
  cursor: pointer;
  touch-action: manipulation;
}
.filter-btn[aria-pressed="true"] {
  border-color: var(--red-bright);
  box-shadow: 0 0 14px rgba(255, 17, 43, 0.6);
}

.song-card .song-art {
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.explore-block { margin-top: 34px; }

/* ---------- 10. Story demo ---------- */
.story {
  background: linear-gradient(135deg, var(--panel-2), #09070d);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
}
.story #storyText { min-height: 80px; color: #fff; font-size: 1.05rem; }
.story #choices { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.story #choices .btn { margin: 0; }

/* ---------- 11. Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  padding-bottom: 45px;
}
.footer-credit { color: var(--txt); font-weight: 700; }

/* ---------- 12. Reduced motion / reduced flashing ----------
   The Reduce flashing switch (and the device's own reduced-motion
   setting) stop every animation. Beams are hidden entirely so nothing
   on the page can flash. */
body.reduce-motion .ambience { display: none; }
body.reduce-motion .club-ball .sphere { animation: none; }
body.reduce-motion * { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .ambience { display: none; }
  .club-ball .sphere { animation: none; }
}

@media (max-width: 500px) {
  .hero-text { padding-top: 18px; }
  .blackout-portrait { top: 15%; left: 10%; width: 80%; height: 60%; }
}

/* ---------- 13. Owner Control Room (owner.html, Phase 4) ----------
   Big touch targets throughout: this page is worked from a phone.
   Only the owner ever sees it — and only after signing in; the page
   itself renders no admin data until the server confirms the session. */
.owner-panel { max-width: 760px; }
.owner-box {
  background: var(--panel, #0d0509);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  margin: 0 0 26px;
}
.owner-box h3 { margin-top: 0; }
.field { margin: 0 0 16px; }
.field label {
  display: block;
  font-weight: 800;
  margin: 0 0 7px;
  letter-spacing: 0.02em;
}
.field input[type="text"],
.field input[type="url"],
.field input[type="password"],
.field input[type="number"],
.field select,
.field textarea {
  width: 100%;
  box-sizing: border-box;
  background: #150309;
  color: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px 15px;
  font-size: 1.05rem;
  font-family: inherit;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--red-bright); outline: none; }
.field .hint { color: var(--muted); font-size: 0.87rem; margin-top: 6px; }
.check-field { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; }
.check-field input[type="checkbox"] { width: 26px; height: 26px; accent-color: var(--red-bright); }
.check-field label { font-weight: 800; }
.btn.danger { border-color: #ffffff; background: linear-gradient(180deg, #3d0505, #1c0202); }
.btn.block { display: block; width: 100%; text-align: center; box-sizing: border-box; }
.owner-msg { min-height: 1.4em; font-weight: 700; }
.owner-msg.error { color: #ff8f9b; }
.owner-msg.ok { color: #9be7a8; }
.admin-song {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; margin: 0 0 12px; background: #12030a;
}
.admin-song .meta { flex: 1 1 200px; }
.admin-song .meta strong { display: block; font-size: 1.05rem; }
.admin-song .meta span { color: var(--muted); font-size: 0.87rem; }
.admin-song .row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.owner-topbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 20px; }
.owner-topbar .who { font-weight: 800; }
