/* Layout concept: a trail-guide page. Granite-grey ground, routed wooden-sign
   section headers in spruce, and one seasonal accent (lupine, lake, maple, ice)
   that changes with the Seasons tab. Single column, wide at desktop. */
:root {
  --bg: #f3f5f1;
  --surface: #ffffff;
  --band: #e8ece6;
  --ink: #1b2320;
  --muted: #4f5a54;
  --line: #d3d9d1;
  --sign: #1f4a3a;
  --sign-ink: #f6f0dc;
  --hero-ink: #ffffff;
  --shade: rgba(10, 20, 16, 0.62);

  /* seasonal accents (text-safe on --bg and --surface) */
  --spring: #6a3d9e;
  --summer: #0a5d86;
  --fall: #a8400f;
  --winter: #1d5a94;
  --accent: var(--fall);

  /* winter theme: deep evergreen-navy, snow white, cold blue */
  --winter-bg: #eef3f7;
  --winter-band: #e0e8ef;
  --winter-sign: #173a4c;
  --winter-sign-ink: #f5f9fc;
  --winter-surface: #ffffff;
  --winter-line: #cfd9e2;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, var(--surface));

  /* map region fills */
  --r1: #b9cfb4; --r2: #9fbfa6; --r3: #a9c8d6; --r4: #cdbfdc;
  --r5: #d9c7a6; --r6: #c9cfc1; --r7: #a7bfd9;
  --map-ink: #1b2320;
  --map-line: rgba(255, 255, 255, 0.7);

  --display: "Zilla Slab", Rockwell, "Roboto Slab", Georgia, serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.8rem, 1.4rem + 1.6vw, 2.4rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.4vw, 4rem);
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111613; --surface: #19201c; --band: #151b18; --ink: #e6ebe6; --muted: #a7b1aa;
    --line: #2d3732; --sign: #2a5a47; --sign-ink: #f6f0dc; --shade: rgba(5, 10, 8, 0.66);
    --spring: #c8a8f2; --summer: #72c3ec; --fall: #ff9d62; --winter: #9fcbf2;
    --winter-bg: #0d141a; --winter-band: #111b23; --winter-sign: #1d4659; --winter-sign-ink: #f5f9fc; --winter-surface: #16212a; --winter-line: #2a3946;
    --r1: #2f4a33; --r2: #355a44; --r3: #2d4d5c; --r4: #463c58; --r5: #55462d; --r6: #3c423b; --r7: #2f4561;
    --map-ink: #eef2ee; --map-line: rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111613; --surface: #19201c; --band: #151b18; --ink: #e6ebe6; --muted: #a7b1aa;
  --line: #2d3732; --sign: #2a5a47; --sign-ink: #f6f0dc; --shade: rgba(5, 10, 8, 0.66);
  --spring: #c8a8f2; --summer: #72c3ec; --fall: #ff9d62; --winter: #9fcbf2;
  --winter-bg: #0d141a; --winter-band: #111b23; --winter-sign: #1d4659; --winter-sign-ink: #f5f9fc; --winter-surface: #16212a; --winter-line: #2a3946;
  --r1: #2f4a33; --r2: #355a44; --r3: #2d4d5c; --r4: #463c58; --r5: #55462d; --r6: #3c423b; --r7: #2f4561;
  --map-ink: #eef2ee; --map-line: rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
