/* bookcover-md: a printer's proof. Uncoated paper, black ink, the four process
   colours as a registration strip, crop marks at the corners, measurements in mono. */
:root {
  --paper: #f2efe8;
  --sheet: #fbfaf6;
  --ink: #121316;
  --muted: #55565c;
  --line: #d8d3c7;
  --cyan: #009fe3;
  --magenta: #d6006f;
  --yellow: #ffd200;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --text: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 var(--text); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-color: var(--magenta); text-decoration-thickness: 2px; text-underline-offset: .2em; }
a:hover { color: var(--magenta); }
:focus-visible { outline: 3px solid var(--magenta); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.02; max-width: 20ch; }
h3 { font: 600 18px/1.3 var(--text); }
p { margin: 0; }
code, pre, kbd { font-family: var(--mono); font-size: .86em; }
kbd { border: 1px solid var(--ink); border-bottom-width: 2px; border-radius: 3px; padding: 0 .35em; background: var(--sheet); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10; }
.skip:focus { top: 12px; }
.eyebrow { font: 500 13px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--magenta); margin-bottom: 14px; }

/* Header */
.top { border-bottom: 1px solid var(--ink); background: var(--paper); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 600 16px/1 var(--mono); color: var(--ink); text-decoration: none; }
.mark { width: 22px; height: 28px; position: relative; background: linear-gradient(90deg, var(--ink) 0 22%, var(--magenta) 22% 32%, var(--ink) 32%); border-radius: 1px 3px 3px 1px; }
.mark::after { content: ""; position: absolute; left: 10px; right: 4px; top: 7px; height: 2px; background: var(--paper); box-shadow: 0 5px 0 var(--paper); }
.nav { display: flex; gap: 6px 20px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { font-size: 15px; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-decoration-color: var(--magenta); }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--ink); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; align-items: center; padding-top: 64px; padding-bottom: 72px; }
.crop { position: relative; padding: 28px; }
.crop::before, .crop::after { content: ""; position: absolute; width: 22px; height: 22px; border: 0 solid var(--ink); }
.crop::before { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.crop::after { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.hero h1 { font-size: clamp(46px, 6.6vw, 88px); line-height: .96; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--magenta); }
.lede { font-size: 20px; line-height: 1.5; color: var(--muted); margin-top: 22px; max-width: 34ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; padding: 13px 22px; font-weight: 600; font-size: 16px; border: 2px solid var(--ink); border-radius: 2px; }
.btn:hover { background: var(--magenta); border-color: var(--magenta); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.formula { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font: 500 15px/1.4 var(--mono); }
.formula span { border-bottom: 1px dashed var(--muted); }
.formula .op { border: 0; color: var(--magenta); }
.formula b { background: var(--yellow); padding: 1px 6px; font-weight: 600; }
.hero-art { position: relative; aspect-ratio: 1.05 / 1; }
.book { position: absolute; display: block; transition: transform .25s ease; }
.book:hover { transform: translateY(-8px); }
.book-1 { width: 62%; left: -6%; top: 6%; z-index: 1; }
.book-2 { width: 62%; right: -6%; top: 0; z-index: 1; }
.book-3 { width: 76%; left: 13%; top: 4%; z-index: 2; }
.colour-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 10px; display: grid; grid-template-columns: repeat(8, 1fr); }
.colour-bar i:nth-child(4n+1) { background: var(--cyan); }
.colour-bar i:nth-child(4n+2) { background: var(--magenta); }
.colour-bar i:nth-child(4n+3) { background: var(--yellow); }
.colour-bar i:nth-child(4n+4) { background: var(--ink); }

/* Sections */
main > section { padding: 88px 0; }
.band { background: var(--sheet); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-lede { color: var(--muted); max-width: 60ch; margin-top: 16px; }

.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.steps li { padding: 26px 28px 8px 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.step-no { display: block; font: 400 64px/1 var(--display); color: var(--magenta); margin-bottom: 14px; }
.steps p { color: var(--muted); margin-top: 8px; }
.ask { margin: 44px 0 0; padding: 22px 26px; background: var(--ink); color: var(--paper); font: italic 400 clamp(22px, 2.6vw, 30px)/1.3 var(--display); max-width: 40ch; border-left: 8px solid var(--yellow); }

.guides-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; }
.guides-grid p { color: var(--muted); margin-top: 16px; max-width: 46ch; }
.legend { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font: 500 14px/1.4 var(--mono); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 12px; display: inline-block; }
.l-bleed { background: rgba(255, 45, 85, .45); }
.l-trim { border: 2px solid #ff2d55; }
.l-spine { border-left: 2px dashed #0a84ff; border-right: 2px dashed #0a84ff; }
.l-safe { border: 2px dashed #00c7be; }
.l-bar { background: rgba(255, 159, 10, .35); border: 2px solid #ff9f0a; }
.proof { margin: 0; padding: 14px; background: #2a2b2e; box-shadow: 0 24px 50px rgba(18, 19, 22, .25); }

.themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.themes figure { margin: 0; display: flex; flex-direction: column; }
.themes a { display: flex; align-items: flex-end; aspect-ratio: 4 / 5; background: radial-gradient(70% 60% at 50% 45%, var(--sheet), var(--paper)); border: 1px solid var(--line); padding: 6px; }
.themes a:hover { border-color: var(--ink); }
.themes img { width: 100%; max-height: 100%; object-fit: contain; }
.themes figcaption { font-size: 15px; color: var(--muted); margin-top: 12px; }
.themes figcaption b { display: block; font: 600 16px/1.3 var(--mono); color: var(--ink); }
.themes figcaption span { display: block; font: 400 13px/1.4 var(--mono); color: var(--magenta); margin: 2px 0 6px; }

.wraps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 28px; margin-top: 40px; }
.wraps figure { margin: 0; }
.wraps a { display: block; box-shadow: 0 1px 2px rgba(18, 19, 22, .12), 0 16px 36px rgba(18, 19, 22, .16); }
.wraps a:hover { box-shadow: 0 0 0 2px var(--ink), 0 16px 36px rgba(18, 19, 22, .2); }
.wraps figcaption { margin-top: 12px; font: 400 13px/1.5 var(--mono); color: var(--muted); }
.wraps figcaption b { display: block; font: 600 15px/1.4 var(--text); color: var(--ink); }
.ebook-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: center; margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.ebook-row img { box-shadow: 0 16px 36px rgba(18, 19, 22, .2); }
.ebook-row h3 { font: 400 32px/1.1 var(--display); }
.ebook-row p { color: var(--muted); margin: 10px 0 16px; max-width: 52ch; }

pre { margin: 0; background: var(--ink); color: #f2efe8; padding: 16px 18px; border-radius: 2px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; line-height: 1.55; }
.install { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 24px; margin-top: 36px; }
.install > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.install pre { flex: 1; }
.note { color: var(--muted); margin-top: 22px; font-size: 15px; }

.foot { border-top: 1px solid var(--ink); padding: 36px 0 48px; font-size: 15px; color: var(--muted); }
.foot-row { display: flex; flex-direction: column; gap: 10px; }
.foot .wordmark { margin-bottom: 4px; }

.lost { padding: 96px 0 120px; }
.lost h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1; margin-bottom: 12px; }

@media (max-width: 1000px) {
  .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .guides-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 36px; padding-bottom: 56px; }
  .hero-art { max-width: 560px; width: 100%; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 22px 0 18px; border-left: 0; border-bottom: 1px solid var(--line); }
  .wraps { grid-template-columns: 1fr; }
  .install { grid-template-columns: 1fr; }
  main > section { padding: 64px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .crop { padding: 18px 12px; }
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .ebook-row { grid-template-columns: 1fr; }
  .ebook-row img { max-width: 220px; }
  .nav { gap: 4px 14px; }
  .nav a { font-size: 14px; }
}
