/* ═══════════════════════════════════════════════════════
   festival-map-page.css — Museum Exhibition Edition
   Page-specific presentation layer for festival-map.html.

   Reuses festival-map.js/.css entirely for logic, data, pan/
   zoom, marker selection and rendering — this file only
   restyles the chrome (header, legend, pins, controls, panel,
   cards) to match the Delta Harvest Festival heritage-archive
   language used on mill-history.html / old-town-hall.html.
   Loaded only on this page, after festival-map.css, so nothing
   here reaches the homepage's modal instance of the map.
   ═══════════════════════════════════════════════════════ */

body {
  --bg:      #F5F3F1;
  --bg-2:    #EFECE7;
  --ink:     #1C1A18;
  --ink-2:   #2B2725;
  --muted:   #8D8782;
  --muted-2: #B5B0AA;
  --rule:    #DCD7CF;
  --rule-2:  #E6E1D9;
  --accent:  #7a3b2e;
  --mono:    "IBM Plex Mono", "Courier New", monospace;
  background: var(--bg);

  /* Pull the map component's "aged paper" tone in line with the
     site's own ivory palette — the stock festival-map.css value
     (#F1E8D6) reads too tan/yellow next to --bg. Overriding the
     variable here only affects this page; the homepage's full-
     screen modal (which never loads this stylesheet) keeps the
     richer original parchment tone that suits a dramatic overlay. */
  --vm-parchment:   #F2EFE7;
  --vm-parchment-2: #E9E3D3;
}

/* ─── hero ─── */
.fm-hero { padding: clamp(76px, 10vw, 128px) 0 clamp(56px, 7vw, 96px); }
.fm-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.fm-kicker {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .36em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}
.fm-hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, 6.5vw, 84px);
  line-height: 1.03;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 0 0 28px;
}
.fm-hero h1 em { font-style: italic; color: var(--ink-2); }
.fm-hero-sub {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(19px, 1.9vw, 25px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0 auto;
}
.fm-hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(20px, 4vw, 48px);
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: clamp(28px, 3.5vw, 40px);
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}
.fm-hero-meta strong { color: var(--ink-2); font-weight: 500; }

/* ─── section wrapper + chapter-style head ─── */
.fm-sw {
  padding: clamp(24px, 4vw, 40px) 56px 0;
  max-width: 1320px;
  margin: 0 auto;
}
.fm-sw + .fm-sw { padding-top: clamp(88px, 10vw, 140px); }
@media (max-width: 780px) { .fm-sw { padding-left: 24px; padding-right: 24px; } }

/* the map section is allowed to run wider than the text measure —
   see .fm-map-plate below for why this matters for legibility */
#map.fm-sw { max-width: 1580px; }

.fm-head {
  display: grid;
  grid-template-columns: 150px 1fr 220px;
  gap: 28px;
  align-items: end;
  padding-bottom: clamp(28px, 3vw, 40px);
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(48px, 6vw, 80px);
}
.fm-head-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
}
.fm-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.05;
  letter-spacing: -.005em;
  color: var(--ink);
  margin: 0;
  text-align: center;
}
.fm-head h2 em { font-style: italic; color: var(--ink-2); }
.fm-head-meta {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
  line-height: 1.7;
}
.fm-head-meta strong { color: var(--ink-2); font-weight: 500; }
@media (max-width: 900px) {
  .fm-head { grid-template-columns: 1fr; text-align: center; }
  .fm-head-meta { text-align: center; }
  .fm-head h2 { text-align: center; }
}

/* ─── map plate ───
   Deliberately wider than the rest of the page's text measure —
   the map's hotspot markers/labels stay a constant screen size
   regardless of zoom, so the more stage room available, the less
   the tightly-clustered village core (Mill/Town Hall/Blacksmith/
   Russell Greenspace) has to zoom out to fit, and the less those
   markers collide. */
.fm-map-plate {
  max-width: 1500px;
  margin: 0 auto;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  box-shadow: 0 30px 80px -48px rgba(28, 26, 24, .28);
}
#village-map-embed { display: block; }
.fm-map-caption {
  display: flex;
  justify-content: center;
  padding: 18px 4px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════
   Restyled village-map component (structure/JS unchanged)
   ══════════════════════════════════════════════════════ */

.vmap-overlay.is-inline .vmap-modal {
  height: clamp(640px, 82vh, 880px);
  border-radius: 0;
  box-shadow: none;
  background: var(--vm-parchment);
}

/* header — kept short so the stage below gets most of the height.
   The legend row is dropped entirely here: it's redundant with the
   full "Festival Locations" section further down the page. */
.vmap-header { border-bottom: 1px solid rgba(46,34,16,.14); padding: clamp(18px,2.2vw,26px) clamp(24px,3vw,40px) clamp(14px,1.6vw,18px); }
.vmap-header-text .vmap-label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .28em;
  color: var(--accent);
  margin-bottom: 10px;
}
.vmap-header-text h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--ink);
}
.vmap-header-text p { display: none; }

/* toolbar: refined outline button only — legend removed (see above) */
.vmap-toolbar { margin-top: 14px; align-items: center; }
.vmap-toggle-btn {
  background: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  padding: 10px 20px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
  gap: 10px;
}
.vmap-toggle-btn:hover { background: var(--ink); color: var(--vm-parchment); transform: none; }
.vmap-toggle-btn .icon { font-size: 14px; }
.vmap-legend { display: none; }

