/* Styles for CMS-generated pages (blog + custom pages). Matches the homepage design. */
:root {
  --paper: #f3eee3;
  --paper-2: #ebe4d4;
  --grid: rgba(60, 110, 160, .14);
  --grid-bold: rgba(60, 110, 160, .26);
  --ink: #1d1d1b;
  --muted: #5d5a52;
  --charcoal: #232323;
  --charcoal-grid: rgba(255, 255, 255, .06);
  --marker: #d23a2a;
  --highlight: #f6d44b;
  --tape: rgba(240, 225, 170, .75);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Libre Franklin", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.graph {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-bold) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-bold) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}
.graph-dark {
  background-color: var(--charcoal);
  background-image:
    linear-gradient(var(--charcoal-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--charcoal-grid) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--paper);
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 740px; }

/* nav */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(243, 238, 227, .94);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--ink);
}
header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-family: "Archivo Black", sans-serif; font-size: 22px; text-decoration: none; letter-spacing: .02em; }
.logo span { color: var(--marker); }
nav { display: flex; gap: 26px; }
nav a { text-decoration: none; font-weight: 500; font-size: 15px; }
nav a:hover, nav a[aria-current] { color: var(--marker); }

.label {
  font-family: "Special Elite", monospace;
  font-size: 14px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--marker);
  margin-bottom: 14px;
}
h1 {
  font-family: "Archivo Black", sans-serif; font-weight: 400;
  font-size: clamp(38px, 5.6vw, 64px); line-height: 1.04; letter-spacing: -.01em;
}
h2 {
  font-family: "Archivo Black", sans-serif; font-weight: 400;
  font-size: clamp(30px, 4vw, 44px); line-height: 1.08;
}
.btn {
  display: inline-block;
  margin-top: 26px;
  font-family: "Archivo Black", sans-serif; font-size: 16px;
  text-transform: uppercase; letter-spacing: .04em; text-decoration: none;
  background: var(--ink); color: var(--paper);
  padding: 15px 26px; border: 2px solid var(--ink);
  box-shadow: 5px 5px 0 var(--marker);
  transition: transform .1s, box-shadow .1s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--marker); }

/* page / post header */
.page-head { padding: 70px 0 60px; border-bottom: 2px solid var(--ink); }
.page-head .lede { margin-top: 20px; font-size: 19px; color: var(--muted); max-width: 34em; }
.back { display: inline-block; margin-bottom: 26px; font-weight: 700; text-decoration: none; font-size: 15px; }
.back:hover { color: var(--marker); }

