/* All About Van website. Palette matches the logo: navy and gold on warm paper.
   --harbour = brand navy, --maple = gold accent (underlines, buttons), --maple-dark = blue accent text. */
:root {
  --paper: #fbf7f0;
  --card: #ffffff;
  --ink: #16181d;
  --muted: #5d6370;
  --line: #e7dfd1;
  --harbour: #14213d;
  --harbour-deep: #0c1529;
  --maple: #e9b44c;
  --maple-dark: #2b4c8c;
  --sun: #e9b44c;
  --cream: #f5f1e8;
  --pin: #d1495b;
  --radius: 14px;
  --head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; letter-spacing: -0.01em; margin: 0; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--card); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ---------- buttons, pills ---------- */
.btn {
  display: inline-block; font-family: var(--head); font-weight: 600; text-decoration: none;
  border-radius: 999px; padding: 12px 22px; border: 0; cursor: pointer;
}
.btn-accent { background: var(--maple); color: var(--harbour); }
.btn-accent:hover { background: #d9a136; }
.btn-small { padding: 8px 16px; font-size: 14px; }

.pill {
  display: inline-block; font-family: var(--head); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--card); color: var(--pill, var(--harbour));
  border: 1px solid color-mix(in srgb, var(--pill, var(--harbour)) 35%, transparent);
  padding: 4px 10px; border-radius: 999px;
}
.pill + .pill { margin-left: 6px; }
.pill-area { color: var(--ink, #222); border-color: var(--line); }

/* ---------- masthead ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.masthead-top { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo { width: 34px; height: 34px; flex: none; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.masthead-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
[hidden] { display: none !important; }
.card.extra { display: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.area-pick { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 8px 4px 10px; background: var(--paper, #fff); font-family: var(--head); font-size: 14px; }
.area-pick select { border: 0; background: transparent; font: inherit; color: inherit; max-width: 9.5em; padding: 2px 0; }
.area-pick select:focus { outline: none; }
.area-pick:focus-within { outline: 2px solid var(--accent, #c94); outline-offset: 2px; }
.area-empty { color: var(--muted); font-size: 15px; margin: 12px 0 0; }
@media (max-width: 420px) { .brand-name { font-size: 18px; } .masthead-top .btn-small { padding: 7px 12px; } }

.tabs { border-top: 1px solid var(--line); }
.tabs-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-row::-webkit-scrollbar { display: none; }
.tab {
  flex: none; font-family: var(--head); font-weight: 600; font-size: 15px; text-decoration: none;
  color: var(--muted); padding: 12px 14px; border-bottom: 3px solid transparent;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); border-bottom-color: var(--maple); }

/* ---------- newsletter (footer) ---------- */
.signup {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius); padding: 18px 20px; max-width: 520px;
}
.signup-title { font-family: var(--head); font-weight: 600; margin: 0 0 4px; }
.signup-note { margin: 6px 0 0; font-size: 15px; color: #c9d3e6; }

/* ---------- cards ---------- */
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(22, 24, 29, 0.08); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--cream); }
.card-media .mosaic { width: 100%; height: 100%; }
.card-tags { position: absolute; top: 12px; left: 12px; }
.card-body { padding: 16px 18px 20px; }
.card-title { font-size: 20px; margin: 6px 0 8px; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-color: var(--maple); text-underline-offset: 3px; }
.card-title a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.dek { margin: 0; color: var(--muted); font-size: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin: 0; font-family: var(--head); font-size: 13px; color: var(--muted); }
.event-date { color: var(--maple-dark); font-weight: 600; }

.card.feature .card-media { aspect-ratio: 16 / 8; }
.card.feature .card-title { font-size: clamp(24px, 3vw, 34px); }
.card.feature .dek { font-size: 18px; -webkit-line-clamp: 4; }

.card.compact { flex-direction: row; }
.card.compact .card-media { flex: 0 0 38%; aspect-ratio: auto; min-height: 120px; }
.card.compact .card-title { font-size: 17px; }
.card.compact .dek { -webkit-line-clamp: 2; font-size: 15px; }
.card.compact .card-body { padding: 12px 14px; }
.card.compact .card-tags { position: static; margin-bottom: 6px; }
.card.compact .pill { font-size: 10px; padding: 2px 8px; }

@media (max-width: 600px) {
  .grid .card-media { aspect-ratio: 3 / 1; overflow: hidden; }
  .grid .card-media .mosaic { display: block; height: 100%; }
}
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }

/* ---------- home ---------- */
.top-stories { display: grid; gap: 22px; margin-top: 36px; }
.side-stack { display: grid; gap: 16px; align-content: start; }
@media (min-width: 900px) { .top-stories { grid-template-columns: 2fr 1fr; } }

.section { margin-top: 48px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-top: 3px solid var(--ink); padding-top: 12px; margin-bottom: 18px;
}
.section-head h2 { font-size: 26px; }
.section-head h2 a { text-decoration: none; }
.see-all { font-family: var(--head); font-weight: 600; font-size: 15px; color: var(--maple-dark); text-decoration: none; }
.see-all:hover { text-decoration: underline; }

.empty {
  border: 1px dashed var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card);
}
.empty .mosaic { width: 100%; height: 48px; opacity: 0.5; }
.empty p { margin: 0; padding: 18px 20px; color: var(--muted); }

