/**
 * 🎨 hub-shell.css — the hub's theme tokens, header and page frame.
 *
 * WHY THIS FILE EXISTS (2026-09-18): the hub's six public pages each carry
 * their OWN inline copy of these rules — index, telegram, support, affiliate,
 * tos and privacy, about 17,700 lines between them (the same duplication
 * hub-nav.js was written to work around). Adding the Dashboard as a seventh
 * hand-copied page would have made the drift worse, and a dashboard that
 * silently stopped matching the rest of the hub is exactly what "the entire
 * marketplace UI is ... i dont even know" was about.
 *
 * So the shell lives here once. The Dashboard is the first page to use it.
 *
 * ⚠️ The six existing pages are deliberately NOT converted in this change.
 * src/scripts/rebuild-static-site.cjs refuses to overwrite hub files without
 * --force precisely because its stylesheet source had already drifted from
 * them, so rewriting all six is its own job with its own verification. This
 * file is the target for that, not a second source of truth: the values below
 * were copied from index.html and must stay identical to it until the others
 * move over.
 */

/* ── TYPE / SPACE / RADIUS SCALE ─────────────────────────────────── */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  --transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: "Orbitron", monospace;
  --font-body: "Space Grotesk", "Inter", sans-serif;

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
}

/* ── DARK CARBONITE/FIBER PALETTE ────────────────────────────────── */
[data-theme="dark"],
:root {
  --color-bg: #0a0b0d;
  --color-surface: #0f1115;
  --color-surface-2: #141720;
  --color-surface-3: #1a1e2a;
  --color-surface-4: #20253a;
  --color-divider: #1e2233;
  --color-border: #252c42;
  --color-border-glow: rgba(64, 140, 255, 0.25);

  --color-text: #e2e6f0;
  --color-text-muted: #8a93ab;
  --color-text-faint: #4a5068;

  --color-primary: #3da8ff;
  --color-primary-dark: #1578e8;
  --color-primary-glow: rgba(61, 168, 255, 0.28);
  --color-primary-hover: #66b8ff;

  --color-accent: #00ddff;
  --color-accent-glow: rgba(0, 221, 255, 0.22);

  --color-blue-deep: #0c1c40;
  --color-blue-mid: #122648;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 32px rgba(61, 168, 255, 0.18);
}

/* ── BASE ────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}
body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}
a {
  color: var(--color-primary);
}

/* ── HEADER ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 13, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-divider);
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}
.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--color-primary-dark),
    var(--color-accent)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 20px var(--color-primary-glow),
    var(--shadow-md);
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #fff 20%, var(--color-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.logo-domain {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.08em;
  font-weight: 500;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.nav-btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: all var(--transition);
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.nav-btn:hover,
.nav-btn.active {
  color: var(--color-text);
  background: var(--color-surface-2);
  border-color: var(--color-border);
}
.nav-btn.login-btn {
  color: var(--color-primary);
  border-color: var(--color-primary-dark);
  background: rgba(74, 158, 255, 0.08);
}
.nav-btn.login-btn:hover {
  background: rgba(74, 158, 255, 0.15);
  border-color: var(--color-primary);
  box-shadow: 0 0 20px var(--color-primary-glow);
}
.nav-btn.logout-btn {
  color: #ff6b6b;
  border-color: rgba(255, 107, 107, 0.3);
  background: rgba(255, 107, 107, 0.08);
}

/* ── PAGE FRAME ──────────────────────────────────────────────────── */
.shell {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6) var(--space-16);
}

.site-footer {
  border-top: 1px solid var(--color-divider);
  padding: var(--space-8) var(--space-6);
  text-align: center;
  color: var(--color-text-faint);
  font-size: var(--text-xs);
}
.site-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
  margin: 0 var(--space-2);
}
.site-footer a:hover {
  color: var(--color-text);
}