/* long-form text */
.prose { font-size: 18px; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(26px, 3.4vw, 34px); margin-top: 1.8em; }
.prose h3 { font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 22px; margin-top: 1.6em; }
.prose h4 { font-size: 18px; margin-top: 1.4em; }
.prose a { text-decoration-color: var(--marker); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { color: var(--marker); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .4em; }
.prose blockquote {
  border-left: 4px solid var(--marker); padding: 4px 0 4px 20px;
  font-size: 20px; color: var(--ink); font-style: italic;
}
.prose code { font-family: "Special Elite", monospace; background: var(--paper-2); padding: 1px 5px; }
.prose hr { border: 0; border-top: 2px dashed var(--ink); margin: 2.2em 0; }
.prose figure { margin: 2em 0; }
.prose figure img, .prose p img { border: 2px solid var(--ink); }
.prose figure img { width: 100%; }
.prose figcaption, .figure img { width: 100%; }
.figure figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.prose sup.ref a {
  text-decoration: none; font-weight: 700; font-size: 12px; color: var(--marker);
  padding: 0 2px; margin-left: 1px;
}

/* blog post */
.post-body { padding: 56px 0 30px; }
.post-meta { font-family: "Special Elite", monospace; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 18px; }
.cover { margin: 0 auto; padding: 46px 20px 0; max-width: 980px; }
.cover img { width: 100%; max-height: 620px; object-fit: cover; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.sources { padding: 10px 0 90px; }
.sources .box { border: 2px solid var(--ink); background: #fffdf8; padding: 26px 28px; box-shadow: 6px 6px 0 var(--ink); }
.sources h2 { font-size: 24px; margin-bottom: 14px; }
.sources ol { padding-left: 1.4em; display: grid; gap: 10px; }
.sources li { font-size: 16px; }
.sources li:target { background: var(--highlight); }
.sources a { font-weight: 700; text-decoration-color: var(--marker); text-underline-offset: 3px; overflow-wrap: anywhere; }
.sources .note { color: var(--muted); }

/* blog list */
.post-list { padding: 60px 0 90px; display: grid; gap: 34px; }
.post-card {
  display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: center;
  text-decoration: none; background: #fffdf8; border: 2px solid var(--ink); padding: 16px;
  box-shadow: 6px 6px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
.post-card:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--marker); }
.post-card .thumb { aspect-ratio: 16 / 10; background: var(--charcoal) center / cover no-repeat; }
.post-card.no-thumb { grid-template-columns: 1fr; }
.post-card h2 { font-size: clamp(24px, 3vw, 30px); }
.post-card p { margin-top: 8px; color: var(--muted); }
.post-card .post-meta { margin-top: 0; margin-bottom: 6px; }
.empty { padding: 60px 0; color: var(--muted); }

/* page sections */
.sec { padding: 70px 0; border-bottom: 2px solid var(--ink); }
.sec:nth-of-type(even):not(.graph-dark) { background-color: var(--paper); }
.sec:nth-of-type(odd):not(.graph-dark) {
  background-image:
    linear-gradient(var(--grid-bold) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-bold) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
}
.sec h2 { margin-bottom: 20px; }
.figure { display: block; max-width: 640px; margin: 0 auto; background: #fff; padding: 14px 14px 18px; box-shadow: 0 14px 30px rgba(0,0,0,.18); transform: rotate(-1deg); }
.figure figcaption { font-family: "Permanent Marker", cursive; font-size: 19px; color: var(--ink); text-align: center; }
.quote blockquote { font-family: "Archivo Black", sans-serif; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.2; }
.quote blockquote::before { content: "“"; color: var(--marker); }
.quote blockquote::after { content: "”"; color: var(--marker); }
.quote cite { display: block; margin-top: 18px; font-family: "Permanent Marker", cursive; font-style: normal; font-size: 20px; color: var(--marker); }
.link-list { list-style: none; display: grid; gap: 14px; }
.link-list a {
  display: block; text-decoration: none; border: 2px solid var(--ink); background: #fffdf8; padding: 14px 18px;
  font-weight: 700; font-size: 17px; box-shadow: 4px 4px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
.link-list a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--marker); }
.link-list small { display: block; font-weight: 400; font-size: 14px; color: var(--muted); }
.mini-posts { list-style: none; display: grid; gap: 12px; }
.mini-posts a { font-weight: 700; font-size: 19px; text-decoration-color: var(--marker); text-underline-offset: 4px; }
.mini-posts span { font-family: "Special Elite", monospace; font-size: 13px; color: var(--muted); margin-left: 8px; }

/* signup card */
.card {
  background: #fffdf8; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  padding: 32px 28px 26px; position: relative; max-width: 520px; margin-top: 26px;
}
.card .stamp {
  position: absolute; top: -18px; right: 18px;
  font-family: "Permanent Marker", cursive; font-size: 17px;
  background: var(--highlight); padding: 4px 12px; transform: rotate(4deg); border: 2px solid var(--ink);
}
form { display: grid; gap: 16px; }
label.field { display: grid; gap: 6px; font-family: "Special Elite", monospace; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
input[type="email"], input[type="text"] {
  width: 100%; font: inherit; font-family: "Libre Franklin", sans-serif; font-size: 16px; text-transform: none; letter-spacing: 0;
  padding: 13px 14px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); outline: none;
}
input:focus { background: #fff; box-shadow: 3px 3px 0 var(--marker); }
fieldset { border: 0; }
legend { font-family: "Special Elite", monospace; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices label { border: 2px solid var(--ink); padding: 11px; text-align: center; cursor: pointer; font-weight: 700; background: var(--paper); }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices label:has(input:checked) { background: var(--highlight); }
.choices label:has(input:focus-visible) { outline: 3px solid var(--marker); outline-offset: 2px; }
button {
  font-family: "Archivo Black", sans-serif; font-size: 18px; text-transform: uppercase; letter-spacing: .04em;
  background: var(--marker); color: #fff; border: 2px solid var(--ink); padding: 15px; cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
button[disabled] { opacity: .6; cursor: wait; }
.fine { font-size: 13px; color: var(--muted); text-align: center; }
.msg { display: none; padding: 14px; border: 2px dashed var(--ink); font-size: 16px; }
.msg.ok, .msg.err { display: block; }
.msg.err { border-color: var(--marker); }

/* instagram feed */
.ig .label { color: var(--highlight); }
.ig-count { font-family: "Special Elite", monospace; font-size: 15px; letter-spacing: .06em; text-transform: uppercase; margin-top: 14px; }
.ig-count strong {
  font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 22px; letter-spacing: 0;
  background: var(--highlight); color: var(--ink); padding: 2px 10px; margin-right: 6px;
  display: inline-block; transform: rotate(-2deg);
}
.ig-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.ig-post {
  display: block; text-decoration: none; text-align: left; color: var(--ink);
  background: #fff; padding: 10px 10px 14px; box-shadow: 0 10px 22px rgba(0,0,0,.35); transition: transform .15s;
}
.ig-post:nth-child(1) { transform: rotate(-2deg); }
.ig-post:nth-child(2) { transform: rotate(1.5deg); }
.ig-post:nth-child(3) { transform: rotate(-1deg); }
.ig-post:hover { transform: rotate(0) scale(1.03); }
.ig-post .pic { position: relative; aspect-ratio: 1; background: #2b2b2b; overflow: hidden; }
.ig-post img { width: 100%; height: 100%; object-fit: cover; }
.ig-post .play { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 3px 8px; font-weight: 700; }
.ig-post p {
  margin-top: 10px; font-size: 14px; line-height: 1.4; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* map */
.map-text { max-width: 740px; margin-bottom: 8px; }
.map {
  height: min(70vh, 640px); min-height: 380px; margin-top: 22px;
  border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
  position: relative; z-index: 0; /* keeps map controls under the sticky header */
  background: var(--paper-2);
}
.leaflet-container { font-family: "Libre Franklin", system-ui, sans-serif; }
.leaflet-container a { color: var(--ink); }
.leaflet-popup-content-wrapper { border-radius: 0; border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.leaflet-popup-content { margin: 12px 16px; font-size: 14px; line-height: 1.45; }
.map-pop strong { display: block; font-size: 16px; }
.map-pop p { margin: 4px 0 0; color: var(--muted); }
.map-pop a { display: inline-block; margin-top: 6px; font-weight: 700; text-decoration-color: var(--marker); }
.pin span {
  display: grid; place-items: center; width: 30px; height: 30px;
  background: var(--marker); border: 2px solid var(--ink);
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 2px 2px 0 rgba(0,0,0,.35);
}
.pin b { transform: rotate(45deg); color: #fff; font-size: 13px; font-weight: 700; }
.map-list { list-style: none; margin-top: 34px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.map-list button {
  all: unset; box-sizing: border-box; width: 100%; cursor: pointer;
  display: flex; gap: 12px; align-items: flex-start;
  background: #fffdf8; border: 2px solid var(--ink); padding: 12px 14px;
  box-shadow: 4px 4px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
.map-list button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--marker); }
.map-list button:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; }
.map-list .n {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--marker); color: #fff; font-weight: 700; font-size: 13px;
}
.map-list strong { display: block; font-size: 16px; line-height: 1.3; }
.map-list small { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }

footer { padding: 34px 0 40px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; align-items: center; }
footer p { font-size: 14px; color: var(--muted); max-width: 40em; }
footer .links { display: flex; gap: 20px; font-size: 14px; font-weight: 500; }
footer .links a { text-decoration: none; }
footer .links a:hover { color: var(--marker); }

@media (max-width: 880px) {
  nav { gap: 16px; }
  nav a.hide-sm { display: none; }
  .page-head { padding: 46px 0 40px; }
  .sec { padding: 54px 0; }
  .post-card { grid-template-columns: 1fr; gap: 16px; }
  .ig-grid { grid-template-columns: 1fr; max-width: 340px; margin-inline: auto; }
  .card, .cover img { box-shadow: 5px 5px 0 var(--ink); }
  .prose { font-size: 17px; }
  .map { box-shadow: 5px 5px 0 var(--ink); }
}
