/* Legal pages use the same brand system as the product pages while keeping
   long-form terms calm, legible and practical to navigate. */
.legal-hero {
  min-height: 390px;
  display: flex;
  align-items: center;
  padding: 88px 0 82px;
  color: var(--paper);
  background-color: #080509;
  background-image: linear-gradient(90deg, #080509f2 0%, #080509d9 52%, #08050973 100%), url("assets/hero-pattern-black-green.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border-bottom: 1px solid #302936;
}

.legal-hero .eyebrow {
  color: var(--mint);
}

.legal-hero h1 {
  max-width: 920px;
  margin: 14px 0 18px;
  color: #fff;
  font-size: clamp(52px, 8vw, 92px);
  line-height: .95;
  letter-spacing: -.065em;
}

.legal-lead {
  max-width: 700px;
  margin: 0;
  color: #d8d1dc;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.legal-meta span {
  padding: 8px 11px;
  color: #d8d1dc;
  background: #17121bcc;
  border: 1px solid #625a68;
  border-radius: var(--control-radius);
  font-size: 13px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 790px);
  gap: clamp(42px, 7vw, 92px);
  align-items: start;
  justify-content: center;
  padding-top: 72px;
  padding-bottom: 120px;
}

.legal-aside {
  position: sticky;
  top: 94px;
  padding: 18px;
  background: #fff;
  border: 1px solid #c9d8d2;
  border-radius: var(--control-radius);
  box-shadow: 0 16px 45px #1020180a;
}

.legal-aside::before {
  content: "Sisukord";
  display: block;
  margin: 0 5px 12px;
  color: #625a68;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

html[lang="en"] .legal-aside::before {
  content: "Contents";
}

.legal-aside a {
  display: block;
  padding: 7px 8px;
  color: #574f5c;
  border-left: 2px solid transparent;
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}

.legal-aside a:hover,
.legal-aside a:focus-visible {
  color: #080509;
  background: var(--glow-soft);
  border-left-color: var(--mint);
}

.legal-summary {
  margin-bottom: 42px;
  padding: 24px 26px;
  background: linear-gradient(135deg, var(--glow-soft), #f7f8f6);
  border: 1px solid var(--glow-line);
  border-radius: var(--control-radius);
}

.legal-summary strong {
  display: block;
  margin-bottom: 8px;
  color: #080509;
  font-size: 18px;
}

.legal-summary p {
  margin: 0;
}

.legal-content h2 {
  scroll-margin-top: 110px;
  margin: 52px 0 14px;
  padding-top: 22px;
  color: #100b14;
  border-top: 1px solid #d8e1dd;
  font-size: clamp(25px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: -.035em;
}

.legal-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-content p,
.legal-content li {
  color: #4e4752;
  font-size: 16px;
  line-height: 1.78;
}

.legal-content p {
  margin: 0 0 17px;
}

.legal-content ul {
  margin: 18px 0 24px;
  padding-left: 24px;
}

.legal-content li + li {
  margin-top: 9px;
}

.legal-content a {
  color: #087e6c;
  font-weight: 650;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: #045f52;
}

@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 42px;
  }

  .legal-aside {
    position: static;
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 5px;
    overflow-x: auto;
    padding: 12px;
    scrollbar-width: thin;
  }

  .legal-aside::before {
    display: none;
  }

  .legal-aside a {
    flex: 0 0 auto;
    padding: 9px 11px;
    border: 1px solid #d8e1dd;
    border-radius: var(--control-radius);
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .legal-hero {
    min-height: 360px;
    padding: 65px 0 58px;
    background-position: 58% center;
  }

  .legal-hero h1 {
    font-size: clamp(42px, 12vw, 52px);
  }

  .legal-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .legal-meta span {
    width: fit-content;
  }

  .legal-layout {
    padding-bottom: 80px;
  }

  .legal-summary {
    padding: 20px;
  }

  .legal-content h2 {
    margin-top: 42px;
    font-size: 26px;
  }
}

@media print {
  .announcement,
  .site-header,
  .legal-aside,
  .site-footer {
    display: none !important;
  }

  .legal-hero {
    min-height: 0;
    padding: 0 0 28px;
    color: #000;
    background: none;
    border-bottom: 1px solid #999;
  }

  .legal-hero h1,
  .legal-hero .eyebrow,
  .legal-lead,
  .legal-meta span {
    color: #000;
  }

  .legal-meta span {
    padding: 0;
    border: 0;
  }

  .legal-layout {
    display: block;
    padding: 30px 0 0;
  }

  .legal-content h2 {
    break-after: avoid;
  }

  .legal-content p,
  .legal-content li {
    color: #000;
  }
}
