/* ──────────────────────────────────────────────────────────────────────────
   legal.css — shared stylesheet for the standalone legal pages
   (/legal, /privacy, /cookies, /credits).

   These are plain, lightweight HTML documents (no Three.js, no bundle) so the
   legal content loads instantly and is shareable/indexable on its own URL.
   The look mirrors the site: cosmic-black background, Geist type, cool palette.
   Served verbatim from /public, so it is linked with an ABSOLUTE path.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  --bg: #05070c; /* cosmicBg — same token as the WebGL scene */
  --ink: #e8f0ff; /* headings — cool near-white */
  --body: #b9c6da; /* body copy */
  --soft: #8a98b0; /* secondary copy */
  --muted: #6b7689; /* captions / metadata */
  --accent: #9fd0ff; /* links / accents (from rgba(159,208,255)) */
  --line: rgba(159, 208, 255, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.legal-page {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Geist", "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Faint cool glow up top so the page reads as part of the cosmos, not a flat doc. */
body.legal-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    120% 80% at 50% -10%,
    rgba(159, 208, 255, 0.06),
    transparent 58%
  );
}

/* Sticky top bar with the back-home link (no blur — solid, for perf + clarity). */
.legal-top {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  padding: 20px clamp(20px, 6vw, 56px);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.legal-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-size: 15px;
  opacity: 0.86;
  transition: opacity 0.25s ease;
}
.legal-home:hover {
  opacity: 1;
}
.legal-home .arrow {
  color: var(--accent);
  transition: transform 0.25s ease;
}
.legal-home:hover .arrow {
  transform: translateX(-3px);
}

/* Readable centred column. */
.legal-wrap {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(48px, 9vw, 96px) clamp(20px, 6vw, 56px) 120px;
}

.legal-title {
  color: var(--ink);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0 0 0.2em;
}
.legal-title .es {
  display: block;
  color: var(--soft);
  font-weight: 400;
  font-size: 0.6em;
  letter-spacing: 0.01em;
  margin-top: 0.25em;
}

.legal-updated {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 clamp(40px, 7vw, 64px);
}

/* Language block (one for EN, one for ES). */
.legal-lang {
  margin: 0;
}
.legal-lang-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 1.4em;
}
.legal-lang-label::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
}

.legal-lang h2 {
  color: var(--ink);
  font-weight: 500;
  font-size: clamp(18px, 2.6vw, 21px);
  letter-spacing: 0;
  margin: 2.4em 0 0.7em;
}
.legal-lang h2:first-of-type {
  margin-top: 0.6em;
}

.legal-lang p,
.legal-lang li {
  margin: 0 0 1em;
}

.legal-lang ul {
  margin: 0 0 1em;
  padding-left: 1.2em;
}
.legal-lang li {
  margin-bottom: 0.5em;
}
.legal-lang li::marker {
  color: var(--accent);
}

.legal-lang a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(159, 208, 255, 0.3);
  transition: border-color 0.25s ease, color 0.25s ease;
  word-break: break-word;
}
.legal-lang a:hover {
  color: #ffffff;
  border-bottom-color: var(--accent);
}

.legal-lang strong {
  color: var(--ink);
  font-weight: 500;
}

.legal-lang code {
  font-family: ui-monospace, SFMono-Regular, "Geist Mono", Menlo, monospace;
  font-size: 0.88em;
  color: var(--soft);
  background: rgba(159, 208, 255, 0.06);
  padding: 0.12em 0.4em;
  border-radius: 3px;
  word-break: break-word;
}

/* Divider between the EN and ES halves. */
.legal-sep {
  border: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--line),
    transparent
  );
  margin: clamp(56px, 9vw, 80px) 0;
}

/* Credits — model entries. */
.legal-credit {
  border-left: 1px solid var(--line);
  padding: 0.1em 0 0.1em 1.1em;
  margin: 0 0 1.6em;
}
.legal-credit .credit-name {
  color: var(--ink);
  font-weight: 500;
}
.legal-credit .credit-meta {
  color: var(--soft);
  font-size: 14px;
}

.legal-foot {
  margin-top: clamp(56px, 9vw, 88px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.legal-foot a {
  color: var(--soft);
  text-decoration: none;
  transition: color 0.25s ease;
}
.legal-foot a:hover {
  color: var(--ink);
}
.legal-foot .legal-foot-nav {
  margin-top: 0.8em;
}
.legal-foot .legal-foot-nav a {
  color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  .legal-home,
  .legal-home .arrow,
  .legal-lang a,
  .legal-foot a {
    transition: none;
  }
}
