/* ArcanaAI Legal — celestial dark theme */

:root {
  --bg-deep: #0b0b1a;
  --bg-purple: #2d1b4d;
  --bg-card: rgba(45, 27, 77, 0.45);
  --gold: #d4af37;
  --gold-muted: #c5a059;
  --cream: #f2e8cf;
  --text-primary: #fffdd0;
  --text-secondary: #b8a9c9;
  --text-muted: #8a7a9e;
  --line: rgba(184, 169, 201, 0.25);
  --glow: rgba(212, 175, 55, 0.12);
  --font-serif: "Cinzel", "Playfair Display", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --max-width: 820px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  background: var(--bg-deep);
  min-height: 100vh;
}

/* Starry background */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(45, 27, 77, 0.55) 0%, transparent 70%),
    linear-gradient(180deg, var(--bg-purple) 0%, var(--bg-deep) 45%, #060610 100%);
}

.stars::before,
.stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 253, 208, 0.5) 50%, transparent 50%),
    radial-gradient(1px 1px at 30% 65%, rgba(255, 255, 255, 0.35) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(255, 253, 208, 0.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 72% 42%, rgba(255, 255, 255, 0.3) 50%, transparent 50%),
    radial-gradient(1px 1px at 88% 78%, rgba(255, 253, 208, 0.35) 50%, transparent 50%),
    radial-gradient(1px 1px at 15% 88%, rgba(255, 255, 255, 0.25) 50%, transparent 50%),
    radial-gradient(1.5px 1.5px at 45% 90%, rgba(255, 253, 208, 0.3) 50%, transparent 50%),
    radial-gradient(1px 1px at 92% 12%, rgba(255, 255, 255, 0.4) 50%, transparent 50%);
  opacity: 0.7;
}

.stars::after {
  background-image:
    radial-gradient(1px 1px at 22% 35%, rgba(255, 255, 255, 0.2) 50%, transparent 50%),
    radial-gradient(1px 1px at 60% 55%, rgba(255, 253, 208, 0.25) 50%, transparent 50%),
    radial-gradient(1px 1px at 80% 30%, rgba(255, 255, 255, 0.2) 50%, transparent 50%);
  opacity: 0.5;
}

/* Layout */
.page {
  position: relative;
  z-index: 1;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(11, 11, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.brand span {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.nav-toc {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-toc a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.55rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-toc a:hover {
  color: var(--gold);
  background: var(--glow);
}

/* Hero */
.hero {
  padding: 3rem 0 2.5rem;
  text-align: center;
}

.hero-banner {
  width: 100%;
  margin: 0 auto 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
}

.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  letter-spacing: 0.03em;
}

.hero .tagline {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--cream);
  margin: 0 0 0.25rem;
}

.hero .subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
}

.hero .divider {
  width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 0 auto 1.25rem;
}

.hero .updated {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.hero .disclaimer {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Sections */
.legal-content {
  padding-bottom: 4rem;
}

.section {
  margin-bottom: 2.5rem;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.02em;
}

.section h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--cream);
  margin: 1.75rem 0 0.75rem;
}

.section h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-muted);
  margin: 1.25rem 0 0.5rem;
}

.section p {
  margin: 0 0 1rem;
}

.section ul,
.section ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.section li {
  margin-bottom: 0.4rem;
}

.section li::marker {
  color: var(--gold-muted);
}

.section a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.section a:hover {
  border-bottom-color: var(--gold);
}

.section code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.88em;
  color: var(--cream);
  background: rgba(11, 11, 26, 0.6);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* Requisites */
.requisites {
  list-style: none;
  padding: 0;
  margin: 0;
}

.requisites li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(184, 169, 201, 0.1);
}

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

.requisites strong {
  color: var(--cream);
  min-width: 11rem;
  font-weight: 500;
}

.placeholder {
  color: var(--gold-muted);
  background: rgba(212, 175, 55, 0.08);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  border: 1px dashed rgba(212, 175, 55, 0.3);
  font-size: 0.9em;
}

/* Table */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead {
  background: rgba(212, 175, 55, 0.08);
}

th {
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--cream);
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(184, 169, 201, 0.1);
  vertical-align: top;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(212, 175, 55, 0.04);
}

.note {
  padding: 1rem 1.15rem;
  background: rgba(212, 175, 55, 0.06);
  border-left: 3px solid var(--gold-muted);
  border-radius: 0 8px 8px 0;
  font-size: 0.92rem;
  color: var(--cream);
  margin: 1rem 0;
}

.note strong {
  color: var(--gold);
}

/* Consent block */
.consent-block {
  padding: 1.25rem 1.5rem;
  background: rgba(11, 11, 26, 0.5);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 1rem;
}

.consent-block p {
  font-size: 0.95rem;
  color: var(--cream);
}

/* Footer */
.site-footer {
  padding: 2rem 0 3rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Mobile nav */
@media (max-width: 720px) {
  .nav-toc {
    display: none;
  }

  .section {
    padding: 1.25rem;
  }

  .requisites strong {
    min-width: 100%;
  }

  th,
  td {
    padding: 0.55rem 0.65rem;
    font-size: 0.82rem;
  }
}

@media (min-width: 721px) {
  .hero {
    padding-top: 3.5rem;
  }
}