body[data-season="spring"] { --accent: var(--spring); }
body[data-season="summer"] { --accent: var(--summer); }
body[data-season="fall"] { --accent: var(--fall); }
body[data-season="winter"] {
  --accent: var(--winter);
  --bg: var(--winter-bg);
  --band: var(--winter-band);
  --sign: var(--winter-sign);
  --sign-ink: var(--winter-sign-ink);
  --surface: var(--winter-surface);
  --line: var(--winter-line);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-wrap: break-word;
  transition: background-color 300ms ease;
}
.band, .site-footer, .sign, .spotlight { transition: background-color 300ms ease; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip {
  position: absolute; left: 8px; top: -60px; z-index: 20;
  background: var(--sign); color: var(--sign-ink); padding: 8px 14px; border-radius: var(--radius);
}
.skip:focus { top: calc(8px + env(safe-area-inset-top, 0px)); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; color: var(--hero-ink); background: #1b2a22; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8, 16, 12, 0.35) 0%, rgba(8, 16, 12, 0.55) 45%, rgba(8, 16, 12, 0.82) 100%);
}
.hero-inner { position: relative; z-index: 1; padding-block: clamp(4rem, 12vw, 9rem) 2rem; display: grid; gap: 1.1rem; }
.snow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.snow-toggle {
  position: absolute; z-index: 2;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  font: 600 0.8rem/1 var(--body); color: #fff; cursor: pointer;
  padding: 0.45rem 0.75rem; border-radius: 999px;
  background: rgba(8, 16, 12, 0.45); border: 1px solid rgba(255, 255, 255, 0.5);
}
.snow-toggle:hover { background: rgba(8, 16, 12, 0.65); }
.snow-toggle:focus-visible { outline-color: #fff; }
.hero-kicker { font-family: var(--display); font-weight: 600; font-size: var(--step-2); color: #fff; max-width: 30ch; }
.hero-eyebrow { color: #e9efe9; }
.hero h1 { font-size: var(--step-4); font-weight: 700; max-width: 16ch; letter-spacing: -0.01em; }
.hero-lede { font-size: var(--step-1); max-width: 40ch; color: #eef3ee; }
.jump ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.jump a {
  display: inline-block; padding: 0.4rem 0.8rem; border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 600; font-size: var(--step--1);
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.45);
}
.jump a:hover { background: rgba(255, 255, 255, 0.26); }
.jump a:focus-visible { outline-color: #fff; }

/* ---------- Seasonal highlight strip ---------- */
.spotlight { background: var(--sign); color: var(--sign-ink); padding-block: 1.5rem 1.75rem; }
.spotlight-h { font-family: var(--mono); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.9rem; }
.spotlight-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0.75rem; }
.spot {
  display: grid; gap: 0.2rem; height: 100%; padding: 0.85rem 1rem; border-radius: var(--radius);
  color: var(--sign-ink); text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--sign-ink) 35%, transparent);
  background: color-mix(in srgb, var(--sign-ink) 7%, transparent);
}
.spot strong { font-family: var(--display); font-size: var(--step-1); line-height: 1.2; }
.spot span { font-size: var(--step--1); opacity: 0.92; }
.spot:hover { background: color-mix(in srgb, var(--sign-ink) 15%, transparent); }
.spot:focus-visible { outline-color: var(--sign-ink); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.band { background: var(--band); }
.sec-head { display: grid; gap: 0.6rem; justify-items: start; margin-bottom: 2rem; }
.sec-lede { color: var(--muted); max-width: 60ch; }
/* routed trail-sign header */
.sign {
  font-size: var(--step-3);
  font-weight: 700;
  color: var(--sign-ink);
  background: var(--sign);
  padding: 0.3em 0.75em 0.32em;
  border-radius: 4px;
  box-shadow: inset 0 0 0 3px var(--sign), inset 0 0 0 5px color-mix(in srgb, var(--sign-ink) 35%, var(--sign));
  letter-spacing: 0.01em;
}
.sub-h { font-size: var(--step-2); margin-bottom: 1rem; }
.note { color: var(--muted); font-size: var(--step--1); margin-top: 0.75rem; max-width: 70ch; }

/* ---------- Facts ---------- */
.facts { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 2rem 2.5rem; }
.fact { display: grid; gap: 0.35rem; align-content: start; border-top: 2px solid var(--line); padding-top: 1rem; }
.fact-big { font-family: var(--display); font-size: 3rem; line-height: 1; color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.fact h3 { font-size: var(--step-1); }
.fact p { color: var(--ink); max-width: 60ch; }
.fact sup a { font-family: var(--mono); font-size: 0.72rem; text-decoration: none; padding-inline: 1px; }

/* ---------- Seasons ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.tab {
  font: 600 var(--step-0)/1 var(--body);
  padding: 0.7rem 1.1rem; border-radius: 999px; cursor: pointer;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line);
}
.tab:hover { border-color: var(--accent); }
.tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.season-top { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); align-items: center; margin-bottom: 2rem; }
@media (min-width: 52rem) { .season-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); } }
.season-top h3 { font-size: var(--step-3); color: var(--accent); }
.season-top .intro { margin-top: 0.75rem; max-width: 55ch; font-size: var(--step-1); }
.season-photo img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); }
.cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; display: grid; gap: 0.4rem; align-content: start; }
.card h4 { font-family: var(--display); font-size: var(--step-1); line-height: 1.2; margin: 0; }
.card a { font-weight: 600; font-size: var(--step--1); }

.feature {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin-bottom: 1.5rem;
  background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 52rem) { .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.feature img { width: 100%; height: 100%; min-height: 14rem; object-fit: cover; }
.night-train { min-height: 14rem; height: 100%; background: #0b1a2c; }
.night-train svg { display: block; width: 100%; height: 100%; min-height: 14rem; }
.feature-body { padding: 1.5rem; display: grid; gap: 0.7rem; align-content: center; }
.feature-body .eyebrow { color: var(--accent); }
.feature-body h4 { font-family: var(--display); font-size: var(--step-3); margin: 0; line-height: 1.1; }
.btn {
  justify-self: start; display: inline-block; padding: 0.6rem 1rem; border-radius: var(--radius);
  background: var(--accent); color: var(--surface); font-weight: 700; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.trains { margin-bottom: 2rem; }
.trains h4 { font-family: var(--display); font-size: var(--step-2); margin: 0 0 0.75rem; }
.train-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem 1.5rem; }
.train-list li { border-top: 1px solid var(--line); padding-top: 0.75rem; display: grid; gap: 0.25rem; align-content: start; }
.train-list strong { font-size: var(--step-0); }
.train-where { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }

/* ---------- Regions ---------- */
.regions-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 52rem) { .regions-grid { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); } }
.map { margin: 0; max-width: 22rem; justify-self: center; width: 100%; }
.map-svg { width: 100%; height: auto; display: block; overflow: visible; }
.region path { stroke-width: 0.8; stroke-linejoin: round; cursor: pointer; transition: fill 160ms ease; }
.region.r1 path { fill: var(--r1); stroke: var(--r1); }
.region.r2 path { fill: var(--r2); stroke: var(--r2); }
.region.r3 path { fill: var(--r3); stroke: var(--r3); }
.region.r4 path { fill: var(--r4); stroke: var(--r4); }
.region.r5 path { fill: var(--r5); stroke: var(--r5); }
.region.r6 path { fill: var(--r6); stroke: var(--r6); }
.region.r7 path { fill: var(--r7); stroke: var(--r7); }
.region:hover path { fill: color-mix(in srgb, var(--accent) 35%, var(--bg)); stroke: color-mix(in srgb, var(--accent) 35%, var(--bg)); }
.region[aria-pressed="true"] path { fill: var(--accent); stroke: var(--accent); }
.region:focus { outline: none; }
.region:focus-visible path { stroke: var(--ink); stroke-width: 2.5; }
.county-lines path { fill: none; stroke: var(--map-line); stroke-width: 0.6; pointer-events: none; }
.map-labels text { font: 600 11px var(--body); fill: var(--map-ink); text-anchor: middle; pointer-events: none; }
.map-labels text.on { fill: var(--surface); }
.map-cap { font-size: 0.75rem; color: var(--muted); margin-top: 0.75rem; }
.region-side { display: grid; gap: 1.25rem; min-width: 0; }
.region-list { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.region-btn {
  font: 600 var(--step--1)/1 var(--body); padding: 0.55rem 0.85rem; border-radius: 999px; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line);
}
.region-btn:hover { border-color: var(--accent); }
.region-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.region-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 0.9rem; }
.region-panel h3 { font-size: var(--step-3); }
.region-panel h4 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0; font-weight: 500; }
.region-panel ul { padding-left: 1.2rem; display: grid; gap: 0.25rem; }
.region-panel .town-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding-left: 0; }
.town-chips li { font-size: var(--step--1); padding: 0.2rem 0.6rem; border-radius: 999px; background: var(--accent-soft); }

