/* ─────────────────────────────────────────────
   BushcraftDen — cinematic dark redesign
   Shared tokens + base styles for all pages
   ───────────────────────────────────────────── */

:root {
  /* Forest palette — deep evergreen, mossy mid, warm ember accent */
  --forest-deep: #0c1a14;        /* near-black green, used for body bg */
  --forest-night: #0f231b;       /* hero/surfaces */
  --forest-mid: #163127;         /* card surfaces */
  --forest-rim: #1f4133;         /* subtle borders */
  --moss: #4a6b51;               /* secondary text */
  --sage: #b8c7a8;               /* body text on dark */
  --bone: #ece5d3;               /* primary text on dark */
  --paper: #f4ecd8;              /* warm paper for light surfaces */
  --ember: #d97a3c;              /* warm CTA glow */
  --ember-bright: #f0a060;
  --gold: #e8c46e;               /* accent highlight */

  /* Type */
  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Rhythm */
  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;

  /* Glow */
  --glow-ember: 0 0 40px -8px rgba(217, 122, 60, 0.55);
  --glow-soft: 0 12px 40px -12px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--bone);
  background: var(--forest-deep);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

/* ───── Pine forest animated hero scene ─────
   Layered SVGs scrolling at different speeds.
   Used by both variations & article header. */
.scene {
  position: relative;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, #1c3a2c 0%, #0d1f17 55%, #07110c 100%);
}

.scene::before {
  /* moonlight glow */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(232, 196, 110, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.scene::after {
  /* drifting fog */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(12, 26, 20, 0.85), transparent);
  pointer-events: none;
  z-index: 5;
}

.scene-fog {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  background-image:
    radial-gradient(ellipse 800px 200px at 20% 70%, rgba(184, 199, 168, 0.06), transparent 60%),
    radial-gradient(ellipse 700px 180px at 80% 80%, rgba(184, 199, 168, 0.05), transparent 60%);
  animation: fog-drift 28s ease-in-out infinite alternate;
}

@keyframes fog-drift {
  0% { transform: translateX(-30px); opacity: 0.7; }
  100% { transform: translateX(30px); opacity: 1; }
}

/* Pine layers — three depths, varying scroll speed */
.pine-layer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  pointer-events: none;
  display: flex;
}
.pine-layer svg { display: block; flex: 0 0 50%; height: 100%; width: 50%; }

.pine-back  { z-index: 2; height: 38%; opacity: 0.55; animation: drift-slow 90s linear infinite; filter: blur(0.5px); }
.pine-mid   { z-index: 3; height: 48%; opacity: 0.85; animation: drift-med 60s linear infinite; }
.pine-front { z-index: 6; height: 60%; opacity: 1;   animation: drift-fast 38s linear infinite; }

@keyframes drift-slow { from { transform: translateX(0); }     to { transform: translateX(-50%); } }
@keyframes drift-med  { from { transform: translateX(0); }     to { transform: translateX(-50%); } }
@keyframes drift-fast { from { transform: translateX(0); }     to { transform: translateX(-50%); } }

/* Tiny floating embers/fireflies */
.embers { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.ember-dot {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--ember-bright);
  box-shadow: 0 0 8px 2px rgba(240, 160, 96, 0.6);
  opacity: 0;
  animation: rise 6s ease-in infinite;
}
@keyframes rise {
  0%   { transform: translateY(0)    scale(1);   opacity: 0; }
  15%  { opacity: 1; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-220px) scale(0.4); opacity: 0; }
}

