/* Big Red Pen — site styles
   Palette echoes biodiversityresearchlab.com (pale sage paper),
   with forest ink and an editing red. */

:root {
  --paper: #f4f6ea;
  --leaf: #e4ead3;
  --rule: #c9d2b4;
  --ink: #18241c;
  --ink-soft: #3f4d42;
  --moss: #4e6045;
  --red: #b3131b;
  --red-ink: #b3131b;
  --on-red: #ffffff;
  --card: #fbfcf5;

  --font-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --font-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;

  --measure: 68ch;
  --wrap: 72rem;
  --radius-pill: 999px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #141b16;
    --leaf: #1d2720;
    --rule: #34423a;
    --ink: #e8ecdd;
    --ink-soft: #b8c2b0;
    --moss: #a9bd96;
    --red: #e5484d;
    --red-ink: #ff6b6f;
    --on-red: #1a0506;
    --card: #19211b;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

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

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

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

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

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

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 700;
}
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.35rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 4.25rem; flex-wrap: wrap;
}
.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 800; font-size: 1.35rem;
  letter-spacing: -0.03em; text-decoration: none;
}
.wordmark svg { width: 1.6rem; height: 1.6rem; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; align-items: center; }
.site-nav a { text-decoration: none; font-size: 1rem; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  font-size: 1rem; line-height: 1.2;
  padding: .85rem 1.4rem; border-radius: var(--radius-pill);
  border: 2px solid var(--ink); background: var(--ink); color: var(--paper);
}
.btn:hover { background: var(--red); border-color: var(--red); color: var(--on-red); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--small { padding: .55rem 1rem; font-size: .95rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem); }
.hero .wrap {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: center;
}
.hero h1 {
  font-size: clamp(2.9rem, 8.2vw, 6.25rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.02;
  margin-bottom: .25em;
}
.struck { position: relative; display: inline-block; white-space: nowrap; }
.struck svg {
  position: absolute; left: -6%; top: 38%; width: 112%; height: .45em;
  overflow: visible; pointer-events: none;
}
.struck path {
  fill: none; stroke: var(--red); stroke-width: 7; stroke-linecap: round;
  stroke-dasharray: 260; stroke-dashoffset: 0;
  animation: strike .55s .5s cubic-bezier(.6,.05,.4,1) both;
}
@keyframes strike { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }
.margin-note {
  font-family: var(--font-hand); color: var(--red-ink);
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.1;
  transform: rotate(-2.5deg); transform-origin: left center;
  margin: 0 0 1.5rem .25rem;
  animation: write .4s 1.05s ease-out both;
}
@keyframes write { from { opacity: 0; } to { opacity: 1; } }
.hero .lede { font-size: clamp(1.15rem, 1.8vw, 1.3rem); max-width: 38ch; }
.hero .lede + p { max-width: 42ch; color: var(--ink-soft); }

.hero-figure { margin: 0; justify-self: center; max-width: 26rem; width: 100%; }
.hero-figure img {
  aspect-ratio: 1; object-fit: cover; object-position: 50% 30%;
  border-radius: 50%; filter: sepia(.15) contrast(1.02);
}
.hero-figure figcaption {
  font-family: var(--font-hand); font-size: 1.45rem; color: var(--ink-soft);
  text-align: center; margin-top: .6rem; transform: rotate(-1.5deg);
}

/* ---------- sections ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section--leaf { background: var(--leaf); }
.section-intro { max-width: var(--measure); margin-bottom: 2.5rem; }
.section-intro p { color: var(--ink-soft); }

/* is / isn't */
.is-isnt { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3.5rem; }
.is-isnt ul { list-style: none; padding: 0; margin: 0; }
.is-isnt li { padding: .7rem 0 .7rem 2rem; border-top: 1px solid var(--rule); position: relative; }
.is-isnt li::before { position: absolute; left: 0; top: .65rem; font-weight: 800; font-family: var(--font-display); }
.is-list li::before { content: "✓"; color: var(--moss); }
.isnt-list li::before { content: "✕"; color: var(--red-ink); }
.isnt-list li { color: var(--ink-soft); }
.timing { margin-top: 2.5rem; max-width: var(--measure); border-left: 4px solid var(--red); padding-left: 1.25rem; }

/* packages */
.packages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.package {
  background: var(--card); border: 1px solid var(--rule); border-radius: 18px;
  padding: 1.75rem 1.5rem 1.5rem; display: flex; flex-direction: column; height: 100%;
}
.package--feature { border: 2px solid var(--ink); }
.package .for { color: var(--ink-soft); font-size: 1rem; margin-bottom: 1rem; }
.package .price { font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; letter-spacing: -0.03em; line-height: 1; margin: .25rem 0 .3rem; }
.package .price small { font-family: var(--font-body); font-size: 1rem; font-weight: 400; letter-spacing: 0; color: var(--ink-soft); }
.package ul { padding-left: 1.1rem; margin: 1rem 0 1.25rem; font-size: 1rem; }
.package li { margin-bottom: .45rem; }
.package li::marker { color: var(--red); }
.turnaround { width: 100%; border-collapse: collapse; font-size: .98rem; margin: auto 0 1.25rem; }
.turnaround caption { text-align: left; font-weight: 700; padding-bottom: .35rem; }
.turnaround th, .turnaround td { padding: .45rem 0; border-top: 1px solid var(--rule); text-align: left; font-weight: 400; }
.turnaround td { text-align: right; font-family: var(--font-display); font-variant-numeric: tabular-nums; font-weight: 700; }
.package .btn { align-self: flex-start; }
.fine-print { max-width: var(--measure); margin-top: 2.25rem; color: var(--ink-soft); font-size: 1rem; }

/* steps — a real sequence, so numbered */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 1rem; }
.steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-weight: 800; font-size: 2.2rem; color: var(--red-ink); line-height: 1; margin-bottom: .6rem; }
.steps h3 { font-size: 1.2rem; }
.steps p { font-size: 1rem; color: var(--ink-soft); }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.about img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; object-position: 50% 35%; max-width: 22rem; width: 100%; justify-self: center; }
.about-text { max-width: var(--measure); }

