/* The portal's shared page chrome (arrival kit 1.2): the marbled-ink field, the one-row header, the
   page footer and the dock. Every page on this site loads it (index, 404, /donate/, /map/), after
   the kit's arrival.css and ORG's org.css, so colors, type and the three lights come from there and
   this file is layout plus ORG's perforated-sheet motif. Linked root-relative (/site.css): the 404
   is served at any depth, and a relative link would resolve under the bad path. */

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--background); }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  min-height: 100vh; color: var(--foreground); background: var(--background); font-family: var(--font-body);
  font-size: 1.0625rem; line-height: 1.6; padding-bottom: 4.5rem; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip {
  position: absolute; left: 0.75rem; top: -3rem; z-index: 100;
  padding: 0.5rem 0.8rem; background: var(--accent); color: var(--on-accent); font-weight: 700;
}
.skip:focus { top: 0.6rem; }

/* The marbled ink behind every page (/marble.js); it follows the light, the motion and the cursor
   choice. Reading mode fades it back to a whisper (org.css). */
.field { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.marble { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.marble[data-fallback="true"] { background: radial-gradient(60% 55% at 50% 30%, var(--glow), var(--background) 70%); }
.scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 0, transparent 30vh, var(--scrim) 62vh); }
.field.quiet .scrim { background: var(--scrim); }
main, .page-foot { position: relative; z-index: 1; }

/* ── the header: one row at every width (the kit's <arrival-nav> folds what doesn't fit) ── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1.25rem 0.7rem;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
/* ORG's blotter perforation instead of a hairline. */
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(to right, var(--perf) 0 12px, transparent 0) 0 0 / 21px 3px repeat-x;
}
.topbar-brand {
  display: inline-flex; flex: 0 1 auto; align-items: center; gap: 0.55rem; min-width: 0;
  color: var(--heading); text-decoration: none; white-space: nowrap;
  font-family: var(--font-heading); font-variation-settings: var(--heading-settings); font-size: 1.15rem;
}
.topbar-brand img { width: 28px; height: 28px; flex: none; }
.topbar-brand .arr-brand-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.topbar arrival-controls { flex: none; }
@media (max-width: 400px) {
  .topbar { padding-inline: 1rem; gap: 0.5rem; }
  .topbar-brand .arr-brand-text { display: none; }
}

/* ── shared page pieces ───────────────────────────────────────────────────────────────── */
h1, h2 {
  font-family: var(--font-heading); font-variation-settings: var(--heading-settings); font-weight: 400;
  color: var(--heading); text-wrap: balance; letter-spacing: -0.01em;
}
.btn {
  --cut: 8px;
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.62rem 1.05rem; text-decoration: none;
  font: 600 0.95rem/1.2 var(--font-body); cursor: pointer;
  border: 0; background: var(--surface); color: var(--foreground);
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
.btn:hover { background: var(--surface-muted); color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.page { max-width: 60rem; margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.page-narrow { max-width: 46rem; }
.page h1 { font-size: clamp(2.1rem, 6vw, 3rem); line-height: 1.08; margin: 0 0 0.9rem; }
.page .lede { max-width: 42rem; margin: 0 0 2rem; color: var(--muted); font-size: 1.08rem; }
.page h1, .page .lede, .crumbs { text-shadow: 0 0 14px var(--background), 0 0 3px var(--background); }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.3rem 0.5rem; margin: 0 0 1rem; font-size: 0.88rem; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }

/* ── the page footer: link groups from the kit (<arrival-footer>), on one perforated sheet ── */
.page-foot { max-width: 64rem; margin: 2rem auto 0; padding: 1rem 1.25rem 1.5rem; }
.page-foot arrival-footer {
  --dash: 12px; --gap: 9px; --w: 3px; --step: calc(var(--dash) + var(--gap));
  display: block; padding: 1.4rem 1.4rem 1.1rem;
  background:
    linear-gradient(to right, var(--perf) 0 var(--dash), transparent 0) top left / var(--step) var(--w) repeat-x,
    linear-gradient(to right, var(--perf) 0 var(--dash), transparent 0) bottom left / var(--step) var(--w) repeat-x,
    linear-gradient(to bottom, var(--perf) 0 var(--dash), transparent 0) top left / var(--w) var(--step) repeat-y,
    linear-gradient(to bottom, var(--perf) 0 var(--dash), transparent 0) top right / var(--w) var(--step) repeat-y,
    color-mix(in srgb, var(--surface) 88%, transparent);
}

/* ── the dock: one row, swipeable on phones rather than wrapping into the bottom of the screen ── */
.foot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 0.6rem 1.25rem; font-size: 0.82rem;
  color: var(--muted); background: color-mix(in srgb, var(--background) 86%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.foot::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(to right, var(--perf) 0 12px, transparent 0) 0 0 / 21px 3px repeat-x;
}
.foot div {
  max-width: 64rem; margin: 0 auto; display: flex; justify-content: safe center; gap: 0.25rem 1.1rem;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.foot div::-webkit-scrollbar { display: none; }
.foot a, .foot b { flex: none; }
.foot a { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }
.foot b { color: var(--heading); }
@media (max-width: 520px) {
  .foot .long { display: none; }
}
