/* ═══════════════════════════════════════════════════════════════════════════
   THE WRITE-UPS: visi.html, games.html, site.html.

   One page behind each of the three worlds, for the reader who wants more
   than the showcase: how the thing was made, in numbers, and what went
   wrong on the way. They are documents, set to be read: one column of text
   at a reading measure, on the page's own ground and in its own type, with
   the world's own sphere at the top (scripts/notes.js) and its colour for
   the few things that are coloured (`--note`, set per world below).

   Tokens and faces come from foundation.css, as on the 404 page. Nothing
   here is lit but the sphere.
   ═════════════════════════════════════════════════════════════════════════ */

.note { --note: var(--cyan-2); --note-soft: rgba(34, 230, 255, .28); min-height: 100svh; display: flex; flex-direction: column; }
.note[data-world="games"] { --note: #ffb24a; --note-soft: rgba(255, 150, 60, .3); }
.note[data-world="web"] { --note: #8f86ff; --note-soft: rgba(120, 110, 255, .32); }

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
  border-bottom: 1px solid rgba(122, 173, 255, .14);
}
.note-header__brand { flex: none; }
.note-header__brand img { display: block; width: auto; height: 34px; }
.note-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 26px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.note-nav a { color: var(--text-2); padding: 8px 0; border-bottom: 1px solid transparent; transition: color 240ms var(--ease-out), border-color 240ms var(--ease-out); }
.note-nav a:hover, .note-nav a:focus-visible { color: var(--text-1); border-bottom-color: var(--note); }
.note-nav a[aria-current="page"] { color: var(--note); }

.note-main { flex: 1; padding: 0 var(--gutter) clamp(64px, 9vw, 120px); }

/* The opening: the words on the left, the world on the right; on one
   column, the world first and smaller. */
.note-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 420px);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(36px, 6vw, 88px) 0 clamp(28px, 4vw, 56px);
}
.note-orb { display: block; width: 100%; aspect-ratio: 1; }
.note-index { margin: 0 0 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--note); }
.note-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3rem, 7.6vw, 7rem);
  line-height: .9;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
  color: #fff;
}
.note-lede { margin: clamp(18px, 2.4vw, 30px) 0 0; max-width: 34em; font-size: clamp(1.05rem, 1.45vw, 1.3rem); line-height: 1.55; color: var(--text-1); }

/* The numbers that matter, once, before the story. */
.note-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(16px, 2.4vw, 40px);
  max-width: 1180px;
  margin: 0 auto clamp(40px, 6vw, 80px);
  padding: 0;
  border-top: 1px solid var(--note-soft);
}
.note-facts > div { padding: 18px 0 0; }
.note-facts dt { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); }
.note-facts dd { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(2rem, 4.2vw, 3.6rem); line-height: 1; letter-spacing: .02em; color: var(--note); font-variant-numeric: tabular-nums; }

/* On the hero's own left edge, at a reading measure. */
.note-body { max-width: 1180px; margin: 0 auto; }
.note-body > * { max-width: 44rem; }
.note-body h2 {
  margin: clamp(40px, 5vw, 68px) 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.8vw, 2.5rem);
  line-height: 1;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
}
.note-body p, .note-body li { font-size: clamp(1rem, 1.15vw, 1.09rem); line-height: 1.7; color: rgba(234, 243, 255, .86); }
.note-body p { margin: 0 0 1.1em; }
.note-body ul { margin: 0 0 1.1em; padding-left: 1.2em; list-style: disc; }
.note-body li { margin-bottom: .5em; }
.note-body li::marker { color: var(--note); }
.note-body strong { color: #fff; font-weight: 600; }
.note-body code { font-family: var(--font-mono); font-size: .88em; color: var(--note); }
.note-body a { color: var(--note); border-bottom: 1px solid var(--note-soft); transition: border-color 240ms var(--ease-out), color 240ms var(--ease-out); }
.note-body a:hover, .note-body a:focus-visible { color: #fff; border-bottom-color: var(--note); }
/* What went wrong: set apart by a rule in the world's colour, not a box. */
.note-wrong { margin: clamp(40px, 5vw, 68px) 0 0; padding-left: clamp(16px, 2vw, 26px); border-left: 2px solid var(--note); }
.note-wrong h2 { margin-top: 0; }

.note-next {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  max-width: 1180px;
  margin: clamp(56px, 8vw, 110px) auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(122, 173, 255, .18);
}
.note-next a { display: grid; gap: 6px; padding: 6px 0; color: var(--text-1); }
.note-next span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); }
.note-next strong { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 2rem); letter-spacing: .03em; text-transform: uppercase; transition: color 240ms var(--ease-out); }
.note-next a:hover strong, .note-next a:focus-visible strong { color: var(--note); }

.note-footer { padding: 26px var(--gutter); border-top: 1px solid rgba(122, 173, 255, .14); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--text-3); }

@media (max-width: 820px) {
  .note-hero { grid-template-columns: minmax(0, 1fr); }
  .note-orb { order: -1; width: min(62vw, 300px); margin: 0 auto; }
  .note-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
  .note-next { grid-template-columns: minmax(0, 1fr); }
  .note-header__brand img { height: 28px; }
  .note-nav { gap: 4px 18px; }
}

@media (forced-colors: active) {
  .note-orb { display: none; }
}
@media print {
  .note-orb, .note-nav, .note-next { display: none !important; }
  .note-title, .note-body h2, .note-body p, .note-body li, .note-lede, .note-facts dd { color: #000 !important; }
}
