/* receipt-md: a dark counter with paper on it. Receipts are the only bright things on the page. */
:root {
  --bg: #111316;
  --bg-2: #181b1f;
  --line: #2a2e34;
  --paper: #f3f4f0;
  --ink: #eceae4;
  --muted: #9ea3ab;
  --accent: #ff6a3d;
  --accent-ink: #1a0d08;
  --focus: #ffd23f;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --text: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
}

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; inset-inline-start: 12px; top: -64px; background: var(--focus); color: #111; padding: 10px 16px; z-index: 10; font-weight: 700; border-radius: 4px; }
.skip:focus { top: 12px; }

.top { position: relative; z-index: 3; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; flex-wrap: wrap; }
.wordmark { font-family: var(--mono); font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.wordmark::before { content: ""; width: 14px; height: 18px; background: var(--paper); clip-path: polygon(0 0, 100% 0, 100% 100%, 83% 90%, 67% 100%, 50% 90%, 33% 100%, 17% 90%, 0 100%); }
.nav { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--accent); }

section { padding: clamp(64px, 9vw, 120px) 0; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .08em; color: var(--accent); text-transform: uppercase; }
.section-lede { color: var(--muted); margin-top: 16px; max-width: 58ch; font-size: 19px; }

/* Hero */
.hero { padding-top: clamp(28px, 5vw, 64px); padding-bottom: clamp(40px, 6vw, 80px); overflow-x: clip; background: radial-gradient(70% 60% at 78% 40%, #232830 0%, transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5vw, 70px); margin-top: 18px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 21px; color: var(--muted); margin-top: 26px; max-width: 46ch; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; padding: 14px 24px; border-radius: 999px; font-weight: 700; font-size: 17px; border: 2px solid var(--accent); }
.btn:hover { background: var(--paper); border-color: var(--paper); color: #111; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.one-liner { margin-top: 28px; }
.one-liner code { display: block; background: var(--bg-2); border: 1px solid var(--line); padding: 12px 14px; border-radius: 10px; overflow-wrap: anywhere; color: var(--ink); }
.one-liner code::before { content: "$ "; color: var(--accent); }

.fan { position: relative; height: clamp(440px, 50vw, 680px); }
.fan a { position: absolute; bottom: 0; display: block; transition: transform .25s ease; }
.fan img { height: 100%; width: auto; max-width: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)) drop-shadow(0 28px 36px rgba(0,0,0,.55)); }
.fan .f1 { left: 0; height: 74%; transform: rotate(-7deg); transform-origin: bottom center; }
.fan .f2 { left: 30%; height: 100%; z-index: 2; transform: rotate(1.5deg); transform-origin: bottom center; }
.fan .f3 { right: 0; height: 84%; transform: rotate(7deg); transform-origin: bottom center; }
.fan a:hover { transform: translateY(-10px) rotate(0deg); z-index: 3; }

/* Paper sizes */
.formats { background: var(--bg-2); border-block: 1px solid var(--line); }
.format-row { display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end; margin-top: 48px; }
.format-row figure { margin: 0; }
.format-row img { height: clamp(300px, 34vw, 440px); width: auto; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)) drop-shadow(0 22px 30px rgba(0,0,0,.5)); }
.format-row figcaption { margin-top: 18px; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.format-row figcaption b { color: var(--ink); display: block; font-size: 16px; }
.format-also { margin-top: 36px; color: var(--muted); max-width: 62ch; }

/* How it works */
.steps { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 18px; }
.steps li::before { content: "0" counter(step); font-family: var(--mono); color: var(--accent); font-size: 14px; display: block; margin-bottom: 10px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 17px; }
.ask { margin: 40px 0 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; font-weight: 500; max-width: 34ch; border-inline-start: 4px solid var(--accent); padding-inline-start: 22px; }

/* The maths */
.maths-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 44px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.facts li { color: var(--muted); font-size: 17px; border-inline-start: 2px solid var(--line); padding-inline-start: 18px; }
.facts b { display: block; color: var(--ink); font-size: 19px; margin-bottom: 2px; }
.term { background: #0a0b0d; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.65; color: #cfd2d6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.term + .term { margin-top: 16px; }
.term .p { color: var(--accent); }
.term .bad { color: #ff8a8a; }
.term .ok { color: #8fe3b0; }
.term .dim { color: #7a7f87; }

/* Themes */
.themes-band { background: var(--bg-2); border-block: 1px solid var(--line); }
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 36px 28px; margin-top: 52px; align-items: end; }
.themes figure { margin: 0; }
.themes a.shot { display: block; }
.themes img { width: 100%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)) drop-shadow(0 20px 26px rgba(0,0,0,.5)); transition: transform .25s ease; }
.themes a.shot:hover img { transform: translateY(-8px); }
.themes figcaption { margin-top: 20px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.themes figcaption b { display: block; font-family: var(--mono); color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* Examples */
.examples { list-style: none; margin: 44px 0 0; padding: 0; border-top: 1px solid var(--line); }
.examples li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto; gap: 8px 32px; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.examples h3 { font-size: 22px; }
.examples p { color: var(--muted); font-size: 16px; }
.examples .meta { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.examples a.view { font-weight: 700; }

/* Install */
.install { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.install pre { margin: 12px 0 0; background: #0a0b0d; border: 1px solid var(--line); color: #e8e8e4; padding: 16px 18px; border-radius: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.note { color: var(--muted); margin-top: 24px; font-size: 16px; }

.foot { border-top: 1px solid var(--line); padding: 48px 0 72px; font-size: 16px; color: var(--muted); }
.foot-row { display: grid; gap: 12px; }

.lost { min-height: 60vh; display: flex; align-items: center; }
.lost h1 { font-size: clamp(38px, 6vw, 72px); margin-top: 14px; }

@media (max-width: 960px) {
  .hero-grid, .maths-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .steps, .install { grid-template-columns: minmax(0, 1fr); }
  .examples li { grid-template-columns: minmax(0, 1fr); }
  .examples .meta { white-space: normal; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  .nav { gap: 16px; }
  .lede { font-size: 19px; }
  .fan .f1 { left: -4%; }
  .fan .f3 { right: -4%; }
  .format-row { gap: 32px; }
}
