/* Shared styles for the legal pages (Terms, Privacy, Cookies, Risk Warning, AUP).
   Nav + footer rules mirror about.html so these pages match the rest of the site. */

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

:root {
  --dark-bg: #0d1a1a;
  --dark-text: #f0f4f3;
  --dark-border: rgba(255, 255, 255, 0.07);
  --dark-muted: rgba(240, 244, 243, 0.5);
  --light-bg: #f3f1ed;
  --light-text: #131f1f;
  --light-muted: rgba(19, 31, 31, 0.6);
  --teal: #173e42;
  --teal-soft: #c0d4d7;
  --line: rgba(19, 31, 31, 0.1);
  --font-display: "Clash Display", sans-serif;
  --font-body: "Clash Display", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--light-bg);
  color: var(--light-text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── ANNOUNCEMENT ─────────────────────────────── */
.serieslink {
  text-decoration: unset;
}

.hero-announcement {
  position: relative;
  z-index: 5;
  width: 100%;
  background: #ffffff;
  text-align: center;
  padding: 10px 24px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 400;
  color: #131f1f;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.hero-announcement strong {
  font-weight: 600;
}

/* ─── NAV ─────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
}

.nav-logo-wrap {
  height: 28px;
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.nav-logo {
  height: 100%;
  width: auto;
  display: block;
  pointer-events: none;
  user-select: none;
}

.nav-links {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 36px;
  list-style: none;
  font-size: 14px;
  font-weight: 400;
}

.nav-links a {
  color: rgba(19, 31, 31, 0.7);
  text-decoration: none;
  transition: color 0.2s;
}

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

.nav-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-signup {
  background: white;
  border: none;
  color: var(--light-text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: 100px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  letter-spacing: 0.01em;
  text-decoration: none !important;
}

.nav-signup:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

nav.scrolled .nav-signup {
  background: var(--light-text);
  color: #fff;
}

/* ─── LEGAL DOCUMENT ──────────────────────────────── */
.legal {
  max-width: 920px;
  margin: 0 auto;
  padding: 72px 40px 120px;
}

.legal-hero {
  text-align: center;
  margin-bottom: 48px;
}

.legal-running {
  font-size: 13px;
  font-weight: 400;
  color: var(--light-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.legal-company {
  font-size: 18px;
  font-weight: 500;
  color: var(--teal);
  letter-spacing: 0.01em;
}

.legal-location {
  font-size: 14px;
  color: var(--light-muted);
  margin-top: 6px;
}

.legal-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--light-text);
  margin: 28px auto 12px;
  text-wrap: balance;
}

.legal-ref {
  font-size: 15px;
  font-style: italic;
  color: var(--teal);
}

.legal-meta {
  max-width: 620px;
  margin: 36px auto 0;
  text-align: left;
}

.legal-doc {
  background: #ffffff;
  border-radius: 24px;
  padding: 56px 64px 64px;
  box-shadow: 0 1px 2px rgba(19, 31, 31, 0.04);
}

.legal-doc h2 {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--light-text);
  margin: 56px 0 18px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.legal-doc > h2:first-child,
.legal-doc > .legal-callout + h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-doc > .legal-callout + h2 {
  margin-top: 40px;
}

.legal-doc h3 {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--teal);
  margin: 32px 0 12px;
}

.legal-doc h2 + h3 {
  margin-top: 8px;
}

.legal-doc h4 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--teal);
  margin: 26px 0 8px;
}

.legal-doc h3 + h4 {
  margin-top: 8px;
}

.legal-doc p,
.legal-doc li {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(19, 31, 31, 0.8);
}

.legal-doc p {
  margin: 0 0 16px;
}

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

.legal-doc p.caps {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.7;
  color: var(--light-text);
}

.legal-doc ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.legal-doc li {
  margin: 0 0 8px;
  padding-left: 4px;
}

.legal-doc li::marker {
  color: var(--teal);
}

.legal-doc ul ul {
  margin: 8px 0 4px;
  padding-left: 20px;
  list-style: none;
}

.legal-doc ul ul li {
  position: relative;
  padding-left: 18px;
}

.legal-doc ul ul li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--teal);
}

.legal-doc a,
.legal-meta a {
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: rgba(23, 62, 66, 0.35);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: text-decoration-color 0.2s;
}

.legal-doc a:hover,
.legal-meta a:hover {
  text-decoration-color: var(--teal);
}

.legal-contact {
  margin: 4px 0 18px;
  padding: 20px 24px;
  border-radius: 16px;
  background: #f7f6f3;
  border: 1px solid var(--line);
}

.legal-doc .legal-contact p {
  margin: 0;
  padding: 4px 0;
}

.legal-callout {
  border: 1px solid var(--teal);
  background: rgba(23, 62, 66, 0.05);
  border-radius: 16px;
  padding: 22px 26px;
}

.legal-doc .legal-callout p {
  margin: 0;
}

