/*
Theme Name: Adirondack Autumn
Theme URI: https://example.com/adirondack-autumn
Author: Built for Dave Briggman
Author URI: https://davebriggman.com
Description: A rustic Great Camp theme evoking the Adirondack High Peaks at dusk. Layered mountain ridgelines, an ember sun, and a pine treeline set a warm, woodsy mood built on deep bark brown (#642307) and autumn ember orange (#E66E06). Slab display type recalls carved park signage; a topographic contour texture runs beneath the reading area.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: adirondack-autumn
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar, full-width-template, editor-style
*/

/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  /* Given brand colors */
  --bark: #642307;        /* deep bark brown */
  --ember: #e66e06;       /* autumn ember orange */

  /* Warm-dark scene tones (dusk in the woods) */
  --night: #1f0f05;       /* warm near-black, sky at top */
  --bark-deep: #3b1606;   /* deep ridge shadow */
  --ridge-far: #7c3a1b;   /* hazy far ridge catching light */
  --ridge-mid: #572009;   /* mid ridge */
  --ridge-near: #351304;  /* near ridge */
  --treeline: #1a0c04;    /* foreground pines */
  --ember-glow: #f59d4a;  /* lit ember, glow + hovers */

  /* Light surfaces (canvas + birch paper), deliberately warmer/greyer
     than the generic cream to avoid a templated look */
  --canvas: #ece3d2;      /* page background, warm sand */
  --paper: #f6efe1;       /* cards and content surface */
  --paper-edge: #ddceb4;  /* hairline edges on light */

  /* Ink */
  --ink: #26160b;         /* body text on light */
  --ink-soft: #6a5038;    /* secondary text */
  --cream: #f4ead9;       /* text on dark scenes */
  --cream-soft: #cdb79c;  /* secondary text on dark */

  /* Type */
  --font-poster: "Alfa Slab One", Georgia, "Times New Roman", serif;
  --font-display: "Zilla Slab", Georgia, serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Scale + rhythm */
  --measure: 68ch;
  --wrap: 1180px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
  --radius: 3px;
  --shadow: 0 10px 30px rgba(31, 15, 5, 0.16);
  --shadow-soft: 0 4px 14px rgba(31, 15, 5, 0.1);
}

/* ==========================================================================
   Reset-ish base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.075rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--canvas);
  /* Topographic contour texture beneath the reading area */
  background-image: url("assets/images/topo.svg");
  background-repeat: repeat;
  background-size: 720px auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--bark);
  text-decoration: none;
  background-image: linear-gradient(var(--ember), var(--ember));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 2px;
  transition: color 0.18s ease, background-size 0.18s ease;
}
a:hover, a:focus { color: var(--ember); background-size: 100% 100%; color: var(--night); }

:focus-visible {
  outline: 3px solid var(--ember);
  outline-offset: 2px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--bark);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: 0.005em;
}
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

p, ul, ol, blockquote, dl, table, figure { margin: 0 0 1.4rem; }

blockquote {
  margin-left: 0;
  padding: 0.4rem 0 0.4rem 1.4rem;
  border-left: 4px solid var(--ember);
  color: var(--ink-soft);
  font-size: 1.15rem;
}

code, pre, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95em;
}
pre {
  background: var(--night);
  color: var(--cream);
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
}
code { background: rgba(100, 35, 7, 0.08); padding: 0.1em 0.35em; border-radius: 2px; }
pre code { background: none; padding: 0; }

hr { border: 0; height: 1px; background: var(--paper-edge); margin: 2.5rem 0; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.measure { max-width: var(--measure); }
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
  word-wrap: normal !important;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ember); color: var(--night);
  padding: 0.6rem 1rem; font-weight: 700; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   Header + navigation
   ========================================================================== */
.site-header {
  background: var(--bark);
  color: var(--cream);
  border-bottom: 3px solid var(--ember);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}
