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

@font-face {
  font-family: "TT Hoves";
  src: url("assets/fonts/TTHoves-DemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #08080a;
  --surface: rgb(19 16 22 / 76%);
  --primary: #a57cf5;
  --text: #fff;
  --muted: #b9b1c7;
  --quiet: #8d849d;
  --border: rgb(165 124 245 / 24%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(ellipse 54% 34% at 50% 0%, rgb(165 124 245 / 13%), transparent 74%),
    var(--bg);
  color: var(--text);
  font-family: "TT Hoves", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  font: inherit;
}

img {
  display: block;
}

.legal-header {
  position: fixed;
  z-index: 20;
  top: 18px;
  left: 50%;
  display: flex;
  width: min(1040px, calc(100% - 40px));
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 22px;
  overflow: hidden;
  border: 1px solid rgb(181 141 247 / 30%);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 5%), transparent 28%),
    rgb(13 11 17 / 68%);
  box-shadow: inset 0 1px rgb(255 255 255 / 9%), 0 16px 44px rgb(0 0 0 / 18%);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  transform: translateX(-50%);
}

.legal-brand {
  display: flex;
  height: 30px;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.legal-brand__icon {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 6px;
}

.legal-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.legal-language {
  display: flex;
  height: 38px;
  padding: 3px;
  border: 1px solid rgb(181 141 247 / 32%);
  border-radius: 20px;
  background: rgb(8 8 10 / 42%);
}

.legal-language button {
  width: 38px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font-size: 12px;
}

.legal-language button.is-active {
  background: rgb(165 124 245 / 18%);
  color: var(--text);
}

.legal-back {
  display: inline-flex;
  height: 42px;
  align-items: center;
  padding: 0 18px;
  border-radius: 21px;
  background: var(--primary);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
}

.legal-main {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 154px 0 96px;
}

.legal-document {
  padding: clamp(32px, 6vw, 68px);
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgb(255 255 255 / 4%), transparent 26%),
    var(--surface);
  box-shadow: inset 0 1px rgb(255 255 255 / 6%), 0 28px 70px rgb(0 0 0 / 24%);
}

.legal-document[hidden] {
  display: none;
}

.legal-kicker {
  margin: 0 0 14px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}

.legal-document h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(38px, 6vw, 62px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.legal-date {
  margin: 22px 0 0;
  color: var(--quiet);
  font-size: 14px;
}

.legal-notice {
  margin: 34px 0 0;
  padding: 20px 22px;
  border: 1px solid rgb(165 124 245 / 20%);
  border-radius: 20px;
  background: rgb(165 124 245 / 7%);
  color: var(--muted);
  line-height: 1.55;
}

.legal-section {
  margin-top: 44px;
}

.legal-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.legal-section p {
  margin: 0 0 12px;
}

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

.legal-section a,
.legal-footer a {
  color: var(--primary);
}

.legal-footer {
  display: flex;
  width: min(900px, calc(100% - 40px));
  min-height: 110px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  color: var(--quiet);
  font-size: 13px;
}

.legal-footer nav {
  display: flex;
  gap: 22px;
}

@media (max-width: 700px) {
  .legal-header {
    top: 12px;
    width: calc(100% - 24px);
    height: 60px;
    padding: 0 10px 0 14px;
    border-radius: 22px;
  }

  .legal-brand {
    font-size: 23px;
  }

  .legal-brand__icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .legal-language {
    height: 32px;
    padding: 2px;
  }

  .legal-language button {
    width: 28px;
    height: 26px;
    font-size: 10px;
  }

  .legal-back {
    width: 42px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .legal-back::before {
    font-size: 18px;
    content: "←";
  }

  .legal-main {
    width: calc(100% - 24px);
    padding: 104px 0 56px;
  }

  .legal-document {
    padding: 30px 22px;
    border-radius: 24px;
  }

  .legal-document h1 {
    font-size: 36px;
  }

  .legal-section {
    margin-top: 34px;
  }

  .legal-section h2 {
    font-size: 20px;
  }

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

  .legal-footer {
    width: calc(100% - 40px);
    min-height: 160px;
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  .legal-footer nav {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
