/*!
 * nightlife.css — the design system for the 3Bit events platform.
 *
 * Shared by every page in the section, so the discovery page, the ticket, the
 * organizer dashboard and the admin panel are visibly one product. It keeps
 * the site's typography (Archivo / Inter / IBM Plex Mono) and swaps the
 * palette: the main site is ink on paper, this is a club at 1 AM.
 *
 * Three decisions worth knowing about:
 *
 *  — Dark is the committed design, not a mode. Nightlife listings are looked
 *    at in the dark, on a phone, and a white page is a flashlight in the face.
 *    So there is one palette rather than a light/dark pair.
 *  — Motion is decorative and every bit of it is behind
 *    `prefers-reduced-motion`. The aurora, the marquee, the tilt and the reveal
 *    all stop; nothing that conveys information depends on animation.
 *  — Contrast is checked against the dark ground, not eyeballed. Body text
 *    (--text-2) is 8.9:1 on --bg-1 and the dimmest supporting text (--text-3)
 *    is 4.7:1, so both clear WCAG AA at their sizes. The neons are used for
 *    large text, borders and glows — never for small body copy, where their
 *    contrast would fail.
 */

/* ---------------------------------------------------------------- tokens -- */
:root {
  /* Ground: a deep violet-black rather than pure black, so the neons have
     something to sit against and the gradients do not band. */
  --bg-0: #07040f;
  --bg-1: #0d0719;
  --bg-2: #150c26;
  --bg-3: #1d1133;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.075);

  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.18);

  --text-1: #f8f5ff;
  --text-2: #cbc0e6;
  --text-3: #9689b4;
  /* Dimmest text still has to clear 4.5:1, because hints and placeholders
     are small: #6d6189 looked right and measured 3.2:1, which fails. */
  --text-4: #8b7fa8;

  /* The party palette. Magenta leads, violet carries, cyan and lime accent. */
  --magenta: #ff2d95;
  --magenta-soft: #ff6fb5;
  --violet: #8b5cf6;
  --violet-deep: #6d28d9;
  --cyan: #22d3ee;
  --lime: #a3e635;
  --amber: #fbbf24;
  --rose: #fb7185;

  --grad-hot: linear-gradient(120deg, #ff2d95 0%, #8b5cf6 55%, #22d3ee 100%);
  --grad-warm: linear-gradient(120deg, #fbbf24 0%, #ff2d95 60%, #8b5cf6 100%);
  --grad-cool: linear-gradient(120deg, #22d3ee 0%, #8b5cf6 60%, #ff2d95 100%);
  --grad-surface: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));

  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #fb7185;

  --font-display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 18px 60px rgba(255, 45, 149, 0.28);

  --header-h: 68px;
  --max: 1240px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Anchors must not land under the fixed header. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.62;
  color: var(--text-2);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The fixed backdrop: two slow-drifting colour fields plus a fine grain so
   large flat gradients do not band on cheap panels. */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  background:
    radial-gradient(38vmax 38vmax at 18% 8%, rgba(255, 45, 149, 0.22), transparent 62%),
    radial-gradient(42vmax 42vmax at 82% 18%, rgba(139, 92, 246, 0.22), transparent 64%),
    radial-gradient(34vmax 34vmax at 50% 92%, rgba(34, 211, 238, 0.15), transparent 62%);
  animation: aurora 34s var(--ease) infinite alternate;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  /* A single inline SVG of fractal noise — cheaper than shipping a texture. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes aurora {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2%, -1.5%, 0) scale(1.06); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.02); }
}

/* ------------------------------------------------------------ typography -- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-1);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
h1 { font-size: clamp(2.1rem, 5.6vw, 4.2rem); font-weight: 850; font-stretch: 112%; }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 820; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 750; }
h4 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--magenta-soft); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-1); }

.mono { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-block;
  margin-bottom: 0.9rem;
}

.gradient-text {
  background: var(--grad-hot);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* A painted-on gradient can clip descenders; the padding buys them room. */
  padding-bottom: 0.06em;
}

.lead { font-size: clamp(1rem, 1.5vw, 1.18rem); color: var(--text-2); max-width: 62ch; }
.muted { color: var(--text-3); }
.small { font-size: 0.85rem; }
.tiny { font-size: 0.76rem; }
.nowrap { white-space: nowrap; }

