/* ==========================================================================
   OUTDOOR DEVS — site.css
   SWITCHBACK interior pages. Each page lives at its own hour of the day:
   Projects = THE SURVEY (midday) · About = THE TRIP LOG (golden hour)
   Blog = THE LOGBOOK (dusk) · 404 = OFF TRAIL (night)
   Articles = field-journal entries on paper.
   The homepage has its own sheet (home.css); shared voice: Geist landscape,
   Geist Mono instrument, blaze-orange trail.
   ========================================================================== */

/* ---------- 1. Fonts ---------- */

@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('/fonts/geist-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}

/* ---------- 2. Tokens ---------- */

:root {
  --day-a:   #F2F0E6;  --day-b:   #E4EADC;
  --gold-a:  #EFD9AC;  --gold-b:  #E6BC7E;
  --dusk-a:  #2C3642;  --dusk-b:  #18222E;
  --night-a: #0E1620;  --night-b: #070C12;

  --blaze:   #E8762C;
  --ember:   #FFB35C;
  --fern:    #3F6142;
  --topo:    #B5A584;
  --paper:   #F7F3E8;
  --ink-dark:  #15231B;
  --ink-light: #E9EDF2;
  --granite:   #5C645B;
  --granite-d: #97A1A8;

  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pop:  cubic-bezier(0.34, 1.56, 0.64, 1);

  --gut: clamp(1.25rem, 6vw, 6rem);
  --maxw: 78rem;
}

/* ---------- 3. Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  background: var(--day-a);
  color: var(--ink-dark);
  overflow-x: hidden;
}

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

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

::selection { background: var(--blaze); color: #14100A; }

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

.skip-link {
  position: absolute;
  top: -100px; left: 16px;
  z-index: 300;
  background: var(--ink-dark);
  color: var(--ink-light);
  padding: 10px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.875rem;
}
.skip-link:focus { top: 12px; }

/* film grain */
body::after {
  content: '';
  position: fixed; inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 4. Page themes ---------- */

body[data-time="day"]    { background: linear-gradient(180deg, var(--day-a),  var(--day-b))  fixed; color: var(--ink-dark); }
body[data-time="golden"] { background: linear-gradient(180deg, var(--gold-a), var(--gold-b)) fixed; color: #2A1F10; }
body[data-time="dusk"]   { background: linear-gradient(180deg, var(--dusk-a), var(--dusk-b)) fixed; color: var(--ink-light); }
body[data-time="night"]  { background: linear-gradient(180deg, var(--night-a), var(--night-b)) fixed; color: var(--ink-light); }
body[data-time="paper"]  { background: var(--day-a); color: var(--ink-dark); }

/* ---------- 5. Chrome ---------- */

.chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px clamp(16px, 3vw, 36px);
}
body[data-time="day"] .chrome,
body[data-time="golden"] .chrome,
body[data-time="paper"] .chrome { color: #1A271E; }
body[data-time="dusk"] .chrome,
body[data-time="night"] .chrome { color: #F2EFE3; }

/* readability scrim under fixed chrome on light pages */
.chrome::before {
  content: '';
  position: absolute; inset: 0 0 -22px 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(242, 240, 230, 0.92), transparent);
}
body[data-time="golden"] .chrome::before {
  background: linear-gradient(180deg, rgba(239, 217, 172, 0.92), transparent);
}
/* dark pages: a contained glass bar, so light cards scrolling beneath
   don't pick up a long gradient shadow */
body[data-time="dusk"] .chrome::before,
body[data-time="night"] .chrome::before {
  inset: 0;
  background: rgba(10, 16, 24, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(233, 237, 242, 0.08);
}

.mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 500;
}
.mark-blaze {
  width: 9px; height: 14px;
  background: var(--blaze);
  border-radius: 1px;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.25);
}

.chrome-nav { position: relative; display: flex; gap: clamp(8px, 2vw, 26px); }
.chrome-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.chrome-nav a:hover { color: var(--blaze); border-bottom-color: var(--blaze); }
body[data-time="dusk"] .chrome-nav a:hover,
body[data-time="night"] .chrome-nav a:hover { color: var(--ember); border-bottom-color: var(--ember); }
.chrome-nav a[aria-current="page"] { border-bottom-color: var(--blaze); }

/* ---------- 6. Effect utilities ---------- */

html.fx [data-r],
html.fx [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
html.fx [data-r].in,
html.fx [data-reveal].in { opacity: 1; transform: none; }

.trail-note {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.16em;
  padding: 7px 12px;
  border: 1px dashed rgba(232, 118, 44, 0.55);
  border-radius: 3px;
  background: rgba(248, 245, 235, 0.55);
  color: var(--granite);
}
body[data-time="dusk"] .trail-note,
body[data-time="night"] .trail-note {
  background: rgba(14, 22, 32, 0.45);
  color: var(--granite-d);
  border-color: rgba(255, 179, 92, 0.45);
}
body[data-time="golden"] .trail-note {
  background: rgba(250, 243, 226, 0.5);
  color: #6B4A1E;
}

.blaze-link {
  display: inline-block;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--blaze);
  padding-bottom: 2px;
  transition: color 0.2s ease;
}
.blaze-link:hover { color: var(--blaze); }
body[data-time="dusk"] .blaze-link:hover,
body[data-time="night"] .blaze-link:hover { color: var(--ember); }

/* trail segments (JS-injected) */
.trail-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: visible;
}
.trail-svg path {
  fill: none;
  stroke: var(--blaze);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 1.5 11;
}
body[data-time="dusk"] .trail-svg path,
body[data-time="night"] .trail-svg path { stroke: var(--ember); }

.wpt { display: flex; align-items: center; gap: 12px; }
.wpt-diamond {
  position: relative;
  width: 13px; height: 13px;
  background: var(--blaze);
  transform: rotate(45deg);
  flex: 0 0 auto;
}
.wpt-diamond::after {
  content: '';
  position: absolute; inset: -7px;
  border: 1.5px solid var(--blaze);
  opacity: 0;
}
html.fx [data-r] .wpt-diamond { transform: rotate(45deg) scale(0); }
html.fx [data-r].in .wpt-diamond { animation: wpt-pop 0.55s var(--pop) 0.1s forwards; }
html.fx [data-r].in .wpt-diamond::after { animation: wpt-ring 0.9s ease-out 0.35s 1; }
@keyframes wpt-pop { to { transform: rotate(45deg) scale(1); } }
@keyframes wpt-ring {
  0% { opacity: 0.9; transform: scale(0.5); }
  100% { opacity: 0; transform: scale(1.7); }
}
.wpt-label { font-size: 10.5px; letter-spacing: 0.18em; color: var(--granite); }
body[data-time="golden"] .wpt-label { color: #6B4A1E; }

/* content sits above the trail line */
[data-trail] { position: relative; }
[data-trail] > :where(:not(.trail-svg):not(.stars):not(.night-trees)) {
  position: relative;
  z-index: 2;
}

/* ---------- 7. Page header board ---------- */

.board {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(8rem, 17vh, 12rem) var(--gut) clamp(2rem, 5vh, 3.5rem);
}
.board h1 {
  margin-top: 1.4rem;
  font-size: clamp(2.4rem, 5.4vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
  max-width: 22ch;
}
.board-sub {
  margin-top: 1.1rem;
  max-width: 52ch;
  color: var(--granite);
  font-size: 1.1rem;
}
body[data-time="golden"] .board-sub { color: #5C431C; }
body[data-time="dusk"] .board-sub,
body[data-time="night"] .board-sub { color: #AEB8BD; }

/* ---------- 8. Field prints & survey sheets ---------- */

.print {
  background: #F8F5EB;
  padding: 10px 10px 12px;
  box-shadow: 0 22px 44px -20px rgba(21, 35, 27, 0.4);
  color: var(--ink-dark);
}
.print img { width: 100%; object-fit: cover; }
.print figcaption {
  margin-top: 9px;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--granite);
}

.cairn {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.cairn a {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 9px 14px;
  background: #ECE8DA;
  border: 1px solid #D8D3C2;
  border-radius: 3px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: var(--ink-dark);
  transition: transform 0.2s var(--ease), border-color 0.2s ease, box-shadow 0.2s ease;
}
.cairn a .mono { font-size: 9.5px; color: var(--granite); letter-spacing: 0.1em; }
.cairn a:hover {
  transform: translateY(-3px);
  border-color: var(--blaze);
  box-shadow: 0 10px 22px -12px rgba(21, 35, 27, 0.45);
}

/* THE SURVEY (projects) — scattered specimen collage */
.survey {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 4rem) var(--gut) clamp(4rem, 9vh, 7rem);
}
.sheet-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(2.5rem, 6vh, 4.5rem) 1.5rem;
  align-items: start;
}
.sheet {
  background: #F8F5EB;
  padding: 11px 11px 0;
  box-shadow: 0 26px 50px -22px rgba(21, 35, 27, 0.45);
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  color: var(--ink-dark);
}
.sheet:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 0 36px 60px -24px rgba(21, 35, 27, 0.55);
}
.sheet > a.sheet-media { display: block; }
.sheet img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.sheet-rail {
  padding: 11px 3px 0;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--granite);
}
.sheet-body { padding: 8px 8px 18px; }
.sheet-body h2, .sheet-body h3 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.sheet-body h2 a, .sheet-body h3 a { text-decoration: none; }
.sheet-body h2 a:hover, .sheet-body h3 a:hover { color: var(--blaze); }
.sheet-body p { margin-top: 0.6rem; font-size: 0.95rem; color: #39443B; }
.sheet-body .cairn { margin-top: 1rem; }
.sheet-body .cairn a { padding: 7px 11px; font-size: 11px; }

.sheet-feature { grid-column: 1 / 9; --rot: -1deg; }
.sheet-feature img { aspect-ratio: 16 / 9; }
.sheet-feature .sheet-body h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.sheet:nth-child(2) { grid-column: 9 / 13; margin-top: 16vh; --rot: 1.4deg; }
.sheet:nth-child(3) { grid-column: 1 / 5; --rot: 0.8deg; }
.sheet:nth-child(4) { grid-column: 5 / 9; margin-top: 7vh; --rot: -1.2deg; }
.sheet:nth-child(5) { grid-column: 9 / 13; margin-top: -6vh; --rot: 0.6deg; }
.sheet:nth-child(6) { grid-column: 2 / 6; --rot: -0.7deg; }
.sheet:nth-child(7) { grid-column: 6 / 10; margin-top: 9vh; --rot: 1.1deg; }
.sheet:nth-child(8) { grid-column: 1 / 5; margin-top: -4vh; --rot: 1.3deg; }
.sheet:nth-child(9) { grid-column: 5 / 9; margin-top: 5vh; --rot: -0.9deg; }
.sheet:nth-child(10) { grid-column: 9 / 13; margin-top: -8vh; --rot: -1.4deg; }
.sheet:nth-child(11) { grid-column: 3 / 8; margin-top: 4vh; --rot: 0.9deg; }

/* ---------- 9. THE LOGBOOK (blog) & journal notes ---------- */

.note {
  background: var(--paper);
  background-image: repeating-linear-gradient(transparent 0 26px, rgba(63, 97, 66, 0.1) 26px 27px);
  color: #1E2A22;
  box-shadow: 0 26px 48px -20px rgba(0, 0, 0, 0.55);
  transform: rotate(var(--nrot, 0deg));
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.note > a {
  display: block;
  padding: 1.4rem 1.5rem 1.6rem;
  text-decoration: none;
  color: inherit;
}
.note:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 0 34px 56px -22px rgba(0, 0, 0, 0.6);
}
.note-stamp {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--fern);
  border: 1.5px solid rgba(63, 97, 66, 0.5);
  border-radius: 2px;
  padding: 4px 9px;
  transform: rotate(-2deg);
  margin-bottom: 0.9rem;
}
.note h2, .note h3 {
  font-size: 1.3rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.note-sub { margin-top: 0.7rem; font-size: 0.92rem; color: #46524A; line-height: 1.55; }
.note .develop { margin: 0 0 1.2rem; }
.note .develop img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
html.fx .develop img {
  filter: grayscale(1) sepia(0.3) brightness(1.18) contrast(0.88);
  transition: filter 1.4s ease 0.2s;
}
html.fx .in .develop img { filter: none; }

.logbook {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 4rem) var(--gut) clamp(4rem, 9vh, 7rem);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2.5rem 1.5rem;
  align-items: start;
}
.logbook .note-feature { grid-column: 1 / 8; grid-row: 1 / 3; --nrot: -1.1deg; }
.logbook .note-feature h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.logbook .note:nth-child(2) { grid-column: 8 / 13; --nrot: 1.3deg; margin-top: 7vh; }
.logbook .note:nth-child(3) { grid-column: 8 / 13; grid-row: 2; --nrot: -0.7deg; margin-top: -1rem; }
.logbook .note:nth-child(4) { grid-column: 2 / 8; --nrot: 0.9deg; margin-top: -3rem; }
.logbook .note:nth-child(5) { grid-column: 8 / 13; grid-row: 3; --nrot: -1.3deg; margin-top: 2rem; }
.logbook .note:nth-child(6) { grid-column: 3 / 9; --nrot: 0.6deg; margin-top: 1rem; }

/* ---------- 10. TRIP LOG (about) ---------- */

.triplog-hero {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.5rem) var(--gut) 0;
  display: grid;
  grid-template-columns: minmax(280px, 50ch) 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.triplog-photos { position: relative; min-height: clamp(340px, 42vw, 520px); }
.triplog-photos .print-back {
  position: absolute;
  right: 55%; top: 0;
  width: min(260px, 42%);
  transform: rotate(1.8deg);
}
.triplog-photos .print-back img { aspect-ratio: 4 / 5; }
.triplog-photos .print-front {
  position: absolute;
  right: 0; top: 24%;
  width: min(430px, 72%);
  transform: rotate(-1.8deg);
  clip-path: polygon(0 0, 100% 0, 100% 96.5%, 96% 98.2%, 91% 96.8%, 85% 99%, 79% 97.2%, 72% 98.8%, 65% 96.9%, 58% 98.6%, 50% 97%, 43% 99%, 36% 97.2%, 29% 98.8%, 22% 96.8%, 15% 98.4%, 8% 97%, 3% 98.6%, 0 96.8%);
  padding-bottom: 30px;
}
.triplog-photos .print-front img { aspect-ratio: 16 / 9; }

.prose-sheet {
  background: var(--paper);
  background-image: repeating-linear-gradient(transparent 0 28px, rgba(63, 97, 66, 0.1) 28px 29px);
  color: #1E2A22;
  box-shadow: 0 26px 48px -22px rgba(40, 24, 8, 0.4);
  padding: clamp(1.8rem, 4vw, 3rem);
  transform: rotate(-0.5deg);
  max-width: 70ch;
}
.prose-sheet h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.prose-sheet p { margin-top: 1rem; }
.prose-sheet a { text-decoration: none; border-bottom: 2px solid var(--blaze); font-weight: 600; }
.prose-sheet a:hover { color: var(--blaze); }

.waypoints {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 5rem) var(--gut);
}
.waypoint {
  position: relative;
  width: min(620px, 90%);
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
}
.waypoint:nth-child(even) { margin-left: auto; }
.waypoint .wpt { margin-bottom: 0.7rem; }
.waypoint h3 {
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.waypoint p { margin-top: 0.5rem; color: #5C431C; max-width: 56ch; }
body[data-time="day"] .waypoint p { color: var(--granite); }

.why-grid {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 5rem) var(--gut) 0;
  display: grid;
  grid-template-columns: minmax(300px, 1.2fr) minmax(260px, 1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: center;
}
.why-grid .print {
  transform: rotate(-1.2deg);
  clip-path: polygon(0 0, 100% 0, 100% 96.5%, 95% 98.4%, 89% 96.9%, 82% 98.8%, 74% 97%, 66% 98.7%, 57% 97.1%, 48% 98.9%, 39% 97.2%, 30% 98.8%, 21% 97.3%, 12% 98.6%, 5% 97.2%, 0 98.4%);
  padding-bottom: 30px;
}
.why-grid h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.why-grid .why-copy p { margin-top: 1rem; color: #5C431C; max-width: 50ch; }
@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ---------- 11. CTA strip ---------- */

.cta-board {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto clamp(4rem, 9vh, 7rem);
  padding: 0 var(--gut);
}
.cta-board-inner {
  border: 1.5px dashed rgba(232, 118, 44, 0.6);
  border-radius: 4px;
  padding: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.cta-board h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.cta-board p { margin-top: 0.6rem; max-width: 48ch; color: var(--granite); }
body[data-time="golden"] .cta-board p { color: #5C431C; }
body[data-time="dusk"] .cta-board p,
body[data-time="night"] .cta-board p { color: #AEB8BD; }

.btn-fire {
  display: inline-block;
  background: var(--blaze);
  color: #14100A;
  font-weight: 650;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 179, 92, 0.4), 0 14px 42px -10px rgba(232, 118, 44, 0.6);
  transition: transform 0.2s var(--ease), background 0.2s ease, box-shadow 0.2s ease;
}
.btn-fire:hover {
  background: #F1843B;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 179, 92, 0.6), 0 20px 50px -10px rgba(232, 118, 44, 0.75);
}

/* ---------- 12. Night footer (all interior pages) ---------- */

.site-foot {
  position: relative;
  z-index: 2;
  margin-top: clamp(4rem, 10vh, 8rem);
  background: linear-gradient(180deg, var(--night-a), var(--night-b));
  color: #828D94;
  padding: 5vh var(--gut) 4vh;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  overflow: hidden;
}
body[data-time="night"] .site-foot,
body[data-time="dusk"] .site-foot {
  background: transparent;
  border-top: 1px solid rgba(233, 237, 242, 0.13);
  margin-top: clamp(3rem, 7vh, 5rem);
}
.site-foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  gap: 10px;
}
.site-foot .foot-brand { color: #9AA5AB; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-foot a { text-decoration: none; transition: color 0.2s ease; }
.site-foot a:hover { color: var(--ember); }
.foot-colophon { color: #5E686F; }
.foot-blaze {
  display: inline-block;
  width: 7px; height: 11px;
  vertical-align: middle;
  background: var(--blaze);
  border-radius: 1px;
  margin-right: 8px;
}

/* ---------- 13. Articles — field journal entries ---------- */

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

.post-hero {
  max-width: 60rem;
  margin: 0 auto;
  padding: clamp(8rem, 16vh, 11rem) 0 clamp(1.5rem, 3vh, 2.5rem);
}
.post-hero .eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fern);
  border: 1.5px solid rgba(63, 97, 66, 0.5);
  border-radius: 2px;
  padding: 4px 9px;
  transform: rotate(-2deg);
}
.post-hero h1 {
  margin-top: 1.2rem;
  font-size: clamp(1.9rem, 3.8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.1;
  max-width: 26ch;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--granite);
}
.article-meta-row .sep { color: rgba(232, 118, 44, 0.7); }

.post-lead-image {
  max-width: 60rem;
  margin: clamp(1.5rem, 3vh, 2.5rem) auto 0;
  background: #F8F5EB;
  padding: 10px 10px 26px;
  box-shadow: 0 26px 50px -22px rgba(21, 35, 27, 0.45);
  transform: rotate(-0.6deg);
  clip-path: polygon(0 0, 100% 0, 100% 97%, 95% 98.6%, 89% 97.2%, 82% 99%, 74% 97.4%, 66% 98.8%, 57% 97.2%, 48% 98.8%, 39% 97.3%, 30% 99%, 21% 97.4%, 12% 98.7%, 5% 97.3%, 0 98.5%);
}
.post-lead-image img { width: 100%; }

.article-content {
  max-width: 46rem;
  margin: 0 auto;
  padding-top: clamp(2.5rem, 5vh, 4rem);
}
.article-content p { margin-bottom: 1.35rem; color: #232E26; }
.article-content .article-intro {
  font-size: 1.22rem;
  line-height: 1.6;
  color: var(--ink-dark);
  border-left: 3px solid var(--blaze);
  padding-left: 1.2rem;
}
.article-content h2 {
  position: relative;
  margin: 2.8rem 0 1rem;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
}
.article-content h2::before {
  content: '';
  position: absolute;
  left: -1.35rem;
  top: 0.62em;
  width: 9px; height: 9px;
  background: var(--blaze);
  transform: rotate(45deg);
}
.article-content h3 {
  margin: 2rem 0 0.8rem;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.015em;
}
.article-content a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--blaze);
}
.article-content a:hover { color: var(--blaze); }
.article-content ul, .article-content ol {
  margin: 0 0 1.35rem 1.3rem;
}
.article-content li { margin-bottom: 0.45rem; color: #232E26; }
.article-content li::marker { color: var(--blaze); }
.article-content strong { color: var(--ink-dark); }
.article-content code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(63, 97, 66, 0.1);
  border: 1px solid rgba(63, 97, 66, 0.16);
  border-radius: 3px;
  padding: 0.1em 0.36em;
}
.article-content pre {
  margin: 0 0 1.5rem;
  padding: 1.1rem 1.3rem;
  background: var(--night-a);
  color: #D9E0D6;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 0.88rem;
  line-height: 1.55;
  box-shadow: 0 16px 32px -18px rgba(7, 12, 18, 0.7);
}
.article-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}
.article-content blockquote {
  margin: 0 0 1.35rem;
  padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 3px solid rgba(63, 97, 66, 0.4);
  color: var(--granite);
  font-style: italic;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2.5rem 0 0;
  padding-top: 2rem;
  border-top: 1px dashed rgba(232, 118, 44, 0.5);
}
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--granite);
  background: #ECE8DA;
  border: 1px solid #D8D3C2;
  border-radius: 3px;
  padding: 5px 10px;
}

.related-posts { margin-top: 2.5rem; }
.related-posts h2 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fern);
  margin-bottom: 1rem;
}
.related-posts h2::before { content: none; }
.related-posts ul { list-style: none; margin: 0; }
.related-posts li {
  margin: 0;
  border-top: 1px solid rgba(21, 35, 27, 0.12);
}
.related-posts li a {
  display: block;
  padding: 0.85rem 0.2rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s ease, transform 0.2s var(--ease);
}
.related-posts li a:hover { color: var(--blaze); transform: translateX(4px); }

