/* Legal pages (voorwaarden, privacy, …): long-form text in the dark site chrome.
   Text is taken unchanged from the app's pages (apps/dashboard/src/app/<slug>/page.tsx). */

:root {
  --accent-soft: rgb(0 34 255 / 14%);
  --radius: 14px;
}

/* the sky sits on <html>, so the stars (.legal-sky, behind the body) stay visible */
html {
  background:
    radial-gradient(1200px 500px at 50% -200px, rgb(0 34 255 / 18%), transparent 70%),
    radial-gradient(120% 85% at 50% 42%, #04071a 0%, #000 62%) fixed,
    var(--bg);
}

body {
  min-height: 100vh;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

/* ---------- nav ---------- */

.legal-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 4vw, 40px);
  background: rgb(0 0 0 / 72%);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.brand .logo {
  display: block;
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 0 12px rgb(0 34 255 / 55%));
}

.legal-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
}

.legal-links a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: var(--accent-line);
  box-shadow: 0 0 8px var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.legal-links a:hover::after,
.legal-links a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.legal-links a:hover {
  color: var(--text);
}

/* ---------- document ---------- */

.legal-page {
  width: 100%;
  max-width: 808px;
  margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 24px 0;
}

.legal-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.legal-head h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 600;
}

.legal-meta {
  margin: 0;
  font: 13px/1.5 var(--mono);
  color: var(--faint);
}

.legal-summary {
  margin-top: 32px;
  padding: 20px 22px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  background: var(--accent-soft);
  font-size: 15px;
  line-height: 1.6;
}

.legal-summary p {
  margin: 0;
}

.legal-summary p + p {
  margin-top: 8px;
}

.legal-summary a,
.legal-foot a {
  color: var(--accent-ink);
  text-underline-offset: 3px;
}

.legal-body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.legal-body section {
  padding-top: 40px;
}

.legal-body h2 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
}

.legal-body p,
.legal-body ol,
.legal-body ul {
  margin: 0;
}

.legal-body p + p,
.legal-body p + ol,
.legal-body ol + p,
.legal-body p + ul,
.legal-body ul + p {
  margin-top: 10px;
}

.legal-body ol,
.legal-body ul {
  padding-left: 22px;
}

.legal-body li + li {
  margin-top: 6px;
}

.legal-body strong {
  color: var(--text);
  font-weight: 500;
}

.legal-body code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgb(255 255 255 / 7%);
  color: var(--text);
}

.legal-body a:not(.btn) {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body .btn {
  gap: 8px;
}

.legal-foot {
  margin: 56px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--faint);
}

/* ---------- footer ---------- */

.legal-footer {
  max-width: 1120px;
  margin: 96px auto 0;
  padding: 40px clamp(20px, 4vw, 40px) 32px;
  border-top: 1px solid var(--line);
}

.legal-footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.legal-footer-brand .brand {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.legal-footer-brand p {
  margin: 0;
  max-width: 460px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.legal-footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 32px;
}

.legal-footer-cols > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-footer-legal {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: min-content;
  column-gap: 24px;
}

.legal-footer-legal h2 {
  grid-column: 1 / -1;
}

.legal-footer h2 {
  margin: 0 0 4px;
  font: 500 11px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.legal-footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.legal-footer a:hover,
.legal-footer a[aria-current="page"] {
  color: var(--text);
}

.legal-footer a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-copy {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}

.legal-copy a {
  font-size: 12px;
}

@media (max-width: 760px) {
  .legal-links {
    display: none;
  }
  .legal-page {
    padding-inline: 16px;
  }
  .legal-footer-cols {
    grid-template-columns: 1fr 1fr;
  }
  .legal-footer-legal {
    grid-column: 1 / -1;
  }
}

/* ---------- the night sky from the landing page, and the line that fills while you read ---------- */

.legal-sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.legal-thread {
  --read: 0;
  position: fixed;
  top: 96px;
  bottom: 40px;
  left: clamp(16px, 3vw, 40px);
  z-index: 5;
  width: 1px;
  background: rgb(255 255 255 / 8%);
  pointer-events: none;
}

.legal-thread::before {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: top;
  transform: scaleY(var(--read));
  background: var(--accent-line);
  box-shadow: 0 0 10px var(--accent);
}

.legal-thread::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(var(--read) * 100%);
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: #ebf0ff;
  box-shadow: 0 0 0 8px rgb(0 34 255 / 25%);
}

@media (max-width: 860px) {
  .legal-thread {
    display: none;
  }
}