/* --------------------------------------------------------------- layout -- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: 20px; }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); position: relative; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.row-tight { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1.25rem; }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.center { text-align: center; }
.hidden { display: none !important; }

/* Anything that must reach a screen reader but not the screen. */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--magenta);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 0 0 12px 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

/* Focus is never removed, only restyled — keyboard users need to see it. */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 6px;
}

/* --------------------------------------------------------------- header -- */
.nl-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(7, 4, 15, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, border-color 0.3s;
}
.nl-header.is-scrolled { background: rgba(7, 4, 15, 0.94); border-color: var(--line-2); }
.nl-header .container { display: flex; align-items: center; gap: 1.2rem; }

.nl-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 850;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  color: var(--text-1);
  white-space: nowrap;
}
.nl-brand:hover { color: var(--text-1); }
.nl-brand-bits { display: inline-flex; gap: 3px; }
.nl-brand-bits span {
  width: 7px; height: 16px;
  border-radius: 2px;
  background: var(--magenta);
  animation: bitPulse 2.4s var(--ease) infinite;
}
.nl-brand-bits span:nth-child(2) { background: var(--violet); animation-delay: 0.25s; }
.nl-brand-bits span:nth-child(3) { background: var(--cyan); animation-delay: 0.5s; }
@keyframes bitPulse { 0%, 100% { transform: scaleY(1); opacity: 1; } 50% { transform: scaleY(0.55); opacity: 0.65; } }

.nl-nav { display: flex; align-items: center; gap: 1.4rem; margin-left: auto; }
.nl-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  position: relative;
  padding-block: 4px;
}
.nl-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--grad-hot);
  border-radius: 2px;
  transition: right 0.3s var(--ease);
}
.nl-nav a:hover, .nl-nav a[aria-current="page"] { color: var(--text-1); }
.nl-nav a:hover::after, .nl-nav a[aria-current="page"]::after { right: 0; }

.nl-burger {
  display: none;
  margin-left: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px; height: 40px;
  color: var(--text-1);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------- button -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
  padding: 0.78rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  /* 44px is the smallest comfortable tap target on a phone in a dark bar. */
  min-height: 44px;
  color: var(--text-1);
  background: var(--surface);
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s, opacity 0.2s;
  text-align: center;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); color: var(--text-1); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--grad-hot); box-shadow: var(--shadow-glow); color: #fff; }
