/* markwj.com: a field notebook from the dig site.
   Colours and fonts live here. Change a colour once and it changes everywhere. */

:root {
  --paper: #f6f1e6;
  --paper-deep: #efe7d6;
  --card: #fffdf8;
  --ink: #1f2433;
  --ink-soft: #4a5166;
  --rule: #ddd3bf;
  --grid: rgba(31, 36, 51, 0.055);
  --ochre: #b0661c;
  --ochre-soft: #f3dfc4;
  --sage: #5e7a5a;
  --sage-soft: #dfe8d8;
  --rust: #a8432f;
  --rust-soft: #f3d9d1;
  --sky: #3f6d8c;
  --sky-soft: #d9e6ef;
  --postit: #f8e58c;
  --postit-edge: #e9cf5c;

  --serif-display: "Fraunces", Georgia, serif;
  --serif: "Literata", Georgia, serif;
  --hand: "Caveat", "Bradley Hand", cursive;
  --mono: "Spline Sans Mono", ui-monospace, monospace;

  --wrap: 1080px;
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1e27;
    --paper-deep: #232733;
    --card: #262a36;
    --ink: #f1eadb;
    --ink-soft: #c2bba9;
    --rule: #3a3f4d;
    --grid: rgba(241, 234, 219, 0.045);
    --ochre: #e0a05a;
    --ochre-soft: #3d3022;
    --sage: #9dbd97;
    --sage-soft: #28352a;
    --rust: #e08a74;
    --rust-soft: #3d2622;
    --sky: #8db8d6;
    --sky-soft: #1f2f3b;
    --postit: #e9d474;
    --postit-edge: #cdb550;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration-color: var(--ochre); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ochre); }

:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--card); padding: 8px 12px; z-index: 10; }

/* ---------- Header ---------- */
.site-header { padding: 22px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif-display); font-weight: 600; font-size: 22px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand:hover { color: var(--ink); }
.brand:hover .trowel { transform: rotate(-18deg); }
.trowel { transition: transform 0.3s ease; transform-origin: 70% 70%; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--mono); font-size: 14px; }
.nav a { text-decoration: none; padding: 6px 12px; border-radius: 99px; }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav a:hover { background: var(--ochre-soft); color: var(--ink); }
.nav a.nav-cta { border: 1.5px solid var(--ink); }

/* ---------- Type helpers ---------- */
h1, h2, h3 { font-family: var(--serif-display); font-weight: 600; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6.4vw, 72px); }
h2 { font-size: clamp(30px, 4.2vw, 44px); }
h3 { font-size: 23px; }
p { margin: 0 0 1em; }
.label { font-family: var(--mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ochre); margin-bottom: 14px; display: block; }
.hand { font-family: var(--hand); font-size: 1.35em; line-height: 1.1; color: var(--ochre); }
.lede { font-size: 21px; color: var(--ink-soft); max-width: 36em; }
em.mark { font-style: normal; background: linear-gradient(transparent 58%, var(--ochre-soft) 58%); padding: 0 2px; }

