/* ============================================================
   Agile Field Guide — site stylesheet
   Editorial design system: Fraunces (serif) + Inter (sans)
   The umbrella hub. Warm-gold neutral accent + per-card
   sister-site palettes (terracotta / green / blue / orange).
   ============================================================ */

:root {
  /* Shared family neutrals (same across all 5 sites, but AFG runs
     true near-black ink instead of the navy used by sister sites). */
  --bg: #F5EFE6;
  --surface: #FBF7F1;
  --ink: #1A1A1A;          /* near-black */
  --ink-soft: #3A3A3A;
  --ink-muted: #6A6A6A;
  --rule: #E2D9C8;
  --rule-soft: #ECE4D4;

  /* Monochrome accent — true ink black for the umbrella site */
  --accent:      #1A1A1A;
  --accent-deep: #000000;
  --accent-soft: #E2D9C8;   /* uses --rule cream for soft hovers */

  --serif: 'Spectral', 'Iowan Old Style', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shell: 1440px;
  --pad-x: clamp(16px, 2vw, 32px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 1vw, 17px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a {
  color: var(--accent-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 0.2s, color 0.2s;
}
a:hover { color: var(--accent); border-bottom-color: var(--accent); }

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

/* ---------- Brand strip ---------- */
.brand-strip { height: 4px; background: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid rgba(245, 239, 230, 0.1);
}
.site-header__inner {
  max-width: var(--shell); margin: 0 auto;
  padding: 12px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(34px, 3.4vw, 46px);
  color: var(--bg); border: none;
  letter-spacing: -0.02em; line-height: 1; white-space: nowrap;
}
.brand sup { font-size: 0.45em; font-weight: 500; margin-left: 2px; vertical-align: super; line-height: 0; }
.brand:hover { color: var(--accent-soft); border: none; }

.site-search { display: flex; align-items: stretch; gap: 8px; }
.site-search input {
  width: clamp(160px, 22vw, 280px);
  padding: 8px 14px;
  font-family: var(--sans); font-size: 14px;
  color: var(--ink); background: #fff;
  border: 1px solid rgba(245, 239, 230, 0.3); border-radius: 4px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-search input:focus { border-color: var(--bg); box-shadow: 0 0 0 3px rgba(245, 239, 230, 0.2); }
.site-search input::placeholder { color: var(--ink-muted); }
.site-search button {
  padding: 8px 18px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  color: var(--bg); background: transparent;
  border: 1px solid rgba(245, 239, 230, 0.6); border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.site-search button:hover { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ---------- Page shell ---------- */
.page { max-width: var(--shell); margin: 0 auto; padding: 0 var(--pad-x); width: 100%; }
.page--narrow { max-width: 920px; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(28px, 4vw, 56px) 0 clamp(20px, 3vw, 36px);
  text-align: center;
}
.hero__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(40px, 6.2vw, 84px);
  line-height: 1.02; letter-spacing: -0.03em;
  color: var(--ink); margin-bottom: 22px;
  max-width: 1000px; margin-left: auto; margin-right: auto;
}
.hero__dek {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(19px, 1.9vw, 25px);
  line-height: 1.4; color: var(--ink-soft);
  max-width: 760px; margin: 0 auto 14px;
}
.hero__sub {
  font-family: var(--sans);
  font-size: clamp(15px, 1.05vw, 17px);
  color: var(--ink-soft);
  max-width: 720px; margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Generic prose block (used between sections) ---------- */
.prose {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(24px, 3vw, 40px) 0;
}
.prose p { color: var(--ink); margin: 0 0 18px; font-size: clamp(15.5px, 1.05vw, 17px); line-height: 1.75; }
.prose p:last-child { margin-bottom: 0; }

/* ---------- Section block ---------- */
.section-block { padding: clamp(40px, 5vw, 72px) 0; }
.section-block--soft { background: var(--surface); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.section-block--ink { background: var(--ink); color: var(--bg); }

.section-heading {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.15; letter-spacing: -0.02em;
  color: var(--ink); text-align: center;
  margin-bottom: 14px;
}
.section-block--ink .section-heading { color: var(--bg); }
.section-heading::after {
  content: ''; display: block;
  width: 56px; height: 2px; background: var(--accent);
  margin: 18px auto 0;
}
.section-block--ink .section-heading::after { background: var(--accent-soft); }
.section-dek {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-soft); text-align: center;
  max-width: 760px; margin: 0 auto 36px;
  line-height: 1.45;
}
.section-block--ink .section-dek { color: rgba(245, 239, 230, 0.78); }

/* ---------- Hub cards (sister-site grid) ---------- */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 8px 0 0;
}
@media (max-width: 1024px) { .hub-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .hub-grid { grid-template-columns: 1fr; } }

.hub-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: 26px 24px 24px;
  color: var(--ink);
  text-decoration: none;
  text-align: center;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--ink);
  border-top-color: var(--ink);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.hub-card__title {
  font-family: var(--serif); font-weight: 600;
  font-size: 22px; line-height: 1.2; letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 12px;
}
.hub-card__dek {
  font-size: 14.5px; line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 22px;
  flex: 1;
}
.hub-card__cta {
  margin-top: auto;
  display: block;
  padding: 12px 16px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  transition: background 0.2s, color 0.2s;
}
.hub-card:hover .hub-card__cta {
  background: var(--ink);
  color: var(--bg);
}

/* Monochrome variant — all cards use the same ink accent. */

/* ---------- Progression strip (replaces the connected-resources image) ---------- */
.progression {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(10px, 1.6vw, 22px);
  flex-wrap: wrap;
  margin: 32px auto 12px;
  text-align: center;
  max-width: 980px;
}
.progression__step {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(16px, 1.6vw, 22px);
  color: var(--ink);
  border-bottom: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.2s;
}
.progression__step:hover { color: var(--ink-muted); border-bottom: none; }
.progression__arrow {
  color: var(--ink);
  font-weight: 700;
  font-size: clamp(16px, 1.6vw, 22px);
}
.progression__caption {
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-soft);
  font-size: clamp(14.5px, 1.1vw, 16px);
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- Pull quote ---------- */
.pullquote {
  margin: 0 auto;
  padding: 48px 44px 36px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  position: relative;
  max-width: 760px;
  text-align: center;
}
.pullquote__mark {
  display: block;
  font-family: var(--serif);
  font-size: 80px;
  line-height: 0.4;
  color: var(--rule);
  text-align: center;
  margin-bottom: 8px;
  pointer-events: none;
}
.pullquote__text {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(20px, 1.9vw, 26px);
  line-height: 1.4; color: var(--ink);
  margin-bottom: 18px; letter-spacing: -0.005em;
  text-align: center;
}
.pullquote__cite {
  display: block;
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--ink-muted); font-style: normal;
  text-align: center;
}
.pullquote__cite a { color: var(--ink-muted); border-bottom: 1px solid var(--rule); }
.pullquote__cite a:hover { color: var(--accent-deep); border-bottom-color: var(--accent); }

/* ---------- Newsletter signup ---------- */
.newsletter { max-width: 640px; margin: 0 auto; }
.newsletter__form {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; align-items: stretch;
  margin: 22px 0 14px;
}
.newsletter__input {
  flex: 1 1 280px;
  min-width: 0;
  padding: 12px 16px;
  font-family: var(--sans); font-size: 15px;
  color: var(--ink); background: #fff;
  border: 1px solid var(--rule); border-radius: 4px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.newsletter__input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.newsletter__input::placeholder { color: var(--ink-muted); }
.newsletter__btn {
  flex: 0 0 auto;
  padding: 12px 28px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--bg); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.newsletter__btn:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  transform: translateY(-1px);
}
.newsletter__note { font-size: 12.5px; color: var(--ink-muted); text-align: center; margin: 0; }
.newsletter__logo { margin-top: 36px; text-align: center; }
.newsletter__logo img {
  max-height: 130px;
  width: auto;
  mix-blend-mode: multiply;
  opacity: 0.92;
}

/* ---------- Search page ---------- */
.search-hero { padding: clamp(40px, 6vw, 72px) 0 clamp(24px, 4vw, 36px); text-align: center; }
.search-hero h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.02em; line-height: 1.1; color: var(--ink);
  margin-bottom: 14px;
}
.search-hero p {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--ink-soft); max-width: 640px; margin: 0 auto;
}
.search-mount { padding: 24px 0 64px; max-width: 880px; margin: 0 auto; }
/* Re-skin Google CSE to match the editorial style */
.gsc-control-cse {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  font-family: var(--sans) !important;
}
.gsc-search-button-v2 {
  background-color: var(--ink) !important;
  border-color: var(--ink) !important;
  padding: 9px 20px !important;
  border-radius: 4px !important;
}
.gsc-search-button-v2:hover { background-color: var(--accent-deep) !important; border-color: var(--accent-deep) !important; }
.gsc-input-box { border-color: var(--rule) !important; border-radius: 4px !important; }
input.gsc-input { background: #fff !important; font-family: var(--sans) !important; }
.gsc-webResult.gsc-result { border-color: var(--rule) !important; }
.gs-title b, .gs-title { font-family: var(--serif) !important; color: var(--ink) !important; }
.gsc-url-top { color: var(--ink-muted) !important; }

/* ---------- Error pages ---------- */
.error-hero { text-align: center; padding: clamp(56px, 8vw, 96px) 0 clamp(24px, 4vw, 40px); }
.error-hero__code {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(72px, 12vw, 160px);
  line-height: 1; letter-spacing: -0.04em;
  color: var(--accent);
  margin-bottom: 8px;
}
.error-hero__title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em; color: var(--ink);
  margin-bottom: 18px;
}
.error-hero__quip {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(17px, 1.4vw, 21px);
  color: var(--ink-soft); max-width: 620px; margin: 0 auto 32px;
}
.error-hero__image { max-width: 480px; margin: 8px auto 32px; }
.error-hero__image img {
  width: 100%; height: auto;
  border-radius: 6px;
  mix-blend-mode: multiply;
}
.error-hero__back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--bg); background: var(--accent);
  border: 1px solid var(--accent); border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}
