@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root {
  --green: #14382b;
  --green-deep: #0c2119;
  --copper: #b5651d;
  --copper-light: #d98a45;
  --gold: #e3a72e;
  --paper: #f2efe6;
  --paper-warm: #ece5d6;
  --ink: #16201b;
  --ink-soft: #4b544c;
  --line: #d8d2c2;
  --radius: 10px;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--copper); }
img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--green);
  color: #eef2ee;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}
.site-header .logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-header .logo .accent { color: var(--gold); }
.site-header nav { display: flex; gap: 22px; align-items: center; }
.site-header nav a {
  color: #cfd8cf;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.site-header nav a:hover { color: #fff; }
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 6px 14px;
}
.search-box input {
  background: none;
  border: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  width: 160px;
}
.search-box input::placeholder { color: #9fab9f; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--green) 0%, var(--green-deep) 100%);
  color: #f2efe6;
  padding: 64px 0 76px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 18px;
  max-width: 720px;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p.lede {
  font-size: 18px;
  color: #cfd8cf;
  max-width: 560px;
  margin: 0 0 32px;
}
.hero-search {
  display: flex;
  max-width: 560px;
  background: #fff;
  border-radius: 999px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 15px;
  border-radius: 999px;
}
.hero-search button {
  background: var(--copper);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0 24px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
}

/* footpath / trail motif used as a decorative header signature */
.trail {
  position: absolute;
  right: -60px;
  top: -20px;
  width: 380px;
  height: 380px;
  opacity: 0.14;
  z-index: 1;
}

/* ---------- Category grid (homepage) ---------- */
.section { padding: 56px 0; }
.section-heading {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 6px;
}
.section-sub { color: var(--ink-soft); margin: 0 0 32px; font-size: 15px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.cat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(20,56,43,0.1); }
.cat-card .eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
  display: block;
  margin-bottom: 10px;
}
.cat-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin: 0 0 8px;
}
.cat-card p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ---------- Article cards ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.article-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
}
.article-card .thumb { aspect-ratio: 16/10; background: var(--paper-warm); overflow: hidden; }
.article-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.article-card .cat-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--copper);
  margin-bottom: 8px;
}
.article-card h4 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 8px;
  line-height: 1.3;
}
.article-card p.summary { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 14px; flex: 1; }
.meta-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--paper-warm);
  color: var(--ink-soft);
  padding: 3px 9px;
  border-radius: 999px;
}

/* ---------- Article page ---------- */
.article-header { padding: 48px 0 28px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 13px; color: var(--ink-soft); margin-bottom: 16px; }
.breadcrumb a { color: var(--ink-soft); }
.article-header h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin: 0 0 16px;
}
.article-header .summary { font-size: 17px; color: var(--ink-soft); max-width: 640px; }

.meta-strip {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.meta-strip strong { color: var(--ink); display: block; font-size: 13px; margin-bottom: 2px; font-family: var(--font-body); }

.disclaimer-banner {
  background: #fbeadd;
  border-left: 4px solid var(--copper);
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 14px;
  color: #6b3f1d;
  margin: 24px 0;
}

.article-body-wrap { padding: 40px 0 60px; display: grid; grid-template-columns: minmax(0,1fr) 260px; gap: 48px; }
.article-body {
  font-size: 17px;
  line-height: 1.75;
  max-width: 680px;
  /* footpath motif: dashed trail down the left of the content connecting steps */
  border-left: 2px dashed var(--copper-light);
  padding-left: 28px;
}
.article-body h2 { font-family: var(--font-display); font-size: 24px; margin: 36px 0 14px; }
.article-body h3 { font-family: var(--font-display); font-size: 19px; margin: 28px 0 12px; }
.article-body p { margin: 0 0 18px; }
.article-body img, .article-body picture { border-radius: 8px; margin: 22px 0; }
.article-body a { text-decoration underline; }
.article-body iframe { border-radius: 8px; margin: 22px 0; max-width: 100%; }
.article-body ul, .article-body ol { padding-left: 22px; margin: 0 0 18px; }
.article-body blockquote {
  margin: 24px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--gold);
  font-style: italic;
  color: var(--ink-soft);
}

.article-sidebar { font-size: 13.5px; }
.sidebar-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.sidebar-block h5 { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--copper); margin: 0 0 12px; }
.tag-pill { display: inline-block; background: var(--paper-warm); color: var(--ink-soft); padding: 3px 10px; border-radius: 999px; font-size: 12px; margin: 0 6px 6px 0; text-decoration: none; }

.feedback-cta { text-align: center; }
.feedback-cta a.btn { display: inline-block; margin-top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--copper);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
}
.btn:hover { background: #9a5518; }
.btn-outline { background: transparent; border: 1.5px solid var(--green); color: var(--green); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-deep); color: #a9b3a9; padding: 44px 0 30px; font-size: 13.5px; margin-top: 40px; }
.site-footer a { color: #cfd8cf; }
.site-footer .cols { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }

/* ---------- External link warning modal ---------- */
.leaving-modal-backdrop {
  position: fixed; inset: 0; background: rgba(12,33,25,0.6);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.leaving-modal-backdrop.open { display: flex; }
.leaving-modal {
  background: #fff; border-radius: 12px; padding: 28px; max-width: 380px; text-align: center;
}
.leaving-modal p { color: var(--ink-soft); font-size: 14px; word-break: break-all; }
.leaving-modal .actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }

@media (max-width: 860px) {
  .article-body-wrap { grid-template-columns: 1fr; }
  /* Collapse the category links on mobile, but keep search reachable —
     search is the primary way people find a guide on a small screen. */
  .site-header .wrap { flex-wrap: wrap; row-gap: 10px; }
  .site-header nav { display: flex; width: 100%; order: 3; }
  .site-header nav a { display: none; }
  .search-box { width: 100%; }
  .search-box input { width: 100%; }
}
