/* legal.css: Legal Center hub page.
   Reuses tokens/components from style.css (nav, aurora, footer, hero
   eyebrow) and the same .staff-hero pattern as contact.html/staff-
   application.html/report-bug.html, so this page sits at the same
   1280px content width and reads as part of the same site. This file
   DEFINES .staff-hero/.staff-h1/.staff-sub itself (it was previously
   relying on contact.css/report-bug.css for those, which this page
   never loads, so the header rendered completely unstyled).

   Layout below the hero is a single scrolling column of document
   sections (Terms, Privacy, Community Guidelines, Cookies), one after
   another — no sidebar, no active/selected doc. Every document is a
   "not yet published" placeholder for now: no real policy text is
   faked here, just a title, a status line and skeleton lines reusing
   the project's existing shimmer-loading treatment (see .res-skel in
   resources.css). This replaces an earlier sidebar + active-panel
   version of this page, which combined position:sticky with
   backdrop-filter and border-radius on the same element — a known
   Chromium/Edge combo that painted a stray rounded "seam" artifact.
   Going with a plain stacked layout (nothing sticky at all) sidesteps
   that bug entirely rather than working around it.

   Each .legal-doc card is deliberately semi-opaque + blurred + shadowed
   ("glass card" treatment, ~line 60) rather than a flat fill: a flat
   fill close to the page's own near-black background was nearly
   invisible against the darker part of the aurora gradient, which read
   as "content floating with nothing behind it." The blur + shadow keeps
   each card visible regardless of what's behind it.

   Responsive strategy: sizes are clamp()/min() where they can vary
   continuously, with explicit fallbacks in the "Narrower screens" block
   at the bottom for 900 / 600 / 480 / 380px. There's no separate mobile
   layout mode to maintain here — it's the same single column at every
   width, just with tighter padding as things narrow. */

#legal-app { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }

.content {
  max-width: 1280px; width: 100%;
  margin: 0 auto;
  padding: 90px 3rem 72px;
}

/* ---------- Page header (same pattern as contact/report-bug/staff-application) ---------- */
.staff-hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.staff-hero .hero-eyebrow { font-size: 0.85rem; }
.staff-h1 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--white);
  text-shadow: 0 0 20px rgba(124,58,237,0.2);
}
.staff-h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--violet) 20%, var(--glow) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.staff-sub {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto;
}

/* ---------- Docs: single stacked column ---------- */
/* Narrower than the page's 1280px content width and centered — this is
   a reading column now, not a two-pane layout, so full width would make
   each line uncomfortably long. */
.legal-docs {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 760px;
  margin: 0 auto;
}

.legal-doc {
  background: linear-gradient(180deg, rgba(22,18,46,0.88), rgba(11,9,24,0.92));
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(168,85,247,0.22);
  border-radius: var(--radius);
  padding: 2rem 2.1rem 2.3rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  /* Offsets the deep-link scroll target so a jump to #privacy etc.
     doesn't tuck the card's top edge under the fixed/compact nav. */
  scroll-margin-top: 100px;
}

.legal-doc-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 1.4rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px solid var(--border);
}
.legal-doc-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(124,58,237,0.16);
  border: 1px solid rgba(168,85,247,0.32);
  color: var(--violet);
}
.legal-doc-icon svg { width: 21px; height: 21px; display: block; }
.legal-doc-head-text { min-width: 0; }
.legal-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.legal-doc-head h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--white);
}
.legal-status {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ---------- Skeleton "text loading" body ---------- */
/* Wrapped in its own faint card so it reads as a distinct "document
   preview" area rather than lines floating loose on the card bg. */
.legal-doc-skel {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(124,58,237,0.1);
  border-radius: 14px;
  padding: 1.6rem 1.7rem;
}

.legal-skel-group { margin-bottom: 1.6rem; }
.legal-skel-group:last-child { margin-bottom: 0; }

.legal-skel-line {
  height: 0.85em;
  border-radius: 5px;
  margin-bottom: 0.65rem;
  background: linear-gradient(100deg, #191333 25%, #241c4d 50%, #191333 75%);
  background-size: 200% 100%;
  animation: legalShimmer 1.3s linear infinite;
}
.legal-skel-line:last-child { margin-bottom: 0; }
.legal-skel-line.title { height: 1.1em; width: 42%; margin-bottom: 1.1rem; }
.legal-skel-line.w-95 { width: 95%; }
.legal-skel-line.w-88 { width: 88%; }
.legal-skel-line.w-72 { width: 72%; }
.legal-skel-line.w-60 { width: 60%; }
.legal-skel-line.w-40 { width: 40%; }

@keyframes legalShimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Filled info card instead of a thin top-border line — reads as a
   finished, deliberate "here's what's happening" note rather than an
   afterthought. Sits once at the bottom of the whole stack rather than
   repeating under every document. */
.legal-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 1.1rem 1.2rem;
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.65;
}
.legal-note svg { flex-shrink: 0; margin-top: 2px; color: var(--violet); }
.legal-note a { color: var(--violet); text-decoration: underline; text-underline-offset: 2px; }
.legal-note a:hover { color: var(--glow); }

/* ---------- Narrower screens ---------- */
@media (max-width: 900px) {
  .content { padding: 76px 1.5rem 56px; }
}

@media (max-width: 600px) {
  .legal-doc { padding: 1.5rem 1.3rem 1.8rem; }
  .legal-doc-skel { padding: 1.3rem 1.2rem; }
}

@media (max-width: 480px) {
  .content { padding: 72px 1.1rem 48px; }
  .staff-hero { margin: 0 auto 30px; gap: 10px; }
  .legal-docs { gap: 18px; }
  .legal-doc { padding: 1.25rem 1.1rem 1.5rem; border-radius: 14px; }
  .legal-doc-head { padding-bottom: 1.1rem; margin-bottom: 1.3rem; gap: 10px; }
  .legal-doc-icon { width: 36px; height: 36px; border-radius: 10px; }
  .legal-doc-icon svg { width: 18px; height: 18px; }
  .legal-doc-head h2 { font-size: 1.3rem; }
  .legal-doc-skel { padding: 1.1rem 1rem; border-radius: 12px; }
  .legal-note { padding: 0.95rem 1rem; font-size: 0.84rem; }
}

@media (max-width: 380px) {
  .legal-skel-line.title { width: 60%; }
  .legal-doc-head { flex-wrap: wrap; }
}
