@font-face {
  font-family: "Pixelify";
  src: url("../assets/fonts/pixelify-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted";
  src: url("../assets/fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --red: #c02806;
  --red-deep: #8e1c03;
  --paper: #f0efed;
  --ink: #240b05;
  --ink-soft: #6a5650;
  --px: 4px; /* one "pixel" of the logo grid, used for offsets and borders */
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --sans: "Schibsted", "Helvetica Neue", Arial, sans-serif;
  --pixel: "Pixelify", "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: var(--px) solid var(--ink); outline-offset: var(--px); }
.defs { position: absolute; }

.skip {
  position: fixed; top: 0; left: 0; z-index: 20;
  padding: .75rem 1rem; background: var(--ink); color: var(--paper);
  transform: translateY(-110%);
}
.skip:focus { transform: none; }

/* ---------- 3D canvas ---------- */
#scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; touch-action: pan-y;
}
.no-3d #scene { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font: 700 1rem/1 var(--sans);
  padding: 1rem 1.4rem;
  background: var(--red); color: var(--paper);
  border: 0; border-radius: 0; cursor: pointer; text-decoration: none;
  box-shadow: var(--px) var(--px) 0 var(--ink);
  transition: transform .08s steps(2), box-shadow .08s steps(2);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(var(--px), var(--px)); box-shadow: 0 0 0 var(--ink); }
.btn-paper { background: var(--paper); color: var(--red-deep); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn.is-done, .btn.is-done:hover { opacity: 1; cursor: default; background: var(--ink); color: var(--paper); transform: none; box-shadow: var(--px) var(--px) 0 var(--red-deep); }
.btn.is-done::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .6em; background: var(--paper); }
/* An element marked hidden stays hidden, whatever layout its class gives it. */
[hidden] { display: none !important; }
.form.is-joined .field { opacity: .55; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .8rem var(--gutter);
  background: rgba(240, 239, 237, .94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: opacity .2s, visibility .2s;
}
.nav.is-hidden { opacity: 0; visibility: hidden; }
.nav-logo { color: var(--red); display: block; width: 7.5rem; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.nav-logo svg { display: block; width: 100%; height: auto; }
.nav.past-hero .nav-logo, .no-3d .nav-logo { opacity: 1; visibility: visible; }
.soon {
  margin-left: auto;
  font: 500 1.05rem/1 var(--pixel); color: var(--red);
  display: flex; align-items: center; gap: .4rem;
}
.blink { width: .55em; height: 1em; background: var(--red); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav .btn { padding: .8rem 1.1rem; font-size: .95rem; }

/* ---------- Panels ---------- */
main { position: relative; z-index: 1; }
.panel {
  min-height: 100vh; min-height: 100svh;
  padding: 6rem var(--gutter) 4rem;
  display: flex; flex-direction: column; justify-content: center;
  pointer-events: none; /* let the pointer reach the 3D scene */
}
.panel a, .panel button { pointer-events: auto; }

.say { max-width: 24rem; }
.say h2 {
  font: 700 clamp(3.5rem, 8.5vw, 7.5rem)/.9 var(--pixel);
  color: var(--red);
  letter-spacing: -.01em;
  margin-bottom: 1.25rem;
}
.say p { font-size: clamp(1.15rem, 1.6vw, 1.4rem); line-height: 1.4; max-width: 21rem; }

/* ---------- Hero ---------- */
.hero { justify-content: flex-end; padding-bottom: clamp(3rem, 8vh, 5.5rem); position: relative; }
.hero-flat { display: none; color: var(--red); width: min(100%, 44rem); height: auto; margin: auto 0; }
.no-3d .hero-flat { display: block; }
.hero-copy {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 6vw, 6rem); align-items: end;
}
h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 4.6vw, 4.25rem);
  line-height: 1.03; letter-spacing: -.035em;
  max-width: 17ch; text-wrap: balance;
}
h1 span { display: block; }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.4; max-width: 24rem; margin-bottom: 1.5rem; }

.scroll-cue { position: absolute; left: 50%; bottom: 1.25rem; width: 12px; height: 24px; margin-left: -6px; }
.scroll-cue i { display: block; width: 12px; height: 12px; background: var(--red); animation: drop 1.4s steps(4) infinite; }
@keyframes drop { from { transform: translateY(0); opacity: 1; } to { transform: translateY(16px); opacity: 0; } }