/* notes list */
.note-list { list-style: none; padding: 0; margin: 0; }
.note-list li { border-top: 1px solid var(--rule); }
.note-list li:last-child { border-bottom: 1px solid var(--rule); }
.note-list a { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; text-decoration: none; align-items: start; }
.note-list time { color: var(--ink-soft); font-size: .95rem; padding-top: .3rem; white-space: nowrap; }
.note-list h3 { margin-bottom: .3rem; }
.note-list a:hover h3 { color: var(--red-ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.note-list p { margin: 0; color: var(--ink-soft); font-size: 1rem; max-width: 60ch; }
.more-link { display: inline-block; margin-top: 1.5rem; font-weight: 700; }

/* contact */
.contact { max-width: var(--measure); }
.contact .email { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3.5vw, 2.1rem); letter-spacing: -0.02em; word-break: break-word; }
.contact ul { padding-left: 1.2rem; }
.contact li::marker { color: var(--red); }

/* ---------- article ---------- */
.article { padding: clamp(2.5rem, 6vw, 4.5rem) 0 4rem; }
.article-inner { max-width: var(--measure); margin-inline: auto; }
.back { display: inline-block; font-size: 1rem; margin-bottom: 2rem; }
.article h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em; }
.byline { color: var(--ink-soft); font-size: 1rem; margin-bottom: 2.25rem; }
.prose { font-size: 1.15rem; line-height: 1.68; }
.prose h2, .prose h3 { margin-top: 2em; }
.prose h3 { font-size: 1.45rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .6em; }
.prose li::marker { color: var(--red-ink); font-weight: 700; }
.prose strong { font-weight: 700; }
.prose figure { margin: 2.25rem 0; }
.prose figure img { border-radius: 12px; }
.prose figure.portrait img { max-width: 22rem; margin-inline: auto; }
.prose figcaption { font-size: .95rem; color: var(--ink-soft); margin-top: .6rem; }
.signoff { font-style: italic; color: var(--ink-soft); }
.article-cta {
  margin-top: 3.5rem; padding: 1.75rem; border-radius: 18px;
  background: var(--leaf); border-left: 6px solid var(--red);
}
.article-cta h2 { font-size: 1.6rem; }
.article-cta .btn-row { margin-top: 1rem; }

.page-head { padding: clamp(3rem, 7vw, 5rem) 0 1.5rem; }
.page-head h1 { font-size: clamp(2.6rem, 6.5vw, 4.5rem); font-weight: 800; letter-spacing: -0.04em; }
.page-head p { max-width: 58ch; color: var(--ink-soft); font-size: 1.2rem; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; font-size: 1rem; color: var(--ink-soft); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 2rem; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; padding: 0; }
.site-footer p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .packages { grid-template-columns: 1fr; max-width: 34rem; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .hero .wrap, .about { grid-template-columns: 1fr; }
  .hero-figure { max-width: 16rem; order: -1; justify-self: start; }
  .about img { max-width: 14rem; justify-self: start; }
  .is-isnt { grid-template-columns: 1fr; }
  .site-nav ul { gap: .25rem 1rem; }
  .site-nav .nav-optional { display: none; }
  .note-list a { grid-template-columns: 1fr; gap: .35rem; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .struck path, .margin-note { animation: none; }
}

@media print {
  .site-header, .site-footer, .article-cta, .back { display: none; }
  body { background: #fff; color: #000; }
}

/* ---------- contact template & copy buttons ---------- */
button.btn { cursor: pointer; font-family: inherit; }
.email .btn { vertical-align: middle; margin-left: .5rem; }
.email-text { user-select: all; }
.template {
  font-family: var(--font-body); font-size: 1rem; line-height: 1.7;
  background: var(--card); border: 1px solid var(--rule); border-radius: 12px;
  padding: 1rem 1.25rem; margin: 0 0 1rem; white-space: pre-wrap; overflow-x: auto;
}
#template-package { font-weight: 700; color: var(--red-ink); }

/* ---------- legal page ---------- */
.legal h2 { font-size: 1.5rem; margin-top: 2em; }
.legal .updated { color: var(--ink-soft); font-size: 1rem; }

/* ---------- breadcrumbs & related posts ---------- */
.crumbs { font-size: 1rem; color: var(--ink-soft); margin-bottom: 2rem; }
.crumbs a { color: var(--ink-soft); }
.related { margin-top: 3.5rem; }
.related h2 { font-size: 1.6rem; }
.related .note-list a { grid-template-columns: 1fr; gap: .25rem; padding: 1.1rem 0; }
.related .note-list h3 { font-size: 1.2rem; }