/* stage / hotspots — smaller, quieter markers so the tightly-
   clustered village core (Mill / Town Hall / Blacksmith Shop /
   Russell Greenspace) doesn't collapse into an overlapping mess */
.vmap-body { grid-template-columns: 1fr 380px; }
.vmap-hotspot { width: 36px; height: 36px; }
.vmap-hotspot-pin {
  width: 36px; height: 36px;
  border-width: 2px;
  box-shadow: 0 2px 8px rgba(46,34,16,.28);
}
.vmap-hotspot-pin svg { width: 17px; height: 17px; }
.vmap-hotspot-pin { animation: none; }
.vmap-hotspot-label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: .03em;
  padding: 3px 7px;
  border-radius: 2px;
  box-shadow: none;
}
.vmap-hotspot.is-active .vmap-hotspot-label,
.vmap-hotspot.is-active .vmap-hotspot-pin { background: var(--accent); border-color: var(--accent); }
@media (max-width: 860px) {
  .vmap-body { grid-template-columns: 1fr; }
}

.vmap-controls {
  background: rgba(241,232,214,.85);
  border: 1px solid rgba(46,34,16,.18);
  border-radius: 2px;
  box-shadow: none;
}
.vmap-controls button {
  border-radius: 0;
  border: 1px solid rgba(46,34,16,.22);
  font-family: var(--mono);
  font-weight: 400;
  box-shadow: none;
}
.vmap-hint {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .06em;
  border-radius: 2px;
  box-shadow: none;
  background: rgba(241,232,214,.85);
  border: 1px solid rgba(46,34,16,.18);
}

/* side panel + cards — editorial "plate label" treatment */
.vmap-panel { background: var(--vm-parchment); }
.vmap-panel-empty {
  font-family: var(--display);
  font-weight: 300;
  opacity: .5;
}

.vmap-card-badge {
  display: block;
  background: none !important;
  border: none !important;
  padding: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: .18em;
  color: var(--muted);
}
.vmap-card-badge.is-placeholder { color: var(--accent); }
.vmap-card-badge::before {
  content: "";
  display: inline-block;
  width: 16px; height: 1px;
  background: var(--rule-2);
  margin-right: 10px;
  vertical-align: middle;
}

.vmap-card-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  color: var(--accent);
  margin-top: 16px;
}
.vmap-card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(24px, 2vw, 30px);
  color: var(--ink);
}
.vmap-card-time {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .06em;
  color: var(--muted);
  opacity: 1;
}
.vmap-card-desc {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ink-2);
}
.vmap-card-placeholder-note {
  background: none;
  border-left: 2px solid var(--accent);
  font-family: var(--display);
}
.vmap-card-heritage { border-top: 1px solid var(--rule); }
.vmap-card-heritage h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
}
.vmap-card-heritage p {
  font-family: var(--display);
  font-style: italic;
  color: var(--ink-2);
}
.vmap-card-link {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  transition: gap .25s, color .25s, border-color .25s;
}
.vmap-card-link:hover { gap: 15px; color: var(--muted); border-color: var(--muted); }

/* list view */
.vmap-list { background: var(--bg-2); }
.vmap-list-head { font-family: var(--display); font-weight: 400; }
.vmap-list-sub { font-family: var(--display); font-style: italic; opacity: 1; color: var(--muted); }
.vmap-list-card {
  position: relative;
  background: var(--vm-parchment);
  border: 1px solid var(--rule);
  border-radius: 0;
  box-shadow: none;
  transition: transform .35s cubic-bezier(.2,.7,.2,1),
              box-shadow .35s cubic-bezier(.2,.7,.2,1),
              border-color .35s ease;
}
.vmap-list-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px -26px rgba(28, 26, 24, .35);
}
.vmap-list-card:hover h3 { color: var(--accent); }
.vmap-list-card h3 { transition: color .3s ease; }
.vmap-locate-btn {
  background: none;
  border: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  transition: background .18s, color .18s;
}
.vmap-locate-btn:hover { background: var(--ink); color: var(--vm-parchment); gap: 14px; }

/* ─── locations grid (page-level cards, outside the map) ─── */
.fm-loc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1px;
  background: var(--bg);
  border: 1px solid var(--rule);
}
.fm-loc-card {
  position: relative;
  background: var(--vm-parchment);
  padding: clamp(32px, 3.2vw, 44px) clamp(26px, 2.6vw, 36px);
  display: flex;
  flex-direction: column;
  transition: transform .4s cubic-bezier(.2,.7,.2,1),
              box-shadow .4s cubic-bezier(.2,.7,.2,1),
              background .4s ease;
}
.fm-loc-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.fm-loc-card:hover {
  z-index: 2;
  background: var(--bg);
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -28px rgba(28, 26, 24, .38);
}
.fm-loc-card:hover::before { transform: scaleX(1); }
.fm-loc-card .vmap-card { flex: 1 1 auto; }
.fm-loc-card .vmap-card-desc { font-size: 17px; }
.fm-loc-card .vmap-card h3 { transition: color .3s ease; }
.fm-loc-card:hover .vmap-card h3 { color: var(--accent); }
.fm-loc-locate { margin-top: 26px; align-self: flex-start; }

/* ─── closing CTA ─── */
.fm-cta {
  text-align: center;
  padding: 0 0 clamp(90px, 11vw, 150px);
}
.fm-cta .fm-cta-kicker {
  display: block;
  margin-bottom: clamp(20px, 2.5vw, 32px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 780px) {
  .fm-loc-card { padding: 28px 22px; }
}