.author-strip {
  margin-top: 2.5rem;
  background: var(--paper);
  background-image: repeating-linear-gradient(transparent 0 26px, rgba(63, 97, 66, 0.1) 26px 27px);
  box-shadow: 0 18px 36px -18px rgba(21, 35, 27, 0.4);
  padding: 1.3rem 1.5rem;
  transform: rotate(-0.4deg);
}
.author-strip::before {
  content: 'TRIP LEADER';
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--fern);
  border: 1.5px solid rgba(63, 97, 66, 0.5);
  border-radius: 2px;
  padding: 3px 8px;
  transform: rotate(-1.5deg);
  margin-bottom: 0.7rem;
}
.author-strip-name { font-weight: 700; }
.author-strip-meta { margin-top: 0.2rem; font-size: 0.92rem; color: var(--granite); }
.author-strip-meta a {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--blaze);
}
.author-strip-meta a:hover { color: var(--blaze); }

/* ---------- 14. OFF TRAIL (404) ---------- */

.offtrail {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(7rem, 16vh, 10rem) var(--gut) clamp(5rem, 10vh, 7rem);
  overflow: hidden;
}
.offtrail-inner { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }
.offtrail-ghost {
  position: absolute;
  right: -2vw; top: 50%;
  transform: translateY(-58%);
  font-size: clamp(10rem, 30vw, 26rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 179, 92, 0.22);
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.offtrail .trail-note { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  html.fx .signal-lost { animation: signal-blink 1.8s steps(2, start) infinite; }
}
@keyframes signal-blink { 50% { opacity: 0.35; } }
.offtrail h1 {
  margin-top: 1.4rem;
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #F2EFE3;
  max-width: 18ch;
}
.offtrail p.offtrail-sub { margin-top: 1.1rem; max-width: 46ch; color: #AEB8BD; }
.offtrail-readout {
  margin-top: 1.6rem;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--granite-d);
}
.offtrail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.2rem;
}
.offtrail-alt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--granite-d);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.offtrail-alt:hover { color: var(--ember); border-bottom-color: var(--ember); }