/* ---------- Waitlist ---------- */
.join {
  position: relative; z-index: 2;
  background: var(--red); color: var(--paper);
  padding: clamp(4rem, 10vh, 8rem) var(--gutter) 0;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: space-between; gap: 4rem;
}
.join-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30rem);
  gap: 3rem clamp(2rem, 8vw, 8rem); align-items: start;
}
.join-copy h2 { font: 700 clamp(3.25rem, 8vw, 7rem)/.9 var(--pixel); margin-bottom: 1.5rem; }
.join-copy p { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.4; max-width: 23rem; }
.join :focus-visible { outline-color: var(--paper); }

.form { display: grid; gap: 1.4rem; }
.field { display: grid; gap: .45rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 1rem; padding: 0; }
.field > legend { margin-bottom: .45rem; }
.opt { font-weight: 400; opacity: .8; margin-left: .35rem; }
.form input[type="tel"]::placeholder { color: var(--ink-soft); opacity: .7; }
.form input[type="text"], .form input[type="email"], .form input[type="tel"], .form textarea {
  width: 100%; font: 400 1.0625rem/1.4 var(--sans);
  padding: .85rem .9rem;
  background: var(--paper); color: var(--ink);
  border: 0; border-radius: 0;
  box-shadow: var(--px) var(--px) 0 var(--red-deep);
}
.form textarea { resize: vertical; min-height: 5.5rem; }
.form [aria-invalid="true"] { box-shadow: var(--px) var(--px) 0 var(--ink); outline: var(--px) solid var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chips span {
  display: block; padding: .7rem .95rem; font-weight: 600; font-size: .98rem;
  border: 2px solid var(--paper);
}
.chips input:checked + span { background: var(--paper); color: var(--red-deep); }
.chips input:focus-visible + span { outline: var(--px) solid var(--paper); outline-offset: var(--px); }

.check { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; font-weight: 400; cursor: pointer; }
.check input {
  appearance: none; -webkit-appearance: none; margin: .1rem 0 0;
  width: 1.4rem; height: 1.4rem; background: var(--paper); border-radius: 0; cursor: pointer;
  display: grid; place-items: center;
}
.check input:checked::after { content: ""; width: .7rem; height: .7rem; background: var(--red); }

.err { font-weight: 600; font-size: .95rem; background: var(--ink); color: var(--paper); padding: .45rem .65rem; justify-self: start; }
.form-err { justify-self: stretch; }
.form .btn { justify-self: start; box-shadow: var(--px) var(--px) 0 var(--ink); }
.hp { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }

.done { border-top: 2px solid var(--paper); padding-top: 1.4rem; }
.done:focus { outline: none; }
.done h3 { font: 700 clamp(2rem, 4vw, 3.25rem)/1 var(--pixel); margin-bottom: .9rem; }
.done p { font-size: 1.2rem; }

.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2.5rem;
  padding: 1.75rem 0 2rem; border-top: 2px solid var(--paper);
  font-size: .95rem;
}
.foot-logo { width: 6.5rem; height: auto; margin-right: auto; }

/* ---------- Privacy page ---------- */
.doc { max-width: 40rem; padding: 7rem var(--gutter) 5rem; }
.doc h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; max-width: none; }
.doc h2 { font-size: 1.2rem; font-weight: 700; margin: 2rem 0 .5rem; }
.doc p + p { margin-top: .9rem; }
.doc .back { display: inline-block; margin-top: 2.5rem; font-weight: 700; color: var(--red-deep); }
.doc-nav .nav-logo { opacity: 1; visibility: visible; }

/* ---------- Why Cursr page ---------- */
.nav .btn { white-space: nowrap; }
.nav-link { white-space: nowrap; font-weight: 700; font-size: .98rem; text-decoration: none; color: var(--ink); border-bottom: 2px solid var(--red); padding-bottom: 2px; }
.nav-link:hover { color: var(--red-deep); }

.why { padding: 0 var(--gutter); }
.numbers-head { margin-bottom: clamp(2.5rem, 7vh, 4.5rem); }
.numbers-head h2 { margin-bottom: 1rem; }
.numbers-head p { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.45; max-width: 30rem; }
.numbers .stat b { margin-bottom: .9rem; }
/* With 3D on, the blocks themselves stand in these spots and spell the numbers. */
.has-3d .numbers .stat b { color: transparent; }
.numbers-more { align-self: flex-start; }
.numbers-more { display: inline-block; margin-top: clamp(2.5rem, 6vh, 3.5rem); font-size: 1.05rem; }
.why h2, .numbers h2 { font-weight: 800; font-size: clamp(1.7rem, 3.2vw, 2.75rem); line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }

.why-hero {
  min-height: 100vh; min-height: 100svh;
  padding: 6.5rem 0 3rem;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 2rem clamp(1.5rem, 4vw, 4rem); align-items: center;
}
.why-hero h1 { max-width: 12ch; margin-bottom: 1.5rem; }
.why-hero .lede { margin-bottom: 0; }