.btn-primary:hover { box-shadow: 0 22px 70px rgba(255, 45, 149, 0.42); }
.btn-ghost { border-color: var(--line-2); background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--magenta); }
.btn-solid { background: var(--text-1); color: var(--bg-0); }
.btn-solid:hover { background: #fff; color: var(--bg-0); }
.btn-danger { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.45); color: #ffd9df; }
.btn-danger:hover { background: rgba(251, 113, 133, 0.26); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.84rem; min-height: 38px; }
.btn-lg { padding: 1rem 2rem; font-size: 1.04rem; min-height: 54px; }
.btn-block { width: 100%; }

/* A spinner inside the button, so a slow network reads as progress. */
.btn.is-busy { pointer-events: none; opacity: 0.8; }
.btn.is-busy::before {
  content: "";
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- cards -- */
.card {
  background: var(--grad-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
}
.card-pad-lg { padding: clamp(1.4rem, 3vw, 2.2rem); }
.card-flat { background: var(--bg-2); backdrop-filter: none; -webkit-backdrop-filter: none; }

/* The event card. The whole tile is the link; the inner controls sit above it. */
.ev-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 0.32s var(--ease), border-color 0.3s, box-shadow 0.35s;
  will-change: transform;
}
.ev-card:hover { transform: translateY(-6px); border-color: rgba(255, 45, 149, 0.5); box-shadow: 0 28px 64px rgba(0, 0, 0, 0.55); }
.ev-card:focus-within { border-color: var(--cyan); }

.ev-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--grad-hot); }
.ev-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s var(--ease), opacity 0.4s;
}
.ev-card:hover .ev-card-media img { transform: scale(1.07); }
/* A gradient scrim so white text stays readable over any photograph. */
.ev-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 4, 15, 0.92) 0%, rgba(7, 4, 15, 0.25) 45%, transparent 75%);
}
.ev-card-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.ev-card-title { font-family: var(--font-display); font-weight: 780; font-size: 1.08rem; line-height: 1.25; color: var(--text-1); }
.ev-card-meta { font-size: 0.83rem; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 0.4rem 0.7rem; }
.ev-card-foot { margin-top: auto; padding-top: 0.7rem; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.ev-card-price { font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--text-1); }
/* Covers the card so the whole tile is clickable without nesting links. */
.ev-card-link { position: absolute; inset: 0; z-index: 1; }
.ev-card-link span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.ev-card-date {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 2;
  background: rgba(7, 4, 15, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 0.4rem 0.6rem;
  text-align: center;
  min-width: 52px;
  line-height: 1.1;
}
.ev-card-date b { display: block; font-family: var(--font-display); font-size: 1.2rem; font-weight: 850; color: var(--text-1); }
.ev-card-date span { display: block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }

/* ---------------------------------------------------------------- chips -- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(7, 4, 15, 0.6);
  color: var(--text-2);
  white-space: nowrap;
}
.chip-hot { background: rgba(255, 45, 149, 0.18); border-color: rgba(255, 45, 149, 0.5); color: #ffc9e2; }
.chip-cool { background: rgba(34, 211, 238, 0.15); border-color: rgba(34, 211, 238, 0.45); color: #b6f1fb; }
.chip-lime { background: rgba(163, 230, 53, 0.15); border-color: rgba(163, 230, 53, 0.45); color: #e2f7b0; }
.chip-warn { background: rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.45); color: #ffe6ad; }
.chip-bad { background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.5); color: #ffd2da; }
.chip-live::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.7);
  animation: livePulse 1.9s infinite;
}
@keyframes livePulse {
  70% { box-shadow: 0 0 0 8px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}

/* Filter pills. `aria-pressed` carries the state, not just the colour. */
.pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1rem;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.pill:hover { background: var(--surface-2); color: var(--text-1); transform: translateY(-1px); }
.pill[aria-pressed="true"] { background: var(--grad-hot); border-color: transparent; color: #fff; font-weight: 600; }
.pill-count { font-size: 0.66rem; opacity: 0.75; }

/* ---------------------------------------------------------------- forms -- */
label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-2); margin-bottom: 0.35rem; }
.label-hint { font-weight: 400; color: var(--text-4); font-size: 0.76rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="url"], input[type="search"], input[type="datetime-local"],
input[type="date"], select, textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.95rem;
  /* 16px on mobile stops iOS zooming the viewport on focus. */
  padding: 0.72rem 0.9rem;
  min-height: 46px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: rgba(7, 4, 15, 0.55);
  color: var(--text-1);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(255, 45, 149, 0.18);
  background: rgba(7, 4, 15, 0.75);
}
input::placeholder, textarea::placeholder { color: var(--text-4); }
textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%239689b4' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field { margin-bottom: 1rem; }
.field-error { color: var(--bad); font-size: 0.8rem; margin-top: 0.3rem; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--bad);
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.16);
}

.checkbox { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.88rem; color: var(--text-2); font-weight: 400; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; min-height: 0; margin: 3px 0 0; accent-color: var(--magenta); flex: none; }

.search-wrap { position: relative; flex: 1; min-width: 220px; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-4); pointer-events: none; }
.search-wrap input { padding-left: 42px; }

/* ------------------------------------------------------------- stepper -- */
.stepper { display: inline-flex; align-items: center; gap: 0; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; background: rgba(7, 4, 15, 0.6); }
.stepper button {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--text-1);
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
}
.stepper button:hover:not([disabled]) { background: var(--surface-2); }
.stepper button[disabled] { opacity: 0.3; cursor: not-allowed; }
.stepper output { min-width: 34px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 1rem; color: var(--text-1); }

/* --------------------------------------------------------------- tables -- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
th, td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  background: rgba(7, 4, 15, 0.5);
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--font-mono); }

/* ----------------------------------------------------------- stat tiles -- */
.stat-tile { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; position: relative; overflow: hidden; }
.stat-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad-hot); }
.stat-tile .stat-label { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.stat-tile .stat-value { font-family: var(--font-display); font-weight: 850; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--text-1); line-height: 1.1; margin-top: 0.3rem; font-variant-numeric: tabular-nums; }
.stat-tile .stat-note { font-size: 0.78rem; color: var(--text-3); margin-top: 0.25rem; }
.stat-tile.is-cool::before { background: var(--grad-cool); }
.stat-tile.is-warm::before { background: var(--grad-warm); }

/* --------------------------------------------------------------- motion -- */
/* Scroll reveal. The un-revealed state is only applied once JS confirms it can
   reveal again (`.js-reveal` on <html>), so with JS off nothing is hidden. */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(22px); }