.site-branding { display: flex; align-items: center; gap: 0.75rem; }
.site-branding .pine-mark { width: 30px; height: 34px; flex: none; color: var(--ember); }
.site-title {
  font-family: var(--font-poster);
  font-size: clamp(1.35rem, 3.2vw, 1.9rem);
  line-height: 1;
  margin: 0;
  letter-spacing: 0.01em;
}
.site-title a {
  color: var(--cream);
  background: none;
}
.site-title a:hover { color: var(--ember-glow); }
.site-description { margin: 0.15rem 0 0; font-size: 0.85rem; color: var(--cream-soft); letter-spacing: 0.06em; }
.custom-logo { max-height: 60px; width: auto; }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.4rem; }
.main-nav a {
  color: var(--cream);
  font-weight: 700;
  font-size: 0.98rem;
  background: none;
  padding: 0.3rem 0;
  position: relative;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 3px; background: var(--ember); transform: scaleX(0);
  transform-origin: left; transition: transform 0.2s ease;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: #fff; }
.main-nav a:hover::after, .main-nav .current-menu-item > a::after { transform: scaleX(1); }
.main-nav .sub-menu {
  position: absolute; background: var(--bark-deep); padding: 0.5rem 0;
  min-width: 200px; box-shadow: var(--shadow); display: none; z-index: 20;
  flex-direction: column; gap: 0; border-top: 3px solid var(--ember);
}
.main-nav li { position: relative; }
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { display: flex; }
.main-nav .sub-menu a { padding: 0.5rem 1.1rem; display: block; }

.menu-toggle {
  display: none;
  background: transparent; border: 2px solid var(--ember);
  color: var(--cream); font-family: var(--font-body); font-weight: 700;
  padding: 0.5rem 0.9rem; border-radius: var(--radius); cursor: pointer;
  align-items: center; gap: 0.5rem;
}
.menu-toggle .bars { width: 18px; height: 2px; background: var(--ember); position: relative; display: inline-block; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ember); }
.menu-toggle .bars::before { top: -6px; } .menu-toggle .bars::after { top: 6px; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bark-deep); padding: 0.5rem 1.25rem 1.25rem;
    display: none; z-index: 30; box-shadow: var(--shadow);
  }
  .site-header { position: relative; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0.25rem; }
  .main-nav a { display: block; padding: 0.7rem 0; border-bottom: 1px solid rgba(244,234,217,0.12); }
  .main-nav a::after { display: none; }
  .main-nav .sub-menu { position: static; display: flex; box-shadow: none; padding-left: 1rem; border-top: 0; background: transparent; }
}

/* ==========================================================================
   Hero scene (front page + page banner)
   ========================================================================== */
.hero {
  position: relative;
  color: var(--cream);
  background: var(--night);
  overflow: hidden;
  isolation: isolate;
}
.hero__scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero__scene svg { width: 100%; height: 100%; display: block; }
.hero__content {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  padding: clamp(4.5rem, 12vw, 9rem) 0 clamp(3rem, 8vw, 6rem);
  text-align: center;
}
.hero__eyebrow {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ember-glow);
  margin: 0 0 0.75rem;
  font-weight: 600;
}
.hero__title {
  font-family: var(--font-poster);
  color: var(--cream);
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  line-height: 0.98;
  margin: 0 0 1rem;
  text-shadow: 0 3px 18px rgba(0,0,0,0.45);
}
.hero__text { max-width: 46ch; margin: 0 auto 1.75rem; font-size: 1.2rem; color: var(--cream); }
.hero__cta { display: inline-flex; gap: 0.9rem; flex-wrap: wrap; justify-content: center; }

/* Compact banner variant for inner pages */
.page-banner {
  position: relative; color: var(--cream); background: var(--night); overflow: hidden; isolation: isolate;
}
.page-banner__scene { position: absolute; inset: 0; z-index: -1; }
.page-banner__scene svg { width: 100%; height: 100%; }
.page-banner__inner {
  width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto;
  padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem);
}
.page-banner__title { color: var(--cream); font-family: var(--font-poster); font-size: clamp(1.9rem, 5vw, 3rem); margin: 0; text-shadow: 0 2px 12px rgba(0,0,0,0.4); }
.page-banner__meta { color: var(--cream-soft); margin: 0.6rem 0 0; }
.page-banner__meta a { color: var(--ember-glow); background: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--ember);
  color: var(--night);
  border: 2px solid var(--ember);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 0 rgba(0,0,0,0.18);
}
.btn:hover, .btn:focus { background: var(--ember-glow); transform: translateY(-2px); box-shadow: 0 8px 0 rgba(0,0,0,0.2); color: var(--night); }
.btn--ghost {
  background: transparent; color: var(--cream); border-color: var(--cream);
  box-shadow: none;
}
.btn--ghost:hover, .btn--ghost:focus { background: var(--cream); color: var(--bark); }

