/* ============================================================
   WILDLIFEREHAB.GUIDE — Main Stylesheet
   Aesthetic: Field-guide utilitarian — earthy, structured,
   trustworthy. Like a well-worn nature journal meets a
   government form that actually makes sense.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&family=DM+Mono:ital,wght@0,400;0,500;1,400&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bark:       #2c2416;
  --soil:       #4a3728;
  --moss:       #4a5e3a;
  --moss-light: #6b8c58;
  --sage:       #8fad7a;
  --sage-pale:  #c8ddb8;
  --fern:       #d4e4c4;
  --cream:      #f5f0e8;
  --parchment:  #ede5d8;
  --amber:      #c17f3a;
  --amber-light:#e8a84e;
  --rust:       #8b3a2a;
  --sky:        #4a7fa5;
  --white:      #fdfaf5;

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Source Serif 4', Georgia, serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --max-width: 1100px;
  --content-width: 760px;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(44,36,22,0.10);
  --shadow-md: 0 4px 24px rgba(44,36,22,0.14);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--bark);
  line-height: 1.72;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--moss); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--amber); }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.content-narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Nav ───────────────────────────────────────────── */
.site-header {
  background: var(--bark);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--amber);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 64px;
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--moss);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-nav a {
  color: var(--sage-pale);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

.nav-cta {
  background: var(--moss) !important;
  color: var(--white) !important;
  font-weight: 500 !important;
}

.nav-cta:hover {
  background: var(--moss-light) !important;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cream);
  font-size: 1.4rem;
  padding: 8px;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: var(--soil);
  color: var(--cream);
  padding: 80px 24px 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(74,94,58,0.3) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(139,58,42,0.2) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--sage);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  max-width: 680px;
}

.hero h1 em {
  font-style: italic;
  color: var(--amber-light);
}

.hero-lead {
  font-size: 1.12rem;
  color: var(--parchment);
  max-width: 560px;
  margin-bottom: 36px;
  line-height: 1.65;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.18s;
}

.btn-primary {
  background: var(--amber);
  color: var(--white);
}
.btn-primary:hover { background: var(--amber-light); color: var(--bark); }

.btn-secondary {
  background: transparent;
  color: var(--cream);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.6); }

.btn-moss {
  background: var(--moss);
  color: var(--white);
}
.btn-moss:hover { background: var(--moss-light); }

/* ── Breadcrumb ─────────────────────────────────────────────── */
.breadcrumb {
  background: var(--parchment);
  border-bottom: 1px solid rgba(74,55,40,0.12);
  padding: 10px 24px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--soil);
}

.breadcrumb-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.breadcrumb a { color: var(--moss); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { color: var(--amber); }

/* ── Section Styles ─────────────────────────────────────────── */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--cream);
}

.section-dark {
  background: var(--bark);
  color: var(--cream);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--moss);
  margin-bottom: 12px;
}

.section-dark .section-label { color: var(--sage); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-lead {
  font-size: 1.05rem;
  color: var(--soil);
  max-width: 600px;
  line-height: 1.65;
}

.section-dark .section-lead { color: var(--parchment); }

/* ── State Grid ─────────────────────────────────────────────── */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 32px;
}

.state-card {
  display: block;
  background: var(--white);
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  color: var(--bark);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.15s;
  position: relative;
}

.state-card:hover {
  border-color: var(--moss);
  background: var(--fern);
  color: var(--moss);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.state-card .state-abbr {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 4px;
  text-transform: uppercase;
}

/* ── Article Cards ──────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.card {
  background: var(--white);
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-decoration: none;
  color: var(--bark);
  display: flex;
  flex-direction: column;
  transition: all 0.15s;
}

.card:hover {
  border-color: var(--moss);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 10px;
}

.card p {
  font-size: 0.88rem;
  color: var(--soil);
  line-height: 1.6;
  flex: 1;
}

.card-arrow {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--moss);
  letter-spacing: 0.06em;
}

/* ── Info Boxes ─────────────────────────────────────────────── */
.info-box {
  border-left: 4px solid var(--moss);
  background: var(--fern);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
}

.info-box.warning {
  border-color: var(--amber);
  background: #fdf3e3;
}

.info-box.alert {
  border-color: var(--rust);
  background: #fdf0ed;
}

.info-box-label {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--moss);
}

.info-box.warning .info-box-label { color: var(--amber); }
.info-box.alert .info-box-label { color: var(--rust); }

.info-box p { font-size: 0.92rem; line-height: 1.6; color: var(--bark); }

/* ── Steps ──────────────────────────────────────────────────── */
.step-list {
  counter-reset: steps;
  list-style: none;
  margin: 28px 0;
}

.step-list li {
  counter-increment: steps;
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
}

