/* =========================================================================
   jessewilson.us — quiet, contemplative, single-column.
   One humanist serif (Newsreader), self-hosted. Earthy palette.
   ========================================================================= */

/* ---- Self-hosted serif (Latin subset, variable weight 400–600) ---------- */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/newsreader-roman.woff2') format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/newsreader-italic.woff2') format('woff2');
}

/* ---- Tokens ------------------------------------------------------------- */
:root {
  --ink:    #24303a;   /* primary text — soft blue-slate near-black */
  --paper:  #f6f1e7;   /* warm sand/paper background */
  --teal:   #46626f;   /* muted blue-teal — links, quiet accents */
  --gold:   #c6963f;   /* amber — used sparingly */
  --forest: #3f4f43;   /* deep green — secondary */
  --frost:  #dfe7ea;   /* pale panels / dividers */
  --border: #d8cfc0;   /* hairline borders */
  --teal-strong: #35505c; /* darker teal for AA link contrast on paper */

  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Palatino,
           'Georgia', 'Times New Roman', serif;

  --measure: 40rem;     /* ~66 char comfortable reading measure */
  --measure-wide: 52rem;
  --pad: clamp(1.25rem, 5vw, 2.5rem);
}

/* ---- Reset-ish ---------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;            /* ~19px */
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (max-width: 40rem) {
  body { font-size: 1.125rem; line-height: 1.65; }
}

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

h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.6em;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2rem, 6vw, 2.85rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1.35em; }
a { color: var(--teal-strong); text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
a:hover { color: var(--gold); }

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem auto;
  max-width: 4rem;
}

/* ---- Skip link ---------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---- Layout ------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--pad);
}
.wrap--wide { max-width: var(--measure-wide); }

main { display: block; }
.section { padding-block: clamp(2.5rem, 7vw, 5rem); }
.section--tight { padding-block: clamp(1.5rem, 4vw, 2.5rem); }

/* ---- Header / nav ------------------------------------------------------- */
.site-header {
  padding: 1.6rem 0 0.4rem;
}
.site-header .wrap {
  max-width: var(--measure-wide);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink); }

.site-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
}
.site-nav a {
  text-decoration: none;
  color: var(--teal-strong);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-block: 0.25rem;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

/* ---- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  width: 100%;
}
.hero__img {
  width: 100%;
  height: clamp(58vh, 62vh, 40rem);
  object-fit: cover;
  object-position: center 42%;
}
.hero--tall .hero__img { height: clamp(62vh, 72vh, 44rem); }

.hero__caption {
  text-align: center;
  padding: 2.75rem var(--pad) 0.5rem;
}
.hero__wordmark {
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  font-weight: 500;
  letter-spacing: 0.01em;
  margin: 0;
}
.tagline {
  font-style: italic;
  color: var(--teal);
  font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  margin: 0.4rem 0 0;
}

/* ---- Page intro / eyebrow ---------------------------------------------- */
.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.9rem;
}
.lede {
  font-size: clamp(1.2rem, 3vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink);
}
.prose :is(h2, h3) { margin-top: 2.2rem; }
.prose blockquote {
  margin: 1.8rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--border);
  font-style: italic;
  color: var(--teal-strong);
}

/* ---- Writing index ------------------------------------------------------ */
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry {
  padding: 1.9rem 0;
  border-bottom: 1px solid var(--border);
}
.entry:first-child { padding-top: 0.5rem; }
.entry a { text-decoration: none; color: inherit; display: block; }
.entry a:hover .entry__title { color: var(--gold); }
.entry__title { font-size: 1.5rem; margin: 0 0 0.15rem; font-weight: 500; }
.entry__meta {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.5rem;
}
.entry__sub { margin: 0; color: var(--ink); }
.entry__kind { color: var(--teal); }

/* ---- Writing detail ----------------------------------------------------- */
.piece__meta {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.4rem;
}
.piece__hero {
  width: 100%;
  max-height: 26rem;
  object-fit: cover;
  border-radius: 2px;
  margin: 0 0 2.2rem;
}
/* Poetry: preserve authored whitespace exactly */
.poem {
  white-space: pre-wrap;
  font-size: 1.2rem;
  line-height: 1.6;
  /* keep leading spaces/indentation from collapsing at line starts */
  tab-size: 2;
}
.poem em, .prose em { font-style: italic; }

.piece-note {
  margin-top: 2.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--border);
  font-size: 0.98rem;
  font-style: italic;
  color: var(--teal-strong);
  line-height: 1.6;
}

.external-link {
  display: inline-block;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

/* ---- The Work: offerings ------------------------------------------------ */
.offering {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}
.offering:last-of-type { border-bottom: 0; }
.offering__head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.5rem 1rem;
  margin-bottom: 0.5rem;
}
.offering__head h2 { margin: 0; }
.readiness {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--teal-strong);
  white-space: nowrap;
}
.readiness--ready { border-color: var(--forest); color: var(--forest); }
.readiness--emerging { color: var(--teal); }

.note-panel {
  background: var(--frost);
  border-radius: 3px;
  padding: 1.5rem var(--pad);
  margin: 2.5rem 0;
}
.note-panel p:last-child { margin-bottom: 0; }

/* ---- Quiet call to conversation ---------------------------------------- */
.invite {
  text-align: center;
  padding-block: 1rem 0;
}
.invite a { font-size: 1.15rem; }

/* ---- Contact form ------------------------------------------------------- */
.form-field { margin-bottom: 1.4rem; }
.form-field label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-strong);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.7rem 0.85rem;
  line-height: 1.5;
}
.form-field textarea { min-height: 9rem; resize: vertical; }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--teal); outline-offset: 1px; }

/* honeypot — visually and semantically hidden from people, present for bots */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

.btn {
  font-family: var(--serif);
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--paper);
  background: var(--teal-strong);
  border: 1px solid var(--teal-strong);
  border-radius: 3px;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
}
.btn:hover { background: var(--forest); border-color: var(--forest); }

.form-note {
  padding: 1rem 1.2rem;
  border-radius: 3px;
  margin-bottom: 1.8rem;
  font-size: 1rem;
}
.form-note--ok { background: var(--frost); border: 1px solid var(--border); }
.form-note--err { background: #f4e3d6; border: 1px solid var(--gold); color: #7a4d16; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--border);
  padding-block: 2.4rem 3rem;
  color: var(--teal);
  font-size: 0.9rem;
}
.site-footer .wrap {
  max-width: var(--measure-wide);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem 1.5rem;
}
.site-footer a { color: var(--teal-strong); }
.site-footer .footer-word {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ---- Utility ------------------------------------------------------------ */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---- Motion: gentle fade only, and only if allowed --------------------- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fade 0.9s ease both; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}