section { padding: 64px 0; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 15px; font-weight: 500; text-decoration: none; padding: 13px 22px; border-radius: 99px; border: 2px solid var(--ink); background: var(--ink); color: var(--paper); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.btn:hover { color: var(--paper); transform: translateY(-2px); box-shadow: 0 4px 0 var(--ochre); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero h1 .hand { display: block; font-size: 0.5em; margin-bottom: 10px; transform: rotate(-2deg); transform-origin: left; }
.hero .lede { margin-bottom: 30px; }

.notebook-page { position: relative; background: var(--card); border: 1.5px solid var(--rule); border-radius: var(--radius); padding: 28px 28px 26px 48px; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(31, 36, 51, 0.35); transform: rotate(1.2deg); }
.notebook-page::before { content: ""; position: absolute; left: 30px; top: 0; bottom: 0; border-left: 2px solid var(--rust-soft); }
.notebook-page .tape { position: absolute; top: -14px; left: 50%; width: 110px; height: 28px; margin-left: -55px; background: rgba(243, 223, 196, 0.85); transform: rotate(-3deg); }
.notebook-page h3 { font-size: 20px; margin-bottom: 12px; }
.notebook-page ul { list-style: none; padding: 0; margin: 0; }
.notebook-page li { padding: 9px 0; border-bottom: 1px dashed var(--rule); font-size: 16px; display: flex; gap: 10px; }
.notebook-page li:last-child { border-bottom: 0; }
.notebook-page li .tick { color: var(--sage); font-weight: 700; flex: none; }
.notebook-page li s { color: var(--ink-soft); text-decoration-color: var(--rust); text-decoration-thickness: 2px; }
.notebook-page .hand { display: block; margin-top: 14px; font-size: 24px; transform: rotate(-1.5deg); }

/* ---------- Strata strip (a nod to the old layers site) ---------- */
.strata { height: 34px; display: grid; grid-template-rows: repeat(4, 1fr); }
.strata span:nth-child(1) { background: var(--ochre-soft); }
.strata span:nth-child(2) { background: var(--ochre); opacity: 0.55; }
.strata span:nth-child(3) { background: var(--rust); opacity: 0.45; }
.strata span:nth-child(4) { background: var(--ink); opacity: 0.8; }

/* ---------- Flagship (Unearthed Pages) ---------- */
.flagship { background: var(--paper-deep); border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); }
.flagship-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; }
.flagship h2 { margin-bottom: 18px; }
.swap { display: grid; gap: 10px; margin: 26px 0 8px; }
.swap-row { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: center; gap: 8px; font-size: 16px; }
.swap-row .old { font-family: var(--mono); font-size: 14px; color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--rust); text-decoration-thickness: 2px; }
.swap-row .arrow { color: var(--ochre); text-align: center; font-weight: 700; }
.swap-row .new { font-weight: 500; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.feature { background: var(--card); border: 1.5px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; }
.feature b { display: block; font-family: var(--serif-display); font-size: 18px; margin-bottom: 4px; }
.feature p { font-size: 15.5px; color: var(--ink-soft); margin: 0; line-height: 1.5; }
.margin-note { font-family: var(--hand); font-size: 24px; color: var(--rust); transform: rotate(-2deg); margin-top: 22px; line-height: 1.2; }

/* ---------- How I help ---------- */
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 34px; }
.help-card { background: var(--card); border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 26px 24px; box-shadow: 5px 5px 0 var(--ink); }
.help-card .num { font-family: var(--mono); font-size: 13px; color: var(--ochre); }
.help-card h3 { margin: 6px 0 10px; }
.help-card p { font-size: 16px; color: var(--ink-soft); }
.help-card .eg { font-family: var(--mono); font-size: 13px; color: var(--ink); border-top: 1px dashed var(--rule); padding-top: 12px; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 30px; counter-reset: step; }
.step { padding-left: 52px; position: relative; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ochre); color: var(--ochre); font-family: var(--serif-display); font-weight: 600; display: grid; place-items: center; }
.step h3 { font-size: 20px; margin-bottom: 6px; }
.step p { font-size: 16px; color: var(--ink-soft); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.9fr 1.4fr; gap: 56px; align-items: start; }
.about-grid h2 { margin-bottom: 10px; }
.about-grid .hand { font-size: 26px; display: block; transform: rotate(-2deg); }
.about-text p { font-size: 18px; }

