/* ============================================================
   legal css — shared by /privacy, /terms, /cookies
   scoped to .lg-* — inherits tokens from index.css
   ============================================================ */

/* ---------- hero ---------- */
.lg-hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}

.lg-hero__mesh {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.lg-hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.36;
  animation: lgBlobDrift 18s ease-in-out infinite alternate;
}

.lg-hero__blob--a {
  width: 460px; height: 460px;
  top: -20%; right: -6%;
  background: radial-gradient(circle, rgba(94, 234, 212, 0.2), transparent 70%);
}

.lg-hero__blob--b {
  width: 380px; height: 380px;
  bottom: -22%; left: -8%;
  background: radial-gradient(circle, rgba(242, 169, 59, 0.1), transparent 70%);
  animation-delay: -9s;
}

@keyframes lgBlobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(26px, -20px) scale(1.06); }
  100% { transform: translate(-16px, 18px) scale(0.96); }
}

.lg-hero__grid {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 20% 30%, black, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 20% 30%, black, transparent 72%);
}

.lg-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 20px;
  opacity: 0;
}

.lg-hero__tag-line {
  width: 32px;
  height: 1px;
  background: var(--signal);
  flex-shrink: 0;
}

.lg-hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.4vw, 3.2rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  opacity: 0;
  transform: translateY(24px);
}

.lg-hero__lede {
  font-size: 1.04rem;
  color: var(--paper-dim);
  max-width: 620px;
  line-height: 1.75;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(24px);
}

.lg-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--paper-dim);
  opacity: 0;
  transform: translateY(24px);
}

.lg-hero__meta strong {
  color: var(--paper);
  font-weight: 600;
}

.lg-hero__dot {
  opacity: 0.5;
}

/* ---------- layout ---------- */
.lg-body {
  padding: 56px 0 100px;
}

.lg-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  align-items: start;
}

/* ---------- table of contents ---------- */
.lg-toc {
  position: sticky;
  top: 96px;
}

.lg-toc__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: 14px;
}

.lg-toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--line-soft);
}

.lg-toc a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  font-size: 0.86rem;
  color: var(--paper-dim);
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.lg-toc a:hover {
  color: var(--paper);
}

.lg-toc a.is-active {
  color: var(--signal);
  border-left-color: var(--signal);
}

/* ---------- content ---------- */
.lg-content {
  max-width: 720px;
}

.lg-section {
  padding-top: 8px;
  margin-bottom: 48px;
  scroll-margin-top: 96px;
  opacity: 0;
  transform: translateY(28px);
}

.lg-section:last-of-type {
  margin-bottom: 0;
}

.lg-section h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.lg-section h2 span {
  color: var(--signal-dim);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1rem;
  margin-right: 10px;
}

.lg-section h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--paper);
  margin: 24px 0 10px;
}

.lg-section p {
  color: var(--paper-dim);
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.lg-section p:last-child {
  margin-bottom: 0;
}

.lg-section strong {
  color: var(--paper);
  font-weight: 600;
}

.lg-section a {
  color: var(--signal);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--signal) 40%, transparent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.lg-section a:hover {
  text-decoration-color: var(--signal);
}

.lg-section ul,
.lg-section ol.lg-list {
  color: var(--paper-dim);
  font-size: 0.98rem;
  line-height: 1.75;
  margin: 0 0 16px;
  padding-left: 22px;
}

.lg-section li {
  margin-bottom: 8px;
}

.lg-section li::marker {
  color: var(--signal-dim);
}

.lg-section code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  color: var(--signal);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  padding: 1px 6px;
}

/* ---------- data table (retention periods, etc.) ---------- */
.lg-table {
  width: 100%;
  border-collapse: collapse;
  margin: 4px 0 20px;
  font-size: 0.92rem;
}

.lg-table th,
.lg-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.lg-table th {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-dim);
  font-weight: 600;
}

.lg-table td {
  color: var(--paper-dim);
}

.lg-table td:first-child {
  color: var(--paper);
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- callouts ---------- */
.lg-callout {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
}

.lg-callout--signal {
  border-color: color-mix(in srgb, var(--signal) 30%, var(--line-soft));
  background: linear-gradient(160deg, color-mix(in srgb, var(--signal) 7%, var(--panel)), var(--panel));
}

.lg-callout h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.lg-callout h3 svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: var(--signal);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lg-callout p {
  margin: 0;
  color: var(--paper-dim);
  font-size: 0.92rem;
  line-height: 1.65;
}

.lg-callout p + p {
  margin-top: 10px;
}

/* ---------- closing contact card ---------- */
.lg-endcard {
  margin-top: 56px;
  padding: 32px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--line-soft);
  background: var(--panel);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(28px);
}

.lg-endcard__text h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.lg-endcard__text p {
  color: var(--paper-dim);
  font-size: 0.92rem;
  max-width: 420px;
}

.lg-endcard__ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- cross-links between legal pages ---------- */
.lg-related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.lg-related a {
  font-size: 0.86rem;
  color: var(--paper-dim);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lg-related a:hover {
  color: var(--signal);
}

/* ---------- back to top ---------- */
.lg-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  color: var(--paper-dim);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  z-index: 40;
}

.lg-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lg-top:hover {
  color: var(--signal);
  border-color: var(--signal);
}

.lg-top svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .lg-hero__blob { animation: none; }
  .lg-hero__tag,
  .lg-hero__title,
  .lg-hero__lede,
  .lg-hero__meta,
  .lg-section,
  .lg-endcard {
    opacity: 1;
    transform: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .lg-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .lg-toc {
    display: none;
  }
  .lg-content {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .lg-hero {
    padding: 48px 0 40px;
  }
  .lg-body {
    padding: 40px 0 72px;
  }
  .lg-section h2 {
    font-size: 1.28rem;
  }
  .lg-endcard {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 24px;
  }
  .lg-top {
    right: 16px;
    bottom: 16px;
    width: 40px;
    height: 40px;
  }
}
