/* ─────────────────────────────────────────────────────────────────
   legal.css — shared styles for /about-us, /contact, /privacy-policy,
   /terms-of-use. Loaded by each page's <head>.
   ───────────────────────────────────────────────────────────────── */

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

:root {
  --bg: #0A0C10;
  --bg-tile: #000000;
  --blue: #0055FF;
  --cyan: #00F0FF;
  --text: #FFFFFF;
  --text-muted: #8E99A8;
  --text-dim: #4A5568;
  --border: rgba(255, 255, 255, 0.06);

  --ink: #0A0C10;
  --ink-muted: #4b5563;
  --ink-dim: #6b7280;
  --hairline: #e5e7eb;
  --hairline-soft: #f1f3f5;
  --paper: #ffffff;
  --paper-tint: #fafafa;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Hero (dark band at top) ───────────────────────────────────── */
.legal-hero {
  position: relative;
  background: var(--bg);
  color: var(--text);
  padding: 2.5rem 1.5rem 3rem;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  top: -380px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 85, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.legal-hero-inner {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
}
.legal-hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.25rem;
}
.legal-home {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.2s ease;
}
.legal-home:hover { opacity: 0.85; text-decoration: none; }
.legal-home-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.legal-home-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.legal-home-name {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.legal-back {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.legal-back:hover { color: var(--text); text-decoration: none; }
.legal-back svg { width: 12px; height: 12px; fill: currentColor; }

.legal-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 0.6rem;
}
.legal-updated {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Document body (light content) ─────────────────────────────── */
.legal-body {
  flex: 1;
  padding: 3rem 1.5rem 4rem;
  background: var(--paper);
}
.legal-inner {
  max-width: 760px;
  margin: 0 auto;
}

/* TOC */
.legal-toc {
  background: var(--paper-tint);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 3rem;
}
.legal-toc-title {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.85rem;
}
.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1.5rem;
}
.legal-toc li {
  counter-increment: toc;
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.875rem;
}
.legal-toc li::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--ink-dim);
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  flex-shrink: 0;
  min-width: 1.4rem;
}
.legal-toc a {
  color: var(--ink-muted);
  font-weight: 400;
  line-height: 1.4;
}
.legal-toc a:hover { color: var(--blue); }

/* Sections */
.legal-section {
  margin-bottom: 2.5rem;
  scroll-margin-top: 1.5rem;
}
.legal-section:last-child { margin-bottom: 0; }
.legal-section h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline-soft);
}
.legal-section:first-of-type h2 {
  padding-top: 0;
  border-top: none;
}
.legal-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin: 1.5rem 0 0.5rem;
}
.legal-section p,
.legal-section li {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink-muted);
}
.legal-section p { margin-bottom: 1rem; }
.legal-section p:last-child { margin-bottom: 0; }
.legal-section ul,
.legal-section ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.legal-section li {
  margin-bottom: 0.5rem;
}
.legal-section strong {
  color: var(--ink);
  font-weight: 600;
}

/* Definition row (used on Contact page) */
.legal-contact-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.5rem 1.5rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--hairline-soft);
  font-size: 0.95rem;
  line-height: 1.6;
}
.legal-contact-row:first-of-type { border-top: none; }
.legal-contact-row dt {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  align-self: center;
}
.legal-contact-row dd { color: var(--ink-muted); }

/* Brand card grid (used on About page) */
.legal-brand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}
.legal-brand-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--paper-tint);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.legal-brand-card:hover {
  border-color: rgba(0, 85, 255, 0.3);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 85, 255, 0.08);
}
.legal-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.legal-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.legal-brand-mark img.inset { padding: 14%; object-fit: contain; }
.legal-brand-mark img.inset-more { padding: 20%; object-fit: contain; }
.legal-brand-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.legal-brand-desc {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .legal-brand-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .legal-hero { padding: 2rem 1.25rem 2.5rem; }
  .legal-hero h1 { font-size: 1.85rem; }
  .legal-body { padding: 2.25rem 1.25rem 3rem; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-section h2 { font-size: 1.2rem; }
  .legal-contact-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
