/*
Theme Name: PackedReady
Theme URI: https://packedready.com
Author: PackedReady
Author URI: https://packedready.com
Description: A trail-and-topo themed WordPress theme for outdoor gear, camping, and van-life affiliate content. Built around Gear Picks (a custom post type) with spec data, "best for" callouts, and an affiliate disclosure baked into the footer.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: packedready
*/

:root {
  --stone:      #EDE8DD;
  --stone-dim:  #E1DACB;
  --pine:       #1F2E23;
  --pine-soft:  #2C4033;
  --ochre:      #C2872F;
  --ochre-deep: #9C6A21;
  --lake:       #3E6E64;
  --ink:        #211D18;
  --ink-soft:   #4C463D;
  --line:       rgba(33,29,24,0.18);
  --card-bg:    #F5F1E7;

  --bg: var(--stone);
  --surface: var(--card-bg);
  --text: var(--ink);
  --text-dim: var(--ink-soft);
  --accent: var(--ochre);
  --accent-deep: var(--ochre-deep);
  --brand: var(--pine);
  --brand-soft: var(--pine-soft);
  --rule: var(--line);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #171A15;
    --surface: #1F231C;
    --text: #EDE8DD;
    --text-dim: #B9B3A4;
    --accent: #D79A44;
    --accent-deep: #E9B565;
    --brand: #6E9482;
    --brand-soft: #86AB99;
    --rule: rgba(237,232,221,0.16);
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 0px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Work Sans", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

h1, h2, h3, .display {
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 0.98;
  margin: 0;
  color: var(--text);
}

.mono {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "Big Shoulders Display", sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--text);
}
.logo span { color: var(--accent-deep); }
.nav-links ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
}
.nav-links ul a {
  text-decoration: none;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav-links ul a:hover { color: var(--accent-deep); }
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.topo { position: absolute; inset: 0; z-index: 0; opacity: 0.5; }
.topo path {
  fill: none;
  stroke: var(--brand-soft);
  stroke-width: 1;
  opacity: 0.35;
  stroke-dasharray: 2400;
  stroke-dashoffset: 2400;
  animation: draw 2.6s ease-out forwards;
}
.topo path:nth-child(2) { animation-delay: 0.15s; }
.topo path:nth-child(3) { animation-delay: 0.3s; }
.topo path:nth-child(4) { animation-delay: 0.45s; }
.topo path:nth-child(5) { animation-delay: 0.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .topo path { animation: none; stroke-dashoffset: 0; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: end;
}
.hero-eyebrow { color: var(--accent-deep); font-weight: 500; font-size: 0.95rem; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); max-width: 12ch; }
.hero p.lede { max-width: 46ch; font-size: 1.15rem; color: var(--text-dim); margin-top: 22px; line-height: 1.55; }
.hero-actions { margin-top: 34px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--brand); color: var(--stone); }
.btn-primary:hover { background: var(--brand-soft); }
.btn-ghost { border-color: var(--rule); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-deep); color: var(--accent-deep); }

.hero-stat-card { border: 1px solid var(--rule); padding: 26px; background: var(--surface); }
.hero-stat-card .num { font-family: "Big Shoulders Display", sans-serif; font-size: 2.6rem; font-weight: 700; color: var(--accent-deep); }
.hero-stat-card p { margin: 8px 0 0; color: var(--text-dim); font-size: 0.92rem; max-width: 30ch; }

@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } }

/* ---------- Section heading pattern ---------- */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 18px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.section-head .sub { color: var(--text-dim); max-width: 42ch; font-size: 0.98rem; }

.site-section { padding: 84px 0; }
.site-section.alt { background: var(--surface); }

