@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap");

:root {
  color: #edf0f2;
  background: #121519;
  font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: #edf0f2;
  background: #121519;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

.legal-bg {
  position: fixed;
  z-index: 0;
  inset: 0;
  background: url("../assets/room-bg-about.webp") center/cover no-repeat;
  pointer-events: none;
}

.legal-bg::after {
  position: absolute;
  inset: 0;
  background: rgba(18, 21, 25, 0.72);
  content: "";
}

.legal-page {
  position: relative;
  z-index: 1;
  width: min(100% - 48px, 720px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 0 clamp(56px, 8vw, 96px);
  font-size: clamp(0.88rem, 0.82rem + 0.2vw, 1rem);
  line-height: 1.6;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(52px, 8vw, 88px);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-home,
.legal-lang-switch button {
  transition: opacity 180ms ease;
}

.legal-home:hover,
.legal-lang-switch button:hover {
  opacity: 0.68;
}

.legal-lang-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.legal-lang-switch button {
  padding: 5px 2px;
  color: rgba(237, 240, 242, 0.52);
  background: transparent;
  cursor: pointer;
  letter-spacing: inherit;
}

.legal-lang-switch button[aria-pressed="true"] {
  color: #edf0f2;
}

.legal-home:focus-visible,
.legal-lang-switch button:focus-visible {
  border-radius: 2px;
  outline: 2px solid #edf0f2;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

h1,
h2 {
  margin-top: 0;
  font-weight: 500;
  line-height: 1.25;
}

h1 {
  max-width: 680px;
  margin-bottom: clamp(28px, 5vw, 44px);
  font-size: clamp(1.75rem, 1.25rem + 2vw, 2.8rem);
  letter-spacing: -0.035em;
}

h2 {
  margin-bottom: 14px;
  padding-top: clamp(26px, 4vw, 38px);
  font-size: clamp(1rem, 0.9rem + 0.45vw, 1.25rem);
  letter-spacing: -0.015em;
}

p {
  margin: 0 0 12px;
}

.legal-notice {
  margin-bottom: 24px;
  padding-left: 14px;
  border-left: 1px solid rgba(237, 240, 242, 0.58);
  color: rgba(237, 240, 242, 0.72);
  font-size: 0.78em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 560px) {
  .legal-page {
    width: min(100% - 32px, 720px);
    padding-top: 22px;
  }

  .legal-header {
    gap: 16px;
    margin-bottom: 44px;
    font-size: 0.66rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-home,
  .legal-lang-switch button {
    transition: none;
  }
}
