@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Nunito:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --color-bg: #0d0b1e;
  --color-surface: #171130;
  --color-elevated: #1f1840;
  --color-gold: #c9a844;
  --color-gold-light: #e2c870;
  --color-gold-border: rgba(201, 168, 68, 0.3);
  --color-violet: #9b7ff4;
  --color-text: #ede8f9;
  --color-text-muted: #a492c8;
  --color-text-tertiary: #6b5d8a;
  --color-border: rgba(155, 127, 244, 0.15);
  --color-border-strong: rgba(155, 127, 244, 0.35);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Nunito', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  top: -25vh;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(124, 92, 191, 0.14), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.legal-page {
  max-width: 740px;
  margin: 0 auto;
  padding: 0 20px 72px;
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────── */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 36px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  color: var(--color-gold);
  letter-spacing: 0.02em;
}

.site-logo__mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 5px 18px rgba(125, 87, 255, .2);
}

.back-link {
  font-size: 13px;
  color: var(--color-text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}

.back-link:hover {
  color: var(--color-text);
}

/* ── Card ────────────────────────────────────────────── */

.legal-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: 16px;
  padding: 36px 40px 40px;
  position: relative;
  overflow: hidden;
}

.legal-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(155, 127, 244, 0.16), transparent 70%);
  pointer-events: none;
}

/* ── Typography ──────────────────────────────────────── */

h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.2;
  margin-bottom: 10px;
  position: relative;
}

h2 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text);
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  position: relative;
}

p {
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

li {
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

ul,
ol {
  padding-left: 20px;
  margin-bottom: 10px;
}

a {
  color: var(--color-violet);
  text-decoration: none;
}

a:hover {
  color: var(--color-gold-light);
}

strong {
  color: var(--color-text);
  font-weight: 600;
}

.meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--color-text-tertiary);
  margin-bottom: 28px;
}

/* ── Index page doc-list ─────────────────────────────── */

.doc-list {
  display: grid;
  gap: 8px;
  padding-left: 0;
  list-style: none;
  margin-top: 24px;
}

.doc-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: var(--color-elevated);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.doc-list a::after {
  content: '→';
  color: var(--color-text-tertiary);
  font-size: 13px;
  flex-shrink: 0;
}

.doc-list a:hover {
  border-color: var(--color-border-strong);
  background: rgba(155, 127, 244, 0.07);
  color: var(--color-text);
}

/* ── Notice block ────────────────────────────────────── */

.notice {
  padding: 14px 16px;
  border-left: 3px solid var(--color-violet);
  background: rgba(155, 127, 244, 0.08);
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
}

.notice p {
  margin-bottom: 0;
}

/* ── Hub: hero ───────────────────────────────────────── */

.hub-hero {
  text-align: center;
  padding: 48px 0 40px;
  position: relative;
}

.hub-glyph {
  display: block;
  font-size: 36px;
  color: var(--color-gold);
  margin-bottom: 20px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(201, 168, 68, 0.5));
}

.hub-title {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 700;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.15;
  margin-bottom: 14px;
}

.hub-sub {
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

.hub-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-gold-border), transparent);
  margin: 32px auto 0;
}

/* ── Hub: sections ───────────────────────────────────── */

.hub-sections {
  display: grid;
  gap: 32px;
}

.hub-section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-tertiary);
  margin-bottom: 10px;
}

/* ── Hub: footer ─────────────────────────────────────── */

.legal-footer {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.legal-footer p {
  font-size: 13px;
  color: var(--color-text-tertiary);
  margin-bottom: 4px;
}

.legal-footer a {
  color: var(--color-text-tertiary);
}

.legal-footer a:hover {
  color: var(--color-violet);
}

/* ── Mobile ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .legal-page {
    padding: 0 14px 52px;
  }

  .legal-card {
    padding: 22px 20px 28px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 16px;
    margin-top: 24px;
  }

  .hub-title {
    font-size: 30px;
  }

  .hub-hero {
    padding: 32px 0 28px;
  }
}
