/* rolreborn.com: verdigris and brass on lapis. Tokens first; everything else uses them. */
:root {
  --lapis: #1f2c45;
  --lapis-deep: #162036;
  --lapis-raised: #26365299;
  --brass: #c29a4e;
  --brass-bright: #dcb76e;
  --verdigris: #5f9c8e;
  --parchment: #ede3cc;
  --muted: #9aa6b8;
  --rule: #c29a4e40;

  --display: "Cormorant Garamond", "Garamond", "Times New Roman", serif;
  --text: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.333rem;
  --step-2: 1.777rem;
  --step-3: 2.369rem;
  --step-4: clamp(2.6rem, 6vw, 4.2rem);

  --measure: 64ch;
  --gutter: clamp(1rem, 4vw, 3rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--lapis-deep); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 60% at 75% 0%, #2a3c5c 0%, transparent 70%),
    var(--lapis);
  color: var(--parchment);
  font: 400 var(--step-0)/1.6 var(--text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brass-bright); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--parchment); }
:focus-visible { outline: 2px solid var(--verdigris); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--parchment);
}
h1 { font-size: var(--step-4); font-weight: 500; }
h2 { font-size: var(--step-3); font-weight: 500; }
h3 { font-size: var(--step-1); font-family: var(--text); font-weight: 700; letter-spacing: 0; }
p, ul, ol { margin: 0 0 1em; max-width: var(--measure); }
code, kbd {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: #ffffff10;
  padding: 0.1em 0.35em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

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

/* header */
.top { padding: 1.25rem 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.mark {
  display: flex; align-items: center; gap: 0.6rem;
  font: 600 var(--step-1)/1 var(--display);
  color: var(--parchment); text-decoration: none;
}
.mark img { width: 28px; height: 28px; }
.mark span { color: var(--brass); }
.nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--parchment); }
.nav a[aria-current="page"] { box-shadow: 0 1px 0 var(--brass); }

main { flex: 1; }

/* home: the hero is the drawing and one sentence */
.hero { padding: clamp(2rem, 7vw, 6rem) 0 clamp(2rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gutter); align-items: center; }
.hero p.lede { font-size: var(--step-1); color: var(--muted); line-height: 1.5; max-width: 34ch; }
.hero img { width: 100%; height: auto; max-width: 520px; justify-self: end; }
.actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  background: var(--brass);
  color: var(--lapis-deep);
  border: 1px solid var(--brass);
}
.button:hover { background: var(--brass-bright); color: var(--lapis-deep); }
.button.quiet { background: transparent; color: var(--parchment); border-color: var(--rule); }
.button.quiet:hover { border-color: var(--brass); color: var(--parchment); }

.band { padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--rule); }

/* a real sequence, so it is numbered */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); max-width: none; counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font: 500 var(--step-3)/1 var(--display);
  color: var(--brass);
  margin-bottom: 0.5rem;
}
.steps p { color: var(--muted); }

.status { list-style: none; padding: 0; max-width: 46rem; }
.status li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 0.9rem 0; border-bottom: 1px solid var(--rule); }
.status li:last-child { border-bottom: 0; }
.status .state { color: var(--muted); }
.status .state.done { color: var(--verdigris); }

/* long-form pages */
.page { padding: clamp(1.5rem, 5vw, 4rem) 0 4rem; }
.page .wrap { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: var(--gutter); }
.page h1 { font-size: var(--step-3); }
.page h2 { font-size: var(--step-2); margin-top: 2.5rem; scroll-margin-top: 1rem; }
.page li { margin-bottom: 0.4em; }
.toc { position: sticky; top: 1.5rem; align-self: start; font-size: var(--step--1); }
.toc ol { padding-left: 1.2rem; color: var(--muted); }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--parchment); }
.note { border-left: 2px solid var(--verdigris); padding: 0.2rem 0 0.2rem 1rem; color: var(--muted); max-width: var(--measure); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0.4rem 1.5rem; margin: 1.5rem 0; max-width: var(--measure); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.foot { padding: 2.5rem 0; border-top: 1px solid var(--rule); color: var(--muted); font-size: var(--step--1); }
.foot p { max-width: 60ch; }

@media (max-width: 52rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero img { max-width: 300px; justify-self: start; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .page .wrap { grid-template-columns: 1fr; }
  .toc { display: none; }
  .status li { grid-template-columns: 1fr; gap: 0.2rem; }
}