/* ---------- Find cards (projects) ---------- */
.finds-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 13.5px; }
.filters button { font: inherit; cursor: pointer; padding: 7px 14px; border-radius: 99px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filters button:hover { background: var(--ochre-soft); color: var(--ink); }

.finds { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.find { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--rule); border-radius: var(--radius); padding: 22px 22px 18px; text-decoration: none; color: var(--ink); transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
a.find:hover { color: var(--ink); transform: translateY(-3px) rotate(-0.4deg); border-color: var(--ink); box-shadow: 5px 6px 0 var(--ink); }
.find[hidden] { display: none; }
.find-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.find-no { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.06em; }
.find-icon { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px; font-size: 26px; }
.find h3 { font-size: 21px; margin-bottom: 8px; }
.find p { font-size: 15.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 14px; }
.find .made-with { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--rule); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.find .go { color: var(--ochre); font-weight: 500; }

.stamp { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border: 1.5px solid currentColor; border-radius: 4px; transform: rotate(-3deg); white-space: nowrap; }
.stamp.live { color: var(--sage); }
.stamp.daily { color: var(--sky); }
.stamp.draft { color: var(--rust); }
.stamp.private { color: var(--ink-soft); }

.tint-ochre { background: var(--ochre-soft); }
.tint-sage { background: var(--sage-soft); }
.tint-rust { background: var(--rust-soft); }
.tint-sky { background: var(--sky-soft); }

.find.flag { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 26px; border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--ochre); padding: 28px; }
.find.flag .find-icon { width: 84px; height: 84px; font-size: 40px; grid-row: span 4; }
.find.flag h3 { font-size: 28px; }
.find.flag p { font-size: 17px; max-width: 46em; }
.find.flag .find-top { grid-column: 2; }
.find.flag .made-with { grid-column: 2; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact h2 { margin-bottom: 14px; }
.contact .lede { margin: 0 auto 28px; }
.contact .hand { display: block; margin-top: 18px; font-size: 24px; }

/* ---------- Post-it ---------- */
.postit { position: fixed; right: 18px; bottom: 18px; z-index: 5; width: 150px; padding: 14px 14px 16px; background: var(--postit); border-bottom: 3px solid var(--postit-edge); color: #3a3220; font-family: var(--hand); font-size: 22px; line-height: 1.1; text-decoration: none; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, 0.45); transform: rotate(3deg); transition: transform 0.2s ease; }
.postit:hover { transform: rotate(0deg) translateY(-4px); color: #3a3220; }
.postit small { display: block; font-family: var(--mono); font-size: 11px; margin-top: 8px; opacity: 0.75; }

/* ---------- Footer ---------- */
.site-footer { padding: 40px 0 120px; font-family: var(--mono); font-size: 13.5px; color: var(--ink-soft); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1.5px solid var(--rule); padding-top: 24px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Little find (easter egg) ---------- */
.dug { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: 14px; padding: 12px 18px; border-radius: 10px; max-width: calc(100vw - 32px); opacity: 0; visibility: hidden; transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s; z-index: 6; }
.dug.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Phones ---------- */
@media (max-width: 860px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  section { padding: 48px 0; }
  .hero { padding: 16px 0 48px; }
  .hero-grid, .flagship-grid, .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .notebook-page { transform: rotate(0.6deg); }
  .help-grid, .steps { grid-template-columns: 1fr; }
  .feature-list { grid-template-columns: 1fr; }
  .finds { grid-template-columns: 1fr; }
  .find.flag { grid-template-columns: 1fr; padding: 22px; }
  .find.flag .find-icon { grid-row: auto; width: 64px; height: 64px; font-size: 30px; }
  .find.flag .find-top, .find.flag .made-with { grid-column: 1; }
  .postit { width: auto; right: 12px; bottom: 12px; font-size: 19px; padding: 10px 12px; }
  .postit small { display: none; }
  .lede { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Screenshots on the find cards ---------- */
.find-shot { width: calc(100% + 44px); max-width: none; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; margin: -22px -22px 18px; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1.5px solid var(--rule); background: var(--paper-deep); }
.find.flag .find-shot { grid-column: 1 / -1; width: calc(100% + 56px); margin: -28px -28px 22px; aspect-ratio: 16 / 7; }
.find.flag .find-icon { grid-row: span 3; }
@media (max-width: 860px) {
  .find.flag .find-shot { width: calc(100% + 44px); margin: -22px -22px 18px; aspect-ratio: 16 / 10; }
}
.find-shot ~ .find-icon { display: none; }
.find.flag:has(.find-shot) { display: flex; flex-direction: column; }

/* ---------- Calmer (2026-11-30): softer type, no hard shadows, fewer buttons ---------- */
h1 { font-weight: 400; font-size: clamp(36px, 5vw, 58px); line-height: 1.15; }
h2 { font-weight: 400; }
.hero { padding: 56px 0 88px; }
.hero h1 { max-width: 15em; }
section { padding: 80px 0; }
.lede { line-height: 1.7; }
.quiet-links { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; font-family: var(--mono); font-size: 15px; margin-top: 8px; }
.quiet-links span { color: var(--ink-soft); }
.aside { margin-top: 30px; color: var(--ink-soft); font-style: italic; font-size: 16.5px; }
.btn:hover { transform: none; box-shadow: none; opacity: 0.85; }
.btn.ghost { border-width: 1.5px; }
.notebook-page { transform: rotate(0.6deg); box-shadow: 0 14px 34px -26px rgba(31, 36, 51, 0.35); }
.help-grid { margin-top: 38px; }
.help-card { border: 1.5px solid var(--rule); box-shadow: none; }
.help-card h3 { margin: 0 0 10px; font-weight: 400; }
.feature b { font-weight: 400; }
.find h3 { font-weight: 400; }
a.find:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -20px rgba(31, 36, 51, 0.4); border-color: var(--rule); }
.find.flag { border: 1.5px solid var(--rule); box-shadow: none; }
.stamp { transform: none; border-width: 1px; font-weight: 400; }
.strata { height: 14px; opacity: 0.7; }
.postit { transform: rotate(2deg); font-size: 20px; width: 132px; opacity: 0.95; }
.postit small { display: none; }
@media (max-width: 860px) {
  .hero { padding: 24px 0 56px; }
  section { padding: 56px 0; }
}
#help h2, .finds-head + * h2 { margin-bottom: 16px; }

/* ---------- Simple home (2026-11-30): one narrow column, small type, little text ---------- */
.narrow { max-width: 680px; }
.simple section { padding: 56px 0; border-top: 1px solid var(--rule); }
.simple section.intro { border-top: 0; padding: 72px 0 64px; }
.simple .intro h1 { font-size: clamp(28px, 3.6vw, 36px); line-height: 1.25; max-width: none; margin: 6px 0 18px; }
.simple .intro .hand { font-size: 26px; margin: 0; transform: none; }
.simple h2 { font-size: 24px; margin-bottom: 12px; }
.simple p { color: var(--ink-soft); }
.simple .quiet-links { gap: 22px; margin-top: 22px; }
.simple .swap { margin: 20px 0 0; }
.simple .swap-row { grid-template-columns: 9em 24px 1fr; }
.plain-list { margin: 0; padding-left: 1.1em; color: var(--ink-soft); }
.plain-list li { margin: 4px 0; }
.simple .contact { text-align: left; }
.simple .contact a { font-family: var(--mono); font-size: 16px; }
.hero h1 { font-size: clamp(28px, 3.6vw, 36px); } .hero h1 .hand { font-size: 26px; transform: none; }
.portrait { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; object-position: 50% 30%; margin-bottom: 22px; border: 3px solid var(--card); box-shadow: 0 8px 22px -14px rgba(31, 36, 51, 0.5); }
