/*
 * Styles for the static legal pages (see build-legal-pages.mjs).
 * Colors, font sizes and breakpoints are taken from apps/tippland/src/styles
 * (variables/_variable_color.scss, base/_headlines.scss, mixins/_breakpoints.scss).
 */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/Inter-Regular.ed64c5d83f5fcc35.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  src: url('fonts/Inter-Bold.04079eb5aa58d207.woff2') format('woff2');
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: #fff;
  color: #2f415e;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 26px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* same page width limit as in the shop ($maxPageWidth) */
.page {
  max-width: 1170px;
  margin: 0 auto;
}

/* full width of .page: edge to edge on mobile/tablet, limited to the page width on desktop */
hr {
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid #e0e6ed;
}

a {
  color: #2f415e;
  text-decoration: underline;
}

a:hover,
a:active {
  text-decoration: none;
}

/* ---------- header ---------- */

.header {
  padding: 20px 16px;
  text-align: center;
}

.header__logo {
  display: block;
  width: 120px;
  height: auto;
  margin: 0 auto;
}

/* ---------- content ---------- */

.content {
  padding: 24px 16px 40px;
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  font-style: normal;
  font-weight: 700;
}

h1 {
  margin: 0 0 24px;
  font-size: 22px;
  line-height: 28px;
  text-align: center;
}

h2 {
  margin: 32px 0 8px;
  font-size: 20px;
  line-height: 26px;
}

h3 {
  margin: 24px 0 8px;
  font-size: 18px;
  line-height: 24px;
}

h4 {
  margin: 16px 0 8px;
  font-size: 16px;
  line-height: 22px;
  font-style: italic;
}

article > :first-child {
  margin-top: 0;
}

article > :last-child {
  margin-bottom: 0;
}

p {
  margin: 0 0 16px;
  /* the shop renders these texts with white-space: pre-line (.pre-line p) */
  white-space: pre-line;
}

ul,
ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 4px;
}

address {
  font-style: normal;
}

/* ---------- footer ---------- */

.footer {
  padding: 20px 16px 32px;
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 10px;
  font-size: 15px;
  line-height: 25px;
}

.footer__nav a[aria-current='page'] {
  font-weight: 700;
  text-decoration: none;
}

/* ---------- breakpoint-tablet ---------- */
@media only screen and (min-width: 768px) {
  .header {
    padding: 28px 24px;
  }

  .header__logo {
    width: 140px;
  }

  .content {
    padding: 32px 24px 56px;
  }

  h1 {
    margin-bottom: 32px;
    font-size: 26px;
    line-height: 32px;
  }

  h2 {
    font-size: 22px;
    line-height: 30px;
  }

  h3 {
    font-size: 20px;
    line-height: 26px;
  }

  h4 {
    font-size: 18px;
    line-height: 22px;
  }

  ul,
  ol {
    padding-left: 40px;
  }

  .footer {
    padding: 24px 24px 40px;
  }

  .footer__nav {
    gap: 4px 12px;
    font-size: 16px;
    line-height: 26px;
  }
}

/* ---------- breakpoint-desktop ---------- */
@media only screen and (min-width: 992px) {
  .header {
    padding: 32px 24px;
  }

  .content {
    padding: 40px 24px 64px;
  }

  h1 {
    font-size: 28px;
    line-height: 34px;
  }

  h2 {
    font-size: 20px;
    line-height: 29px;
  }

  h3 {
    font-size: 18px;
    line-height: 26px;
  }

  h4 {
    font-size: 16px;
    line-height: 24px;
  }
}

/* ---------- breakpoint-desktop-wide: page is narrower than the viewport, text lines up with the hr ---------- */
@media only screen and (min-width: 1200px) {
  .header,
  .content,
  .footer {
    padding-left: 0;
    padding-right: 0;
  }
}