/* ---------- Events ---------- */
.months { list-style: none; display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: 1rem; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem 1.2rem; display: grid; gap: 0.75rem; align-content: start; }
.month.now { border: 2px solid var(--accent); }
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; border-bottom: 1px solid var(--line); padding-bottom: 0.5rem; }
.month-head h3 { font-size: var(--step-2); }
.now-pill { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--accent); color: var(--surface); padding: 0.2rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.ev-list { list-style: none; display: grid; gap: 0.8rem; }
.ev { display: grid; gap: 0.1rem; }
.ev-name { font-weight: 700; }
.ev-name a { color: var(--ink); text-decoration-color: var(--accent); }
.ev-name a:hover { color: var(--accent); }
.ev-town { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.ev-when { font-size: var(--step--1); }
.ev.star .ev-name::before { content: "\2605\00a0"; color: var(--accent); }
.ev.note { font-style: italic; }

/* ---------- Towns ---------- */
.towns { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 2rem 2rem; }
.town { display: grid; gap: 0.45rem; align-content: start; }
.town img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 0.4rem; }
.town h3 { font-size: var(--step-2); }
.town .eyebrow { font-size: 0.72rem; }
.town a { font-size: var(--step--1); font-weight: 600; }

/* ---------- Small-town spotlight ---------- */
.small-towns { display: grid; gap: 2rem; }
.small-town {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
@media (min-width: 52rem) { .small-town { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.small-town-media img { width: 100%; height: 100%; min-height: 14rem; object-fit: cover; }
.small-town-art {
  min-height: 14rem; height: 100%;
  background:
    radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--accent) 30%, transparent) 0 18%, transparent 19%),
    linear-gradient(160deg, var(--band), color-mix(in srgb, var(--accent) 22%, var(--band)));
}
.small-town-body { padding: 1.5rem; display: grid; gap: 0.75rem; align-content: start; min-width: 0; }
.small-town-body h3 { font-size: var(--step-3); }
.small-town-tag { font-family: var(--display); font-size: var(--step-1); color: var(--accent); font-weight: 600; }
.small-town-body > p { max-width: 65ch; }
.small-town-body h4 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin: 0.5rem 0 0; }
.small-events { list-style: none; display: grid; gap: 0.9rem; }
.small-events li { display: grid; gap: 0.1rem; border-left: 3px solid var(--accent); padding-left: 0.8rem; }

