/* Shared styles for the /map pages. Tokens, fonts and components are copied from the
   homepage's <style> block (index.html) so these pages match it. If the homepage's look
   changes, change it here too. Phone first: 16px side gutters, wider layouts from 900px. */

:root {
  --uc-yellow: #FFE539;
  --uc-green: #5D7845;
  --uc-forest: #3A4F2B;
  --uc-sage: #8FA878;
  --uc-parchment: #F2EDE4;
  --uc-charcoal: #2C2C2C;
  --uc-white: #FFFFFF;
  --grain-opacity: 0.09;
  --gutter: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', 'Nunito Sans', system-ui, sans-serif;
  color: var(--uc-charcoal);
  background: var(--uc-parchment);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Grain texture on green surfaces (brand signature) */
.grain { position: relative; isolation: isolate; }
.grain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.85 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
.grain > * { position: relative; z-index: 1; }

.display {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  margin: 0;
}
.h-display { font-size: clamp(2rem, 8.5vw, 3.8rem); }

.sec { padding: 3.5rem var(--gutter); }
.container { max-width: 1240px; margin: 0 auto; }
.narrow { max-width: 720px; margin: 0 auto; }
/* Keep anchor targets clear of the sticky top bar */
section[id] { scroll-margin-top: 64px; }

.on-green { background: var(--uc-green); color: var(--uc-white); }
.on-green .display { color: var(--uc-yellow); }
.on-light { background: var(--uc-parchment); color: var(--uc-charcoal); }
.on-light .display { color: var(--uc-forest); }
.on-forest { background: var(--uc-forest); color: var(--uc-white); }
.on-forest .display { color: var(--uc-yellow); }

.eyebrow { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 1rem; opacity: 0.85; }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.5rem); line-height: 1.4; max-width: 640px; margin: 1.25rem 0 0; }

/* Buttons: flat pills, sentence case. No arrows; a raised arrow only marks off-site links. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.5rem;
  font: inherit; font-weight: 700; font-size: 0.95rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-solid { background: var(--uc-yellow); color: var(--uc-charcoal); border-color: var(--uc-yellow); }
@media (hover: hover) {
  .btn-solid:hover { background: var(--uc-white); border-color: var(--uc-white); }
}
.btn-ghost-dark { color: var(--uc-forest); border-color: var(--uc-forest); }
@media (hover: hover) {
  .btn-ghost-dark:hover { background: var(--uc-forest); color: var(--uc-yellow); }
}

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--uc-yellow); outline-offset: 3px;
}
.on-light a:focus-visible { outline-color: var(--uc-forest); }
::selection { background: var(--uc-yellow); color: var(--uc-forest); }
/* Keep a tabbed-to item clear of the sticky top bar (WCAG 2.2, 2.4.11) */
html { scroll-padding-top: 72px; }

/* Text only screen readers hear, such as "(opens in a new tab)" after a ↗ link */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Skip link: hidden until a keyboard user tabs to it, then a yellow pill at the top left */
.skip-link {
  position: absolute; left: 1rem; top: 0.75rem; z-index: 300;
  transform: translateY(-200%);
  background: var(--uc-yellow); color: var(--uc-charcoal);
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  padding: 0.6rem 1.1rem; border-radius: 999px;
}
.skip-link:focus { transform: none; outline: 2px solid var(--uc-charcoal); outline-offset: 2px; }
main:focus { outline: none; }

/* ---------- NAV (simpler than the homepage's: sticky bar, no menu needed) ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding: 0.9rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--uc-forest);
  color: var(--uc-white);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.wordmark { color: inherit; text-decoration: none; display: inline-block; line-height: 0.95; text-transform: uppercase; }
.wordmark span { display: block; }
.wordmark .w1 { font-weight: 500; letter-spacing: 0.14em; font-size: 0.7rem; margin-bottom: 2px; }
.wordmark .w2 { font-weight: 900; letter-spacing: 0.04em; font-size: 1.05rem; }
.nav-right { display: flex; gap: 1rem; align-items: center; }
.nav-link {
  color: inherit; text-decoration: none;
  font-size: 0.92rem; font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.nav-link:hover, .nav-link[aria-current="page"] { border-bottom-color: var(--uc-yellow); }
.nav-link.wide { display: none; } /* "Home" only from tablet up, so the phone bar stays on one line */
.nav-cta { padding: 0.5rem 0.85rem; font-size: 0.82rem; }

/* ---------- PAGE HEAD ---------- */
.page-head { padding-top: 3rem; padding-bottom: 3rem; }
.page-head .lede { opacity: 0.95; }

/* ---------- MAPS PAGE (map/index.html): a grid of cards, one per map, each opening that map's page ---------- */
.map-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.map-card { display: flex; flex-direction: column; color: inherit; text-decoration: none; max-width: 520px; }
.map-card img { width: 100%; box-shadow: 0 10px 40px rgba(10,16,6,0.45); transition: transform 200ms ease; }
@media (hover: hover) { .map-card:hover img { transform: translateY(-4px); } .map-card:hover .map-card-title { text-decoration: underline; text-underline-offset: 4px; } }
.map-card-body { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; padding-top: 1.1rem; }
.map-card-title { font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 900; text-transform: uppercase; line-height: 0.95; color: var(--uc-yellow); }

