/* Interior pages of the town: service pages and the field notes share one
   shell so every page down the street matches the homepage's pier-at-lamplight
   system. Each page paints its own trim via two custom properties set in a
   small inline <style>:
     --accent       text-safe tint (AA on paper and surface, both schemes)
     --accent-rail  decorative door paint (card rails, dots; no AA duty)
   Defaults below are the brand ember. */

@font-face { font-family: "Josefin Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/josefin-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Josefin Sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/josefin-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/mulish-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Mulish"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/mulish-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/red-hat-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Red Hat Mono"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/fonts/red-hat-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --display: "Josefin Sans", ui-sans-serif, system-ui, sans-serif;
  --body: "Mulish", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #f5f1e6;
  --surface: #fcfaf3;
  --border: #e2dbc7;
  --ink: #211f18;
  --ink-2: #575244;
  --ink-3: #6b6455;
  --pine: #16302e;
  --pine-deep: #0b1f1e;
  --glow: #e4532f;
  --link: #c4401f;
  --ember: #c4401f;
  --ember-deep: #a53517;
  --lamp-bright: #f5b04c;
  --accent: #c4401f;
  --accent-rail: #e4532f;
  --dot: #8a5a10;
  --dot-glow: none;
  --ok-ink: #33682e;
  --deck-board: #e9e1cb; --deck-gap: #cfc5a8; --deck-edge: #bfb494;
  --night-ink: #f2f7f6; --night-sub: #bcd8d2; --night-dim: #8db9b3;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a100f;
    --surface: #131f1d;
    --border: #263733;
    --ink: #eef3f1;
    --ink-2: #c3cfcb;
    --ink-3: #93a39e;
    --glow: #ef6743;
    --link: #ef6743;
    --accent: #ef6743;
    --accent-rail: #ef6743;
    --dot: #f5b04c;
    --dot-glow: 0 0 8px 1px color-mix(in srgb, #f5b04c 65%, transparent);
    --ok-ink: #9fce8f;
    --deck-board: #1c2b28; --deck-gap: #0c1513; --deck-edge: #31443f;
  }
}

* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
img, svg { max-width: 100%; }
a { color: var(--link); }
a:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
.deck { height: 14px; border-top: 1px solid var(--deck-edge); border-bottom: 1px solid var(--deck-edge);
  background: repeating-linear-gradient(90deg, var(--deck-gap) 0 3px, var(--deck-board) 3px 92px), var(--deck-board); }

/* --- nav --- */
nav.top { background: var(--pine-deep); color: var(--night-ink); border-bottom: 1px solid rgba(185,214,209,.16); }
.nav-inner { display: flex; align-items: center; gap: 18px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff;
  font: 700 17px/1 var(--display); text-transform: uppercase; letter-spacing: .07em; padding-top: 2px; }
.brand svg { width: 21px; height: 20px; color: var(--night-sub); flex: none; position: relative; top: -2px; }
.nav-links { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; align-items: center; }
.nav-links a { color: var(--night-sub); text-decoration: none; font-size: 13.5px; font-weight: 700; }
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current="page"] { color: #fff; border-bottom: 2px solid var(--lamp-bright); padding-bottom: 2px; }
.nav-links a.cta { background: var(--ember); color: #fff; padding: 8px 16px; border-radius: 9px; }
.nav-links a.cta:hover { background: var(--ember-deep); }
@media (max-width: 720px) { .nav-links { margin-left: 0; flex-basis: 100%; padding-bottom: 4px; } }

/* --- hero: pine at lamplight, the page's door paint on the sill ---
   Each page sets a photo behind the pine veil (privacy/terms pattern).
   The gradient ground stays underneath as the loading fallback; the veil
   keeps the text zone at ~.9 pine so the photo reads as a right-edge
   vignette, per the hero readability standard. Mobile swaps to a heavier
   vertical scrim. Per-photo aim = object-position on the img itself. */
header.hero { position: relative; overflow: hidden; background:
    radial-gradient(90% 140% at 85% -20%, color-mix(in srgb, var(--accent-rail) 26%, transparent), transparent 60%),
    linear-gradient(180deg, var(--pine-deep), var(--pine));
  color: var(--night-ink); border-bottom: 3px solid var(--accent-rail); }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-veil { position: absolute; inset: 0; background:
  linear-gradient(97deg, rgba(11,31,30,.95) 0%, rgba(11,31,30,.88) 36%, rgba(11,31,30,.6) 62%, rgba(11,31,30,.22) 86%, rgba(11,31,30,.14) 100%); }
@media (max-width: 720px) {
  .hero-veil { background: linear-gradient(180deg, rgba(11,31,30,.95) 0%, rgba(11,31,30,.88) 55%, rgba(11,31,30,.68) 100%); }
}
.hero-inner { position: relative; z-index: 1; padding: 58px 20px 64px; }
.eyebrow { font: 600 11px/1.5 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--lamp-bright); }
h1 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .035em;
  font-size: clamp(27px, 4.4vw, 44px); line-height: 1.1; margin-top: 14px; max-width: 860px; }