/* ==========================================================================
   Content layout (posts + sidebar)
   ========================================================================== */
.site-main { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.content-area {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
.content-area.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.content-area.no-sidebar .measure { margin-inline: auto; }
@media (max-width: 980px) {
  .content-area { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Post cards + article
   ========================================================================== */
.post-list { display: grid; gap: 2rem; }

.post-card {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 240px 1fr;
}
.post-card__thumb { display: block; height: 100%; background: none; }
.post-card__thumb img { height: 100%; width: 100%; object-fit: cover; }
.post-card__body { padding: 1.5rem 1.6rem; }
.post-card__body h2 { margin-bottom: 0.35rem; }
.post-card__body h2 a { background: none; color: var(--bark); }
.post-card__body h2 a:hover { color: var(--ember); }
@media (max-width: 620px) {
  .post-card { grid-template-columns: 1fr; }
  .post-card__thumb img { height: 210px; }
}

.entry-meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
  display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center;
}
.entry-meta a { color: var(--ink-soft); background-size: 100% 1px; }
.entry-meta a:hover { color: var(--ember); }
.entry-meta .meta-leaf { width: 14px; height: 14px; color: var(--ember); flex: none; }

.category-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ember);
  background: rgba(230, 110, 6, 0.1);
  border: 1px solid rgba(230, 110, 6, 0.4);
  padding: 0.18rem 0.6rem;
  border-radius: 100px;
}
.category-tag:hover { background: var(--ember); color: var(--night); }

/* Single article surface */
.entry {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.5rem, 4vw, 3rem);
}
.entry-content { max-width: var(--measure); }
.entry-content > * { margin-left: auto; margin-right: auto; }
.entry-content .alignwide { max-width: min(100%, 1100px); }
.entry-content .alignfull { max-width: none; }
.entry-content h2 { margin-top: 2rem; }
.entry-content img, .wp-block-image { border-radius: var(--radius); }
.entry-content figcaption, .wp-caption-text { font-size: 0.85rem; color: var(--ink-soft); text-align: center; }
.entry-footer { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--paper-edge); font-size: 0.9rem; color: var(--ink-soft); }
.tags-links a {
  display: inline-block; margin: 0 0.35rem 0.4rem 0; padding: 0.2rem 0.6rem;
  background: rgba(100,35,7,0.07); border-radius: 100px; font-size: 0.82rem;
  background-image: none; color: var(--bark);
}
.tags-links a:hover { background: var(--ember); color: var(--night); }

.featured-media { margin: 0 0 1.75rem; }
.featured-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.read-more { font-family: var(--font-display); font-weight: 700; background: none; color: var(--ember); }
.read-more:hover { color: var(--bark); }

/* Section intro on front page */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.75rem; border-bottom: 2px solid var(--paper-edge); padding-bottom: 0.75rem;
}
.section-head h2 { margin: 0; }
.section-head .section-link { font-family: var(--font-display); font-weight: 700; background: none; }

/* Intro band under hero */
.trailhead {
  background: var(--bark);
  color: var(--cream);
}
.trailhead__inner {
  width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.25rem) 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem;
}
.trailhead__item h3 { color: var(--ember-glow); margin-bottom: 0.35rem; }
.trailhead__item p { margin: 0; color: var(--cream-soft); }
@media (max-width: 760px) { .trailhead__inner { grid-template-columns: 1fr; gap: 1.25rem; } }

/* ==========================================================================
   Sidebar + widgets
   ========================================================================== */
.sidebar .widget {
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-soft);
}
.widget-title {
  font-size: 1.15rem; margin: 0 0 0.9rem; padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--ember); display: inline-block;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget ul li { padding: 0.4rem 0; border-bottom: 1px dashed var(--paper-edge); }
.widget ul li:last-child { border-bottom: 0; }
.widget a { background-size: 100% 1px; }
.widget-search .search-form { display: flex; gap: 0.5rem; }

