/* Wantless site, « Hands off » direction.
   Mobile first: built for a 390 px phone, checked at 320 px, then widened.

   Contrast (WCAG 2.2): ink on bubble 12.4:1, ink on white 16.3:1, ink on sky 11.8:1,
   plum on white 7.1:1, plum on bubble 5.4:1, ink on tomato 5.1:1, bubble on ink 12.4:1.
   Tomato is never text on bubble (2.4:1) and never small text on white (3.2:1):
   it only fills shapes, and underlines links on white. */

@font-face {
  font-family: "Bagel Fat One";
  src: url("fonts/bagel-fat-one-latin.woff2") format("woff2");
  font-weight: 400;
  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 {
  --tomato: #ff5533;
  --ink: #231942;
  --bubble: #ffd6e8;
  --sky: #bde0ff;
  --white: #ffffff;
  --plum: #5e527a;
  --seam: #e6c9d6;
  --display: "Bagel Fat One", "Arial Rounded MT Bold", "Arial Black", sans-serif;
  --text: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --gutter: 1.5rem;
  --line: 2.5px solid var(--ink);
  --wide: 64rem;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bubble);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-synthesis: none; /* Bagel has one weight: never fake a bold or an italic */
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.04;
  text-wrap: balance;
}

h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 750;
  line-height: 1.3;
}

p,
ul,
ol {
  margin: 0;
}

strong {
  font-weight: 700;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  background: var(--sky);
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  top: -5rem;
  left: var(--gutter);
  z-index: 10;
  padding: 0.625rem 1rem;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus {
  top: 0.75rem;
}

/* Header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  font-family: var(--display);
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  transform: rotate(-8deg);
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

/* Home: first screen */

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0.25rem var(--gutter) 2.25rem;
}

.sticker {
  width: clamp(4.5rem, 24vw, 6.5rem);
  margin: 0 0 1rem -0.25rem;
  transform: rotate(-10deg);
}

.hero h1 {
  font-size: clamp(2.25rem, 9vw + 0.5rem, 5rem);
}

.lede {
  max-width: 34rem;
  margin-top: 0.875rem;
  font-size: 1.125rem;
  line-height: 1.45;
}

.soon {
  display: inline-block;
  margin-top: 1.125rem;
  padding: 0.375rem 0.875rem;
  background: var(--sky);
  border: var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0;
  list-style: none;
}

.pills a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
}

.pills a:hover,
.lang:hover,
.brand:hover {
  background: var(--sky);
}

.brand:hover {
  background: none;
  text-decoration: underline;
}

/* Home: how it works */

.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.5rem var(--gutter);
}

.section > h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.75rem, 6vw + 0.25rem, 2.75rem);
}

.cards {
  display: grid;
  gap: 0.75rem;
  padding: 0;
  list-style: none;
  counter-reset: card;
}

.card {
  padding: 1.125rem 1.25rem 1.25rem;
  background: var(--white);
  border: var(--line);
  border-radius: 1.5rem;
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--display);
  font-size: 1.3125rem;
  font-weight: 400;
  line-height: 1.1;
}

.card h3::before {
  content: counter(card);
  counter-increment: card;
  display: grid;
  flex: none;
  place-items: center;
  width: 2rem;
  height: 2rem;
  background: var(--tomato);
  border-radius: 50%;
  color: var(--ink);
  font-size: 1.0625rem;
}

.card p {
  margin-top: 0.5rem;
}

.note {
  padding: 1.5rem 1.25rem;
  background: var(--ink);
  border-radius: 1.5rem;
  color: var(--bubble);
}

.note h2 {
  font-size: clamp(1.5rem, 5vw + 0.25rem, 2.25rem);
}

.note p {
  margin-top: 0.625rem;
}

.note a {
  color: var(--bubble);
}

.note a:hover {
  background: none;
  text-decoration-thickness: 3px;
}

.note :focus-visible {
  outline-color: var(--bubble);
}

/* Legal pages */

.paper {
  padding: 2rem var(--gutter) 2.5rem;
  background: var(--white);
  border-block: var(--line);
}

.paper a {
  text-decoration-color: var(--tomato);
}

.paper a:hover {
  text-decoration-color: var(--ink);
}

.paper h1 {
  font-size: clamp(2.125rem, 7vw + 0.5rem, 3.25rem);
}

.date {
  margin-top: 0.5rem;
  color: var(--plum);
  font-size: 0.9375rem;
}

.intro {
  margin-top: 1.25rem;
  font-size: 1.125rem;
}

.paper h2 {
  margin: 2.25rem 0 0.25rem;
  font-size: 1.5rem;
}

.paper h3 {
  margin: 1.5rem 0 0;
}

.paper p,
.paper ul,
.paper table {
  margin-top: 0.75rem;
}

.paper ul {
  padding-left: 1.25rem;
}

.paper li {
  margin-top: 0.375rem;
}

.paper li::marker {
  color: var(--tomato);
}

.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.data th,
.data td {
  padding: 0.625rem 0.75rem 0.625rem 0;
  border-bottom: 2px dashed var(--seam);
  text-align: left;
  vertical-align: top;
}

.data th {
  font-weight: 750;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.paper .button {
  display: inline-flex;
  align-items: center;
  min-height: 3.25rem;
  padding: 0 1.5rem;
  background: var(--tomato);
  border: 3px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
}

.paper .button:hover {
  background: var(--sky);
}

.addr {
  font-weight: 700;
  overflow-wrap: anywhere;
}

/* Footer */

.foot {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 3rem;
  color: var(--plum);
  font-size: 0.9375rem;
}

.foot p + p {
  margin-top: 0.375rem;
}

.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}

.foot ul a {
  display: inline-block;
  padding: 0.5rem 0;
  font-weight: 650;
}

/* 320 px phones: tighter gutters so lines and pills keep their room */

@media (max-width: 22.4375rem) {
  :root {
    --gutter: 1rem;
  }

  body {
    font-size: 1rem;
  }

  .lede {
    font-size: 1.0625rem;
  }

  .pills a {
    padding: 0 0.875rem;
  }
}

/* Tablets and up */

@media (min-width: 40rem) {
  :root {
    --gutter: 2rem;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .paper {
    max-width: 44rem;
    margin: 0.5rem auto 0;
    padding: 2.75rem 3rem 3rem;
    border: 3px solid var(--ink);
    border-radius: 2rem;
  }

  .foot {
    max-width: 44rem;
    padding-inline: 0;
  }

  .home .foot {
    max-width: var(--wide);
    padding-inline: var(--gutter);
  }
}

/* Desktop: the sticker moves beside the headline */

@media (min-width: 60rem) {
  .hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 3rem;
    align-items: start;
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
  }

  .hero > * {
    grid-column: 1;
  }

  .hero .sticker {
    grid-column: 2;
    grid-row: 1 / span 4;
    width: 15rem;
    margin: 0;
    transform: rotate(12deg);
  }

  .hero nav {
    justify-self: start;
  }

  .soon {
    justify-self: start;
  }

  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
}