.legal-doc .legal-callout .legal-callout-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal);
  margin-bottom: 8px;
}

/* tables */
.legal-table-wrap {
  margin: 8px 0 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(19, 31, 31, 0.82);
}

.legal-table th,
.legal-table td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px;
}

.legal-table thead th {
  background: var(--teal);
  color: var(--dark-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.legal-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.legal-table tbody tr:nth-child(even) td {
  background: rgba(19, 31, 31, 0.025);
}

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

.legal-table.is-dense {
  font-size: 13px;
}

.legal-table.is-dense th,
.legal-table.is-dense td {
  padding: 10px 12px;
}

.legal-table.is-dense td:first-child {
  overflow-wrap: break-word;
  font-weight: 500;
  color: var(--light-text);
}

.legal-table.is-dense th:nth-child(n + 4),
.legal-table.is-dense td:nth-child(2),
.legal-table.is-dense td:nth-child(n + 4) {
  white-space: nowrap;
}

.legal-table-wrap.is-wide {
  margin-left: -32px;
  margin-right: -32px;
}

.legal-end {
  margin-top: 40px;
  text-align: center;
}

.legal-end p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--light-muted);
  max-width: 640px;
  margin: 0 auto;
}

.legal-end p.legal-closing {
  font-style: italic;
  margin-bottom: 10px;
}

/* ─── FOOTER ──────────────────────────────────────── */
footer {
  background: var(--dark-bg);
  border-top: 1px solid var(--dark-border);
  padding: 64px 60px 40px;
}

.footer-logo {
  height: 32px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 64px;
}

.footer-brand p {
  font-size: 13px;
  font-weight: 300;
  color: var(--dark-muted);
  line-height: 1.65;
  margin-top: 16px;
  max-width: 240px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  gap: 0 32px;
}

.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 244, 243, 0.22);
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 14px;
  font-weight: 300;
  color: var(--dark-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  border-top: 1px solid var(--dark-border);
}

.footer-bottom p {
  font-size: 12px;
  color: rgba(240, 244, 243, 0.22);
  font-weight: 300;
}

.footer-socials {
  display: flex;
  gap: 20px;
}

.footer-socials a {
  color: rgba(240, 244, 243, 0.3);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.footer-socials a:hover {
  color: var(--dark-text);
}

.footer-legal {
  padding: 32px 0;
  border-top: 1px solid var(--dark-border);
}

.footer-legal p {
  font-size: 12px;
  font-weight: 300;
  color: var(--dark-muted);
  line-height: 1.7;
  max-width: 560px;
}

.footer-legal p + p {
  margin-top: 12px;
}

.footer-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

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

/* ─── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
  .hero-announcement {
    font-size: 12px;
  }

  nav {
    padding: 0 24px;
  }

  .nav-links {
    display: none;
  }

  .legal {
    padding: 48px 20px 80px;
  }

  .legal-doc {
    padding: 40px 32px 48px;
  }

  .legal-table-wrap.is-wide {
    margin-left: 0;
    margin-right: 0;
    overflow-x: auto;
  }

  .footer-top {
    flex-direction: column;
    gap: 30px;
  }

  footer {
    padding: 20px !important;
  }
}

@media (max-width: 640px) {
  .legal {
    padding: 36px 16px 64px;
  }

  .legal-hero {
    margin-bottom: 32px;
  }

  .legal-running {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .legal-company {
    font-size: 16px;
  }

  .legal-doc {
    padding: 28px 20px 36px;
    border-radius: 18px;
  }

  .legal-doc h2 {
    font-size: 22px;
    margin-top: 44px;
    padding-top: 32px;
  }

  .legal-doc h3 {
    font-size: 17px;
  }

  .legal-doc p,
  .legal-doc li {
    font-size: 15px;
  }

  .legal-contact {
    padding: 16px 18px;
  }

  .legal-callout {
    padding: 18px 20px;
  }

  /* data tables become stacked cards on phones */
  .legal-table.is-stacked thead {
    display: none;
  }

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

  .legal-table.is-stacked tbody tr {
    padding: 12px 16px;
  }

  .legal-table.is-stacked tbody tr + tr {
    border-top: 1px solid var(--line);
  }

  .legal-table.is-stacked tbody tr + tr td,
  .legal-table.is-stacked tbody tr:nth-child(even) td {
    border-top: 0;
    background: transparent;
  }

  .legal-table.is-stacked tbody tr:nth-child(even) {
    background: rgba(19, 31, 31, 0.025);
  }

  .legal-table.is-stacked td {
    padding: 4px 0;
    white-space: normal !important;
  }

  .legal-table-wrap.is-wide {
    overflow-x: visible;
  }

  .legal-table.is-stacked td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
    margin-bottom: 2px;
  }

  .legal-table.is-stacked td:empty {
    display: none;
  }

  .legal-meta .legal-table th,
  .legal-meta .legal-table td {
    padding: 10px 12px;
  }
}