/* ---------- tab page ---------- */

/* ---------- story ---------- */
.story-head { max-width: 820px; padding-top: 32px; padding-bottom: 24px; }
.crumb { font-family: var(--head); font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--ink); }
.story-tags { margin: 18px 0 12px; }
.story h1 { font-size: clamp(30px, 4.6vw, 50px); }
.story-dek { font-size: 21px; color: var(--muted); margin: 14px 0 16px; }
.story-art { height: 150px; background: var(--cream); }
.story-art .mosaic { width: 100%; height: 100%; }
.story-body { max-width: 760px; padding-top: 28px; }
.prose { font-size: 19px; line-height: 1.72; }
.prose h2 { font-size: 26px; margin: 32px 0 10px; }
.prose h3, .prose h4 { font-size: 21px; margin: 26px 0 8px; }
.prose a { color: var(--harbour); text-decoration-color: var(--maple); text-underline-offset: 3px; }
.prose blockquote { margin: 22px 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--sun); font-style: italic; }
.prose ul { padding-left: 22px; }
.notice {
  background: #fff4e0; border: 1px solid #f0d9ab; border-radius: 10px; padding: 12px 16px;
  font-family: var(--head); font-size: 15px;
}
.sources { margin-top: 32px; padding: 18px 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.sources h2 { font-size: 16px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.sources ul { margin: 10px 0 0; padding-left: 20px; }
.sources a { color: var(--harbour); }
.sources p { margin: 8px 0 0; color: var(--muted); }
.disclosure { font-family: var(--head); font-size: 13px; color: var(--muted); margin-top: 14px; }

.notfound { text-align: center; padding-bottom: 40px; }
.notfound .mosaic { height: 60px; width: 100%; margin-bottom: 24px; opacity: 0.6; }
.notfound a { color: var(--maple-dark); font-family: var(--head); font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { margin-top: 72px; background: var(--harbour); color: #cfd5e2; }
.footer-grid { display: grid; gap: 28px; padding-top: 44px; padding-bottom: 28px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1.4fr 1.4fr; } }
.brand-footer .brand-name { color: #fff; }
.brand-footer .logo { border-radius: 7.5px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35); }
.footer-about { font-size: 15px; margin: 12px 0 0; max-width: 42ch; }
.footer-head { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: #8f95a1; }
.footer-links { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; font-family: var(--head); }
.footer-links a { text-decoration: none; color: #fff; }
.footer-links a:hover { text-decoration: underline; }
.footer-base { border-top: 1px solid #2b3a5c; padding-top: 16px; padding-bottom: 24px; font-family: var(--head); font-size: 13px; color: #8f95a1; }

@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* ---------- coming soon (live site before launch) ---------- */
.coming-soon { max-width: 640px; min-height: calc(100vh - 190px); padding-top: 56px; padding-bottom: 40px; text-align: center; }
.coming-soon-art .mosaic { width: 100%; height: 64px; }
.coming-soon-label { font-family: var(--head); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--maple-dark); margin: 28px 0 8px; }
.coming-soon h1 { font-size: clamp(36px, 7vw, 56px); }
.coming-soon-sub { font-size: 19px; color: var(--muted); margin: 14px auto 28px; max-width: 46ch; }
.tab-coming-soon { min-height: 0; margin: 0 auto; padding-top: 24px; }
.tab-coming-soon.small { padding-top: 0; }
.tab-coming-soon.small h3 { font-size: 28px; }
.tab-coming-soon.small .coming-soon-sub { font-size: 16px; margin-bottom: 8px; }
.signup-light { background: #fff; border-color: rgba(0, 0, 0, 0.1); color: var(--ink); text-align: left; margin: 0 auto; }
.signup-light .signup-note { color: var(--muted); }

/* ---------- story photos (Wikimedia Commons) and maps (assets/map.js) ---------- */
.card-media { position: relative; overflow: hidden; }
.card-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-credit {
  position: absolute; right: 0; bottom: 0; max-width: 100%; padding: 2px 6px;
  background: rgba(22, 24, 29, 0.55); color: #fff; font: 10px/1.4 system-ui, sans-serif;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.map-box { position: relative; width: 100%; height: 100%; min-height: 120px; background: #e9e5dc; }
.map-box > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.map-fallback {
  position: absolute; inset: auto 8px 8px 8px; font: 600 13px/1.3 system-ui, sans-serif; color: var(--muted);
}
.map-on .map-fallback { display: none; }
.map-painter { position: absolute; left: -10000px; top: 0; width: 640px; height: 400px; }
.story-media { margin-top: 8px; margin-bottom: 0; }
.story-photo img { display: block; width: 100%; max-height: 520px; object-fit: cover; border-radius: 8px; }
.story-map .map-box { height: 380px; border-radius: 8px; overflow: hidden; }
.story-photo figcaption, .story-map figcaption { margin-top: 6px; font-size: 13px; color: var(--muted); }
.story-photo figcaption a, .story-map figcaption a { color: inherit; }
.map-pin-holder { width: 26px; height: 34px; }
.map-pin {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0; background: var(--pin); transform: rotate(-45deg);
  border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
@media (max-width: 640px) { .story-map .map-box { height: 300px; } }