.search-form { display: flex; gap: 0.5rem; }
.search-form input[type="search"] {
  flex: 1; padding: 0.6rem 0.8rem; border: 1px solid var(--paper-edge);
  border-radius: var(--radius); font-family: var(--font-body); background: #fff; color: var(--ink);
}
.search-form input[type="search"]:focus { outline: 2px solid var(--ember); border-color: var(--ember); }
.search-submit { padding: 0.6rem 1rem; border: 0; background: var(--bark); color: var(--cream); border-radius: var(--radius); font-family: var(--font-display); font-weight: 700; cursor: pointer; }
.search-submit:hover { background: var(--ember); color: var(--night); }

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.pagination .page-numbers {
  display: inline-flex; min-width: 2.6rem; height: 2.6rem; align-items: center; justify-content: center;
  padding: 0 0.75rem; background: var(--paper); border: 1px solid var(--paper-edge);
  border-radius: var(--radius); font-family: var(--font-display); font-weight: 700; background-image: none; color: var(--bark);
}
.pagination .page-numbers.current { background: var(--ember); color: var(--night); border-color: var(--ember); }
.pagination .page-numbers:hover { background: var(--bark); color: var(--cream); }

.post-navigation { margin-top: 2.5rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.post-navigation a { font-family: var(--font-display); font-weight: 700; background: none; }
.post-navigation .nav-previous, .post-navigation .nav-next { max-width: 48%; }

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area { margin-top: 2.5rem; background: var(--paper); border: 1px solid var(--paper-edge); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-soft); }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 1.5rem; }
.comment-body { background: var(--canvas); border: 1px solid var(--paper-edge); border-radius: var(--radius); padding: 1rem 1.2rem; }
.comment-list .children { list-style: none; margin: 1.25rem 0 0 1.5rem; padding-left: 1rem; border-left: 3px solid var(--ember); }
.comment-author { font-family: var(--font-display); font-weight: 700; }
.comment-metadata { font-size: 0.82rem; color: var(--ink-soft); }
.comment-form label { display: block; font-family: var(--font-display); font-weight: 700; margin-bottom: 0.3rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--paper-edge); border-radius: var(--radius); font-family: var(--font-body); margin-bottom: 1rem; background: #fff; color: var(--ink);
}
.comment-form textarea:focus, .comment-form input:focus { outline: 2px solid var(--ember); border-color: var(--ember); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  background: var(--night);
  color: var(--cream);
  margin-top: 3rem;
}
.footer-treeline { display: block; width: 100%; height: 60px; color: var(--treeline); margin-top: -1px; }
.footer-treeline svg { width: 100%; height: 100%; }
.site-footer__inner {
  width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto;
  padding: 2.5rem 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem;
}
.site-footer .widget { background: transparent; border: 0; box-shadow: none; padding: 0; margin: 0; }
.site-footer .widget-title { color: var(--ember-glow); border-color: var(--ember); }
.site-footer a { color: var(--cream); background-size: 100% 1px; }
.site-footer a:hover { color: var(--ember-glow); }
.site-footer .widget ul li { border-color: rgba(244,234,217,0.14); }
.site-colophon {
  border-top: 1px solid rgba(244,234,217,0.15);
  text-align: center; padding: 1.3rem 0; font-size: 0.88rem; color: var(--cream-soft);
}
.site-colophon a { color: var(--ember-glow); background: none; }

/* ==========================================================================
   Misc entry states
   ========================================================================== */
.page-header-inline { margin-bottom: 2rem; }
.no-results { background: var(--paper); border: 1px solid var(--paper-edge); border-radius: var(--radius); padding: 2rem; }
.error-404 { text-align: center; padding: 2rem 0; }
.error-404 .huge { font-family: var(--font-poster); font-size: clamp(4rem, 18vw, 9rem); color: var(--ember); line-height: 1; margin: 0; }

.wp-block-button__link { background: var(--ember); color: var(--night); border-radius: var(--radius); }
.has-ember-color { color: var(--ember) !important; }
.has-bark-color { color: var(--bark) !important; }
.has-ember-background-color { background-color: var(--ember) !important; }
.has-bark-background-color { background-color: var(--bark) !important; }

.aligncenter { margin-inline: auto; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.sticky .post-card { border-color: var(--ember); }
