/* ==========================================================================
   willshaw.io - shared design tokens and typography
   Warm, editorial, calm. Cream paper, ink text, terracotta accent.
   ========================================================================== */

:root {
  --paper: #f7f3ec;
  --paper-2: #efe8dc;
  --paper-3: #e7dece;
  --card: #fbf9f5;
  --ink: #22201c;
  --ink-2: #5a544c;        /* muted text: 6.8:1 on paper */
  --ink-3: #6b645b;        /* captions: 5.3:1 */
  --rule: #ddd3c3;
  --rule-2: #cbbfab;
  --accent: #a44a24;       /* terracotta for text and links: 5.3:1 */
  --accent-bright: #c4602f;/* decorative only */
  --accent-wash: #f3e1d4;

  /* data colours - chosen to stay distinguishable for common colour-vision differences */
  --pos: #2f7a72;          /* positive */
  --mix: #8a6519;          /* mixed (text) */
  --mix-fill: #c39532;     /* mixed (shapes) */
  --neg: #7a4e7e;          /* negative / null */
  --na: #8a8278;           /* not applicable / unknown */
  --strong: #a44a24;
  --moderate: #c39532;
  --weak: #9b948a;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Source Serif Pro", Georgia, Cambria, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 68ch;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(34, 32, 28, .06), 0 6px 24px rgba(34, 32, 28, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
  color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 650; }
small, .small { font-size: .875rem; }
code { font-family: var(--mono); font-size: .9em; background: var(--paper-2); padding: .05em .3em; border-radius: 4px; }

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

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.prose { max-width: var(--measure); }
.lede { font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.5; color: var(--ink-2); }
.eyebrow {
  font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .9rem;
}

.btn {
  display: inline-flex; align-items: center; gap: .5em;
  font: 600 .95rem/1 var(--sans); padding: .8em 1.15em; border-radius: 999px;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.small { font-size: .85rem; padding: .55em .9em; }

.site-footer {
  border-top: 1px solid var(--rule); margin-top: 5rem; padding: 2.5rem 0 3rem;
  color: var(--ink-2); font-size: .9rem;
}
.site-footer a { color: var(--ink-2); }

/* ---------- site header (shared by every page and project) ---------- */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); position: relative; z-index: 60; }
.site-header .inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 58px; }
.site-brand { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.mainnav { display: flex; align-items: center; gap: .2rem; }
.mainnav > a, .mainnav summary {
  font-size: .92rem; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: .45rem .7rem; border-radius: 8px; cursor: pointer;
}
.mainnav > a:hover, .mainnav summary:hover { background: var(--paper-2); color: var(--ink); }
.menu { position: relative; }
.menu summary { list-style: none; display: flex; align-items: center; gap: .35rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: .45rem; height: .45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.menu[open] summary { background: var(--paper-2); color: var(--ink); }
.menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 280px; list-style: none; margin: 0; padding: .4rem;
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px; box-shadow: var(--shadow);
}
.menu li a { display: block; padding: .6rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.menu li a:hover, .menu li a[aria-current] { background: var(--paper-2); }
.foot-h { font-family: var(--sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 .6rem; font-weight: 600; }

/* ---------- home ---------- */
.home-hero { padding: clamp(4rem, 12vw, 8rem) 0 3rem; }
.home-hero h1 { max-width: 16ch; }
.home-hero .lede { max-width: 44ch; }
.projects { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); margin-top: 1rem; }
.project-card { display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; }
.project-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(34,32,28,.06), 0 14px 40px rgba(34,32,28,.1); }
.project-card .art { aspect-ratio: 1200/630; background: var(--paper-2); display: block; width: 100%; height: auto; }
.project-card .body { padding: 1.4rem 1.5rem 1.6rem; }
.project-card h3 { font-size: 1.45rem; margin-bottom: .4rem; }
.project-card p { color: var(--ink-2); margin: 0 0 1rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.tags li { font-size: .78rem; border: 1px solid var(--rule-2); border-radius: 999px; padding: .2em .65em; color: var(--ink-2); }
.more { color: var(--accent); font-weight: 600; font-size: .95rem; margin-top: 1.1rem !important; }