.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-run { display: flex; align-items: center; gap: 2.4rem; padding-right: 2.4rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

.tilt { transition: transform 0.3s var(--ease); transform-style: preserve-3d; }

.glow-ring { position: relative; }
.glow-ring::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-hot);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.glow-ring:hover::before, .glow-ring:focus-within::before { opacity: 1; }

/* Skeletons while a fetch is in flight — a shimmer reads as loading in a way
   a spinner in an empty grid does not. */
.skeleton { background: linear-gradient(100deg, var(--bg-2) 30%, var(--bg-3) 50%, var(--bg-2) 70%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { to { background-position: -220% 0; } }
.skeleton-card { height: 330px; border-radius: var(--radius); }
.skeleton-line { height: 12px; margin-bottom: 8px; }

/* Every animation above stops here. Nothing in it carries meaning. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js-reveal [data-reveal] { opacity: 1; transform: none; }
  .ev-card:hover { transform: none; }
  .ev-card:hover .ev-card-media img { transform: none; }
}

/* --------------------------------------------------------------- toasts -- */
.toast-host {
  position: fixed;
  z-index: 300;
  bottom: 20px; right: 20px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--magenta);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
  color: var(--text-1);
  animation: toastIn 0.35s var(--ease);
}
.toast.is-ok { border-left-color: var(--ok); }
.toast.is-bad { border-left-color: var(--bad); }
.toast.is-out { animation: toastOut 0.3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(0.96); } }

/* ---------------------------------------------------------------- modal -- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(3, 2, 8, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
  overflow-y: auto;
  animation: fadeIn 0.25s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: 100%;
  max-width: 560px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  padding: clamp(1.3rem, 3vw, 2rem);
  box-shadow: var(--shadow);
  animation: modalIn 0.3s var(--ease);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.modal-wide { max-width: 860px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.97); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.modal-close {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 36px; height: 36px;
  color: var(--text-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
}
.modal-close:hover { background: var(--surface-2); color: var(--text-1); }

/* ----------------------------------------------------------- empty/error -- */
.empty { text-align: center; padding: clamp(2.5rem, 7vw, 4.5rem) 1.5rem; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }
.empty-emoji { font-size: 2.6rem; display: block; margin-bottom: 0.8rem; }

.banner { border-radius: var(--radius-sm); padding: 0.9rem 1.1rem; font-size: 0.9rem; border: 1px solid var(--line-2); background: var(--surface); display: flex; gap: 0.7rem; align-items: flex-start; }
.banner-bad { background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.4); color: #ffd2da; }
.banner-ok { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.4); color: #baf3dd; }
.banner-warn { background: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.4); color: #ffe6ad; }

/* --------------------------------------------------------------- footer -- */
.nl-footer { border-top: 1px solid var(--line); padding-block: 3rem 2rem; margin-top: 3rem; background: rgba(7, 4, 15, 0.6); }
.nl-footer a { color: var(--text-3); font-size: 0.88rem; }
.nl-footer a:hover { color: var(--text-1); }
.nl-footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.nl-footer h4 { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-4); margin-bottom: 0.9rem; }
.nl-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }

/* --------------------------------------------------------- breakpoints -- */
@media (max-width: 900px) {
  .nl-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(7, 4, 15, 0.985);
    border-bottom: 1px solid var(--line-2);
    padding: 0.5rem 20px 1.2rem;
    /* Collapsed by default on small screens; .is-open reveals it. */
    display: none;
  }
  .nl-nav.is-open { display: flex; }
  .nl-nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
  .nl-nav a::after { display: none; }
  .nl-nav .btn { margin-top: 0.8rem; }
  .nl-burger { display: inline-flex; }
  .nl-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .container { padding-inline: 16px; }
  .nl-footer-grid { grid-template-columns: 1fr; }
  .section { padding-block: 2.5rem; }
  .toast-host { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

/* Printing a ticket: drop the theme, keep the code readable in black on white. */
@media print {
  body { background: #fff; color: #000; }
  body::before, body::after { display: none; }
  .nl-header, .nl-footer, .no-print, .toast-host { display: none !important; }
  .card, .ev-card { border-color: #999; background: #fff; color: #000; box-shadow: none; }
  h1, h2, h3, .ev-card-title, .stat-value { color: #000; }
  .gradient-text { color: #000 !important; -webkit-text-fill-color: #000; }
}
