:root {
  --legal-white: rgba(255, 255, 255, 0.94);
  --legal-muted: rgba(220, 235, 255, 0.76);
  --legal-blue: #1f8cff;
  --legal-deep: #041124;
}

.abucco-footer {
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  align-items: center;
}

.abucco-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  align-items: center;
  justify-content: center;
}

.abucco-footer-links a {
  color: rgba(218, 232, 248, 0.72);
  text-decoration: none;
}

.legal-body,
.legal-body * {
  box-sizing: border-box;
}

html,
.legal-body {
  min-height: 100%;
  margin: 0;
}

.legal-body {
  color: var(--legal-white);
  background: var(--legal-deep);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

.legal-page {
  position: relative;
  min-height: 100vh;
  padding: clamp(1.25rem, 4vw, 3rem);
  isolation: isolate;
}

.legal-page::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background: url("../../assets/backgrounds/business-page-background.png") center center / cover no-repeat;
  content: "";
  pointer-events: none;
}

.legal-header {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 64rem);
  margin: 0 auto 1.25rem;
}

.legal-brand {
  display: inline-flex;
  width: clamp(7.5rem, 14vw, 11rem);
}

.legal-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.legal-language-switch-wrap {
  display: flex;
  justify-content: center;
  width: min(100%, 64rem);
  margin: 0 auto 1.25rem;
}

.legal-language-switch {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  min-height: 2.35rem;
  padding: 0 0.55rem;
  color: rgba(220, 235, 255, 0.46);
  background: rgba(5, 26, 55, 0.72);
  border: 1px solid rgba(75, 165, 255, 0.42);
  border-radius: 4px;
}

.legal-language-switch button {
  min-width: 2rem;
  padding: 0.45rem 0.35rem;
  color: rgba(220, 235, 255, 0.58);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.legal-language-switch button.active {
  color: rgba(250, 253, 255, 0.98);
  text-shadow: 0 0 12px rgba(31, 140, 255, 0.72);
}

.legal-language-switch button:focus-visible {
  outline: 2px solid rgba(75, 165, 255, 0.92);
  outline-offset: 2px;
}

[data-language-content] {
  display: none;
}

html[data-language="fi"] [data-language-content="fi"],
html[data-language="en"] [data-language-content="en"] {
  display: block;
}

.legal-back,
.legal-bottom-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.35rem 1rem;
  color: rgba(235, 247, 255, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
  text-decoration: none;
  background: rgba(5, 26, 55, 0.72);
  border: 1px solid rgba(75, 165, 255, 0.58);
  border-radius: 4px;
}

.legal-document {
  width: min(100%, 64rem);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem);
  background: rgba(2, 15, 34, 0.86);
  border: 1px solid rgba(80, 152, 230, 0.28);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.legal-document h1 {
  margin: 0 0 0.85rem;
  color: rgba(250, 253, 255, 0.97);
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.08;
}

.legal-document h2 {
  margin: 2.25rem 0 0.75rem;
  color: rgba(245, 251, 255, 0.96);
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.25;
}

.legal-document p {
  margin: 0 0 1rem;
  color: var(--legal-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.legal-document .updated {
  margin-bottom: 2rem;
  color: rgba(235, 247, 255, 0.88);
}

.legal-document ul {
  margin: 0 0 1.15rem;
  padding-left: 1.4rem;
  color: var(--legal-muted);
  line-height: 1.7;
}

.legal-document li + li {
  margin-top: 0.25rem;
}

.legal-document a:not(.legal-bottom-back) {
  color: rgba(130, 193, 255, 0.96);
}

.legal-bottom-back {
  margin-top: 1.25rem;
}

@media (max-width: 760px) {
  .abucco-footer {
    flex-direction: column;
  }

  .abucco-footer-links {
    flex-direction: column;
  }

  .legal-page {
    min-height: 100svh;
    padding: 1rem;
  }

  .legal-page::before {
    background-position: 54% center;
  }

  .legal-header {
    gap: 0.75rem;
  }

  .legal-brand {
    width: min(34vw, 8.5rem);
  }

  .legal-language-switch {
    min-height: 2rem;
    padding: 0 0.35rem;
  }

  .legal-language-switch button {
    min-width: 1.75rem;
    padding: 0.35rem 0.25rem;
    font-size: 0.64rem;
  }

  .legal-back {
    min-height: 2.35rem;
    padding: 0.3rem 0.75rem;
    font-size: 0.64rem;
  }

  .legal-document {
    padding: 1.75rem 1.25rem;
  }

  .legal-document h1 {
    font-size: clamp(1.8rem, 8vw, 2.6rem);
  }

  .legal-document h2 {
    margin-top: 1.9rem;
  }

  .legal-document p,
  .legal-document ul {
    font-size: 0.96rem;
    line-height: 1.65;
  }
}

@media (max-width: 420px) {
  .legal-page {
    padding: 0.8rem;
  }

  .legal-brand {
    width: 7rem;
  }

  .legal-back {
    padding: 0.25rem 0.6rem;
    font-size: 0.58rem;
  }

  .legal-language-switch {
    min-height: 1.9rem;
  }

  .legal-language-switch button {
    min-width: 1.6rem;
    font-size: 0.58rem;
  }

  .legal-document {
    padding: 1.5rem 1rem;
  }
}