.hero p.lede { margin-top: 16px; max-width: 660px; font-size: 17px; color: #e3edea; }
.hero p.lede a { color: var(--lamp-bright); }
.hero-facts { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-facts .fact { background: rgba(11,31,30,.55); border-color: rgba(185,214,209,.28); color: var(--night-sub); }
.hero-facts .fact strong { color: #fff; }
.hero-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 15px;
  text-decoration: none; font-family: var(--body); }
.btn-glow { background: var(--ember); color: #fff;
  box-shadow: 0 8px 24px rgba(228,83,47,.32), 0 0 48px rgba(245,176,76,.16); }
.btn-glow:hover { background: var(--ember-deep); }
.btn-ghost { border: 1px solid rgba(185,214,209,.5); color: var(--night-ink); }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.hero p.stamp { margin-top: 20px; font: 400 12px/1.7 var(--mono); color: var(--night-dim); }

/* --- sections --- */
main { padding-bottom: 8px; }
section { padding: 56px 0 8px; }
.kicker { font: 600 11px/1.5 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
  display: inline-flex; align-items: center; gap: 9px; }
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-rail);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-rail) 18%, transparent); }
h2 { font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .045em;
  font-size: clamp(21px, 3vw, 28px); margin-top: 10px; }
.section-lede { margin-top: 12px; max-width: 760px; color: var(--ink-2); }
.section-lede + .section-lede { margin-top: 10px; }

/* --- cards --- */
.grid { margin-top: 26px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); }
.cols { margin-top: 26px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.card { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.card p { font-size: 14px; color: var(--ink-2); flex: 1; }
.card .stack { font: 400 11.5px/1.6 var(--mono); color: var(--ink-3); flex: 0 0 auto; }
.card a.demo { font-size: 14px; font-weight: 700; color: var(--link); text-decoration: none;
  padding-top: 10px; border-top: 1px solid var(--border); }
.card a.demo:hover { text-decoration: underline; }
.card.rail::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 3px;
  background: var(--accent-rail); border-radius: 0 0 3px 3px; opacity: .85; }
.card p.step-plate { font: 600 10.5px/1.4 var(--mono); letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); flex: 0 0 auto; }
.card ul.plain { margin: 0; padding: 14px 0 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.card ul.plain li { padding-left: 18px; position: relative; }
.card ul.plain li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--dot); box-shadow: var(--dot-glow); }

/* --- chips, checklists, tiers (same joinery as the homepage) --- */
.facts { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.fact { font: 600 11px/1.6 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 14px; color: var(--ink-2); }
.fact strong { color: var(--ink); font-weight: 600; margin-right: 6px; }
.checklist { margin: 24px 0 0; padding: 0; list-style: none; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); }
.checklist li { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 16px 16px 42px; position: relative; font-size: 14px; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: 17px; top: 21px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--dot); box-shadow: var(--dot-glow); }
.checklist strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 3px; }
.tiers { margin-top: 26px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.tier { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; position: relative; }
.tier.hot { border-color: var(--glow); box-shadow: 0 6px 24px rgba(228,83,47,.12); }
.tier .flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--ember);
  color: #fff; font: 600 10px/1.6 var(--mono); text-transform: uppercase; letter-spacing: .08em;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap; }