/* ---------- Eat & drink ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.coffee { width: 100%; border-collapse: collapse; font-size: var(--step--1); min-width: 32rem; }
.coffee th, .coffee td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.coffee thead th { font-family: var(--mono); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.coffee tbody tr:last-child td { border-bottom: 0; }
.coffee td:first-child { font-weight: 700; }
.eats { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.5rem 2rem; margin-top: 2.5rem; }
.eats li { display: grid; gap: 0.35rem; align-content: start; border-top: 2px solid var(--line); padding-top: 0.9rem; }
.eats h3 { font-size: var(--step-1); }
.eats a { font-size: var(--step--1); font-weight: 600; }

/* ---------- Fun facts ---------- */
.fun { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.75rem 2rem; }
.fun li { display: grid; gap: 0.35rem; align-content: start; }
.fun h3 { font-size: var(--step-2); color: var(--accent); }
.fun a { font-size: var(--step--1); font-weight: 600; }
.sources { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.sources ol { padding-left: 1.4rem; display: grid; gap: 0.4rem; font-size: var(--step--1); color: var(--muted); }
.sources li:target { background: var(--accent-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--sign); color: var(--sign-ink); padding-block: 2.5rem; font-size: var(--step--1); }
.site-footer a { color: var(--sign-ink); }
.site-footer a:focus-visible { outline-color: var(--sign-ink); }
.footer-inner { display: grid; gap: 1rem; }
.footer-inner > * { max-width: 70ch; }
.disclaimer { opacity: 0.92; }
.realtor { font-weight: 600; }
.credits summary { cursor: pointer; font-weight: 600; }
.credits ul { list-style: disc; padding-left: 1.2rem; margin-top: 0.6rem; display: grid; gap: 0.3rem; }
.credits p { margin-top: 0.6rem; }
.updated { opacity: 0.85; }
.noscript { padding-block: 1rem; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
