:root {
  --paper: #f1ebdd;      /* hero artwork ground */
  --straw: #f3efd9;      /* network artwork ground */
  --clay: #e5dfcf;       /* step artwork ground */
  --pine: #173f31;
  --moss: #2f7a5b;
  --mint: #a9dcc4;
  --frost: #f7fbf8;
  --ink: #12261f;

  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --cube: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 80%;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: clamp(2.1rem, 5.2vw, 4.25rem); max-width: 17ch; }
h3 { font-size: clamp(1.7rem, 3vw, 2.5rem); }

p { margin: 0; max-width: 62ch; }

a { color: inherit; }

:focus-visible { outline: 3px solid var(--moss); outline-offset: 3px; }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--pine); color: var(--frost); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

/* ---------- top bar ---------- */

.top {
  position: absolute; inset: 0 0 auto 0; z-index: 3;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px var(--gutter);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-stretch: 80%; font-weight: 700;
  font-size: 1.35rem; letter-spacing: -0.01em; text-decoration: none;
}

.top nav { display: flex; gap: clamp(14px, 2.5vw, 34px); }
.top nav a {
  text-decoration: none; font-weight: 500; font-size: 0.97rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.top nav a:hover { border-bottom-color: var(--moss); }
.top nav .nav-app { background: var(--pine); color: var(--frost); padding: 6px 14px; border-bottom: 0; }
.top nav .nav-app:hover { background: var(--moss); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: min(100svh, 900px);
  display: grid; align-items: end;
  padding: 120px var(--gutter) clamp(36px, 7vh, 80px);
  overflow: hidden;
}

.hero-art {
  position: absolute; z-index: 0;
  right: -5%; top: 50%;
  width: min(66vw, 980px); max-width: none;
  transform: translateY(-52%);
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}

.hero-copy { position: relative; z-index: 1; max-width: 46rem; }

h1 {
  font-size: clamp(3.4rem, 10vw, 9rem);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.88;
  letter-spacing: -0.015em;
  color: var(--pine);
}

h1 .line { display: block; width: fit-content; }

.lede {
  margin-top: clamp(20px, 3vw, 34px);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  max-width: 30ch;
  font-weight: 500;
}

.button {
  display: inline-block; margin-top: 28px;
  background: var(--pine); color: var(--frost);
  font-weight: 600; text-decoration: none;
  padding: 15px 22px;
  box-shadow: 6px 6px 0 var(--mint);
  transition: transform .12s steps(2), box-shadow .12s steps(2);
}
.button:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--mint); }
.button:active { transform: translate(6px, 6px); box-shadow: 0 0 0 var(--mint); }

