/* ============================================================
   PARACORD CENTRAL — paracordcentral.org
   Outdoor / artisan magazine design system
   Palette : deep olive khaki + burnt orange + cream paper
   ============================================================ */

:root {
  --ink: #232a1f;
  --ink-soft: #4c5346;
  --olive-900: #262e22;
  --olive-800: #333d2e;
  --olive-700: #414d39;
  --olive-500: #66725a;
  --olive-300: #a9b199;
  --olive-100: #e3e6da;
  --orange-600: #c9601a;
  --orange-500: #e2711d;
  --orange-300: #f0a35c;
  --orange-100: #fbe6d2;
  --cream: #f6f3ea;
  --paper: #fffdf7;
  --line: #dcd7c8;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(35, 42, 31, .10);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

a { color: #a04e0d; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #82430c; }

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

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.01em;
  color: var(--olive-900);
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }

p { margin: 0 0 1.2em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #a04e0d;
  margin: 0 0 14px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--orange-500);
}

.lead {
  font-size: 1.16rem;
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(38, 46, 34, .96);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--orange-500);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
  text-decoration: none;
  padding: 5px 0;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  letter-spacing: .01em;
  line-height: 1.05;
}
.brand-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--orange-300);
}

.main-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.main-nav a {
  color: var(--cream);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 9px 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { color: var(--orange-300); border-bottom-color: var(--orange-500); }

@media (max-width: 860px) {
  .main-nav { display: none; }
}

/* ---------- Hero (home) ---------- */

.hero {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  background: var(--olive-900);
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(75deg, rgba(24, 29, 20, .93) 0%, rgba(24, 29, 20, .78) 34%, rgba(24, 29, 20, .18) 68%, rgba(24, 29, 20, .05) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 74px; }
.hero h1 { color: var(--cream); max-width: 15ch; }
.hero h1 em { font-style: italic; color: var(--orange-300); }
.hero .lead { color: rgba(246, 243, 234, .85); }
.hero .eyebrow { color: var(--orange-300); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  text-decoration: none;
  transition: transform .15s ease, background .15s ease;
}
.btn-primary { background: #b4530a; color: #fff; }
.btn-primary:hover { background: #9c4408; color: #fff; transform: translateY(-2px); }
.btn-ghost { border: 2px solid rgba(246, 243, 234, .55); color: var(--cream); }
.btn-ghost:hover { border-color: var(--orange-300); color: var(--orange-300); }

@media (max-width: 720px) {
  .hero { min-height: 520px; }
  .hero-img { object-position: 70% center; }
}

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-head { max-width: 640px; margin-bottom: 40px; }

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* Cards */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(35, 42, 31, .05);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-body { padding: 26px 26px 24px; display: flex; flex-direction: column; flex: 1; }
.card-kicker {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #a04e0d;
  margin-bottom: 8px;
}
.card h3 { margin-bottom: 8px; font-size: 1.28rem; }
.card p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 16px; }
.card-more { margin-top: auto; font-weight: 700; font-size: .88rem; text-decoration: none; }
.card-more:hover { text-decoration: underline; }

.card-visual {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    repeating-linear-gradient(45deg, rgba(102, 114, 90, .08) 0 12px, transparent 12px 24px),
    linear-gradient(150deg, var(--olive-100), var(--paper));
  border-bottom: 1px solid var(--line);
}
.card-visual svg { width: 62%; height: auto; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Article layout ---------- */

.article { padding: 56px 0 72px; }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); } }

.article-header { max-width: 720px; margin-bottom: 36px; }
.article-header h1 { margin-bottom: 18px; }
.meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: .875rem;
  color: var(--olive-500);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.meta span::before { content: "—"; margin-right: 8px; color: var(--orange-500); }
.meta span:first-child::before { content: none; margin: 0; }

.prose { max-width: 720px; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-collapse: collapse; font-size: .92rem; margin: 1.4em 0; }
.prose th {
  text-align: left;
  background: var(--olive-800);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: .875rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 10px 14px;
}
.prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.prose tr:nth-child(even) td { background: #faf8f0; }

/* Sidebar / TOC */

.toc {
  position: sticky;
  top: 90px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.toc h2 {
  font-family: var(--font-body);
  font-size: .875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--olive-500);
  margin-bottom: 12px;
}
.toc ol { margin: 0; padding-left: 18px; font-size: .9rem; }
.toc li { margin-bottom: 7px; }
.toc a { display: inline-block; color: var(--ink-soft); text-decoration: none; padding: 6px 0; }
.toc a:hover { color: #a04e0d; }

@media (max-width: 960px) { .toc { display: none; } }

/* ---------- Steps (tutorials) ---------- */

.steps { counter-reset: step; margin: 1.6em 0; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px dashed var(--line);
}
.step:first-child { border-top: 0; }
.step-num {
  counter-increment: step;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--olive-800);
  color: #f0a35c;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-num::before { content: counter(step); }
.step h3 { margin-bottom: 6px; font-size: 1.15rem; }
.step p { margin-bottom: 0; font-size: .98rem; }
.step-diagram { margin-top: 16px; }

/* Diagram panels */
.diagram {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.panel {
  background:
    radial-gradient(circle at 22% 18%, rgba(226, 113, 29, .06), transparent 55%),
    var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 14px 8px;
}
.panel svg { width: 100%; height: auto; display: block; }
.panel figcaption {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--olive-500);
  text-align: center;
  padding: 8px 0 4px;
}
@media (max-width: 620px) { .diagram { grid-template-columns: 1fr; } }

/* ---------- Callouts ---------- */

.callout {
  border-left: 4px solid var(--orange-500);
  background: var(--orange-100);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 1.6em 0;
}
.callout strong { color: #a04e0d; }
.callout p:last-child { margin-bottom: 0; }

.note {
  border-left: 4px solid var(--olive-500);
  background: var(--olive-100);
  border-radius: 0 10px 10px 0;
  padding: 18px 22px;
  margin: 1.6em 0;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- Hero band (article top visual) ---------- */

.page-hero img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.figure-caption { font-size: .875rem; color: var(--olive-500); margin-top: 8px; font-style: italic; }

/* ---------- Feature strip ---------- */

.stats {
  background: var(--olive-800);
  color: var(--cream);
  padding: 40px 0;
}
.stats .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  text-align: center;
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--orange-300);
}
.stat span { font-size: .875rem; letter-spacing: .08em; text-transform: uppercase; color: var(--olive-300); }
@media (max-width: 720px) { .stats .wrap { grid-template-columns: repeat(2, 1fr); } }

/* ---------- CTA band ---------- */

.cta-band {
  background:
    linear-gradient(rgba(38, 46, 34, .92), rgba(38, 46, 34, .92)),
    repeating-linear-gradient(45deg, rgba(226, 113, 29, .12) 0 14px, transparent 14px 28px);
  color: var(--cream);
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { color: var(--cream); }
.cta-band p { color: var(--olive-300); max-width: 52ch; margin: 0 auto 26px; }

/* ---------- Related / prev-next ---------- */

.related { background: var(--olive-100); border-top: 1px solid var(--line); }
.prevnext {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin: 44px 0 0;
}
.prevnext a {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 20px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: .95rem;
}
.prevnext a:hover { border-color: var(--orange-500); }
.prevnext small {
  display: block;
  font-size: .875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--olive-500);
  margin-bottom: 4px;
}
@media (max-width: 620px) { .prevnext { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--olive-900);
  color: var(--olive-300);
  padding: 56px 0 32px;
  margin-top: 0;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 {
  color: var(--cream);
  font-family: var(--font-body);
  font-size: .875rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 2px; }
.site-footer a { display: inline-block; color: var(--olive-300); text-decoration: none; font-size: .92rem; padding: 8px 0; }
.site-footer a:hover { color: var(--orange-300); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand svg { width: 38px; height: 38px; }
.footer-brand span {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--cream);
}
.footer-desc { font-size: .92rem; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid rgba(233, 230, 218, .14);
  margin-top: 44px;
  padding-top: 22px;
  font-size: .875rem;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Utility ---------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0; }
.tag {
  font-size: .875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--olive-700);
  background: var(--olive-100);
  border-radius: 999px;
  padding: 4px 12px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #b4530a;
  color: #fff;
  padding: 10px 18px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }
