/* Lincolnshire Legends Map — local draft. The Eerie Archive. */
:root {
  --bg: #0d0d12;
  --bg-raised: #16161e;
  --bg-card: #1b1b25;
  --ink: #ece8e1;
  --fog: #8a8f98;
  --mist: #c8c4bb;
  --amber: #e8a33d;
  --amber-dim: #c4842a;
  --amber-soft: rgba(232, 163, 61, 0.16);
  --line: rgba(232, 163, 61, 0.22);
  --line-faint: rgba(236, 232, 225, 0.08);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --max: 1080px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at top, rgba(232, 163, 61, 0.07), transparent 52%),
    radial-gradient(ellipse at 80% 120%, rgba(80, 90, 140, 0.12), transparent 50%);
}

img { max-width: 100%; }

a {
  color: var(--amber);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: #f3c36a; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--amber);
  color: #1a1408;
  padding: 0.5rem 0.8rem;
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus { top: 1rem; }

.wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
.site-header {
  padding: 1.35rem 0 0.4rem;
  text-align: center;
}

.draft-banner {
  display: inline-block;
  margin: 0 0 1.1rem;
  padding: 0.22rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mist);
}

.brand span {
  display: inline-block;
  color: var(--amber);
  letter-spacing: 0.28em;
}

.site-header h1 {
  margin: 0.45rem 0 0.35rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.05rem, 7vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.lede {
  margin: 0 auto 0.9rem;
  max-width: 36rem;
  color: var(--fog);
  font-size: 1.02rem;
}

.rule {
  width: 4.5rem;
  height: 1px;
  margin: 0.9rem auto 0;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  border: 0;
}

/* Map */
.map-panel {
  margin: 1.5rem auto 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #101018;
  box-shadow: var(--shadow);
  position: relative;
}

#map {
  height: min(62vh, 560px);
  min-height: 320px;
  width: 100%;
  background: #15151c;
}

/* Keep OSM tiles readable, slightly muted to match the dark page.
   Do not filter attribution or controls. */
#map .leaflet-tile-pane {
  filter: grayscale(0.4) saturate(0.7) brightness(0.72) contrast(1.05);
}

#map .leaflet-control-attribution {
  background: rgba(13, 13, 18, 0.82);
  color: var(--fog);
  font-size: 10px;
  margin: 0;
}

#map .leaflet-control-attribution a {
  color: var(--mist);
}

#map .leaflet-control-zoom a {
  background: var(--bg-raised);
  color: var(--ink);
  border-bottom-color: var(--line-faint);
  width: 32px;
  height: 32px;
  line-height: 32px;
}

#map .leaflet-control-zoom a:hover {
  background: #22222c;
  color: var(--amber);
}

#map .leaflet-bar {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: none;
}

/* Custom markers */
.legend-pin {
  background: transparent;
  border: 0;
}

.legend-pin .pin {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid #1a1408;
  box-shadow: 0 0 0 6px var(--amber-soft), 0 6px 14px rgba(0, 0, 0, 0.45);
  color: #1a1408;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(0, 0);
}

.legend-pin.is-featured .pin {
  background: #f3c36a;
  box-shadow: 0 0 0 7px rgba(243, 195, 106, 0.28), 0 6px 14px rgba(0, 0, 0, 0.45);
}

.legend-pin.is-active .pin {
  box-shadow: 0 0 0 8px rgba(232, 163, 61, 0.4), 0 6px 14px rgba(0, 0, 0, 0.5);
}

/* Popups */
#map .leaflet-popup-content-wrapper {
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 0;
}

#map .leaflet-popup-content {
  margin: 0;
  min-width: 230px;
  max-width: 280px;
}

#map .leaflet-popup-tip {
  background: var(--bg-card);
  border: 1px solid var(--line);
  box-shadow: none;
}

#map .leaflet-popup-close-button {
  color: var(--fog) !important;
  top: 6px !important;
  right: 8px !important;
  font-size: 18px !important;
}

#map .leaflet-popup-close-button:hover {
  color: var(--ink) !important;
}

.popup-card {
  padding: 0.95rem 1rem 1rem;
}

.popup-card h3 {
  margin: 0 0 0.1rem;
  padding-right: 1.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
}

.place-kicker {
  margin: 0 0 0.45rem;
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.place-town {
  margin: 0 0 0.55rem;
  color: var(--fog);
  font-size: 0.86rem;
}

.place-copy {
  margin: 0 0 0.85rem;
  color: var(--mist);
  font-size: 0.92rem;
  line-height: 1.45;
}

.legend-tag {
  display: inline-block;
  margin: 0 0 0.55rem;
  color: var(--fog);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--amber);
  background: var(--amber);
  color: #1a1408;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover { background: #f3c36a; color: #1a1408; }

.btn-soon,
.btn[aria-disabled="true"] {
  background: transparent;
  color: var(--fog);
  border-color: rgba(138, 143, 152, 0.45);
  cursor: default;
  pointer-events: none;
}

/* List */
.section-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
}

.section-intro {
  margin: 0 0 1.1rem;
  color: var(--fog);
  font-size: 0.98rem;
}

.place-list {
  display: grid;
  gap: 0.9rem;
  margin: 0 0 2.4rem;
  padding: 0;
  list-style: none;
}

.place-card {
  background: var(--bg-card);
  border: 1px solid var(--line-faint);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.place-card:hover,
.place-card:focus-within {
  border-color: var(--line);
}

.place-card.is-active {
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber-soft), 0 8px 24px rgba(0, 0, 0, 0.2);
}

.place-card.is-featured {
  background-image: linear-gradient(180deg, rgba(232, 163, 61, 0.08), transparent 42%);
}

.place-card-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.featured-badge {
  flex: none;
  padding: 0.12rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--amber);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.place-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.15;
}

.place-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.3rem;
  height: 1.3rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--amber);
  color: #1a1408;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  position: relative;
  top: -0.08em;
}

.locate-btn {
  display: block;
  margin: 0.15rem 0 0.65rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--fog);
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.locate-btn:hover { color: var(--amber); }

/* Contribute — placeholder only, no data collection */
.contribute {
  margin: 0 0 2.6rem;
  padding: 1.3rem 1.2rem 1.4rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--amber-soft);
  text-align: center;
}

.contribute h2 { margin-bottom: 0.4rem; }

.contribute p { margin: 0 auto 0.85rem; max-width: 34rem; }

.placeholder-note {
  margin: 0 auto !important;
  max-width: 30rem;
  color: var(--mist);
  font-size: 0.9rem;
}

/* Footer */
.site-footer {
  padding: 0 0 2.4rem;
  color: var(--fog);
  text-align: center;
  font-size: 0.88rem;
}

.site-footer strong {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
}

.disclaimer {
  margin: 0 auto 0.7rem;
  max-width: 36rem;
}

/* Narrow phones */
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { width: min(var(--max), calc(100% - 1.4rem)); }
  #map { height: 58vw; min-height: 280px; max-height: 380px; }
  .place-card-top { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
}

@media (min-width: 800px) {
  .place-list {
    grid-template-columns: 1fr 1fr;
  }
}
