/* ProTesting site-wide styles
   Idea: every page is a reviewed draft. Paper and ink, a reviewer's red pen for
   the things that are wrong, and a pass-green tick for the things that work. */

:root {
  --paper: #f3f0e8;
  --paper-2: #e9e4d8;
  --card: #fbfaf6;
  --ink: #17161a;
  --ink-2: #4a4740;
  --ink-3: #77736a;
  --line: #d9d3c5;
  --red: #c8321e;
  --red-ink: #a8291a;
  --green: #1d7a4a;
  --night: #141416;
  --night-2: #1e1e21;
  --night-line: #2e2e33;
  --night-text: #edeae2;
  --night-muted: #a39f95;

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --hand: "Kalam", "Comic Sans MS", cursive;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red-ink);
  margin-bottom: 14px;
}
.h2 {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 800;
  text-wrap: balance;
}
.lede { color: var(--ink-2); font-size: 19px; max-width: 34em; margin-top: 18px; }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px;
  border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s, color .2s, box-shadow .2s;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 1px 0 var(--red-ink), 0 8px 20px -10px rgba(200, 50, 30, .7); }
.btn-red:hover { background: var(--red-ink); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #000; }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.text-link {
  font-weight: 700; text-decoration: none;
  background: linear-gradient(var(--red), var(--red)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 2px;
  transition: background-size .25s var(--ease), color .2s;
}
.text-link:hover { color: var(--red-ink); }

/* ── Nav ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 240, 232, .94);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background-color .3s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: 72px; display: flex; align-items: center; gap: 28px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 900; font-size: 19px; letter-spacing: -.03em; text-decoration: none;
  margin-right: auto;
}
.logo-mark { width: 26px; height: 26px; fill: var(--ink); }
.logo-mark path { fill: none; stroke: var(--paper); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.logo:hover .logo-mark { fill: var(--green); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink-2); transition: color .2s; }
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-links-cta { display: none; }
.nav-cta { min-height: 42px; padding: 0 18px; font-size: 15px; }
.burger { display: none; width: 44px; height: 44px; position: relative; margin-right: -10px; }
.burger span {
  position: absolute; left: 11px; width: 22px; height: 2px; background: var(--ink); border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: block; }
  .nav-cta { display: none; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
  }
  .nav-links.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .nav-links a { font-size: 22px; font-weight: 700; color: var(--ink); padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav-links .nav-links-cta { display: block; border: 0; color: var(--red-ink); }
}

/* ── Quiz engine (quiz.js) ───────────────────────────── */
.qz-wrap {
  background: var(--card); border: 1.5px solid var(--ink); border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
  box-shadow: 8px 8px 0 var(--ink);
  animation: qz-in .4s var(--ease);
}
@keyframes qz-in { from { opacity: 0; transform: translateY(8px); } }
.qz-step { font-family: var(--mono); font-size: 12px; color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.qz-bar { height: 6px; background: var(--paper-2); border-radius: 6px; margin: 12px 0 28px; overflow: hidden; }
.qz-bar-fill { height: 100%; background: var(--ink); border-radius: 6px; transition: width .4s var(--ease); }
.qz-question { font-size: clamp(22px, 2.4vw, 28px); font-weight: 800; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 28px; min-height: 2.4em; }
.qz-options { display: flex; gap: 12px; }
.qz-btn {
  flex: 1; min-height: 56px; border-radius: 12px;
  background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line);
  font-weight: 700; font-size: 17px;
  transition: box-shadow .2s, background-color .2s, color .2s, transform .15s;
}
.qz-btn:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.qz-btn:active { transform: scale(.97); }
.qz-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--red-ink);
}
.qz-badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.qz-headline { font-size: clamp(26px, 3vw, 34px); font-weight: 900; letter-spacing: -.035em; line-height: 1.08; margin: 14px 0 12px; }
.qz-insight { color: var(--ink-2); margin-bottom: 26px; }
.qz-cta { background: var(--red); color: #fff; }
.qz-cta:hover { background: var(--red-ink); }
.qz-restart { margin-left: 14px; font-size: 15px; font-weight: 500; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; }
.qz-restart:hover { color: var(--ink); }
.qz-question:focus, .qz-headline:focus { outline: none; }
.qz-options--choice { flex-direction: column; }
.qz-options--choice .qz-btn { text-align: left; padding: 14px 20px; min-height: 54px; font-size: 16px; }
@media (max-width: 860px) { .qz-wrap { box-shadow: 5px 5px 0 var(--ink); } }

/* ── Footer ──────────────────────────────────────────── */
.foot { padding: 28px 0 96px; font-size: 14px; color: var(--ink-3); }
.foot-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }

/* ── Inner page header ───────────────────────────────── */
.page-head { padding: clamp(48px, 8vw, 104px) 0 clamp(40px, 6vw, 72px); }
.page-title {
  font-size: clamp(44px, 7vw, 96px);
  line-height: .96; letter-spacing: -.05em; font-weight: 900;
  text-wrap: balance; max-width: 13em;
}
.page-sub { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 34em; margin-top: 24px; }
.band { padding: clamp(72px, 10vw, 140px) 0; }
.band--alt { background: var(--paper-2); }
.band--rule { border-top: 1px solid var(--line); }
.nav-links a[aria-current="page"] { color: var(--ink); text-decoration: underline 2px var(--red); text-underline-offset: 7px; }
@media (max-width: 860px) { .nav-links a[aria-current="page"] { text-decoration: none; color: var(--red-ink); } }

/* ── Reveal on scroll ────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
