/* Self-hosted, subset to latin + latin-ext. No third-party requests. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-var.woff2") format("woff2-variations");
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/plex-sans-var.woff2") format("woff2-variations");
  font-weight: 400 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* ground */
  --void:   #0F1218;
  --slab:   #171B23;
  --edge:   #242A35;
  --text:   #E9EAEE;
  --muted:  #8B92A1;

  /* brand — the three letterform colours from the TEN mark */
  --coral: #E4574A;
  --green: #3FA85F;
  --blue:  #2F6BE0;

  /* the ten list colours — one sweep from coral through green to violet,
     landing exactly on the three brand hues at rows 1, 5 and 8.
     The only saturated things on the page. */
  --l1:  #E4574A;
  --l2:  #E88A46;
  --l3:  #E0B341;
  --l4:  #A9BF45;
  --l5:  #3FA85F;
  --l6:  #2FA894;
  --l7:  #2F97C4;
  --l8:  #2F6BE0;
  --l9:  #6A63D6;
  --l10: #9A5FC4;

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --gut: clamp(1.25rem, 4vw, 4.5rem);
  --stack: clamp(4.5rem, 10vw, 9rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--text);
  color: var(--void);
  padding: 0.5rem 0.9rem;
  border-radius: 2px;
}

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

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

.topbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem var(--gut);
}

.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
}

.topnav {
  display: flex;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.topnav a {
  color: var(--muted);
  text-decoration: none;
}
.topnav a:hover { color: var(--text); }

@media (max-width: 600px) {
  .topnav { display: none; }
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem) var(--gut) var(--stack);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.5rem;
}

.headline {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 6.4vw, 5.1rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin: 0 0 1.5rem;
}
.headline em {
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.lede {
  max-width: 34ch;
  color: var(--muted);
  margin: 0 0 2.25rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  padding: 0.8rem 1.3rem;
  border-radius: 3px;
  border: 1px solid var(--edge);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn-solid {
  background: var(--text);
  color: var(--void);
  border-color: var(--text);
}
.btn-solid:hover { background: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--muted);
}

/* ---------- the board (signature) ---------- */

.board {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: clamp(3px, 0.6vw, 7px);
}

.slot {
  aspect-ratio: 1;
  border-radius: 2px;
  background: color-mix(in srgb, var(--row) 34%, var(--slab));
  border: 1px solid color-mix(in srgb, var(--row) 45%, transparent);
  opacity: 0;
  transform: scale(0.6);
  animation: pop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2) forwards;
  animation-delay: var(--delay);
  position: relative;
}

@keyframes pop {
  to { opacity: 1; transform: scale(1); }
}

.slot.is-done::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--row);
  border-radius: 1px;
}
.slot.is-dropped {
  background: transparent;
  border-style: dashed;
  border-color: var(--edge);
}
.slot.is-empty {
  background: var(--slab);
  border-color: var(--edge);
}

.board-caption {
  margin: 1.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.tick { color: var(--text); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
}

/* ---------- the rule ---------- */

.rule {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding: var(--stack) var(--gut);
  border-top: 1px solid var(--edge);
}

.num {
  font-family: var(--mono);
  font-size: clamp(3rem, 7vw, 4.75rem);
  line-height: 1;
  margin: 0 0 0.75rem;
  color: var(--edge);
  letter-spacing: -0.04em;
}

.rule-item h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem;
}
.rule-item p:last-child {
  margin: 0;
  color: var(--muted);
  max-width: 38ch;
}

/* ---------- the year ---------- */

.h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 1.25rem;
  max-width: 20ch;
}

.year {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding: var(--stack) var(--gut);
  border-top: 1px solid var(--edge);
  background: linear-gradient(180deg, var(--slab), var(--void));
}

.year-copy p {
  color: var(--muted);
  max-width: 44ch;
  margin: 0 0 2rem;
}

.year-board { position: relative; }

.board-sm .slot { border-radius: 1px; }

.report {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  background: var(--void);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: clamp(1.25rem, 3vw, 2rem);
  animation: rise 0.5s ease forwards;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.report-head {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.5rem;
}
.report-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.report-rows li { padding: 0.15rem 0; }
.report-n {
  font-family: var(--mono);
  font-weight: 500;
  color: var(--green);
  margin-right: 0.6rem;
}
.report-rows li:nth-child(2) .report-n { color: var(--coral); }
.report-rows li:nth-child(3) .report-n { color: var(--muted); }

.report-foot {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin: 0.75rem 0 0;
}

@media (max-width: 820px) {
  .year { grid-template-columns: 1fr; }
}

/* ---------- offline ---------- */

.offline {
  padding: var(--stack) var(--gut);
  border-top: 1px solid var(--edge);
}

.offline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1.75rem, 3.5vw, 3rem);
  margin-top: 2.5rem;
}
.offline-grid h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.offline-grid p {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
}

/* ---------- cta + foot ---------- */

.cta {
  padding: var(--stack) var(--gut);
  border-top: 1px solid var(--edge);
}
.cta p {
  color: var(--muted);
  max-width: 40ch;
  margin: 0 0 2rem;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem var(--gut) 3rem;
  border-top: 1px solid var(--edge);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.foot p { margin: 0; }
.foot a { color: var(--text); text-decoration: none; }
.foot a:hover { text-decoration: underline; }

/* ---------- legal pages ---------- */

.doc {
  max-width: 62ch;
  padding: clamp(2rem, 5vw, 4rem) var(--gut) var(--stack);
}
.doc h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.035em;
  margin: 0 0 0.5rem;
}
.doc h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.5rem;
}
.doc p, .doc li { color: var(--muted); }
.doc .updated {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slot {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .report { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
