/* LevelUp Legal Site — static, mobile-first, premium dark */

:root {
  --bg: #020814;
  --bg-bottom: #061c3f;
  --bg-elevated: #0c0d12;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-border: rgba(255, 255, 255, 0.1);
  --text: #f4f4f8;
  --text-muted: #9ca3b8;
  --accent: #4cc9ff;
  --accent-soft: #8a5cff;
  --glow: rgba(76, 201, 255, 0.35);
  --glow-purple: rgba(138, 92, 255, 0.28);
  --scrim: rgba(0, 0, 0, 0.42);
  --radius: 14px;
  --radius-lg: 20px;
  --max-width: 720px;
  --max-width-wide: 960px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-bottom) 100%);
}

/* Live cosmic background (auth gate / CosmicLoadingBackground) */
.cosmic-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#cosmic-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.cosmic-scrim {
  position: absolute;
  inset: 0;
  background: var(--scrim);
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  #cosmic-canvas {
    display: none;
  }

  .cosmic-bg {
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-bottom) 100%);
  }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

a:hover {
  color: #9ab0ff;
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(2, 8, 20, 0.72);
  border-bottom: 1px solid var(--surface-border);
}

.header-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  width: 36px;
  height: auto;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 0 10px rgba(76, 201, 255, 0.45));
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin: 0 auto 1.25rem;
}

.hero-logo-mark {
  width: min(120px, 34vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 0 22px rgba(76, 201, 255, 0.5));
}

.hero-logo-wordmark {
  margin: 0.75rem 0 0;
  padding: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 10px;
  color: #ffffff;
  text-align: center;
  text-shadow: 0 0 20px rgba(76, 201, 255, 0.65);
  transform: translateX(7px);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

main {
  flex: 1 0 auto;
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  box-sizing: border-box;
}

.page-narrow {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Typography */
h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.75rem;
  color: var(--text);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 42em;
}

.meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* Cards */
.glass {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

@media (min-width: 560px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.legal-card {
  display: block;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.legal-card:hover {
  text-decoration: none;
  color: var(--text);
  border-color: rgba(76, 201, 255, 0.4);
  box-shadow: 0 0 28px var(--glow);
  transform: translateY(-2px);
}

.legal-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.legal-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.legal-card .card-path {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent);
  opacity: 0.85;
}

.domain-badge {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
  color: var(--accent);
  background: rgba(107, 140, 255, 0.12);
  border: 1px solid rgba(107, 140, 255, 0.28);
  border-radius: 999px;
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-links {
    flex: 1 1 100%;
    justify-content: flex-start;
    gap: 0.5rem 0.85rem;
  }
}

/* Alerts */
.notice {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.notice-warning {
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #f5e6c8;
}

.notice-info {
  background: rgba(107, 140, 255, 0.1);
  border: 1px solid rgba(107, 140, 255, 0.25);
  color: #d4dcff;
}

.verify {
  color: #c4b5fd;
  font-weight: 500;
}

/* Content */
.prose ul,
.prose ol {
  padding-left: 1.35rem;
  margin: 0.75rem 0 1rem;
}

.prose li {
  margin: 0.35rem 0;
}

.prose p {
  margin: 0.75rem 0;
  color: var(--text-muted);
}

.prose strong {
  color: var(--text);
}

.prose code,
.template-block {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c8d0e8;
  margin: 1rem 0;
  line-height: 1.5;
}

.issue-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.issue-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--surface-border);
}

.issue-list li:last-child {
  border-bottom: none;
}

.issue-list strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.25rem;
}

/* Footer — aligned with .page-narrow content column */
.site-footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  border-top: 1px solid var(--surface-border);
  background: rgba(2, 8, 20, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.footer-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  max-width: 100%;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

.copyright {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  opacity: 0.85;
  word-break: break-word;
}

@media (max-width: 480px) {
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }

  .footer-links a {
    white-space: normal;
  }
}