/* The one load moment: the headline is laid down in blocks, like the cubes. */
@media (prefers-reduced-motion: no-preference) {
  h1 .line { clip-path: inset(0 100% 0 0); animation: lay .7s steps(9) forwards; }
  h1 .line:nth-child(2) { animation-delay: .45s; }
  .hero-art { animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes lay { to { clip-path: inset(0 0 0 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(-48%); } }

/* ---------- the problem ---------- */

.exposed { background: var(--straw); padding: clamp(40px, 8vw, 110px) 0 clamp(56px, 9vw, 130px); }
.exposed img { width: 100%; }
.exposed-copy { padding: clamp(24px, 4vw, 56px) var(--gutter) 0; }
.cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(18px, 3vw, 48px);
  margin-top: clamp(24px, 3.5vw, 48px);
  max-width: 78rem;
}
.cols p:last-child { font-weight: 500; }

/* ---------- asset classes ---------- */

.assets { --ground: #ede6d3; background: var(--ground); padding: clamp(56px, 9vw, 130px) var(--gutter); }
.classes {
  list-style: none; padding: 0; margin: clamp(20px, 3vw, 40px) 0 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: clamp(20px, 3vw, 44px);
}
.classes img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
}
.classes h3 { font-size: clamp(1.45rem, 2.1vw, 1.9rem); }
.classes p { margin-top: 10px; max-width: 30ch; }

/* ---------- ledger ---------- */

.ledger {
  background: var(--pine); color: var(--frost);
  padding: clamp(56px, 9vw, 130px) var(--gutter);
}

.ledger-art {
  display: block; width: min(100%, 1100px); height: auto;
  margin: calc(clamp(56px, 9vw, 130px) * -.5) auto clamp(8px, 2vw, 28px);
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}

.ledger-head {
  display: flex; flex-wrap: wrap; gap: 28px;
  justify-content: space-between; align-items: end;
}

.switch { display: inline-flex; border: 2px solid var(--mint); }
.switch button {
  font: inherit; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--mint);
  border: 0; padding: 12px 18px;
}
.switch button[aria-pressed="true"] { background: var(--mint); color: var(--pine); }
.switch button:focus-visible { outline-color: var(--frost); }

.record { margin: clamp(32px, 5vw, 64px) 0 0; }
.record > div {
  display: grid; grid-template-columns: minmax(9rem, 1fr) 3fr;
  gap: 8px 24px; align-items: center;
  padding: 18px 0;
  border-top: 1px solid rgb(169 220 196 / .28);
}
.record > div:last-child { border-bottom: 1px solid rgb(169 220 196 / .28); }
.record dt { color: var(--mint); font-size: 0.97rem; }
.record dd {
  margin: 0;
  font-family: var(--display); font-stretch: 85%; font-weight: 600;
  font-size: clamp(1.25rem, 2.6vw, 2.1rem); line-height: 1.1;
  min-height: 1.1em;
  overflow-wrap: anywhere;
}
.record .verdict dd { color: var(--mint); }

/* A hidden value is drawn as a row of cubes rather than as text. */
.cubes { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.cubes i {
  width: var(--cube); height: calc(var(--cube) * 1.6);
  background: var(--mint);
  opacity: calc(1 - var(--i) * .075);
}
@media (prefers-reduced-motion: no-preference) {
  .cubes i { animation: drop .28s steps(3) backwards; animation-delay: calc(var(--i) * 28ms); }
}
@keyframes drop { from { transform: translateY(-10px); opacity: 0; } }

.note { margin-top: 22px; font-size: 0.95rem; color: rgb(247 251 248 / .72); }

/* ---------- how ---------- */

.how { background: var(--clay); padding: clamp(56px, 9vw, 130px) var(--gutter); }

.steps { list-style: none; margin: clamp(28px, 5vw, 72px) 0 0; padding: 0; counter-reset: step; }

.steps li {
  counter-increment: step;
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(16px, 4vw, 64px); align-items: center;
}
.steps li:nth-child(even) img { order: 2; }
.steps li + li { margin-top: clamp(8px, 2vw, 24px); }

.steps img {
  width: 100%;
  -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent 96%);
          mask-image: radial-gradient(closest-side, #000 60%, transparent 96%);
}

.steps h3::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 1.5em; height: 1.5em; margin-right: .45em;
  background: var(--pine); color: var(--frost);
  font-size: .55em; font-stretch: 100%; letter-spacing: 0;
  vertical-align: .3em;
}
.steps p { margin-top: 14px; max-width: 46ch; }

/* ---------- footer ---------- */

.foot { background: var(--ink); color: var(--frost); padding: clamp(56px, 9vw, 120px) var(--gutter) 36px; }
.foot-line {
  font-family: var(--display); font-stretch: 75%; font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 8rem); line-height: .9; letter-spacing: -0.03em;
  max-width: none; color: var(--mint);
}
.foot .button { background: var(--mint); color: var(--pine); box-shadow: 6px 6px 0 var(--moss); }
.foot-small { margin-top: clamp(32px, 5vw, 64px); font-size: 0.95rem; color: rgb(247 251 248 / .7); }

/* ---------- small screens ---------- */

@media (max-width: 760px) {
  .top nav a:not(:last-child) { display: none; }
  .classes { grid-template-columns: 1fr 1fr; }
  .hero { min-height: 0; padding-top: 104px; display: block; }
  .hero-art {
    position: static; transform: none; animation: none;
    width: 124%; height: auto; margin: 24px 0 -4% -12%;
  }
  .record > div { grid-template-columns: 1fr; }
  .steps li { grid-template-columns: 1fr; gap: 0; }
  .steps li:nth-child(even) img { order: 0; }
  .steps li + li { margin-top: 28px; }
}
