@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/Nunito-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("assets/fonts/Nunito-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #061008;
  --panel: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f4fff6;
  --muted: rgba(244, 255, 246, 0.7);
  --mint: #d8ffe0;
  --green: #5dd170;
  --gold: #e6bf61;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font-family: "Nunito", system-ui, sans-serif;
  background: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.legal-background {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(circle at 12% 12%, rgba(56, 154, 75, 0.34), transparent 31%),
    radial-gradient(circle at 88% 24%, rgba(230, 191, 97, 0.2), transparent 28%),
    linear-gradient(145deg, #07170b, #071009 54%, #101a0d);
}

.legal-background::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
}

.legal-header {
  position: sticky;
  z-index: 10;
  top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1040px, calc(100% - 28px));
  min-height: 64px;
  margin: 14px auto 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 22, 10, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.legal-brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.lang-btn {
  min-width: 62px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  cursor: pointer;
  background: transparent;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.lang-btn:hover {
  color: white;
}

.lang-btn.is-active {
  color: #102016;
  background: var(--mint);
  box-shadow: 0 8px 24px rgba(216, 255, 224, 0.2);
  transform: translateY(-1px);
}

.legal-shell {
  width: min(900px, calc(100% - 28px));
  margin: 0 auto;
  padding: 70px 0 100px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 46px;
  color: var(--muted);
  transition: color 0.25s ease, transform 0.25s ease;
}

.back-link:hover {
  color: var(--mint);
  transform: translateX(-3px);
}

.legal-heading {
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.legal-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 700;
}

h1 {
  max-width: 850px;
  margin: 0;
  font-size: 4.3rem;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.legal-content {
  padding-top: 42px;
}

.legal-content p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.72;
  white-space: pre-line;
}

.legal-content .legal-lead {
  color: var(--mint);
  font-size: 1.18rem;
  font-weight: 700;
}

.legal-content .legal-meta {
  color: var(--gold);
  font-weight: 700;
}

.legal-content .legal-operator {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  background: var(--panel);
}

.legal-content h2 {
  margin: 48px 0 20px;
  color: white;
  font-size: 1.65rem;
  line-height: 1.25;
}

.legal-content hr {
  height: 1px;
  margin: 42px 0;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(216, 255, 224, 0.4), transparent);
}

.legal-footer {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 30px 18px;
  border-top: 1px solid var(--line);
  background: rgba(3, 10, 5, 0.72);
}

.legal-footer nav {
  display: flex;
  justify-content: center;
  gap: 12px 24px;
  flex-wrap: wrap;
}

.legal-footer a {
  color: var(--muted);
}

.legal-footer a:hover,
.legal-footer a.is-current {
  color: var(--mint);
}

.legal-footer small {
  color: rgba(255, 255, 255, 0.46);
  text-align: center;
}

@media (max-width: 560px) {
  .legal-header {
    top: 8px;
    width: calc(100% - 16px);
    margin-top: 8px;
  }

  .legal-brand span {
    display: none;
  }

  .legal-shell {
    width: calc(100% - 24px);
    padding: 52px 0 72px;
  }

  .back-link {
    margin-bottom: 34px;
  }

  .legal-heading {
    padding-bottom: 30px;
  }

  h1 {
    font-size: 2.35rem;
  }

  .legal-content {
    padding-top: 30px;
  }

  .legal-content p {
    font-size: 0.98rem;
    line-height: 1.65;
  }

  .legal-content h2 {
    margin-top: 38px;
    font-size: 1.3rem;
  }
}

@media print {
  :root {
    color-scheme: light;
  }

  body {
    color: #111;
    background: white;
  }

  .legal-background,
  .legal-header,
  .back-link,
  .legal-footer {
    display: none;
  }

  .legal-shell {
    width: 100%;
    padding: 0;
  }

  .legal-content p,
  .legal-content .legal-lead,
  .legal-content .legal-meta,
  .legal-content .legal-operator,
  .legal-content h2 {
    color: #111;
  }
}
