/* Silent Ratchet: shared visual system for every page.

   Rules
   - Two typefaces with fixed jobs. Source Serif 4 is the voice: the wordmark, headlines, reading text.
     Schibsted Grotesk is the mechanism: actions, status, navigation, legal headings.
   - Black ground, warm white type. No accent colour; the call to action is the only solid light shape.
   - Wordmark: "Silent Ratchet", sentence case, serif semibold. Never letterspaced, never all caps.
   - Motion moves forward in clicks and never slides back. One place uses it: the call to action.
*/

@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --white: #edebe6;
  --gray: #9c9a94;
  --charcoal: #2b2b29;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 5vw, 5rem);
  --page-max: 85rem;
  --col-gap: clamp(1rem, 2vw, 2rem);
  --measure: 34rem;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--black);
  color: var(--white);
  font-family: var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, p { margin: 0; }

a { color: inherit; }

::selection { background: var(--white); color: var(--black); }

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

/* Page frame */

.masthead,
.page,
.colophon {
  width: 100%;
  max-width: calc(var(--page-max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.masthead { padding-block: clamp(1.25rem, 3.5vw, 2.5rem) 0; }

.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--white);
  text-decoration: none;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.75rem 1.25rem;
  padding-block: 2.5rem clamp(1.5rem, 3.5vw, 2.5rem);
  font-family: var(--sans);
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--gray);
}

.colophon a {
  display: inline-block;
  padding-block: 0.3rem;
  color: var(--gray);
  text-decoration: none;
}

.colophon a:hover,
.colophon a[aria-current="page"] { color: var(--white); }

.colophon .rights { flex-basis: 100%; }

@media (min-width: 40em) {
  .colophon { column-gap: 1.75rem; }
  .colophon .rights { flex-basis: auto; margin-left: auto; }
}

/* Home */

.hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  align-content: center;
  padding-block: clamp(3.5rem, 13vh, 9rem) clamp(1.5rem, 5vh, 3.5rem);
}

.question {
  grid-column: 1 / -1;
  max-width: 13em;
  font-size: clamp(2.6rem, min(1.2rem + 6.4vw, 14svh), 7.25rem);
  font-weight: 340;
  line-height: 0.98;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.question .unit { white-space: nowrap; }

.answer {
  grid-column: 1 / -1;
  max-width: var(--measure);
  margin-top: clamp(2rem, 6vh, 3.75rem);
}

.answer p {
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.5;
  color: var(--gray);
  text-wrap: pretty;
}

.answer p + p { margin-top: 1em; }

.answer .lead { color: var(--white); }

.offer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: clamp(2rem, 5vh, 2.75rem);
}

.offer .status {
  flex: 1 1 14rem;
  max-width: 20rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--gray);
}

/* The call to action. Hover or focus advances its underline in four clicks, and it holds:
   the return transition waits a day, so the progress is not given back. */

.cta {
  display: inline-flex;
  align-items: center;
  min-height: 3.5rem;
  padding: 0 1.75rem;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.005em;
  text-decoration: none;
}

.cta span {
  position: relative;
  padding-block: 0.375rem;
}

.cta span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0s 86400s;
}

.cta:hover span::after,
.cta:focus-visible span::after {
  transform: scaleX(1);
  transition: transform 0.32s steps(4, jump-start) 0s;
}

@media (min-width: 40em) {
  .answer { grid-column: 3 / -1; }
}

@media (min-width: 64em) {
  .answer { grid-column: 7 / -1; }
}

/* Documents: privacy, terms, not found */

.document {
  padding-block: clamp(3rem, 10vh, 7rem) clamp(2rem, 6vh, 4rem);
}

.document h1 {
  max-width: 14em;
  font-size: clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
  font-weight: 340;
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.document .meta {
  margin-top: 1.25rem;
  font-family: var(--sans);
  font-size: 0.875rem;
  color: var(--gray);
}

.document .intro,
.document section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
}

.document .intro { margin-top: clamp(2.5rem, 7vh, 4.5rem); }

.document section { margin-top: 2.75rem; }

.document h2 {
  grid-column: 1 / -1;
  margin-bottom: 0.75rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.005em;
  color: var(--white);
}

.document .body {
  grid-column: 1 / -1;
  max-width: 36rem;
}

.document .body p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #d3d0c9;
  text-wrap: pretty;
}

.document .body p + p { margin-top: 0.9em; }

.document .body a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--gray);
}

.document .body a:hover { text-decoration-color: var(--white); }

@media (min-width: 52em) {
  .document h2 {
    grid-column: 1 / span 3;
    margin-bottom: 0;
    padding-top: 0.2rem;
    padding-right: 1rem;
  }
  .document .body { grid-column: 4 / -1; }
}

.document .return {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 1rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

@media (prefers-reduced-motion: reduce) {
  .cta:hover span::after,
  .cta:focus-visible span::after { transition-duration: 0s; }
}

@media print {
  body { background: #fff; color: #000; }
  .document .body p, .colophon, .colophon a, .document .meta { color: #000; }
}
