/* ==========================================================================
   Mobiza Games — Legal pages stylesheet
   Builds on style.css for privacy & terms pages.
   ========================================================================== */

/* ----------------------------------------------------- Legal page header */
.legal-hero {
  /* `main` already clears the fixed header, so keep the hero content centred
     within its own area instead of adding the header height a second time. */
  padding-block: clamp(64px, 6vw, 96px);
  background: var(--black);
  color: var(--white);
}

.legal-hero .container {
  max-width: 880px;
}

.legal-hero h1 {
  margin: 0;
  color: var(--white);
  font-family: "Poppins", sans-serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.legal-hero .legal-meta {
  margin: 12px 0 0;
  color: #a6a6a6;
  font-size: 13px;
  letter-spacing: .04em;
  line-height: 1.5;
}

/* ----------------------------------------------------------- Legal body */
.legal-section {
  padding-block: clamp(56px, 6vw, 80px);
}

.legal-section .container {
  max-width: 880px;
}

.legal-prose {
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.7;
}

/* A predictable vertical rhythm for prose content. */
.legal-prose > * + * {
  margin-top: 16px;
}

/* Headings reset browser defaults and define their own rhythm. */
.legal-prose > h2 {
  margin: clamp(40px, 4vw, 48px) 0 0;
}

.legal-prose > h3 {
  margin: 32px 0 0;
}

/* The section padding already creates the lead-in before the first heading. */
.legal-prose > :first-child {
  margin-top: 0;
}

/* Heading immediately following another heading (e.g. h3 right after h2 intro) */
.legal-prose > h2 + h3 {
  margin-top: 24px;
}

.legal-prose > h3 + h2 {
  margin-top: 48px;
}

/* Space below a heading before its content */
.legal-prose > h2 + p,
.legal-prose > h2 + ul,
.legal-prose > h2 + ol,
.legal-prose > h2 + table,
.legal-prose > h3 + p,
.legal-prose > h3 + ul,
.legal-prose > h3 + ol,
.legal-prose > h3 + table {
  margin-top: 16px;
}

.legal-prose p {
  margin: 0;
}

/* Paragraphs, lists, and tables reset their own browser margins, so their
   shared flow needs a more specific rule than the generic sibling spacing. */
.legal-prose > :is(p, ul, ol, table) + :is(p, ul, ol, table) {
  margin-top: 16px;
}

.legal-prose strong {
  color: var(--gray-900);
  font-weight: 600;
}

.legal-prose a {
  color: var(--black);
  border-bottom: 1px solid var(--gray-300);
  transition: border-color var(--transition), color var(--transition);
}

.legal-prose a:hover {
  border-color: currentColor;
}

/* Headings */
.legal-prose h2 {
  color: var(--black);
  font-family: "Poppins", sans-serif;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
}

.legal-prose h3 {
  color: var(--black);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.4;
}

/* Lists */
.legal-prose ul,
.legal-prose ol {
  margin: 0;
  padding-left: 22px;
}

.legal-prose li + li {
  margin-top: 8px;
}

.legal-prose li::marker {
  color: var(--gray-500);
}

/* Separator */
.legal-prose hr {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--gray-200);
}

/* Separators distinguish major sections without creating a visual gulf. */
.legal-prose > hr + h2,
.legal-prose > hr + h3 {
  margin-top: 32px;
}

/* Separator spacing depends on what comes before it */
.legal-prose > * + hr {
  margin-top: 36px;
}

.legal-prose > hr + * {
  margin-top: 32px;
}

/* Tables */
.legal-table {
  width: 100%;
  margin: 20px 0 0;
  border-collapse: collapse;
  font-size: 15px;
  text-align: left;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--gray-200);
}

.legal-table th,
.legal-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}

.legal-table tr:last-child th,
.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-table thead th {
  color: var(--gray-900);
  background: var(--gray-100);
  font-family: "Poppins", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.legal-table tbody th {
  color: var(--gray-900);
  font-weight: 600;
  background: var(--gray-100);
  width: 32%;
}

.legal-table td { color: var(--gray-700); }
.legal-table td strong { color: var(--gray-900); }

/* Brief labels directly attached to a table use the tighter local rhythm. */
.legal-prose > .legal-table-heading {
  margin-top: 24px;
}

/* -------------------------------------------------- Legal back link */
.legal-footer-note {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 14px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  color: var(--black);
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: opacity var(--transition);
}

.legal-back:hover { opacity: .7; }

.legal-back svg { width: 16px; height: 16px; }

/* ----------------------------------------------------------- Responsive */
@media (max-width: 767px) {
  .legal-hero .legal-meta {
    margin-top: 10px;
    letter-spacing: .02em;
  }

  .legal-prose {
    font-size: 15px;
    line-height: 1.7;
  }

  .legal-table {
    display: block;
    border: 0;
  }

  .legal-table thead,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
    width: 100%;
  }

  .legal-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
  }

  .legal-table td,
  .legal-table tbody th {
    border-bottom: 1px solid var(--gray-200);
  }

  .legal-table tr:last-child td:last-child {
    border-bottom: 0;
  }
}
