/* ── Vintage map backdrop ── */

.hl-section--map {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--parchment);
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0px, transparent 59px,
      rgba(184, 150, 104, 0.16) 59px, rgba(184, 150, 104, 0.16) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0px, transparent 59px,
      rgba(184, 150, 104, 0.16) 59px, rgba(184, 150, 104, 0.16) 60px
    );
}

.hl-section--map > .container,
.hl-section--map > * { position: relative; z-index: 1; }

/* Map overlay — position absolute, covers the section, pointer-events none */
.map-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.map-contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-coord {
  position: absolute;
  font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
  color: rgba(107, 107, 104, 0.5);
  line-height: 1.5;
}

.map-coord--tl { top: 14px;    left: 16px; }
.map-coord--bl { bottom: 14px; left: 16px; }
.map-coord--br { bottom: 14px; right: 16px; text-align: right; }

.map-compass {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 54px;
  height: 54px;
}

.map-legend-box {
  position: absolute;
  bottom: 36px;
  right: 16px;
  width: 136px;
  background: rgba(241, 232, 208, 0.82);
  border: 1px solid rgba(184, 150, 104, 0.5);
  padding: 8px 10px 6px;
}

.map-legend-title {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(107, 107, 104, 0.65);
  font-weight: 700;
  font-family: var(--font-body);
  border-bottom: 1px solid rgba(184, 150, 104, 0.4);
  padding-bottom: 4px;
  margin-bottom: 5px;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  font-family: var(--font-body);
  color: rgba(107, 107, 104, 0.65);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.map-legend-swatch {
  flex-shrink: 0;
  width: 18px;
  height: 1.5px;
  background: rgba(184, 150, 104, 0.55);
}

.map-legend-swatch--dashed {
  background: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(184, 150, 104, 0.55) 0, rgba(184, 150, 104, 0.55) 4px,
    transparent 4px, transparent 7px
  );
  height: 1px;
}

.map-legend-swatch--pin {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(200, 69, 58, 0.45);
}

/* ── Polaroid frame ── */

.polaroid {
  background: var(--cloud-white);
  border-radius: 4px;
  padding: 0.6rem 0.6rem 1.2rem;
  box-shadow: var(--shadow-lg);
  transform: rotate(-2deg);
  max-width: 320px;
  position: relative;
  display: inline-block;
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 18px;
  background: var(--compass-red);
  border-radius: 7px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.25);
}

.polaroid--right { transform: rotate(2deg); }
.polaroid--left  { transform: rotate(-3deg); }

.polaroid-img {
  border-radius: 2px;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.polaroid-caption {
  margin-top: 0.6rem;
  font-size: 13px;
  color: var(--stone-gray);
  line-height: 1.4;
}

.polaroid-caption span {
  font-family: var(--font-accent);
  font-size: 15px;
  display: block;
  color: var(--ink-black);
}

/* ── Scrapbook layout row ── */

.scrapbook-row {
  display: grid;
  gap: 2rem;
  align-items: flex-start;
}

@media (min-width: 900px) {
  .scrapbook-row {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.scrapbook-notes {
  max-width: var(--reading-width);
}

.scrapbook-layout {
  position: relative;
  min-height: 260px;
}

.scrapbook-polaroid {
  position: absolute;
  width: 180px;
}

.scrapbook-polaroid--left {
  left: 0;
  top: 40px;
  transform: rotate(-3deg);
}

.scrapbook-polaroid--right {
  right: 8%;
  top: 0;
  transform: rotate(2deg);
}

/* ── Postage stamp badge ── */

.scrapbook-stamp {
  position: absolute;
  top: 0;
  left: 0;
  width: 120px;
  height: 80px;
  border-radius: 2px;
  border: 1px solid var(--aged-sepia);
  background: repeating-linear-gradient(
    45deg,
    rgba(241, 232, 208, 0.8) 0, rgba(241, 232, 208, 0.8) 3px,
    rgba(226, 191, 177, 0.7) 3px, rgba(226, 191, 177, 0.7) 6px
  );
  box-shadow: var(--shadow-sm);
  position: relative;
}

.scrapbook-stamp::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed rgba(184, 150, 104, 0.7);
  border-radius: 2px;
}

.scrapbook-stamp-label {
  position: absolute;
  inset: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-black);
  font-family: var(--font-body);
}

/* ── Compass Red map pin ── */

.map-pin {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--compass-red);
  box-shadow: var(--shadow-pin);
  position: absolute;
}

/* ── Dashed journey path ── */

.scrapbook-path {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scrapbook-path svg path {
  stroke: var(--aged-sepia);
  stroke-width: 1.8;
  stroke-dasharray: 6 4;
  fill: none;
}
