/* Legal terms page — visual parity with kamuno.ch /info/legal T&Cs */

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Soft locale switch: hide until scroll restore, then fade in; fade out on leave */
html.locale-fade-pending,
html.locale-fade-out {
  opacity: 0;
}

html.locale-fade-ready {
  opacity: 0;
  transition: opacity 0.22s ease;
}

html.locale-fade-ready.locale-fade-in {
  opacity: 1;
}

html.locale-fade-out {
  transition: opacity 0.22s ease;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html.locale-fade-pending,
  html.locale-fade-out,
  html.locale-fade-ready,
  html.locale-fade-ready.locale-fade-in {
    opacity: 1;
    transition: none;
    pointer-events: auto;
  }
}


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

.page-legal-terms {
  margin: 0;
  color: #142c33;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.page-shell {
  position: relative;
  overflow: clip;
}

.terms-page {
  padding: 48px 0 96px;
}

.terms-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
  width: min(1290px, calc(100% - 80px));
  margin: 0 auto 48px;
}

.terms-hero__copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.terms-eyebrow {
  display: inline-flex;
  align-self: flex-start;
  margin: 0 0 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(100, 205, 114, 0.1);
  color: #2b7534;
  font-family: alaska, "Google Sans", Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.terms-heading {
  margin: 0;
  max-width: 18ch;
  color: #142c33;
  font-family: alaska, "Google Sans", Helvetica, sans-serif;
  font-size: clamp(28px, 3.6vw, 52px);
  font-weight: 500;
  line-height: 1.15;
}

.terms-hero__media {
  min-height: 220px;
  border-radius: 20px;
  background:
    center / cover no-repeat url("./assets/terms-hero.jpg");
}

.terms-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
  width: 80%;
  margin: 0 auto;
  padding: 0 20rem;
}

.terms-body h2 {
  margin: 0;
  padding: 16px 0 0;
  color: #142c33;
  font-family: alaska, "Google Sans", Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.terms-body p {
  margin: 8px 0 32px;
  color: #142c33;
  font-size: 16px;
  line-height: 1.65;
}

.terms-body h2 + p,
.terms-body h2 + ul,
.terms-body h2 + ol {
  margin-top: 6px;
}

.terms-body p:last-child {
  margin-bottom: 16px;
}

.terms-body a {
  color: #ed7e40;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.terms-body a:hover,
.terms-body a:focus-visible {
  color: #d46b30;
}

.terms-body .attribute-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0 32px;
  padding: 0 0 0 2.6rem;
  list-style: none;
}

.terms-body .attribute-list .data-hero-feature,
.terms-body .attribute-list li {
  display: block;
  position: relative;
  margin: 0;
  color: #142c33;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
}

.terms-body .attribute-list .data-hero-feature::before,
.terms-body .attribute-list li::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  position: absolute;
  left: -2.6rem;
  top: 0.2rem;
  width: 2rem;
  height: 2rem;
  background: center / contain no-repeat url("./assets/check-green.png");
}

.terms-body ol {
  margin: 16px 0 32px 1.5em;
  padding: 0;
  list-style: none;
  counter-reset: alpha-counter;
}

.terms-body ol li {
  position: relative;
  margin: 16px 0;
  color: #142c33;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  counter-increment: alpha-counter;
}

.terms-body ol li::before {
  content: counter(alpha-counter, lower-alpha) ") ";
  position: absolute;
  left: -1.5em;
}

.terms-updated {
  margin: 24px 0 0;
  color: #142c33;
  font-size: 16px;
  line-height: 1.65;
}

/* Match kamuno.ch general_terms breakpoints */
@media (max-width: 1120px) {
  .terms-content {
    padding: 0 5rem;
  }
}

@media (max-width: 900px) {
  .terms-page {
    padding: 32px 0 72px;
  }

  .terms-hero {
    grid-template-columns: 1fr;
    width: min(1290px, calc(100% - 40px));
    margin-bottom: 32px;
  }

  .terms-heading {
    max-width: none;
  }

  .terms-hero__media {
    min-height: 180px;
    order: -1;
  }

  .terms-content {
    width: calc(100% - 40px);
    padding: 0;
  }
}

@media (max-width: 560px) {
  .terms-hero__media {
    min-height: 140px;
  }

  /* Keep body copy at 16px on mobile — readable long-form / avoids <16px UX issues */
  .terms-body h2 {
    font-size: 18px;
  }

  .terms-body p,
  .terms-body .attribute-list li,
  .terms-body ol li,
  .terms-updated {
    font-size: 16px;
  }

  .terms-body p,
  .terms-body ol li,
  .terms-updated {
    line-height: 1.7;
  }
}