.tier .tier-name { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: .02em; }
.tier h3 { font: 600 11px/1.6 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  margin-top: 4px; color: var(--accent); }
.tier ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.tier li { padding-left: 20px; position: relative; }
.tier li::before { content: "✓"; position: absolute; left: 0; color: var(--ok-ink); font-weight: 700; }

/* --- question and answer rows --- */
.qa { margin-top: 26px; display: grid; gap: 14px; }
.qa div { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.qa h3 { font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .01em; }
.qa p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }

/* --- closing invitation --- */
.cta-band { margin-top: 64px; background: linear-gradient(180deg, var(--pine-deep), var(--pine));
  color: var(--night-ink); padding: 52px 0 58px; }
.cta-band h2 { margin-top: 0; }
.cta-band p { margin-top: 12px; max-width: 640px; color: var(--night-sub); }
.cta-band p a { color: var(--lamp-bright); }
.cta-band .hero-actions { margin-top: 24px; }

/* --- the field notes: index cards and articles --- */
.post-list { margin-top: 28px; display: grid; gap: 16px; }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px 24px 20px; position: relative; overflow: hidden; display: block; text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.post-card::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 3px;
  background: var(--accent-rail); border-radius: 0 0 3px 3px; opacity: .85; }
.post-card:hover { border-color: color-mix(in srgb, var(--accent-rail) 55%, var(--border));
  transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--accent-rail) 16%, transparent); }
.post-card .post-date { font: 600 11px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.post-card h2, .post-card h3 { font-family: var(--display); font-weight: 700; text-transform: none;
  letter-spacing: .01em; font-size: 21px; margin-top: 8px; color: var(--ink); }
.post-card p { margin-top: 8px; font-size: 14.5px; color: var(--ink-2); }
.post-card .read { display: inline-block; margin-top: 12px; font-weight: 700; font-size: 14px; color: var(--link); }

article { max-width: 820px; margin: 0 auto; padding: 44px 20px 24px; }
article .post-meta { font: 400 12px/1.7 var(--mono); color: var(--ink-3); }
article .post-meta a { color: var(--accent); }
article h2 { font-size: 19px; margin-top: 40px; }
article p, article li { color: var(--ink-2); margin-top: 12px; font-size: 15.5px; }
article ul, article ol { margin: 0; padding-left: 24px; }
article li { margin-top: 8px; }
article li::marker { color: var(--accent); }
article strong { color: var(--ink); }
article code { font: 400 .9em var(--mono); background: var(--surface); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
.note-card { margin-top: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; position: relative; overflow: hidden; }
.note-card::before { content: ""; position: absolute; top: 0; left: 16px; right: 16px; height: 3px;
  background: var(--accent-rail); border-radius: 0 0 3px 3px; opacity: .85; }
.note-card p { margin-top: 0; font-size: 14.5px; }
.note-card p + p { margin-top: 10px; }
article .post-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 14.5px; color: var(--ink-2); }

/* --- footer --- */
footer { background: var(--pine-deep); color: var(--night-sub); font-size: 13px; }
.foot-grid { display: grid; gap: 28px; padding: 38px 20px 30px; max-width: 1100px; margin: 0 auto; }
@media (min-width: 640px) { .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.foot-brand { font: 700 15px/1.3 var(--display); text-transform: uppercase; letter-spacing: .06em;
  color: #fff; display: flex; align-items: center; gap: 8px; }
.foot-brand svg { width: 18px; height: 17px; flex: none; position: relative; top: -1px; }
.foot-desc { margin-top: 10px; font-size: 12.5px; line-height: 1.6; color: var(--night-dim); max-width: 300px; }
.foot-head { font-weight: 700; color: #fff; }
.foot-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 5px; }
.foot-list a { color: var(--night-sub); text-decoration: none; }
.foot-list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.foot-credit { color: var(--night-dim); }
.foot-bar { border-top: 1px solid rgba(185,214,209,.16); padding: 15px 20px; text-align: center;
  font: 400 11.5px/1.6 var(--mono); color: var(--night-dim); }
