/* BLOF — Bel's Library of Friends
   Naturalist field-guide system. See SPEC.md → Design direction. */

:root {
  --ink: #2e3a2c;
  --ink-soft: #4a5a48;
  --fern: #6b8464;
  --fern-light: #93ac8a;
  --fern-pale: #c9d6bc;
  --paper: #f0f1e6;
  --paper-deep: #e3e7d3;
  --card: #fbfbf4;
  --amber: #c6873f;
  --amber-deep: #a96f2e;
  --stream: #7fa3a8;
  --bark: #5c4b3a;

  --font-display: "Young Serif", "Iowan Old Style", Georgia, serif;
  --font-body: "Alegreya Sans", "Gill Sans", system-ui, sans-serif;
  --font-hand: "Caveat", cursive;

  --measure: 62ch;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1em; }
a { color: var(--amber-deep); }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- specimen label (structural motif) ---------- */
.label {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fern);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.label::after {
  content: "";
  height: 1px;
  width: 3.5rem;
  background: var(--fern-light);
}

.hand {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.25;
  color: var(--bark);
  rotate: -1.5deg;
}

/* ---------- header ---------- */
.site-head {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand span { color: var(--fern); }
.site-nav { display: flex; gap: clamp(0.9rem, 2.5vw, 1.8rem); flex-wrap: wrap; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.site-nav a:hover { border-bottom-color: var(--amber); color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(#eef2e2 0%, #f3f0da 45%, #eaeccd 100%);
}
.hero-scene {
  position: absolute;
  inset: auto 0 0 0;
  width: 100%;
  height: min(62vh, 620px);
  display: block;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(5rem, 14vh, 8rem) 1.25rem 34vh;
  max-width: 46rem;
}
.hero-eyebrow {
  justify-content: center;
}
.hero-eyebrow::before {
  content: "";
  height: 1px;
  width: 3.5rem;
  background: var(--fern-light);
}
.hero h1 {
  font-size: clamp(2.6rem, 7.5vw, 4.6rem);
  margin: 0.25em 0 0.35em;
}
.hero h1 em {
  font-style: normal;
  color: var(--fern);
}
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-inline: auto;
}
.hero-when {
  font-weight: 700;
  color: var(--ink);
  margin: 1.1rem 0 1.6rem;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}
.hero-when .dot { color: var(--amber); padding: 0 0.4em; }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--card);
  background: var(--amber);
  border: none;
  border-radius: 999px;
  padding: 0.85rem 2.1rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--amber-deep);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 0 var(--amber-deep); }
.btn-quiet {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--fern-light);
}
.btn-quiet:hover { box-shadow: inset 0 0 0 2px var(--fern); }

.hero-note {
  margin-top: 1.4rem;
  display: inline-block;
}

/* fireflies */
.firefly {
  fill: #f4d47c;
  opacity: 0;
  animation: drift 9s ease-in-out infinite;
}
.firefly:nth-of-type(2) { animation-delay: 2.2s; animation-duration: 11s; }
.firefly:nth-of-type(3) { animation-delay: 4.1s; animation-duration: 8s; }
.firefly:nth-of-type(4) { animation-delay: 5.7s; animation-duration: 12s; }
.firefly:nth-of-type(5) { animation-delay: 1.3s; animation-duration: 10s; }
@keyframes drift {
  0%   { opacity: 0; transform: translate(0, 0); }
  20%  { opacity: 0.9; }
  50%  { opacity: 0.35; transform: translate(-18px, -26px); }
  80%  { opacity: 0.8; }
  100% { opacity: 0; transform: translate(10px, -48px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .firefly { animation: none; opacity: 0.5; }
  .btn { transition: none; }
}

/* ---------- sections ---------- */
.section {
  padding: clamp(3.5rem, 9vw, 6rem) clamp(1.25rem, 5vw, 3rem);
  max-width: 68rem;
  margin-inline: auto;
}
.section h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.section-intro { max-width: var(--measure); color: var(--ink-soft); }

/* the idea */
.idea-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.idea-aside {
  background: var(--paper-deep);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
}
.idea-aside .hand { font-size: 1.5rem; margin: 0; }
@media (max-width: 760px) {
  .idea-grid { grid-template-columns: 1fr; }
}

/* entry cards */
.entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.entry {
  background: var(--card);
  border: 1px solid var(--fern-pale);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.2rem;
  position: relative;
  rotate: -0.4deg;
}
.entry:nth-child(even) { rotate: 0.4deg; }
.entry-no {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fern);
  margin-bottom: 0.5rem;
}
.entry h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.entry p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }
.entry .hand {
  position: absolute;
  top: -0.9rem;
  right: 0.9rem;
  font-size: 1.15rem;
  color: var(--amber-deep);
}

/* trail timeline */
.trail { list-style: none; margin: 2rem 0 0; padding: 0; }
.trail li {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 1.25rem;
  padding: 0.9rem 0;
  border-bottom: 1px dashed var(--fern-pale);
  align-items: baseline;
}
.trail li:last-child { border-bottom: none; }
.trail .when {
  font-weight: 700;
  color: var(--bark);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.trail .what strong { color: var(--ink); }
.trail .what { color: var(--ink-soft); }
@media (max-width: 560px) {
  .trail li { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* closing cta */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: clamp(3.5rem, 8vw, 5.5rem) 1.5rem;
}
.cta-band h2 { color: var(--card); font-size: clamp(1.7rem, 4vw, 2.3rem); }
.cta-band p { color: var(--fern-pale); max-width: 38rem; margin: 0 auto 1.75rem; }
.cta-band .label { color: var(--fern-light); justify-content: center; }
.cta-band .label::after { background: var(--fern); }

/* footer */
.site-foot {
  text-align: center;
  padding: 2rem 1.5rem 2.5rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
  background: var(--ink);
  color: var(--fern-pale);
}
.site-foot .hand { color: var(--fern-light); font-size: 1.25rem; }
