/* Divewrap site. The page is a dive: each section sits deeper and the water darkens as you scroll.
   Tokens from design/README.md. No external requests and no scripts (see deploy/divewrap-headers.conf). */

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-latin.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/schibsted-grotesk-latin-ext.woff2') format('woff2');
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

:root {
  --ink: #1f2e36;
  --muted: #4f6169;
  --primary: #0c3b52;
  --primary-hover: #072636;
  --rule: #c5d1cc;
  --good: #2f6b52;
  --light: #dce7e3;
  --pale: #9fc3d6;
  /* Water, from the surface down. Text: ink on 0–2, light on 3–5 (all checked for WCAG AA). */
  --w0: #eef3f0;
  --w1: #e0e9e5;
  --w2: #ccdbd5;
  --w2b: #bfd1cb;
  --w3: #1b5470;
  --w4: #0c3b52;
  --w5: #072636;
  /* Depth bands, shallow to deep: the order water absorbs light. Never change. */
  --d1: #c8553d;
  --d2: #db8a2b;
  --d3: #c7ae36;
  --d4: #4c9677;
  --d5: #2a6b9a;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--w5);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
}
a {
  color: var(--primary);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}
a:hover {
  color: var(--primary-hover);
  text-decoration-thickness: 0.14em;
}
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 3px;
}
p {
  margin: 0 0 1.1rem;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10;
  background: var(--w0);
  padding: 0.5rem 1rem;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* ---------- Masthead ---------- */

.masthead {
  background: var(--w0);
  padding: 1.5rem var(--gutter) 0;
}
.masthead-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.masthead nav {
  display: flex;
  gap: 1.5rem;
}
.masthead nav a {
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}
.masthead nav a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Wordmark: "d" + dotless i with a manta as its dot + "vewrap". */
.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
  letter-spacing: -0.045em;
  color: var(--primary);
  line-height: 1;
  text-decoration: none;
  font-size: 2.1rem;
}
.wordmark .i {
  position: relative;
  display: inline-block;
}
.wordmark svg {
  position: absolute;
  left: 50%;
  top: -0.2em;
  width: 0.56em;
  height: 0.43em;
  transform: translateX(-50%);
}

/* ---------- Hero: the surface ---------- */

.hero {
  background: linear-gradient(to bottom, var(--w0) 40%, var(--w1));
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}
.hero-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-inner {
    grid-template-columns: 1fr 1.05fr;
  }
}
.eyebrow {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  border-radius: 50%;
  background: var(--d4);
  margin-right: 0.55em;
  vertical-align: 0.05em;
}
h1 {
  font-size: clamp(2.6rem, 8.5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 900;
  color: var(--primary);
  margin: 0 0 1.5rem;
}
.lead {
  font-size: clamp(1.2rem, 2.4vw, 1.375rem);
  line-height: 1.5;
  max-width: 34rem;
}

.figure {
  margin: 0;
}
.profile-chart {
  display: block;
  width: 100%;
  height: auto;
}
.profile-chart .axis {
  font:
    500 16px 'Schibsted Grotesk',
    system-ui,
    sans-serif;
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
}
.profile-chart .note-label {
  font:
    700 15px 'Schibsted Grotesk',
    system-ui,
    sans-serif;
  fill: var(--good);
}
.profile-chart .diver {
  font:
    700 17px 'Schibsted Grotesk',
    system-ui,
    sans-serif;
}

/* ---------- Depth stops ---------- */

.stop {
  padding: clamp(3rem, 8vw, 6rem) var(--gutter);
}
.stop-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  gap: 0.5rem 2rem;
  align-items: start;
}
@media (min-width: 48rem) {
  .stop-inner {
    grid-template-columns: 7rem minmax(0, 44rem);
  }
}
/* The depth this section sits at, like a gauge in the margin. */
.depth {
  margin: 0.9rem 0 0;
  font-weight: 800;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.depth::before {
  content: '';
  width: 1.5rem;
  height: 4px;
  border-radius: 2px;
  background: currentColor;
}
.stop h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 900;
  margin: 0 0 1.25rem;
}

.w1 {
  background: linear-gradient(to bottom, var(--w1), var(--w2));
}
.w1 .depth {
  color: #a8432d; /* --d1, darkened to pass 4.5:1 as text on --w1 */
}
.w2 {
  background: linear-gradient(to bottom, var(--w2), var(--w2b));
}
.w2 .depth {
  color: #7a4210; /* --d2, darkened to pass 4.5:1 as text on --w2 */
}

/* The whole page is one gradient, surface to bottom: each section fades into the next one's colour.
   The thermocline is the stretch where light water turns dark. Mid-tones there are too grey for
   either text colour to pass contrast, so it holds no text. */
.thermocline {
  height: clamp(8rem, 18vw, 13rem);
  background: linear-gradient(to bottom, var(--w2b), var(--w3));
}

.dark {
  color: var(--light);
}
.dark a {
  color: #fff;
}
.dark a:hover {
  color: var(--light);
}
.dark :focus-visible {
  outline-color: #fff;
}
.dark h2 {
  color: #fff;
}
.w3 {
  background: linear-gradient(to bottom, var(--w3), var(--w4));
}
.w3 .depth {
  color: var(--light);
}
.w4 {
  background: linear-gradient(to bottom, var(--w4), var(--w5));
}
.w4 .depth,
.w5 .depth {
  color: var(--pale);
}
.w5 {
  background: var(--w5);
}

/* A statement, set large. */
.big {
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: #fff;
}

.promise {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  border-top: 1px solid rgba(220, 231, 227, 0.25);
}
.promise li {
  padding: 0.85rem 0 0.85rem 2rem;
  border-bottom: 1px solid rgba(220, 231, 227, 0.25);
  position: relative;
}
.promise li::before {
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 1.45rem;
  width: 0.9rem;
  height: 3px;
  border-radius: 2px;
  background: var(--d4);
}

.after-list {
  margin-top: 1.25rem;
}

.email {
  display: inline-block;
  font-size: clamp(1.5rem, 5vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 0.5rem 0 1.5rem;
  word-break: break-word;
}

/* ---------- Footer: the bottom ---------- */

.site-footer {
  background: var(--w5);
  color: var(--pale);
  padding: 2.5rem var(--gutter) 3rem;
  font-size: 0.9375rem;
}
.site-footer-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  border-top: 1px solid rgba(159, 195, 214, 0.3);
  padding-top: 1.5rem;
}
.site-footer p {
  margin: 0;
}
.site-footer a {
  color: #fff;
}
.site-footer :focus-visible {
  outline-color: #fff;
}

/* ---------- Plain pages (privacy) ---------- */

.page {
  background: var(--w0);
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(3rem, 8vw, 6rem);
}
.page-inner {
  max-width: 44rem;
  margin: 0 auto;
}
.page h1 {
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  margin-top: 1rem;
}
.page h2 {
  font-size: 1.5rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin: 2.75rem 0 0.75rem;
  color: var(--primary);
}
.page ul,
.page ol {
  margin: 0 0 1.1rem;
  padding-left: 1.25rem;
}
.page li {
  margin-bottom: 0.35rem;
}
.muted {
  color: var(--muted);
}
.toc {
  background: var(--w1);
  border-radius: 4px 14px 14px 14px;
  padding: 1rem 1.25rem 0.5rem;
  margin: 1.5rem 0 1rem;
}
.toc p {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.table-scroll {
  overflow-x: auto;
}
table {
  /* Tabular figures only where numbers line up: in this font they also widen , and . */
  font-variant-numeric: tabular-nums;
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.9688rem;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}
th {
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