/* ---------- Trailheads (category strip) ---------- */
.trailheads { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.trailhead { background: var(--bg); padding: 34px 30px 30px; text-decoration: none; color: var(--text); position: relative; transition: background 0.15s ease; }
.trailhead:hover { background: var(--surface); }
.trailhead .mark { font-family: "JetBrains Mono", monospace; font-size: 0.8rem; color: var(--accent-deep); }
.trailhead h3 { font-size: 1.7rem; margin-top: 14px; }
.trailhead p { color: var(--text-dim); font-size: 0.92rem; margin-top: 10px; line-height: 1.5; }
@media (max-width: 780px) { .trailheads { grid-template-columns: 1fr; } }

/* ---------- Gear cards ---------- */
.gear-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 940px) { .gear-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .gear-grid { grid-template-columns: 1fr; } }
.gear-card { border: 1px dashed var(--rule); padding: 22px; background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.gear-card .tag { font-size: 0.78rem; color: var(--accent-deep); font-weight: 600; }
.gear-thumb { width: 100%; aspect-ratio: 4/3; background: var(--bg); border: 1px solid var(--rule); overflow: hidden; }
.gear-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gear-card h3 { font-size: 1.4rem; font-weight: 700; }
.gear-card .best-for { font-size: 0.9rem; color: var(--text-dim); }
.gear-specs { display: flex; justify-content: space-between; border-top: 1px solid var(--rule); padding-top: 12px; font-family: "JetBrains Mono", monospace; font-size: 0.76rem; color: var(--text-dim); flex-wrap: wrap; gap: 6px; }
.gear-card .btn { align-self: flex-start; margin-top: 4px; }

/* ---------- Trail markers (how we test) ---------- */
.markers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 780px) { .markers { grid-template-columns: 1fr; } }
.marker { border-left: 2px solid var(--brand); padding-left: 22px; }
.marker .mi { font-family: "JetBrains Mono", monospace; color: var(--brand); font-size: 0.85rem; }
.marker h3 { font-size: 1.5rem; margin-top: 10px; }
.marker p { color: var(--text-dim); margin-top: 10px; font-size: 0.94rem; line-height: 1.55; }

/* ---------- Newsletter ---------- */
.signup { display: grid; grid-template-columns: minmax(0,6fr) minmax(0,6fr); gap: 48px; align-items: center; }
@media (max-width: 780px) { .signup { grid-template-columns: 1fr; } }
.signup h2 { font-size: clamp(2rem, 4vw, 3rem); max-width: 14ch; }
.signup p { color: var(--text-dim); margin-top: 16px; max-width: 42ch; line-height: 1.55; }
form.sub { display: flex; gap: 0; border: 1px solid var(--rule); background: var(--surface); }
form.sub input { flex: 1; border: none; background: transparent; padding: 16px 18px; font-family: inherit; font-size: 1rem; color: var(--text); }
form.sub input:focus { outline: none; }
form.sub button { border: none; background: var(--accent); color: var(--ink); font-weight: 600; padding: 0 24px; cursor: pointer; }
form.sub button:hover { background: var(--accent-deep); }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 46px 0 60px; }
.foot-grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.foot-grid .disclosure { max-width: 56ch; color: var(--text-dim); font-size: 0.86rem; line-height: 1.6; }
.foot-links { display: flex; gap: 24px; font-size: 0.9rem; color: var(--text-dim); list-style: none; padding: 0; margin: 0; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--accent-deep); }

/* ---------- Blog / archive lists (index.php, single.php, page.php) ---------- */
.post-list { display: flex; flex-direction: column; gap: 0; }
.post-row { padding: 28px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: baseline; }
.post-row h2 { font-size: 1.6rem; }
.post-row h2 a { text-decoration: none; }
.post-row h2 a:hover { color: var(--accent-deep); }
.post-row .meta { font-family: "JetBrains Mono", monospace; font-size: 0.78rem; color: var(--text-dim); white-space: nowrap; }
.single-content { max-width: 68ch; margin: 0 auto; padding: 60px 0; line-height: 1.7; }
.single-content h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 20px; }
.single-content img { margin: 24px 0; }
.page-content { max-width: 68ch; margin: 0 auto; padding: 60px 0; line-height: 1.7; }