/* ───── Campfire flames + sparks ───── */
.flame {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  filter: blur(1px);
  mix-blend-mode: screen;
  transform-origin: 50% 100%;
}
.flame-outer {
  width: 36px; height: 56px;
  background: radial-gradient(ellipse at 50% 100%, rgba(240,160,96,0.9), rgba(217,122,60,0.4) 60%, transparent 80%);
  animation: flame-flicker 1.4s ease-in-out infinite alternate;
}
.flame-mid {
  width: 22px; height: 38px;
  background: radial-gradient(ellipse at 50% 100%, #f0a060, #d97a3c 70%, transparent);
  animation: flame-flicker 0.9s ease-in-out infinite alternate-reverse;
}
.flame-inner {
  width: 10px; height: 22px;
  background: radial-gradient(ellipse at 50% 100%, #fff4cc, #f0a060 70%, transparent);
  animation: flame-flicker 0.6s ease-in-out infinite alternate;
}
@keyframes flame-flicker {
  0%   { transform: translateX(-50%) scaleY(1)    scaleX(1)    skewX(-2deg); opacity: 0.9; }
  50%  { transform: translateX(-52%) scaleY(1.08) scaleX(0.94) skewX(3deg);  opacity: 1; }
  100% { transform: translateX(-48%) scaleY(0.95) scaleX(1.06) skewX(-1deg); opacity: 0.85; }
}
@keyframes fire-glow {
  0%   { opacity: 0.75; transform: translateX(-50%) scale(0.96); }
  100% { opacity: 1;    transform: translateX(-50%) scale(1.06); }
}
@keyframes spark-rise {
  0%   { transform: translateY(0)     scale(1);   opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translateY(-120px) scale(0.3); opacity: 0; }
}

/* ───── Type helpers ───── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 144;
}

.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  color: var(--sage);
  line-height: 1.4;
}

/* ───── Buttons ───── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .25s ease;
}
.btn-primary {
  background: var(--ember);
  color: #1a0e08;
  box-shadow: var(--glow-ember);
}
.btn-primary:hover { background: var(--ember-bright); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(236, 229, 211, 0.25);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ───── Cards ───── */
.card {
  background: var(--forest-mid);
  border: 1px solid var(--forest-rim);
  border-radius: var(--r-md);
  transition: all .3s ease;
}
.card:hover {
  border-color: rgba(232, 196, 110, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--glow-soft);
}

/* ───── Image placeholder (striped) ───── */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      rgba(184, 199, 168, 0.08) 0 8px,
      rgba(184, 199, 168, 0.02) 8px 16px),
    var(--forest-night);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--moss);
  border-radius: var(--r-sm);
}

/* ───── Affiliate disclosure pill ───── */
.affiliate-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(232, 196, 110, 0.1);
  color: var(--gold);
  border: 1px solid rgba(232, 196, 110, 0.25);
}

/* ───── Blog page rule (used by all article pages) ───── */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 80px 24px 120px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--sage);
}
.article h1 {
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1.05;
  color: var(--bone);
  font-weight: 400;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}
.article h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--bone);
  margin: 56px 0 16px;
  letter-spacing: -0.01em;
}
.article h3 {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin: 40px 0 12px;
}
.article p { margin: 0 0 20px; }
.article a {
  color: var(--gold);
  border-bottom: 1px solid rgba(232, 196, 110, 0.4);
  transition: color .2s;
}
.article a:hover { color: var(--ember-bright); border-color: var(--ember-bright); }
.article blockquote {
  margin: 32px 0;
  padding: 4px 0 4px 24px;
  border-left: 2px solid var(--gold);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 22px;
  color: var(--bone);
}
.article ul, .article ol { padding-left: 22px; margin: 0 0 24px; }
.article li { margin-bottom: 8px; }
.article code {
  font-family: var(--font-mono);
  font-size: 14px;
  background: var(--forest-mid);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold);
}
.article hr {
  border: none;
  height: 1px;
  background: var(--forest-rim);
  margin: 48px 0;
}
.article figure { margin: 40px -40px; }
.article figcaption {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--moss);
  margin-top: 8px;
  text-align: center;
}

/* ───── Scrollbar ───── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--forest-deep); }
::-webkit-scrollbar-thumb { background: var(--forest-rim); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--moss); }

/* ─────────────────────────────────────────────
   Layout utilities
   ───────────────────────────────────────────── */

.section  { padding: 120px 56px; }
.container { max-width: 1200px; margin: 0 auto; }

.grid   { display: grid; gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; }

.sticky-col  { position: sticky; top: 40px; align-self: start; }
.hero-content { padding: 0 56px; }