.error-hero__back:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--bg); border-bottom-color: var(--accent-deep); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(245, 239, 230, 0.78);
  padding: 40px var(--pad-x) 36px;
  margin-top: 0;
  text-align: center;
}
.site-footer__inner { max-width: 720px; margin: 0 auto; }
.site-footer__tagline { font-size: 15px; color: var(--bg); letter-spacing: 0.01em; margin-bottom: 12px; }
.site-footer__social { display: flex; justify-content: center; gap: 18px; margin-bottom: 12px; }
.site-footer__social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  color: rgba(245, 239, 230, 0.8);
  font-size: 18px;
  border: none; border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}
.site-footer__social a:hover { color: var(--accent-soft); background: rgba(245, 239, 230, 0.08); border: none; }
.site-footer__byline { font-size: 14px; color: rgba(245, 239, 230, 0.72); }
.site-footer__byline a { color: rgba(245, 239, 230, 0.9); border: none; }
.site-footer__byline a:hover { color: var(--accent-soft); border: none; }

.site-footer__umbrella { margin-top: 32px; margin-bottom: 10px; }
.site-footer__umbrella a {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(24px, 2.4vw, 30px);
  color: var(--bg); border: none;
  letter-spacing: -0.01em; line-height: 1.1;
}
.site-footer__umbrella a:hover { color: var(--accent-soft); border: none; }
.site-footer__umbrella sup { font-size: 0.45em; font-weight: 500; margin-left: 2px; vertical-align: super; line-height: 0; }

.site-footer__sites { font-size: 14px; color: rgba(245, 239, 230, 0.85); line-height: 1.7; }
.site-footer__sites a { color: rgba(245, 239, 230, 0.85); border: none; white-space: nowrap; }
.site-footer__sites a:hover { color: var(--accent-soft); border: none; }
.site-footer__sep { color: rgba(245, 239, 230, 0.4); margin: 0 8px; }

.site-footer__legal { margin-top: 28px; font-size: 12.5px; color: rgba(245, 239, 230, 0.6); line-height: 1.7; }
.site-footer__legal sup { font-size: 0.8em; vertical-align: super; line-height: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 560px) {
  .site-header__inner { gap: 12px; padding: 14px var(--pad-x); flex-wrap: wrap; justify-content: center; }
  .brand { font-size: 20px; }
  .site-search input { width: clamp(140px, 60vw, 240px); }
  .pullquote { padding: 28px 22px 28px 48px; }
  .pullquote__mark { font-size: 64px; top: 30px; left: 14px; }
  .site-footer { padding: 36px 22px 28px; }
  .progression { padding: 18px 14px; gap: 8px; }
  .progression__arrow { display: none; }
}
