/* ============================================================
   Legal Notice Page — Desktop 1440px
   Responsive styles will be added later.
   ============================================================ */

/* Language toggling for paragraphs with embedded links */
html[lang="en"] [data-lang-de] { display: none; }
html[lang="de"] [data-lang-en] { display: none; }


/* ── Hero dark section ─────────────────────────────────────── */

.legal-hero {
  position: relative;
  width: 100%;
  height: 439px;
  background-color: var(--color-off-white);
  overflow-x: clip;
  display: flow-root;
}

.legal-hero__bg--mobile {
  display: none;
}

.legal-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right bottom;
  transform: scaleX(1.011); /* Prevents a thin rendering gap on wide screens */
  pointer-events: none;
  filter: drop-shadow(0 3px 5px rgba(1, 1, 1, 0.5));
}

.legal-hero__inner {
  position: absolute;
  inset: 0;
  max-width: 1440px;
  margin: 0 auto;
}

.legal-hero__container {
  position: absolute;
  top: 140px;
  left: 24px;
  z-index: 2;
}

@media (min-width: 900px) {
  .legal-hero__container {
    top: 200px;
    left: 120px;
  }
}

.legal-hero__title {
  font-family: var(--font-base);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--color-text-light);
}

@media (min-width: 568px) {
  .legal-hero__title {
    font-size: 4rem;
    line-height: 1;
  }
}

/* ── Back button ────────────────────────────────────────────── */

.legal-back {
  display: none;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-base);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
  transition: color var(--transition-base);
}

.legal-back:hover {
  color: var(--color-cta-hover);
}

/* ── White content section ─────────────────────────────────── */

.legal-content {
  background-color: var(--color-off-white);
  padding-top: 80px;
}

.legal-content__outer {
  max-width: 1440px;
  margin: 0 auto;
}

.legal-content__container {
  max-width: 1024px;
  margin-left: 120px;
  padding: 0 0 5rem;
}

.legal-content__section {
  margin-bottom: 24px;
}

.legal-content__heading {
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--color-blue);
  margin-bottom: 0;
}

.legal-content__section:first-child .legal-content__heading {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content__list {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-content__list li,
.legal-content__p {
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--color-text);
}

.legal-content__p {
  margin-bottom: 1rem;
}

.legal-content__link {
  color: var(--color-blue);
  text-decoration: none;
}

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

.legal-content__notice,
.legal-content__date {
  font-family: var(--font-base);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--color-text);
  margin-top: 1rem;
}

/* ── Mobile responsive (max 568px) ────────────────────────── */

@media (max-width: 568px) {
  .legal-hero {
    height: 271px;
  }
  .legal-hero__bg--desktop {
    display: none;
  }
  .legal-hero__bg--mobile {
    display: block;
    object-fit: cover;
    object-position: center bottom;
    transform: scale(2.60) translateX(calc(-16% - 30px)) translateY(5px);
    transform-origin: left bottom;
    filter: none;
  }
  .legal-hero__container {
    top: 118px;
    left: 12px;
  }
  .legal-hero__title {
    white-space: nowrap;
  }
  .legal-content {
    padding-top: 18px;
  }
  .legal-back {
    display: inline-flex;
    margin-bottom: 2.5rem;
    padding-left: 20px;
  }

  .legal-content__container {
    margin-left: 20px;
    margin-right: 27px;
    margin-top: -1.5rem;
    max-width: none;
    padding: 0 0 2.2rem;
  }

  /* ── Mobile footer layout ──
     footer.css targets these same classes (unscoped) for the main page's
     grid layout; explicitly reset display/transform/grid-* here so those
     rules don't leak into this page's own flex-based layout. */
  .legal-content .site-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 27px 58px 25px;
    gap: 0;
    min-height: unset;
  }

  .legal-content .site-footer__logo-link {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
  }

  .legal-content .site-footer__copyright {
    grid-column: auto;
    grid-row: auto;
    margin-left: auto;
    transform: none;
  }

  .legal-content .footer__nav {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    margin-top: 2rem;
    justify-content: space-evenly;
  }

  .legal-content .footer__nav-link--legal {
    grid-column: auto;
    grid-row: auto;
    flex: 0 0 100%;
    text-align: right;
    margin-bottom: 3.35rem;
    margin-top: -1.4rem;
    transform: none;
  }

  .legal-content .footer__nav-link--legal::after {
    left: auto;
    right: 10px;
  }

  .legal-content .footer__nav-item {
    grid-row: auto;
    flex: 0 0 auto;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
  }

  .legal-content .footer__nav-btn {
    padding: 0.6rem 0.7rem;
    height: 2.125rem;
    font-weight: 500;
    border: none;
  }
}

/* ── Narrow phones only (max 335px) ────────────────────────── */

@media (max-width: 335px) {
  .legal-hero__title {
    font-size: 2.75rem;
  }
}

/* ── Fluid right margin (569px–1256px) ────────────────────── */
@media (min-width: 569px) and (max-width: 1256px) {
  .legal-content__container {
    margin-right: clamp(27px, calc(9.94vw - 4.8px), 120px);
    max-width: none;
  }
}

/* ── Intermediate layout (569px–900px) ──────────────────────
   footer.css switches .site-footer to its mobile grid at 900px for the
   main page; reset those leaked properties here so this page keeps its
   own desktop-style flex layout down to the 568px breakpoint above. */
@media (min-width: 569px) and (max-width: 900px) {
  .legal-content__container {
    margin-left: clamp(2rem, calc(31.43vw - 10.18rem), 7.5rem);
  }
  .legal-content .site-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: clamp(2rem, calc(31.43vw - 10.18rem), 7.5rem);
    padding-right: 27px;
  }
  .legal-content .site-footer__logo-link {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
  }
  .legal-content .site-footer__copyright {
    grid-column: auto;
    grid-row: auto;
    text-align: left;
    transform: none;
  }
  .legal-content .footer__nav {
    display: flex;
    width: 100%;
  }
  .legal-content .footer__nav-link--legal {
    grid-column: auto;
    grid-row: auto;
    text-align: left;
    margin-top: 0;
    transform: none;
  }
  .legal-content .footer__nav-link--legal::after {
    left: 0.5em;
    right: auto;
  }
  .legal-content .footer__nav-item {
    grid-row: auto;
    margin-left: 0;
    margin-right: 0;
  }
}

/* ── Footer overrides (white background) ───────────────────── */

.legal-content .site-footer {
  background-color: var(--color-off-white);
}

.legal-content .footer__nav-icon {
  filter: brightness(0) opacity(0.5);
}

.legal-content .site-footer__copyright,
.legal-content .footer__nav-link--legal,
.legal-content .footer__nav-btn {
  color: var(--color-text);
}

.legal-content .footer__nav-item:hover .footer__nav-btn {
  color: var(--color-text-light);
}