.footer-brand-row { display: grid; grid-template-columns: 1.4fr 3fr; gap: 60px; margin-bottom: 56px; align-items: start; }
.footer-link-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }

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

.site-nav { padding: 28px 56px; }
.nav-desktop { display: flex; gap: 32px; align-items: center; }
.nav-hamburger { display: none; background: rgba(7,15,10,0.6); border: 1px solid var(--forest-rim); color: var(--bone); width: 44px; height: 44px; border-radius: 10px; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(6px); padding: 0; }
.nav-drawer { display: none; position: fixed; inset: 0; z-index: 30; background: rgba(7,15,10,0.96); backdrop-filter: blur(10px); padding: 80px 24px 32px; flex-direction: column; gap: 0; }
.nav-drawer a { display: block; padding: 18px 0; border-bottom: 1px solid var(--forest-rim); font-family: var(--font-display); font-size: 26px; color: var(--bone); }

/* ─────────────────────────────────────────────
   Mobile — 720px
   Class rules: homepage + future template pages.
   !important rules: override inline JSX styles on
   existing content pages (posts + reviews).
   ───────────────────────────────────────────── */

@media (max-width: 720px) {

  /* ── Responsive layout utilities ── */
  .section  { padding: 48px 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-5  { grid-template-columns: repeat(2, 1fr); }
  .sticky-col  { position: static; }
  .hero-content { padding: 0 20px; }
  .footer-brand-row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
  .footer-link-cols { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* ── Nav ── */
  .site-nav { padding: 16px 20px !important; }
  .nav-desktop { display: none !important; }
  .nav-hamburger { display: flex !important; }
  .nav-drawer { display: flex !important; }

  /* ── !important overrides for existing pages (inline JSX styles) ── */

  /* Sticky article/review nav */
  nav[style*="sticky"] { padding: 14px 20px !important; }
  nav[style*="sticky"] > div { display: none !important; }

  /* Breadcrumb nav */
  nav[style*="20px 56px"] { padding: 12px 20px !important; }

  /* Section padding */
  section[style*="56px"] {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* Footer */
  footer[style] { padding-top: 48px !important; padding-left: 20px !important; padding-right: 20px !important; }

  /* Hero scene content wrapper */
  .scene [style*="0px 56px"] { padding-left: 20px !important; padding-right: 20px !important; }

  /* Hide review hero product image on mobile (prevents overflow) */
  .scene .placeholder { display: none !important; }

  /* Grid collapse: repeat(N,...) */
  [style*="repeat(2,"]  { grid-template-columns: 1fr !important; }
  [style*="repeat(3,"]  { grid-template-columns: 1fr !important; }
  [style*="repeat(4,"]  { grid-template-columns: 1fr !important; }
  [style*="repeat(5,"]  { grid-template-columns: 1fr !important; }
  [style*="repeat(2, "] { grid-template-columns: 1fr !important; }
  [style*="repeat(3, "] { grid-template-columns: 1fr !important; }
  [style*="repeat(4, "] { grid-template-columns: 1fr !important; }
  [style*="repeat(5, "] { grid-template-columns: 1fr !important; }

  /* Grid collapse: fraction multi-column */
  [style*="1fr 1fr"]   { grid-template-columns: 1fr !important; }
  [style*="1.4fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="1fr 1.6fr"] { grid-template-columns: 1fr !important; }
  [style*="1.4fr 3fr"] { grid-template-columns: 1fr !important; }

  /* Specs row: keep 2-col but narrow label */
  [style*="180px 1fr"] { grid-template-columns: 110px 1fr !important; }

  /* Article body */
  .article { padding-top: 48px !important; padding-bottom: 72px !important; }
  .article h1 { font-size: clamp(28px, 8vw, 40px) !important; }
  .article h2 { font-size: 26px !important; margin-top: 40px !important; }
  .article figure { margin: 24px 0 !important; }
  .article blockquote { font-size: 18px !important; }
  .lede { font-style: normal !important; font-size: 16px !important; }
}
