/* Fieldguide MD: the site looks like a pocket guide. Lichen paper, spruce ink, and colour tabs on the edge. */
:root {
  --paper: #e6eadf;
  --paper-2: #dde3d4;
  --card: #f4f6ef;
  --ink: #14231d;
  --muted: #4c5e55;
  --line: #bcc6b6;
  --spruce: #0f261f;
  --lime: #c9f26b;
  --t1: #e4572e;
  --t2: #2e86ab;
  --t3: #f2a900;
  --t4: #1f9d8a;
  --t5: #8a5bd6;
  --display: "Newsreader", "Iowan Old Style", "Charter", "Palatino Linotype", Georgia, serif;
  --text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1160px;
}

*, *::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: 18px/1.6 var(--text); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--t2); outline-offset: 3px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.04; margin: 0; text-wrap: balance; letter-spacing: -.012em; }
h2 { font-size: clamp(34px, 4.6vw, 54px); }
h3 { font-size: 24px; }
p { margin: 0; }
code, pre { font-family: var(--mono); font-size: .86em; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: 12px; top: -56px; background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 30; }
.skip:focus { top: 12px; }
.label { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* Edge tabs: the section links, fixed to the right edge like a thumb index. */
.edge { position: fixed; right: 0; top: 96px; z-index: 20; display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.edge a { display: block; writing-mode: vertical-rl; padding: 14px 7px 14px 9px; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: #fff; border-radius: 6px 0 0 6px; background: var(--c); transition: padding .15s; }
.edge a:hover, .edge a:focus-visible { padding-right: 16px; }
.edge a:active { filter: brightness(.9); }
/* Tab colours are the tab palette, darkened until white text passes AA (4.5:1). */
.edge li:nth-child(1) a { --c: #b93f1c; }
.edge li:nth-child(2) a { --c: #1f6f93; }
.edge li:nth-child(3) a { --c: #167462; }
.edge li:nth-child(4) a { --c: #7447c4; }

.top { position: relative; z-index: 5; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 25px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.wordmark img { width: 30px; height: 30px; }
.top .gh { font-family: var(--mono); font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; }

section { padding: clamp(64px, 9vw, 112px) 0; }

/* Hero */
.hero { padding-top: clamp(24px, 4vw, 56px); padding-bottom: clamp(72px, 9vw, 120px); overflow-x: clip; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(42px, 5.4vw, 74px); margin-top: 18px; font-weight: 500; }
.hero h1 em { font-style: italic; color: #1d5a46; }
.lede { font-size: 20px; color: var(--muted); margin-top: 24px; max-width: 34em; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn { display: inline-block; background: var(--ink); color: var(--paper); text-decoration: none; padding: 14px 22px; border-radius: 8px; font-weight: 700; font-size: 16px; border: 2px solid var(--ink); }
.btn { transition: background-color .15s, transform .1s; }
.btn:hover { background: var(--spruce); }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--card); }
.btn-quiet:active { background: var(--paper-2); }
.one-liner { margin-top: 24px; }
.one-liner code { display: inline-block; background: var(--card); border: 1px solid var(--line); padding: 9px 12px; border-radius: 8px; overflow-wrap: anywhere; }

.fan { position: relative; aspect-ratio: 1.12 / 1; }
.fan a { position: absolute; width: 46%; background: #fff; box-shadow: 0 2px 4px rgba(20, 35, 29, .12), 0 28px 50px rgba(20, 35, 29, .24); transition: transform .25s; }
.fan a:hover { z-index: 5; }
.fan .p1 { left: 0; top: 10%; transform: rotate(-6deg); }
.fan .p2 { left: 27%; top: 0; transform: rotate(1.5deg); z-index: 2; }
.fan .p3 { right: 0; top: 14%; transform: rotate(7deg); }
.fan .p1:hover { transform: rotate(-6deg) translateY(-8px); }
.fan .p2:hover { transform: rotate(1.5deg) translateY(-8px); }
.fan .p3:hover { transform: rotate(7deg) translateY(-8px); }

/* What it does */
.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.facts { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 22px; border-top: 2px solid var(--ink); }
.facts li { padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 17px; }
.facts b { display: block; color: var(--ink); font-family: var(--display); font-size: 25px; font-weight: 500; line-height: 1.15; margin-bottom: 8px; letter-spacing: -.01em; text-wrap: balance; }
.facts .sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 9px; background: var(--c); vertical-align: 2px; }

/* How it works */
.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px 26px 28px; position: relative; min-width: 0; }
.steps li::before { content: counter(s); position: absolute; top: -18px; left: 22px; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--lime); font-family: var(--display); font-size: 22px; display: grid; place-items: center; }
.steps h3 { margin-top: 8px; }
.steps p { color: var(--muted); font-size: 16.5px; margin-top: 8px; }
.steps pre { margin: 18px 0 0; background: var(--spruce); color: #e3efe3; padding: 14px 16px; border-radius: 10px; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.steps pre b { color: var(--lime); font-weight: 500; }
.ask { margin: 40px 0 0; font-family: var(--display); font-style: italic; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; max-width: 30em; border-left: 4px solid var(--t4); padding-left: 22px; }

/* Themes */
.dark { background: var(--spruce); color: #e3efe3; }
.dark h2 { color: #fff; }
.dark .section-lede { color: #9db8a8; }
.dark a { color: #e3efe3; }
.section-lede { color: var(--muted); margin-top: 14px; max-width: 40em; font-size: 19px; }
.themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; margin-top: 48px; }
.themes figure { margin: 0; }
.themes a.shot { display: block; background: #fff; box-shadow: 0 18px 40px rgba(0, 0, 0, .4); transition: transform .2s; }
.themes a.shot:hover { transform: translateY(-6px); }
.themes figcaption { margin-top: 16px; font-size: 15px; color: #a9c2b3; line-height: 1.5; }
.themes figcaption b { display: block; font-family: var(--display); font-size: 25px; font-weight: 500; color: #fff; margin-bottom: 2px; }
.themes .name { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--lime); }
.covers { display: flex; gap: 14px; margin-top: 54px; overflow-x: auto; padding-bottom: 12px; }
.covers img { width: 130px; flex: none; box-shadow: 0 8px 22px rgba(0, 0, 0, .4); }

/* Inside a page */
.inside { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.inside figure { margin: 0; }
.inside img { box-shadow: 0 2px 4px rgba(20, 35, 29, .12), 0 28px 50px rgba(20, 35, 29, .22); }
.parts { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.parts li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 17px; }
.parts b { color: var(--ink); font-weight: 700; }
.parts .n { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--lime); font-family: var(--mono); font-size: 13px; display: grid; place-items: center; margin-top: 2px; }

/* Examples */
.examples { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.examples li { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.examples .swatch { width: 56px; height: 56px; border-radius: 12px; background: var(--c); }
.examples h3 { font-size: 27px; }
.examples p { color: var(--muted); font-size: 16px; margin-top: 4px; }
.examples .links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.examples .links a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--mono); font-size: 13px; padding: 6px 14px; border: 1px solid var(--ink); border-radius: 99px; text-decoration: none; background: var(--card); transition: background-color .15s, color .15s; }
.examples .links a:hover { background: var(--ink); color: var(--paper); }
.examples .links a:active { background: var(--spruce); color: var(--paper); }

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

.foot { background: var(--spruce); color: #a9c2b3; padding: 52px 0 64px; font-size: 16px; }
.foot a { color: #e3efe3; }
.foot-row { display: grid; gap: 12px; }
.foot .wordmark { color: #fff; }
.foot .more { margin-top: 8px; }

/* The 404 page: the footer sits at the bottom edge, so no strip of paper shows under it. */
body.page-lost { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.lost { flex: 1; display: flex; align-items: center; padding: 48px 0; }
.lost .wrap { width: 100%; }
.lost h1 { font-size: clamp(42px, 6vw, 72px); margin-top: 14px; }

@media (max-width: 1100px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .themes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .edge { display: none; }
}
@media (max-width: 900px) {
  .hero-grid, .inside { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .steps, .install { grid-template-columns: minmax(0, 1fr); }
  .fan { max-width: 560px; margin: 0 auto; width: 100%; }
  .examples li { grid-template-columns: 56px minmax(0, 1fr); }
  .examples .swatch { width: 44px; height: 44px; }
  .examples .links { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 600px) {
  .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .themes figcaption { font-size: 14px; }
}
@media (max-width: 480px) {
  body { font-size: 17px; }
  .wrap { padding: 0 20px; }
  .lede { font-size: 18px; }
  .top .gh { display: none; }
}
