/* Legal document pages (terms, privacy, sweepstakes-rules,
   referral-competition-rules, responsible-play, legal-notice).
   Loaded after landing.css: same header, footer, fonts and tokens; this only
   lays out the long-form text. */

/* ---------- hero band ---------- */
.legal-hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(60% 120% at 85% 0%, rgba(142, 92, 255, .45) 0%, rgba(142, 92, 255, 0) 70%),
    linear-gradient(180deg, rgba(31, 20, 52, .55) 0%, rgba(31, 20, 52, .92) 100%),
    url("../assets/landing/footer-wall.webp") 0 0 / 360px repeat, var(--night);
  padding: 32px 0 40px;
}
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.legal-tabs a {
  font-family: var(--display); font-weight: 600; font-size: 14px; line-height: 1; text-decoration: none;
  color: var(--melrose); padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(201, 179, 255, .35);
  transition: background-color .15s ease, color .15s ease;
}
.legal-tabs a:hover { background: rgba(201, 179, 255, .12); color: #fff; }
.legal-tabs a[aria-current="page"] { background: var(--yellow); border-color: #fff; color: var(--btn-ink); box-shadow: var(--glow); }

.legal-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--yellow); }
.legal-head h1 { font-family: var(--display); font-weight: 600; font-size: 44px; line-height: 1.1; margin-top: 8px; }
.legal-sub { margin-top: 10px; font-size: 16px; font-weight: 600; color: var(--melrose); }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.legal-meta div {
  display: flex; gap: 6px; align-items: baseline; padding: 8px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14); font-size: 12px;
}
.legal-meta dt { font-weight: 600; color: rgba(255, 255, 255, .65); }
.legal-meta dd { font-weight: 700; color: #fff; }
.legal-de-note { display: none; margin-top: 16px; font-size: 13px; font-weight: 600; color: var(--yellow); }
html[lang="de"] .legal-de-note { display: block; }

/* ---------- contents + document ---------- */
.legal-layout {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start;
  padding-top: 40px;
}
.legal-layout-single { grid-template-columns: minmax(0, 820px); }
.legal-toc {
  position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto;
  background: #fff; border: 1px solid var(--lilac); border-radius: 16px; padding: 20px;
}
.legal-toc h2 { font-family: var(--display); font-weight: 600; font-size: 18px; margin-bottom: 12px; }
.legal-toc ol { counter-reset: toc; display: flex; flex-direction: column; gap: 2px; }
.legal-toc li { counter-increment: toc; }
.legal-toc a {
  display: flex; gap: 8px; padding: 6px 8px; border-radius: 8px; text-decoration: none;
  font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--muted);
}
.legal-toc a::before { content: counter(toc) "."; min-width: 20px; color: var(--purple-2); font-weight: 700; }
.legal-toc a:hover { background: var(--selago); color: var(--purple); }

.legal-doc {
  background: #fff; border: 1px solid var(--lilac); border-radius: 20px;
  box-shadow: 0 8px 24px rgba(43, 27, 61, .06); padding: 40px 48px;
  font-size: 15px; font-weight: 500; line-height: 1.7; color: #3d3150;
}
.legal-section { scroll-margin-top: 96px; }
.legal-section + .legal-section { margin-top: 32px; padding-top: 32px; border-top: 1px solid var(--lilac); }
.legal-section h2 { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.25; color: var(--ink); margin-bottom: 12px; }
.legal-section h2 .legal-num { color: var(--purple-2); }
.legal-doc p + p, .legal-doc p + .legal-list, .legal-list + p, .legal-doc p + .legal-help { margin-top: 12px; }
.legal-clause { display: grid; grid-template-columns: 44px 1fr; scroll-margin-top: 96px; }
.legal-clause .legal-num { font-weight: 700; color: var(--purple); }
.legal-doc strong { font-weight: 700; color: var(--ink); }
.legal-doc a { color: #7c24d5; font-weight: 600; }

.legal-list { display: flex; flex-direction: column; gap: 8px; margin-left: 44px; }
.legal-list li { position: relative; padding-left: 22px; }
ul.legal-list li::before {
  content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 50%;
  background: var(--yellow); box-shadow: 0 0 0 2px rgba(252, 212, 44, .3);
}
ol.legal-list { counter-reset: item; }
ol.legal-list li { counter-increment: item; padding-left: 32px; }
ol.legal-list li::before { content: "(" counter(item) ")"; position: absolute; left: 0; font-weight: 700; color: var(--purple); }

.legal-note, .legal-help {
  border-radius: 14px; padding: 16px 20px; background: var(--selago); border-left: 4px solid var(--heliotrope);
}
.legal-help { border-left-color: var(--yellow); background: #fffaf0; }
.legal-help p + p { margin-top: 6px; }
.legal-help a { font-weight: 700; }

.legal-contact {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--lilac);
  font-size: 14px; font-weight: 600; color: var(--muted);
}
/* a blank left in the brand owner's text, shown until they fill it in */
.legal-gap { background: rgba(252, 212, 44, .45); color: var(--ink); font-weight: 700; padding: 0 4px; border-radius: 4px; }

/* ---------- narrower screens ---------- */
@media (max-width: 1023px) {
  .legal-layout { grid-template-columns: 1fr; gap: 16px; }
  .legal-toc { position: static; max-height: none; }
  .legal-toc ol { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
}
@media (max-width: 899px) {
  .legal-hero { padding: 20px 0 28px; }
  .legal-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 24px; padding: 0 16px 4px; scrollbar-width: none; }
  .legal-tabs a { flex: none; font-size: 13px; padding: 9px 14px; }
  .legal-head h1 { font-size: 30px; }
  .legal-sub { font-size: 14px; }
  .legal-layout { padding-top: 24px; }
  .legal-toc { padding: 16px; }
  .legal-toc ol { grid-template-columns: 1fr; max-height: 232px; overflow: auto; }
  .legal-doc { padding: 24px 18px; font-size: 14px; line-height: 1.65; border-radius: 16px; }
  .legal-section + .legal-section { margin-top: 24px; padding-top: 24px; }
  .legal-section h2 { font-size: 19px; }
  .legal-clause { grid-template-columns: 36px 1fr; }
  .legal-list { margin-left: 0; }
  .legal-note, .legal-help { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .legal-tabs a { transition: none; }
}
