/* ---- Legal documents & modal ---- */

.legal-page {
  min-height: 100vh;
  background: #0a0a0a;
  color: rgba(255, 255, 255, 0.88);
}

.legal-page__header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.legal-page__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}

.legal-page__brand img {
  height: 36px;
  width: auto;
}

.legal-page__back {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-page__back:hover {
  color: #fff;
}

.legal-page__langs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.legal-page__langs a {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

.legal-page__langs a.is-active,
.legal-page__langs a:hover {
  color: #e03030;
}

.legal-doc {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.legal-doc h1 {
  font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 8px;
}

.legal-doc__meta {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-doc h2 {
  font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin: 32px 0 12px;
}

.legal-doc h3 {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
  margin: 20px 0 8px;
}

.legal-doc p,
.legal-doc li {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 12px;
}

.legal-doc ul,
.legal-doc ol {
  padding-left: 1.25rem;
  margin-bottom: 16px;
}

.legal-doc a {
  color: #e03030;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-doc strong {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
}

.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.875rem;
}

.legal-doc th,
.legal-doc td {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.legal-doc th {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-weight: 600;
}

.legal-doc__notice {
  padding: 16px 18px;
  border-left: 3px solid #e03030;
  background: rgba(224, 48, 48, 0.08);
  margin: 24px 0;
  font-size: 0.875rem;
  line-height: 1.65;
}

body.legal-embed .legal-page__header {
  display: none;
}

body.legal-embed .legal-doc {
  padding-top: 24px;
}

body.legal-modal-open {
  overflow: hidden;
}

/* Nav legal links */
.nav__legal {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.nav__legal-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.62);
  background: none;
  border: none;
  padding: 4px 0;
  cursor: crosshair;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav__legal-btn:hover {
  color: #fff;
}

.nav__legal-sep {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.75rem;
  user-select: none;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: center;
  margin-top: 12px;
}

.footer__legal button {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  background: none;
  border: none;
  padding: 0;
  cursor: crosshair;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer__legal button:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* Legal modal */
.legal-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.legal-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.legal-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(4px);
}

.legal-modal__panel {
  position: relative;
  width: min(920px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.legal-modal.is-open .legal-modal__panel {
  transform: translateY(0) scale(1);
}

.legal-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.legal-modal__title {
  font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

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

.legal-modal__open {
  font-size: 0.8125rem;
  color: #e03030;
  text-decoration: none;
  white-space: nowrap;
}

.legal-modal__open:hover {
  text-decoration: underline;
}

.legal-modal__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: crosshair;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.legal-modal__close:hover {
  background: rgba(224, 48, 48, 0.15);
  border-color: rgba(224, 48, 48, 0.4);
}

.legal-modal__frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: none;
  background: #0a0a0a;
}

.form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 16px;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.62);
}

.form-consent input {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: #e03030;
}

.form-consent button {
  background: none;
  border: none;
  padding: 0;
  color: #e03030;
  text-decoration: underline;
  cursor: crosshair;
  font: inherit;
}

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10040;
  max-width: 520px;
  margin: 0 auto;
  padding: 16px 18px;
  background: rgba(12, 12, 12, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  display: none;
}

.cookie-banner.is-visible {
  display: block;
}

.cookie-banner p {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 12px;
}

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-banner__btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  cursor: crosshair;
}

.cookie-banner__btn--primary {
  background: #e03030;
  border-color: #e03030;
}

@media (max-width: 1100px) {
  .nav__legal:not(.nav__legal--menu) {
    display: none;
  }
}

.nav__legal--menu {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
  .nav__links.open .nav__legal--menu {
    display: flex;
  }
}

@media (max-width: 768px) {
  .legal-modal {
    padding: 0;
  }

  .legal-modal__panel {
    width: 100%;
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .legal-doc {
    padding-inline: 16px;
  }

  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}