.race { position: relative; height: min(70vh, 38rem); min-height: 22rem; }
.race canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.race-tag {
  position: absolute; left: 0; top: 0; white-space: nowrap;
  font: 600 1.05rem/1 var(--pixel); color: var(--ink);
  transform: translate(-50%, -100%); visibility: hidden;
}
.race-tag-red { color: var(--red); transform: translate(-50%, 0); }
.race.is-live .race-tag { visibility: visible; }
.race-flat { display: none; font-size: 1.15rem; max-width: 26rem; border-left: var(--px) solid var(--red); padding-left: 1rem; }
.no-3d .race { height: auto; min-height: 0; }
.no-3d .race canvas { display: none; }
.no-3d .race-flat { display: block; }

.why-block { padding: clamp(3.5rem, 9vh, 6.5rem) 0; border-top: 2px solid var(--ink); }
.why-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem clamp(2rem, 6vw, 6rem); align-items: end; margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.why-head h2 { max-width: 16ch; }
.why-head p { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.45; max-width: 27rem; }

/* A hundred squares: the ones that sink away are what you no longer spend. */
.tallies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem clamp(1.5rem, 5vw, 5rem); }
.stat { margin: 0; }
.tally { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; width: min(100%, 15rem); aspect-ratio: 1; padding: 0 3px 3px 0; margin-bottom: 1.6rem; }
.tally i, .meter i {
  display: block; background: var(--red);
  box-shadow: 1px 1px 0 var(--red-deep), 2px 2px 0 var(--red-deep), 3px 3px 0 var(--red-deep);
  transition: transform .12s steps(3), background-color .12s steps(2), box-shadow .12s steps(3);
}
.tally i.gone, .meter i.gone {
  background: transparent; transform: translate(3px, 3px);
  box-shadow: inset 0 0 0 1px rgba(36, 11, 5, .2);
}
.stat strong { display: block; font-weight: 700; font-size: 1.2rem; line-height: 1.1; margin-bottom: .6rem; }
.stat b { display: block; font: 700 clamp(3.5rem, 6.5vw, 5.5rem)/.85 var(--pixel); color: var(--red); margin-bottom: .5rem; }
.stat span { display: block; max-width: 17rem; color: var(--ink-soft); }

/* Slider */
.mix-panel { max-width: 46rem; }
.mix-label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }
/* Changing numbers use the plain typeface: the pixel face's 5 reads as an S. */
.mix-label output { font: 800 2rem/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--red); min-width: 4ch; text-align: right; }
/* The slider is built to be noticed: a thick track that fills with red, a big
   handle with grip lines, and a "Drag me" flag that rides on the handle until
   the visitor has moved it. --v is the slider's position from 0 to 1. */
.mix-slide { --v: .5; --thumb: 3rem; position: relative; padding-top: 3.1rem; margin-bottom: 2.75rem; }
#mix-range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: var(--thumb); margin: 0;
  background:
    linear-gradient(var(--red), var(--red)) left center / calc(var(--v) * 100%) 14px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 100% 14px no-repeat;
  cursor: grab; border-radius: 0; touch-action: pan-y;
}
#mix-range:active { cursor: grabbing; }
#mix-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: var(--thumb); height: var(--thumb); border: 0; border-radius: 0;
  background:
    linear-gradient(90deg, transparent 32%, var(--paper) 32% 40%, transparent 40% 46%, var(--paper) 46% 54%, transparent 54% 60%, var(--paper) 60% 68%, transparent 68%) center / 100% 44% no-repeat,
    var(--red);
  box-shadow: 0 0 0 var(--px) var(--paper), 6px 6px 0 var(--px) var(--ink);
}
#mix-range::-moz-range-thumb {
  width: var(--thumb); height: var(--thumb); border: 0; border-radius: 0;
  background:
    linear-gradient(90deg, transparent 32%, var(--paper) 32% 40%, transparent 40% 46%, var(--paper) 46% 54%, transparent 54% 60%, var(--paper) 60% 68%, transparent 68%) center / 100% 44% no-repeat,
    var(--red);
  box-shadow: 0 0 0 var(--px) var(--paper), 6px 6px 0 var(--px) var(--ink);
}
.mix-hint {
  position: absolute; top: 0; left: calc(var(--v) * (100% - var(--thumb)) + var(--thumb) / 2);
  transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font: 600 1.05rem/1 var(--pixel); background: var(--ink); color: var(--paper); padding: .5rem .7rem;
  animation: nudge 1s steps(2) infinite;
}
.mix-hint::after { content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 10px; margin-left: -5px; background: var(--ink); }
.mix-slide.is-used .mix-hint { display: none; }
@keyframes nudge { 50% { transform: translate(-50%, -5px); } }
.mix-ends { display: flex; justify-content: space-between; margin-top: .7rem; font-weight: 600; font-size: .92rem; color: var(--ink-soft); }
#mix-range::-moz-range-track { background: transparent; }
.meters { display: grid; gap: 1.5rem; }
.meter-row { display: grid; grid-template-columns: minmax(0, 1fr) 13.5rem; gap: 1.5rem; align-items: center; }
.meter { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; height: 1.9rem; padding: 0 3px 3px 0; }
.meter-row p { font-weight: 600; font-size: 1.1rem; white-space: nowrap; }
.meter-row b { font: 800 1.6rem/1 var(--sans); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--red); display: inline-block; min-width: 3.1ch; }

