/* ============================================================
   Red Dots — shared legal stylesheet
   Loaded by privacy.html and terms-of-service.html only
   ============================================================ */

:root {
  --bg: #140D0E;
  --bg-soft: #1D1314;
  --bg-card: #201617;
  --bg-raised: #281A1B;
  --bg-red-deep: #2B0D0D;
  --red: #EF4444;
  --red-dark: #DC2626;
  --red-light: #FCA5A5;
  --text: #F6EDEA;
  --text-muted: #CBB4AF;
  --text-faint: #A58D89;
  --line: #3A2628;
  --line-soft: #2C1D1F;
  --white: #FBF6F4;
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legal-page {
  background-color: #140D0E;
  color: #F6EDEA;
}

a {
  color: var(--red-light);
  text-decoration: none;
}

a:hover {
  color: var(--red);
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ============================================================
   LEGAL HEADER (div/header, solid background, contrasting h1)
   ============================================================ */

.legal-header {
  background: linear-gradient(135deg, #2B0D0D 0%, #1D1314 60%, #140D0E 100%);
  border-bottom: 3px solid var(--red);
  padding: 72px 0 56px;
}

.legal-header__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

.legal-header .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.legal-header .brand__glyph {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px var(--bg-red-deep);
}

.legal-header .brand__word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.legal-header h1 {
  font-size: clamp(32px, 5vw, 48px);
  color: var(--text);
  margin-bottom: 14px;
}

.legal-header p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 680px;
}

.legal-header .meta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 14px;
  color: var(--text-faint);
}

.legal-header .meta strong {
  color: var(--text-muted);
  font-weight: 600;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */

.toc {
  max-width: 860px;
  margin: 40px auto 0;
  padding: 0 24px;
}

.toc__card {
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--red);
  border-radius: 12px;
  padding: 26px 28px;
}

.toc__card h2 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red-light);
  margin-bottom: 16px;
}

.toc__card ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.toc__card ol li {
  counter-increment: toc;
}

.toc__card ol li a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 15px;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.toc__card ol li a:hover {
  color: var(--red-light);
  text-decoration: none;
}

.toc__card ol li a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  color: var(--red);
}

/* ============================================================
   LEGAL CONTENT
   ============================================================ */

.legal-content {
  padding: 40px 0 72px;
}

.legal-content .container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* scope isolation: any section inside the legal content gets a
   transparent background regardless of other styles */
.legal-page .legal-content section {
  background-color: transparent !important;
}

.legal-content section {
  padding: 40px 0 8px;
  border-bottom: 1px solid var(--line-soft);
}

.legal-content section:last-of-type {
  border-bottom: 0;
}

.legal-content section h2 {
  font-size: 26px;
  color: var(--text);
  margin-bottom: 18px;
  padding-top: 8px;
}

.legal-content section h2::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  margin-right: 12px;
  vertical-align: middle;
}

.legal-content section h3 {
  font-size: 19px;
  color: var(--text);
  margin: 26px 0 12px;
}

.legal-content section p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 16px;
}

.legal-content section ul {
  list-style: none;
  margin: 4px 0 18px;
}

.legal-content section ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 16px;
}

.legal-content section ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.legal-content section strong {
  color: var(--text);
  font-weight: 600;
}

/* ============================================================
   LEGAL FOOTER
   ============================================================ */

.legal-footer {
  background: var(--bg);
  border-top: 3px solid var(--red);
  padding: 40px 0;
}

.legal-footer__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.legal-footer p {
  font-size: 14px;
  color: var(--text-faint);
}

.legal-footer .back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  background: var(--red);
  padding: 12px 22px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
}

.legal-footer .back-link:hover {
  background: var(--red-dark);
  text-decoration: none;
  color: var(--white);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 680px) {
  .toc__card ol {
    grid-template-columns: 1fr;
  }

  .legal-header {
    padding: 52px 0 44px;
  }

  .legal-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
