/**
 * Aura funnel styles.
 *
 * No framework and no CDN on purpose: this page is shared into social in-app
 * browsers on slow mobile connections, and every external request is another
 * thing that can be slow, blocked, or logged by someone else.
 */

:root {
  color-scheme: dark;
  --bg: #0a0a0c;
  --panel: #141418;
  --line: #26262c;
  --text: #f5f5f6;
  --muted: #9b9ba4;
  --accent: #0084b4;
  --accent-hot: #e11d74;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

/**
 * The `hidden` attribute is only `display: none` via the user-agent stylesheet,
 * so any class here that sets `display` silently outranks it. Several elements
 * below are toggled with `hidden` (the gate, the lightbox, the stage controls),
 * and without this the lightbox's `display: grid` wins and leaves a fixed,
 * near-opaque overlay covering the page and eating every click.
 */
[hidden] {
  display: none !important;
}

html.gated {
  overflow: hidden;
}

/* Belt and braces: even if a script fails, gated content stays hidden. */
html.gated #app {
  display: none;
}

html:not(.gated) #gate {
  display: none;
}

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -10%, #1b1b22 0%, var(--bg) 60%);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.01em;
}

.fine {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* --------------------------------------------------------------- age gate */

.gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 5, 7, 0.94);
  backdrop-filter: blur(6px);
}

.gate-card {
  width: 100%;
  max-width: 420px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  text-align: center;
}

.gate-card h1 {
  font-size: 22px;
}

.gate-card p {
  color: var(--muted);
  font-size: 14px;
}

.gate-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

/* Empty until a configured age check has something to say. */
.gate-status:not(:empty) {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.gate-status[data-state='failed'] {
  color: #fca5a5;
}

.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 28px 0 22px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(28px, 7vw, 40px);
}

.tagline {
  margin: 8px 0 20px;
  color: var(--muted);
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-hot), #b4126a);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f02a82, var(--accent-hot));
}

.btn-quiet {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
}

.btn-quiet:hover {
  border-color: #3a3a44;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* --------------------------------------------------------------- gallery */

.gallery-section,
.live-section {
  margin-top: 34px;
}

.gallery-section h2,
.live-title,
.live-head h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

@media (min-width: 620px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tile {
  position: relative;
  aspect-ratio: 3 / 4;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, #1e1e26, #121218);
  cursor: pointer;
}

.tile img,
.tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-missing img,
.tile-missing video {
  visibility: hidden;
}

/* Named so an empty media/ directory reads as "add files here", not "bug". */
.tile-missing::after {
  content: 'add media';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #55555f;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tile-video::before {
  content: '▶';
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 1;
  color: #fff;
  font-size: 11px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* ----------------------------------------------------------------- stage */

.live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.live-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.live-controls {
  display: flex;
  gap: 6px;
}

.live-controls .btn {
  padding: 7px 13px;
  font-size: 12px;
}

.stage {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0e0e12;
  aspect-ratio: 16 / 10;
}

/* Chat sits beside the video on wide screens, so the frame needs to be taller
   than video alone would be, and much taller on phones where it stacks. */
@media (max-width: 700px) {
  .stage {
    aspect-ratio: 3 / 4;
  }
}

.stage iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.stage-open {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 6px;
  border: 0;
  background: linear-gradient(160deg, #1a1a22, #0e0e12);
  color: var(--text);
  cursor: pointer;
  text-align: center;
}

.stage-open:hover {
  background: linear-gradient(160deg, #20202a, #121218);
}

.stage-open-icon {
  display: block;
  margin: 0 auto 4px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--accent-hot);
  color: #fff;
  font-size: 19px;
  line-height: 54px;
}

.stage-open-label {
  font-size: 16px;
  font-weight: 700;
}

.stage-open-sub {
  color: var(--muted);
  font-size: 12px;
}

body.theater .stage {
  position: fixed;
  inset: 0;
  z-index: 90;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

body.theater {
  overflow: hidden;
}

body.theater .live-controls {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 91;
}

.below-embed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.logo-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.logo-link:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(4, 4, 6, 0.93);
}

/**
 * `width: auto` and `height: auto` are load-bearing, not redundant.
 *
 * app.js puts width/height attributes on every <img> so tiles reserve their
 * space and do not reflow the page as they decode. Those attributes also act as
 * a specified height here, which means `max-width` alone would shrink the width
 * and leave the height where it was — squashing a 1293x700 photo. Resetting both
 * to auto restores the replaced-element sizing rules, which scale the two
 * constraints together and keep the aspect ratio.
 */
.lightbox-body img,
.lightbox-body video {
  width: auto;
  height: auto;
  max-width: min(92vw, 900px);
  max-height: 86vh;
  border-radius: 12px;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

/* ----------------------------------------------------------------- foot */

.foot {
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.links a {
  color: var(--accent);
  font-size: 13px;
  text-decoration: none;
}

.links a:hover {
  text-decoration: underline;
}
