/* One system for every page (2026-11-24, design review: one world, one type system, one motion idea).
   Cream and ink, red the only accent. Instrument Serif for headings, Switzer for text, one size scale.
   One radius, one easing. The case films on Home keep their clients' colours; nothing else brings its own.
   The one motion idea is the pen llama drawing itself in the Home hero. */

@font-face{font-family:"Instrument Serif";src:url("fonts/InstrumentSerif-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Instrument Serif";src:url("fonts/InstrumentSerif-Italic.woff2") format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"Switzer";src:url("fonts/Switzer-Regular.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Switzer";src:url("fonts/Switzer-Medium.woff2") format("woff2");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Switzer";src:url("fonts/Switzer-Semibold.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}

:root {
  /* colour: one ground, one ink, one accent */
  --paper: #f5efe3;
  --card: #fbf8f1;
  --sunk: #ebe3d4;
  --ink: #1e1914;
  --muted: #5c5249;
  --line: rgba(30, 25, 20, 0.16);
  --accent: #be3418;
  --accent-deep: #9f2b13;
  --on-ink: #f3eee2;
  --on-ink-muted: #c9c0b3;
  --on-ink-line: rgba(243, 238, 226, 0.2);

  /* type: two faces, six steps */
  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-text: "Switzer", system-ui, sans-serif;
  --fs-display: clamp(3rem, 1.6rem + 5.2vw, 6.5rem);
  --fs-h2: clamp(2.25rem, 1.6rem + 2.4vw, 4rem);
  --fs-h3: clamp(1.375rem, 1.15rem + 0.8vw, 1.875rem);
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem);
  --fs-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --fs-small: 0.875rem;

  /* space, shape, motion */
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --stack: clamp(2rem, 1.25rem + 2.5vw, 3.5rem);
  --r: 6px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --shadow: 0 1px 2px rgba(30, 25, 20, 0.08), 0 12px 32px -16px rgba(30, 25, 20, 0.3);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font-family: var(--font-text); font-size: var(--fs-body); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- type ---------- */
h1, h2, h3, .t-display, .t-h2, .t-h3 { margin: 0; font-family: var(--font-display); font-weight: 400; text-wrap: balance; }
/* no widows or orphans: text never ends on a lone word, headings break evenly (assets/unorphan.js measures each last line and rebalances any shorter than a third) */
p, li, dd, dt, blockquote, figcaption, .lead { text-wrap: pretty; }
h4, h5, h6 { text-wrap: balance; }
h1, .t-display { font-size: var(--fs-display); line-height: 0.98; letter-spacing: -0.02em; }
h2, .t-h2 { font-size: var(--fs-h2); line-height: 1.02; letter-spacing: -0.015em; }
h3, .t-h3 { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -0.005em; }
/* emphasis inside a heading is the heading's own voice; the red italic is kept for the Home headline only */
:is(h1, h2, h3, .t-display, .t-h2, .t-h3) em { font-style: normal; color: inherit; }
em.accent { font-style: italic; color: var(--accent); }
.lead { font-size: var(--fs-lead); line-height: 1.4; text-wrap: pretty; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); line-height: 1.45; }
.prose { max-width: 38em; text-wrap: pretty; }

/* ---------- layout ---------- */
.wrap { width: min(100%, 90rem); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section + .section { border-top: 1px solid var(--line); }
.section__head { display: grid; gap: 1rem; margin-bottom: var(--stack); }

/* ---------- controls: one button shape, one link ---------- */
.btn, .foot .foot__book { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 3rem; padding: 0 1.5rem; border: 0; border-radius: var(--r); background: var(--ink); color: var(--paper); font: inherit; font-size: 1.0625rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: background-color 0.2s var(--ease); }
.btn:is(:hover, :focus-visible) { background: var(--accent); }
.btn svg { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--accent, .foot .foot__book { background: var(--accent); color: #fff; }
.btn--accent:is(:hover, :focus-visible), .foot .foot__book:is(:hover, :focus-visible) { background: var(--accent-deep); }
.link { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 500; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.3em; }
.link:hover { text-decoration-color: currentColor; }

/* ---------- top: the name, linking home, and the site's links (2026-11-24) ----------
   Fixed on its own cream ground, so it reads over the ink and blue scenes. It slides away while you read down and
   returns the moment you scroll up (assets/top.js). On Home it lies over the hero. The name is always in it (2026-11-24). Two links, Me and Me & AI, at every size (2026-11-24). */
:root { --top-h: 3.75rem; }
@media (min-width: 48rem) { :root { --top-h: 4.5rem; } }
.top { position: fixed; inset: 0 0 auto; z-index: 60; height: var(--top-h); background: var(--paper); color: var(--ink); border-bottom: 1px solid transparent; transition: transform 0.4s var(--ease), border-color 0.2s linear; }
.top.is-away { transform: translateY(-100%); }
.top.is-scrolled { border-bottom-color: var(--line); }
.top:not(.top--over) + main { padding-top: var(--top-h); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; height: 100%; }
/* the name reads LAMA THE LLAMA: set in capitals, spaced like the name label in the Home hero (2026-11-24) */
.top__home { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0.16em; line-height: 1; text-transform: uppercase; text-decoration: none; }
.top__nav { margin-left: auto; }
.top__nav ul { display: flex; align-items: center; gap: 0 1.75rem; margin: 0; padding: 0; list-style: none; }
.top__nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1rem; font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 0.35em; transition: text-decoration-color 0.2s var(--ease); }
.top__nav a:hover, .top__nav a[aria-current="page"] { text-decoration-color: var(--accent); }
@media (max-width: 47.99rem) { .top__nav ul { gap: 0 1.25rem; } }
@media (prefers-reduced-motion: reduce) { .top { transition: none; } }

/* ---------- footer: the one ink band ---------- */
.foot { background: var(--ink); color: var(--on-ink); padding: clamp(3rem, 2rem + 4vw, 5.5rem) var(--gutter) max(1.25rem, env(safe-area-inset-bottom)); }
.foot a { color: inherit; }
.foot :focus-visible { outline-color: var(--on-ink); }
.foot__top, .foot__bottom { display: grid; gap: 2.5rem; width: min(100%, 90rem); margin-inline: auto; padding-inline: var(--gutter); }
.foot__top { padding-inline: 0; }
.foot__ask { margin: 0; max-width: 14em; font-size: var(--fs-h2); line-height: 1.02; }
.foot .foot__book { margin-top: 1.5rem; }
.foot__cols { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; align-items: center; }
.foot__cols h3 { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot nav ul { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.foot nav a { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.125rem; text-decoration-color: var(--on-ink-muted); text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.foot nav a:hover { text-decoration-color: var(--on-ink); }
.foot ul.foot__icons { display: flex; gap: 0.5rem; }
.foot__icons a { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: var(--r); transition: background-color 0.2s var(--ease); }
.foot__icons a:is(:hover, :focus-visible) { background: rgba(243, 238, 226, 0.12); }
.foot__icons svg { width: 2rem; height: 2rem; overflow: visible; fill: none; stroke: var(--on-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.foot__icons .dot { fill: var(--on-ink); stroke: none; }
.foot__bottom { grid-template-columns: minmax(0, 1fr); margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); padding: 1.25rem 0 0; border-top: 1px solid var(--on-ink-line); color: var(--on-ink-muted); font-size: var(--fs-small); }
.foot__bottom p { display: flex; align-items: center; gap: 0.75rem; }
.foot__llama { width: 2.25rem; height: 2.75rem; flex: none; fill: none; stroke: var(--on-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.foot__llama .e { fill: var(--on-ink); stroke: none; }
.foot__llama .t { display: none; }
@media (min-width: 56rem) {
  .foot__top { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 4rem; }
  .foot__cols { justify-content: flex-end; }
}

/* ---------- back to top (2026-11-24): one round cream button (it reads on the cream pages and on the ink footer), bottom right, shown once you are well down the page (assets/top.js) ---------- */
.to-top { position: fixed; right: max(var(--gutter), env(safe-area-inset-right)); bottom: max(var(--gutter), env(safe-area-inset-bottom)); z-index: 55;
  display: grid; place-items: center; width: 3rem; height: 3rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(0.75rem);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.25s, background-color 0.2s var(--ease); }
.to-top.is-on { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:is(:hover, :focus-visible) { border-color: var(--accent); background: var(--accent); color: #fff; }
.to-top svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* the footer's last row keeps clear of it */
.foot__bottom { padding-right: 4rem; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; } }