/* ---------- ONE MAP (map/<name>/index.html): the map, one line, the email box ---------- */
.map-page { padding-top: 2.2rem; }
.back-link { display: inline-block; color: inherit; opacity: 0.75; text-decoration: none; font-size: 0.92rem; font-weight: 500; margin-bottom: 1.4rem; }
.back-link:hover { opacity: 1; text-decoration: underline; }
.map-item { display: grid; grid-template-columns: 1fr; gap: 2.2rem; align-items: center; }
.map-item-pic { margin: 0; }
.map-item-pic img { width: 100%; box-shadow: 0 10px 40px rgba(10,16,6,0.45); }
.map-item-text { min-width: 0; }
/* The peek: only the top of the map shows, fading into the page, so people sign up to see the rest
   (Alex, 11/19). The picture files hold only the top part; the full map goes out by email. */
.peek { position: relative; }
.peek img, .map-card .peek-img {
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}
.peek figcaption {
  margin-top: -0.4rem;
  text-align: center; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--uc-yellow);
}
.map-card-tag {
  display: inline-block;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--uc-yellow); color: var(--uc-charcoal); padding: 0.2rem 0.55rem;
}
.map-item-title { font-size: clamp(2.4rem, 10vw, 4rem); font-weight: 900; text-transform: uppercase; line-height: 0.92; letter-spacing: -0.01em; color: var(--uc-yellow); margin: 0; text-wrap: balance; }
.map-item-line { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.45; margin: 1rem 0 1.6rem; max-width: 34ch; }

/* Sign-up box. The beehiiv form loads inside .map-signup; its look is set in beehiiv. */
.map-signup { max-width: 520px; min-height: 64px; }
.map-signup.blocked { min-height: 0; }
/* beehiiv's loader starts its frame 2000px tall and shrinks it once it has drawn the one-row form;
   cap it so the page never shows a big empty gap while that happens. */
.map-signup iframe { max-height: 140px; }
/* Plain button shown only if an ad blocker stops or hides the beehiiv form (same idea as the homepage) */
.js .join-alt { display: none; }
.js .join-alt.shown { display: inline-flex; }

/* ---------- YOU'RE IN (map/youre-in/index.html): one screen after sign-up ---------- */
.youre-in { min-height: 70vh; display: flex; align-items: center; }
.youre-in .lede { max-width: 34ch; }
.youre-in .small { font-size: 0.95rem; margin: 1.4rem 0 0; max-width: 46ch; } /* full white: 0.8 was under the 4.5:1 contrast line on green */
.youre-in .btn { margin-top: 2rem; }

/* ---------- FOOTER ---------- */
.footer { background: var(--uc-forest); color: var(--uc-white); padding: 3.5rem var(--gutter) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2.2rem; align-items: start; }
.footer-brand .display { font-size: 2.6rem; color: var(--uc-yellow); line-height: 0.9; }
.footer-brand .display span { display: block; font-weight: 500; font-size: 0.36em; letter-spacing: 0.02em; color: var(--uc-white); }
.footer-brand p { font-size: 0.95rem; opacity: 0.75; margin-top: 1.2rem; max-width: 300px; }
.footer h3 { font-size: 0.95rem; font-weight: 700; color: var(--uc-yellow); margin: 0 0 1rem; }
.footer-grid a { display: block; color: inherit; text-decoration: none; font-size: 0.92rem; padding: 0.4rem 0; opacity: 0.85; }
.footer-grid a:hover { color: var(--uc-yellow); opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.18); margin-top: 3rem; padding-top: 1.5rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  font-size: 0.85rem; opacity: 0.7; /* 0.6 was just under 4.5:1 on forest */
}
.footer-bottom a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--uc-yellow); }

/* ---------- PRIVACY AND ACCESSIBILITY PAGES: plain reading text on parchment ---------- */
.updated { font-size: 0.92rem; margin: 1.4rem 0 0; }
.legal { padding-top: 3rem; }
.legal h2 { font-size: 1.35rem; font-weight: 700; color: var(--uc-forest); margin: 2.6rem 0 0.7rem; line-height: 1.25; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 1.1rem; font-weight: 700; color: var(--uc-forest); margin: 1.8rem 0 0.5rem; line-height: 1.3; }
.legal p, .legal li { font-size: 1.05rem; line-height: 1.6; max-width: 68ch; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.legal li { margin-bottom: 0.6rem; }
.legal a { color: var(--uc-forest); font-weight: 700; text-underline-offset: 3px; }

/* ================= WIDER SCREENS ================= */
@media (min-width: 600px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .nav-link.wide { display: inline; }
  .map-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  :root { --gutter: 2rem; }
  .sec { padding: 6rem var(--gutter); }
  .page-head { padding-top: 5rem; padding-bottom: 5rem; }
  .nav { padding: 1rem var(--gutter); }
  .nav-right { gap: 2rem; }
  .wordmark .w1 { font-size: 0.78rem; }
  .wordmark .w2 { font-size: 1.15rem; }
  .nav-cta { padding: 0.55rem 0.95rem; font-size: 0.88rem; }
  .map-grid { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
  .map-page { padding-top: 4rem; }
  .map-item { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .map-item-pic { max-width: 520px; justify-self: end; }
  .footer { padding: 5rem var(--gutter) 2rem; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; }
  .footer-brand { grid-column: auto; }
  .footer-brand .display { font-size: 3rem; }
  .footer-bottom { flex-direction: row; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
}