/* Other reasons */
.perks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.75rem clamp(1.5rem, 5vw, 5rem); }
.perks li { padding-top: 1rem; position: relative; }
.perks li::before { content: ""; position: absolute; top: 0; left: 0; width: 12px; height: 12px; background: var(--red); box-shadow: 3px 3px 0 var(--ink); }
.perks h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; margin: 1.1rem 0 .45rem; }
.perks p { max-width: 20rem; }
.fine { margin-top: clamp(2.5rem, 6vh, 4rem); font-size: .92rem; color: var(--ink-soft); }

.why-join { min-height: 0; gap: clamp(3rem, 8vh, 6rem); }
.why-join-inner h2 { font: 700 clamp(3.25rem, 8vw, 7rem)/.9 var(--pixel); margin-bottom: 1.5rem; }
.why-join-inner p { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.4; max-width: 23rem; margin-bottom: 1.75rem; }
.foot-mark { display: block; aspect-ratio: 1405 / 258; background: currentColor; -webkit-mask: url("../assets/logo-red.svg") center / contain no-repeat; mask: url("../assets/logo-red.svg") center / contain no-repeat; }

.nav-menu { display: flex; align-items: center; gap: 1.5rem; margin-left: auto; }
.nav-toggle {
  display: none; margin-left: auto; width: 2.9rem; height: 2.9rem; padding: 0; border: 0; border-radius: 0; cursor: pointer;
  background: var(--red); box-shadow: var(--px) var(--px) 0 var(--ink);
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle i { display: block; width: 1.35rem; height: 4px; background: var(--paper); transition: transform .12s steps(3), opacity .12s steps(2); }
.nav.is-open .nav-toggle i:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav.is-open .nav-toggle i:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle i:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* Phones and foldables: the links fold away behind the three-line button. */
@media (max-width: 900px) {
  .nav { background: var(--paper); }
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    flex-direction: column; align-items: flex-start; gap: 1.4rem;
    padding: 1.5rem var(--gutter) 1.9rem;
    background: var(--paper); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  }
  .nav.is-open .nav-menu { display: flex; }
  .nav-menu .soon { margin-left: 0; order: 3; }
  .nav-menu .nav-link { font-size: 1.25rem; }
  .nav-menu .btn { padding: 1rem 1.4rem; font-size: 1rem; }
}

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .why-hero { grid-template-columns: 1fr; min-height: 0; padding: 6rem 0 2rem; gap: 1rem; }
  .race { height: 42vh; height: 42svh; min-height: 17rem; margin: 0 calc(var(--gutter) * -1); }
  .no-3d .race { margin: 0; }
  .why-head { grid-template-columns: 1fr; }
  .tallies { grid-template-columns: 1fr; gap: 3.5rem; }
  .tally { width: min(100%, 13rem); }
  .meter-row { grid-template-columns: 1fr; gap: .6rem; }
  .perks { grid-template-columns: 1fr; gap: 2.25rem; }
  .panel.numbers { justify-content: center; padding-bottom: 4rem; }
  .numbers .tallies { gap: 2.25rem; }
  .panel { justify-content: flex-end; padding-bottom: 14vh; padding-bottom: 14svh; }
  .hero { padding-bottom: 4.5rem; }
  .hero-copy { grid-template-columns: 1fr; gap: 1.1rem; }
  .lede { margin-bottom: 1.1rem; }
  .join-inner { grid-template-columns: 1fr; }
  .foot-logo { flex-basis: 100%; width: 6rem; margin-bottom: .5rem; }
  .foot { gap: .5rem 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blink, .scroll-cue i, .mix-hint { animation: none; }
  .btn, .tally i, .meter i, .nav-toggle i { transition: none; }
}