.stars { position: absolute; inset: 0 0 25% 0; z-index: 0; }
.star-layer { position: absolute; width: 1px; height: 1px; top: 0; left: 0; }
@media (prefers-reduced-motion: no-preference) {
  html.fx .star-layer-1 { animation: twinkle 5.5s ease-in-out infinite alternate; }
  html.fx .star-layer-2 { animation: twinkle 7.5s ease-in-out infinite alternate-reverse; }
}
@keyframes twinkle { from { opacity: 0.55; } to { opacity: 1; } }

.night-trees {
  position: absolute;
  bottom: 0; left: -2%; right: -2%;
  width: 104%;
  height: clamp(70px, 11vh, 130px);
  fill: #05090C;
  z-index: 1;
}

/* ---------- 15. Responsive ---------- */

@media (max-width: 980px) {
  .sheet-feature { grid-column: 1 / 13; }
  .sheet:nth-child(n+2) { grid-column: span 6; margin-top: 0; }
  .sheet:nth-child(odd) { margin-top: 3vh; }
}

@media (max-width: 900px) {
  .triplog-hero { grid-template-columns: 1fr; }
  .triplog-photos { min-height: 0; margin-top: 0.5rem; }
  .triplog-photos .print-back { position: static; width: min(260px, 60%); margin-left: 30%; }
  .triplog-photos .print-front { position: static; width: min(430px, 92%); margin-top: -2rem; }
  .logbook { display: flex; flex-direction: column; gap: 2rem; }
  .logbook .note:nth-child(n) { margin-top: 0; }
  .logbook .note:nth-child(2) { margin-left: 6%; }
  .logbook .note:nth-child(4) { margin-left: 4%; }
  .waypoint:nth-child(even) { margin-left: 0; }
}

@media (max-width: 700px) {
  .chrome { padding: 12px 14px; }
  .chrome-nav { gap: 10px; }
  .chrome-nav a { font-size: 9.5px; letter-spacing: 0.1em; }
  .mark-name { display: none; }
  .sheet-grid { display: flex; flex-direction: column; gap: 2.2rem; }
  .sheet:nth-child(n) { margin-top: 0; }
  .sheet:nth-child(even) { margin-left: 4%; }
  .article-content h2::before { left: -1rem; width: 7px; height: 7px; }
  .offtrail-ghost { right: -6vw; }
}
