/* Backyard Wildlife — shared article styles
   Used by /articles index and every individual article page.
   Per-article layout CSS (.tips, .seasons, .compare, .groups, .tools, etc.)
   stays inline in each article file.

   Hero photo per page:
     <header class="hero" style="--hero-bg: url('/photos/foo.jpg'); --hero-pos: center 30%;">
*/

:root {
  --paper: #f5efe2;
  --paper-warm: #ede4cf;
  --ivory: #faf5e8;
  --ink-dark: #2c1f15;
  --ink-mid: #4a3a2c;
  --ink-light: #6f5d4a;
  --ink-faint: #9a8772;
  --terra: #b5532a;
  --sage: #6a8c6a;
  --rust: #a85a3e;
  --border: #d8cdb8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink-mid);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.serif { font-family: 'Playfair Display', Georgia, serif; }
.specimen { font-family: 'DM Mono', ui-monospace, monospace; text-transform: uppercase; }

/* ────── Top nav ────── */
.nav {
  max-width: 960px; margin: 0 auto;
  padding: 20px 28px;
  display: flex; align-items: center; gap: 12px;
}

.nav a.back {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 8px; color: var(--ink-light);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.nav a.back:hover { color: var(--terra); border-color: var(--terra); }

/* Cross-section links (Weekly Species / Articles / Gear) */
.nav-sections { display: flex; align-items: center; gap: 4px; }
.nav-sections a {
  padding: 8px 12px; border: 1px solid transparent;
  border-radius: 8px; color: var(--ink-light);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.nav-sections a:hover {
  color: var(--terra); border-color: var(--border);
  background: var(--paper-warm);
}
@media (max-width: 600px) {
  .nav-sections a { padding: 8px 9px; }
}

.brand { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.brand-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px; font-weight: 700;
  color: var(--ink-dark); letter-spacing: -0.01em;
}
.brand-sub {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 8px; color: var(--ink-faint);
  letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px;
}

/* ────── Hero (photo set per page via --hero-bg / --hero-pos) ────── */
.hero {
  position: relative; width: 100%; height: 580px;
  overflow: hidden; margin-top: 4px;
}

.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: var(--hero-pos, center);
  filter: saturate(0.94) contrast(0.97);
}

.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(245, 239, 226, 0.10) 0%,
    rgba(245, 239, 226, 0) 25%,
    rgba(245, 239, 226, 0) 60%,
    rgba(245, 239, 226, 0.65) 90%,
    var(--paper) 100%);
}

.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center;
  padding: 0 28px 64px; text-align: center;
}

.hero-card {
  max-width: 640px; padding: 28px 34px 30px;
  background: rgba(245, 239, 226, 0.62);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  border: 1px solid rgba(216, 205, 184, 0.5);
}

.hero-eyebrow {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--terra);
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 12px;
}

.hero-eyebrow .dot {
  display: inline-block; width: 4px; height: 4px;
  border-radius: 50%; background: var(--terra);
  margin: 0 8px; vertical-align: middle;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 48px; font-weight: 700;
  color: var(--ink-dark); line-height: 1.04;
  letter-spacing: -0.015em; margin: 0 0 12px;
}

.hero .dek {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic; font-size: 17px;
  color: var(--ink-light); line-height: 1.45;
  margin: 0 0 18px;
}

.hero-tag {
  display: inline-block; padding: 4px 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: rgba(250, 245, 232, 0.6);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px; font-weight: 500;
  color: var(--ink-mid); letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-credit {
  position: absolute; bottom: 10px; right: 14px; z-index: 2;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 0.05em;
  color: rgba(74, 58, 44, 0.9); text-decoration: none;
  padding: 4px 9px;
  background: rgba(245, 239, 226, 0.65); border-radius: 4px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}

/* ────── Sections ────── */
section {
  max-width: 720px; margin: 0 auto;
  padding: 56px 28px 0;
}

section h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 30px; font-weight: 700;
  color: var(--ink-dark); line-height: 1.1;
  letter-spacing: -0.01em; margin: 0 0 12px;
}

.section-rule {
  width: 56px; height: 2px;
  background: var(--terra); border-radius: 1px;
  margin: 0 0 22px;
}

section > p {
  font-size: 15px; color: var(--ink-mid);
  line-height: 1.7; margin: 0 0 14px;
}

section > p:last-child { margin-bottom: 0; }

.lead {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic; font-size: 18px;
  color: var(--ink-light); line-height: 1.55;
  margin: 0 0 22px;
}

/* ────── Callouts (default sage; .warning = rust) ────── */
.callout {
  margin-top: 22px; padding: 22px 26px;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--sage);
  border-radius: 8px;
}

.callout.warning { border-left-color: var(--rust); }

.callout-eyebrow {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--sage);
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 8px;
}

.callout.warning .callout-eyebrow { color: var(--rust); }

.callout h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px; font-weight: 700; font-style: italic;
  color: var(--ink-dark); margin: 0 0 8px; line-height: 1.25;
}

.callout p {
  font-size: 14px; color: var(--ink-mid);
  line-height: 1.7; margin: 0 0 10px;
}

.callout p:last-child { margin-bottom: 0; }

.callout ul {
  margin: 8px 0 0; padding-left: 20px;
  font-size: 14px; line-height: 1.7;
  color: var(--ink-mid);
}

.callout ul li { margin-bottom: 6px; }

.callout a {
  color: var(--terra); text-decoration: none; font-weight: 500;
}

.callout a:hover { text-decoration: underline; }

/* ────── Sources / further reading ────── */
.sources { list-style: none; padding: 0; margin: 0; }

.sources li {
  padding: 12px 0; border-bottom: 1px solid var(--border);
  font-size: 14px; color: var(--ink-mid);
}

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

.sources a {
  color: var(--terra); text-decoration: none; font-weight: 500;
}

.sources a:hover { text-decoration: underline; }

.sources .source-label {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-right: 8px;
}

/* ────── Footer ────── */
footer.page-footer {
  max-width: 720px; margin: 56px auto 0;
  padding: 24px 28px 40px;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer.page-footer a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border: 1px solid var(--border);
  border-radius: 8px; color: var(--ink-mid);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

footer.page-footer a:hover {
  color: var(--terra); border-color: var(--terra);
}

footer.page-footer .credits {
  margin-top: 18px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 9px; color: var(--ink-faint);
  letter-spacing: 0.08em; line-height: 1.7;
}

footer.page-footer .credits a {
  display: inline; padding: 0; border: none;
  color: var(--terra); text-transform: none;
  letter-spacing: normal; font-size: 9px;
}

footer.page-footer .credits a:hover { text-decoration: underline; }

/* ────── Keyboard focus ring ──────
   Visible on keyboard navigation only. Mirrors src/styles/globals.css so
   keyboard nav looks the same across the React homepage and the static
   article pages. */
:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 2px;
}

/* ────── Shared mobile breakpoint ────── */
@media (max-width: 600px) {
  .hero { height: 520px; }
  .hero h1 { font-size: 36px; }
  .hero .dek { font-size: 15px; }
  .hero-card { padding: 22px 22px 24px; }
  section h2 { font-size: 26px; }
}
