/* ==========================================================================
   NewKey · Text pages
   Privacy policy, terms, cookies and other content pages
   ========================================================================== */

:root {
  --text-page-bg: #f4f7f9;
  --text-page-surface: #ffffff;
  --text-page-ink: #17313e;
  --text-page-muted: #5f737d;
  --text-page-line: #dce5ea;
  --text-page-blue: #1675e8;
  --text-page-brand: #2f2963;
  --text-page-container: 1200px;
}

/* On regular pages the scene JS is not responsible for revealing the logo. */
.fixed-brand {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================================================================
   Page
   ========================================================================== */

.text-page {
  position: relative;
  min-height: 70vh;
  padding:
    clamp(132px, 12vw, 170px)
    clamp(20px, 4vw, 54px)
    clamp(80px, 9vw, 120px);
  background:
    radial-gradient(circle at 90% 0, rgba(40, 142, 255, .08), transparent 30%),
    linear-gradient(180deg, #eef5f8 0, var(--text-page-bg) 260px);
  color: var(--text-page-ink);
}

.text-page .container {
  width: 100%;
  max-width: var(--text-page-container);
  margin-inline: auto;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.text-page h1,
.text-page h2,
.text-page h3,
.text-page h4,
.text-page h5,
.text-page h6 {
  color: var(--text-page-ink);
  font-weight: 400;
  text-wrap: balance;
  scroll-margin-top: 110px;
}

.text-page .container > h1:first-child,
.text-page .container > h2:first-child {
  max-width: 960px;
  margin: 0 0 clamp(48px, 6vw, 76px);
  padding-bottom: clamp(28px, 4vw, 42px);
  border-bottom: 1px solid var(--text-page-line);
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -.05em;
  font-weight: 300;
}

.text-page h2 {
  max-width: 920px;
  margin: 58px 0 20px;
  font-size: clamp(30px, 3vw, 40px);
  line-height: 1.15;
  letter-spacing: -.035em;
}

.text-page h3 {
  max-width: 920px;
  margin: 48px 0 16px;
  font-size: clamp(23px, 2.1vw, 29px);
  line-height: 1.25;
  letter-spacing: -.025em;
}

.text-page h4 {
  max-width: 920px;
  margin: 38px 0 14px;
  font-size: 21px;
  line-height: 1.3;
}

.text-page h5 {
  max-width: 920px;
  margin: 32px 0 12px;
  font-size: 18px;
  line-height: 1.35;
}

.text-page h6 {
  max-width: 920px;
  margin: 28px 0 10px;
  color: var(--text-page-blue);
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.text-page p,
.text-page ul,
.text-page ol,
.text-page blockquote {
  max-width: 920px;
}

.text-page p {
  margin: 0 0 18px;
  color: var(--text-page-muted);
  font-size: 17px;
  line-height: 1.85;
}

.text-page p + p {
  margin-top: 8px;
}

.text-page strong,
.text-page b {
  color: var(--text-page-ink);
  font-weight: 500;
}

.text-page small {
  color: #788b94;
  font-size: 12px;
  line-height: 1.6;
}

/* ==========================================================================
   Links
   ========================================================================== */

.text-page a {
  color: var(--text-page-blue);
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(22, 117, 232, .32);
  text-underline-offset: .16em;
  transition:
    color .2s ease,
    text-decoration-color .2s ease;
}

.text-page a:hover {
  color: var(--text-page-brand);
  text-decoration-color: currentColor;
}

.text-page a:focus-visible {
  outline: 3px solid rgba(40, 142, 255, .2);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Lists
   ========================================================================== */

.text-page ul,
.text-page ol {
  margin: 18px 0 26px;
  padding-inline-start: 1.45em;
  color: var(--text-page-muted);
  font-size: 17px;
  line-height: 1.75;
}

.text-page li {
  padding-inline-start: .35em;
}

.text-page li + li {
  margin-top: 9px;
}

.text-page li::marker {
  color: var(--text-page-blue);
}

/* Nested lists */
.text-page li > ul,
.text-page li > ol {
  margin-top: 9px;
  margin-bottom: 9px;
}

/* ==========================================================================
   Quotes / notes
   ========================================================================== */

.text-page blockquote {
  margin: 34px 0;
  padding: 22px 26px;
  border-inline-start: 3px solid var(--text-page-blue);
  background: rgba(255, 255, 255, .72);
  color: #506872;
  font-size: 16px;
  line-height: 1.75;
}

.text-page blockquote > :first-child {
  margin-top: 0;
}

.text-page blockquote > :last-child {
  margin-bottom: 0;
}

.text-page hr {
  max-width: 920px;
  margin: 48px 0;
  border: 0;
  border-top: 1px solid var(--text-page-line);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.text-page table {
  width: 100%;
  margin: 32px 0 42px;
  border-collapse: collapse;
  border: 1px solid var(--text-page-line);
  background: var(--text-page-surface);
  font-size: 14px;
  line-height: 1.55;
}

.text-page th,
.text-page td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--text-page-line);
  text-align: start;
  vertical-align: top;
}

.text-page th {
  background: #edf4f8;
  color: var(--text-page-ink);
  font-weight: 500;
}

.text-page td {
  color: var(--text-page-muted);
}

.text-page tr:last-child td {
  border-bottom: 0;
}

/* ==========================================================================
   Media / code
   ========================================================================== */

.text-page img,
.text-page video,
.text-page iframe {
  max-width: 100%;
}

.text-page img {
  height: auto;
}

.text-page figure {
  max-width: 100%;
  margin: 34px 0;
}

.text-page figcaption {
  margin-top: 10px;
  color: #788b94;
  font-size: 12px;
  line-height: 1.5;
}

.text-page code {
  padding: .14em .38em;
  border-radius: 4px;
  background: #e8eff3;
  color: #233d49;
  font-family: Consolas, Monaco, monospace;
  font-size: .9em;
}

.text-page pre {
  max-width: 100%;
  margin: 28px 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--text-page-line);
  border-radius: 6px;
  background: #172730;
  color: #e6f1f6;
  line-height: 1.65;
}

.text-page pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

/* ==========================================================================
   Forms inside text content, if needed
   ========================================================================== */

.text-page input,
.text-page textarea,
.text-page select {
  max-width: 100%;
  border: 1px solid #d5e0e6;
  border-radius: 5px;
  background: #fff;
  color: var(--text-page-ink);
  font: inherit;
}

.text-page input,
.text-page select {
  min-height: 46px;
  padding-inline: 13px;
}

.text-page textarea {
  min-height: 130px;
  padding: 12px 13px;
  resize: vertical;
}

.text-page input:focus,
.text-page textarea:focus,
.text-page select:focus {
  outline: none;
  border-color: #258ce0;
  box-shadow: 0 0 0 3px rgba(37, 140, 224, .11);
}

/* ==========================================================================
   RTL / LTR
   Logical properties above cover almost everything.
   ========================================================================== */

html[dir="rtl"] .text-page {
  text-align: right;
}

html[dir="ltr"] .text-page {
  text-align: left;
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 1000px) {
  /*
   * scene.css hides the whole site below 1000px.
   * textpage.css is loaded after it, so regular pages restore their content.
   */
  body::before {
    content: none !important;
    display: none !important;
  }

  body > .site-header,
  body > .locale-modal,
  body > .text-page,
  body > .site-footer {
    visibility: visible !important;
  }

  .text-page {
    padding:
      118px
      clamp(20px, 5vw, 40px)
      80px;
  }

  .text-page .container > h1:first-child,
  .text-page .container > h2:first-child {
    margin-bottom: 46px;
    padding-bottom: 28px;
    font-size: clamp(38px, 7vw, 54px);
  }

  .text-page h2 {
    margin-top: 48px;
  }

  .text-page h3 {
    margin-top: 40px;
  }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 767px) {
  .text-page {
    padding:
      102px
      20px
      64px;
  }

  .text-page .container > h1:first-child,
  .text-page .container > h2:first-child {
    margin-bottom: 38px;
    padding-bottom: 24px;
    font-size: clamp(34px, 10vw, 44px);
    line-height: 1.05;
    letter-spacing: -.04em;
  }

  .text-page h2 {
    margin: 42px 0 15px;
    font-size: 29px;
  }

  .text-page h3 {
    margin: 34px 0 13px;
    font-size: 23px;
  }

  .text-page h4 {
    margin-top: 30px;
    font-size: 19px;
  }

  .text-page p,
  .text-page ul,
  .text-page ol {
    font-size: 16px;
  }

  .text-page p {
    line-height: 1.75;
  }

  .text-page ul,
  .text-page ol {
    line-height: 1.7;
  }

  .text-page blockquote {
    margin: 26px 0;
    padding: 18px 20px;
    font-size: 15px;
  }

  .text-page table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .text-page th,
  .text-page td {
    padding: 12px 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-page a {
    transition: none;
  }
}
