/* ═══════════════════════════════════════════════════════════════
   Montreal ESK8 — legal.css (PR-13 Jarvis HUD · PR-52 / DIP-88)
   Styles for terms.html and privacy.html.

   VISUAL INTENT (deliberate, not drift):
   Legal pages stay quieter than home/rides/showcase on purpose.
   Long-form policy copy needs a calm reading surface: sticky TOC
   sidebar, readable measure (~680px), muted body, no marquee/hero
   cinema. Brand still applies via design tokens, Bebas Neue titles,
   Share Tech Mono HUD labels, accent section rails, cyan TOC title,
   and the shared hud-cinema grain/vignette shell on the page body.
   Do not “upgrade” these pages to marketing density.
═══════════════════════════════════════════════════════════════ */

.legal-wrap {
  padding-top: var(--nav-h);
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  gap: 0;
  position: relative;
  z-index: 1;
}

/* ── SIDEBAR ─────────────────────────────────────────────────── */
.legal-sidebar {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 48px 24px 48px 40px;
  border-right: 1px solid var(--glass-border);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.015) 0%,
    transparent 28%
  );
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.legal-sidebar::-webkit-scrollbar { width: 4px; }
.legal-sidebar::-webkit-scrollbar-track { background: transparent; }
.legal-sidebar::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 2px; }

.sidebar-logo {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.16em;
  text-decoration: none;
  color: var(--white);
  margin-bottom: 32px;
}
.sidebar-logo img {
  display: block;
  width: min(300px, 100%);
  height: auto;
  max-height: 150px;
  object-fit: contain;
}

.sidebar-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-title::before {
  content: '';
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-link {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  line-height: 1.4;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.sidebar-link:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 2px;
  color: var(--text);
}
.sidebar-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}

.sidebar-meta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.sidebar-meta p {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1.9;
}
.sidebar-meta a {
  color: var(--blue);
  text-decoration: none;
}
.sidebar-meta a:hover { text-decoration: underline; color: var(--cyan); }

/* ── MAIN CONTENT ─────────────────────────────────────────────── */
.legal-content {
  padding: 48px 48px 80px 56px;
  /* Soft dual-brand wash — present but calm (not home-level cinema) */
  background:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(224, 32, 47, 0.04) 0%, transparent 55%),
    radial-gradient(ellipse 50% 35% at 100% 8%, rgba(0, 212, 255, 0.03) 0%, transparent 50%);
}

.legal-header {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}
.legal-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: min(120px, 30%);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.legal-header .section-label { margin-bottom: 14px; }

.legal-page-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: 0.05em;
  color: var(--white);
  line-height: 0.95;
  margin-bottom: 20px;
}

.legal-meta {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.legal-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-meta-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
}
.legal-meta-val {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* ── SECTIONS ────────────────────────────────────────────────── */
.legal-section {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.legal-section-num {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.legal-section-num::before {
  content: '';
  display: inline-block;
  width: 20px; height: 1px;
  background: var(--accent);
}

.legal-section h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 20px;
}

.legal-section h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--white);
  margin-bottom: 10px;
  margin-top: 24px;
}

.legal-section p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 14px;
  max-width: 680px;
}

.legal-section ul,
.legal-section ol {
  list-style: none;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 680px;
}
.legal-section ul li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.75;
  padding-left: 18px;
  position: relative;
}
.legal-section ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 1rem;
  line-height: 1.4;
}
.legal-section ol { counter-reset: item; }
.legal-section ol li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.75;
  padding-left: 26px;
  position: relative;
  counter-increment: item;
}
.legal-section ol li::before {
  content: counter(item) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.7rem;
  line-height: 1.8;
}

.legal-section a {
  color: var(--blue);
  text-decoration: none;
}
.legal-section a:hover { text-decoration: underline; color: var(--cyan); }
.legal-section a:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 2px;
}

/* Callout box — glass edge, still quieter than dash cards */
.legal-callout {
  background: var(--blue-dim);
  border: 1px solid rgba(0,118,188,0.22);
  border-left: 2px solid var(--blue);
  padding: 18px 20px;
  margin: 20px 0;
  max-width: 680px;
  box-shadow: 0 0 24px rgba(0, 118, 188, 0.06);
}
.legal-callout p {
  margin-bottom: 0;
  font-size: 0.86rem;
  color: var(--text);
}
.legal-callout strong { color: var(--white); }

.legal-callout.warn {
  background: var(--accent-dim);
  border-color: rgba(224,32,47,0.22);
  border-left-color: var(--accent);
  box-shadow: 0 0 24px rgba(224, 32, 47, 0.06);
}

/* Divider */
.legal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0;
  max-width: 680px;
}

/* Last-updated line under long docs — mono muted, not browser default small */
.legal-section small,
.legal-content > .legal-section small {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1.6;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .legal-wrap { grid-template-columns: 1fr; }
  .legal-sidebar {
    position: static;
    height: auto;
    padding: 32px 20px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.01);
  }
  .legal-content {
    padding: 32px 20px 60px;
    background:
      radial-gradient(ellipse 90% 30% at 50% 0%, rgba(224, 32, 47, 0.035) 0%, transparent 60%);
  }
}