.step-list li::before {
  content: counter(steps);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  background: var(--moss);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content h4 {
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-content p { font-size: 0.93rem; line-height: 1.62; color: var(--soil); }

/* ── Tables ─────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 28px 0;
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

thead {
  background: var(--bark);
  color: var(--cream);
}

thead th {
  padding: 13px 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

tbody tr {
  border-bottom: 1px solid var(--parchment);
  transition: background 0.12s;
}

tbody tr:hover { background: var(--fern); }
tbody tr:last-child { border-bottom: none; }

td {
  padding: 11px 16px;
  line-height: 1.5;
  color: var(--soil);
}

td:first-child { font-weight: 600; color: var(--bark); }

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-list { margin: 28px 0; }

.faq-item {
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  padding: 16px 20px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bark);
  border: none;
  width: 100%;
  text-align: left;
  transition: background 0.12s;
}

.faq-question:hover { background: var(--fern); }
.faq-question.open { background: var(--moss); color: var(--white); }

.faq-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: transform 0.2s;
  font-family: var(--font-mono);
}

.faq-question.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  display: none;
  padding: 16px 20px;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--soil);
  background: var(--cream);
  border-top: 1px solid var(--parchment);
}

.faq-answer.open { display: block; }

/* ── Permit Level Badges ────────────────────────────────────── */
.permit-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.badge-apprentice { background: #e8f0e3; color: var(--moss); }
.badge-general    { background: #e3ecf5; color: var(--sky);  }
.badge-master     { background: #f5e8d0; color: var(--amber);}
.badge-federal    { background: #f0e3e3; color: var(--rust); }

/* ── Requirement Checklist ──────────────────────────────────── */
.req-list {
  list-style: none;
  margin: 20px 0;
}

.req-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--parchment);
  font-size: 0.93rem;
}

.req-list li:last-child { border-bottom: none; }

.req-list li::before {
  content: '✓';
  color: var(--moss);
  font-weight: 700;
  font-size: 0.88rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── Article Body ───────────────────────────────────────────── */
.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 42px 0 16px;
  color: var(--bark);
  line-height: 1.25;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 700;
  margin: 30px 0 12px;
  color: var(--soil);
}

.article-body h4 {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 24px 0 10px;
}

.article-body p {
  margin-bottom: 18px;
  font-size: 1rem;
  color: var(--soil);
  line-height: 1.75;
}

.article-body ul, .article-body ol {
  margin: 16px 0 20px 20px;
  font-size: 0.96rem;
  color: var(--soil);
  line-height: 1.70;
}

.article-body li { margin-bottom: 8px; }

.article-body strong { color: var(--bark); font-weight: 600; }

/* ── Sidebar Quick Facts ────────────────────────────────────── */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-box {
  background: var(--bark);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin-bottom: 20px;
}

.sidebar-box h4 {
  font-family: var(--font-mono);
  font-size: 0.70rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}

.sidebar-fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 0.88rem;
}

.sidebar-fact:last-child { border-bottom: none; }
.sidebar-fact .label { color: var(--parchment); font-size: 0.82rem; }
.sidebar-fact .value { font-weight: 600; color: var(--amber-light); font-family: var(--font-mono); font-size: 0.82rem; }

.sidebar-link-list {
  list-style: none;
}

.sidebar-link-list li a {
  display: block;
  color: var(--sage-pale);
  text-decoration: none;
  font-size: 0.86rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.12s;
}

.sidebar-link-list li:last-child a { border-bottom: none; }
.sidebar-link-list li a:hover { color: var(--amber-light); }

/* ── Tool / Calculator ──────────────────────────────────────── */
.tool-container {
  background: var(--white);
  border: 2px solid var(--moss);
  border-radius: 6px;
  padding: 36px 32px;
  max-width: 680px;
  margin: 0 auto;
}

.tool-step { display: none; }
.tool-step.active { display: block; }

.tool-question {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 22px;
  color: var(--bark);
}

.tool-options {
  display: grid;
  gap: 10px;
}

.tool-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1.5px solid var(--parchment);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--white);
  transition: all 0.15s;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--bark);
}

.tool-option:hover {
  border-color: var(--moss);
  background: var(--fern);
}

.tool-option.selected {
  border-color: var(--moss);
  background: var(--moss);
  color: var(--white);
}

.tool-option .opt-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.tool-result {
  background: var(--bark);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 28px 26px;
  margin-top: 20px;
}

.tool-result h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--amber-light);
}

.tool-result p { font-size: 0.92rem; line-height: 1.65; margin-bottom: 12px; color: var(--parchment); }

.tool-progress {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
}

.tool-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--parchment);
  transition: background 0.2s;
}

.tool-progress-dot.active { background: var(--moss); }
.tool-progress-dot.done   { background: var(--amber); }

.tool-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--bark);
  color: var(--parchment);
  padding: 60px 0 32px;
  margin-top: 80px;
  border-top: 3px solid var(--amber);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-tagline {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
}

.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 8px; }

.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 0.12s;
}

.footer-col ul li a:hover { color: var(--amber-light); }

.footer-bottom {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
  font-family: var(--font-mono);
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom a { color: rgba(255,255,255,0.45); text-decoration: none; }
.footer-bottom a:hover { color: var(--amber-light); }

/* ── Disclaimer ─────────────────────────────────────────────── */
.disclaimer {
  background: var(--parchment);
  border: 1px solid rgba(74,55,40,0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 0.80rem;
  line-height: 1.6;
  color: var(--soil);
  margin: 36px 0 0;
}

.disclaimer strong { color: var(--bark); }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .site-nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bark); padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); z-index: 99; }
  .nav-toggle { display: block; }
  .hero { padding: 48px 20px 44px; }
  .hero-actions { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .tool-container { padding: 24px 18px; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, .sidebar, .breadcrumb { display: none; }
  body { font-size: 11pt; }
  .article-body h2 { font-size: 14pt; page-break-after: avoid; }
}
