/* The map of the journey (/map). The warm night with its clouds comes from body.keep-page. */

.map-main { max-width: 1480px; margin: 0 auto; padding: 0 28px 64px; }
.map-intro { max-width: 760px; margin: 0 auto; padding: 64px 0 24px; text-align: center; }
.map-intro h1 { font-family: var(--display); font-weight: 600; font-size: clamp(38px, 7vw, 64px); line-height: 1.05; margin: 8px 0 20px; }
.map-lede { font-size: 18px; line-height: 1.65; color: var(--text-soft, rgba(239, 233, 228, 0.8)); margin: 0 0 14px; }

/* The board fills one screen on a desktop: layers at the left, the spiral at the centre, the step's
   card beside it, so they work together without scrolling. */
.map-board { display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(340px, 400px); gap: 36px;
  height: calc(100vh - 96px); min-height: 640px; margin-top: 24px; scroll-margin-top: 76px; }
.map-left, .map-step { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(239, 233, 228, 0.15) transparent; }
.map-left { display: flex; flex-direction: column; gap: 18px; padding-right: 4px; }
.map-figure { display: flex; flex-direction: column; justify-content: center; min-height: 0; }
#spiral-svg { width: 100%; height: 100%; max-height: calc(100vh - 140px); display: block; overflow: visible; }
.map-hint { text-align: center; color: var(--text-dim); font-size: 13px; margin: 8px 0 0; }

.map-seg { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.5s ease; }
.map-onward { fill: none; stroke: rgba(240, 205, 140, 0.5); stroke-width: 2; stroke-dasharray: 2 7; stroke-linecap: round; }
.map-onward-label { fill: rgba(240, 205, 140, 0.8); font: italic 500 18px var(--display); }
.map-gap-halo { fill: rgba(250, 5, 138, 0.12); stroke: rgba(255, 143, 200, 0.45); stroke-width: 1; }
.map-gap-dot { fill: #ffd2e8; }
.map-gap { cursor: help; }

.map-node { cursor: pointer; outline: none; --tone: #fa058a; }
.map-node-glow { opacity: 0.16; transition: opacity 0.3s ease; }
.map-node-disc { fill: #0d0a16; stroke: var(--tone); stroke-width: 1.8; transition: stroke 0.5s ease, fill 0.3s ease; }
.map-node-n { fill: var(--text); font: 600 12px var(--body); letter-spacing: 0.02em; pointer-events: none; }
.map-node:hover .map-node-glow, .map-node:focus-visible .map-node-glow { opacity: 0.5; }
.map-node:focus-visible .map-node-disc { stroke-width: 3; }
.map-node.on .map-node-glow { opacity: 0.9; }
.map-node.on .map-node-disc { fill: var(--tone); stroke: #fff; stroke-width: 1.5; }
.map-node.on .map-node-n { fill: #0d0a16; }
.map-name { fill: rgba(239, 233, 228, 0.78); font: 500 16px var(--display); pointer-events: none; paint-order: stroke; stroke: #07050d; stroke-width: 5px; stroke-linejoin: round; transition: opacity 0.6s ease; }
.map-node.on .map-name { fill: #fff; font-weight: 600; }

.map-layers { display: flex; flex-wrap: wrap; gap: 8px; }
.map-layer { border: 1px solid var(--line); background: rgba(13, 10, 22, 0.6); color: var(--text-dim); border-radius: 999px; padding: 8px 14px; font: 500 14px var(--body); cursor: pointer; }
.map-layer:hover { color: var(--text); }
.map-layer.on { color: #fff; border-color: rgba(250, 5, 138, 0.7); background: rgba(250, 5, 138, 0.16); }

/* Solid smoked panels, no backdrop blur: a blur over a moving picture is redone on every frame. */
.map-legend, .map-step { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13, 10, 22, 0.86); padding: 22px 24px; }
.map-legend-title { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.1; margin: 0 0 6px; }
.map-source-line { margin: 0 0 14px; font-size: 13px; color: var(--accent); }
.map-legend-note { margin: 0 0 16px; color: var(--text-soft, rgba(239, 233, 228, 0.8)); font-size: 15px; line-height: 1.6; }
.map-ranges { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.map-ranges li { display: grid; grid-template-columns: 62px 1fr; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; line-height: 1.5; color: var(--text-dim); cursor: pointer; border-left: 3px solid var(--tone); }
.map-ranges li strong { color: var(--text); font-weight: 600; }
.map-ranges li.on { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.map-range-n { font-family: var(--display); font-size: 17px; color: var(--tone); }
.map-credit { margin: 12px 0 0; font-size: 12px; color: var(--text-dim); font-style: italic; }

.map-step.arrive { animation: map-arrive 0.45s ease-out; }
@keyframes map-arrive { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.map-step-n { font-family: var(--display); font-size: 22px; color: var(--accent); margin: 0; }
.map-step h2 { font-family: var(--display); font-weight: 600; font-size: 36px; line-height: 1.1; margin: 2px 0 8px; }
.map-outer { font-family: var(--display); font-style: italic; font-size: 22px; line-height: 1.35; margin: 0 0 18px; }
.map-group { margin: 0 0 18px; color: var(--text-soft, rgba(239, 233, 228, 0.8)); line-height: 1.6; }
.map-group span, .map-where span { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 3px; }
.map-where { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.map-where strong { font-weight: 500; font-size: 15px; }
.map-ladder { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.map-ladder th, .map-ladder td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.map-ladder thead th { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; }
.map-ladder td { color: var(--text-soft, rgba(239, 233, 228, 0.8)); }
.map-stage { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); font-weight: 500; }
.map-word { display: block; font-family: var(--display); font-size: 19px; color: var(--accent); font-weight: 600; }
.map-walk { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.map-walk .btn { font-size: 14px; padding: 8px 14px; }
.map-walk .btn[disabled] { visibility: hidden; }

.map-section { max-width: 1100px; margin: 0 auto; padding: 96px 0 0; }
.map-section h2 { font-family: var(--display); font-weight: 600; font-size: clamp(30px, 5vw, 44px); margin: 8px 0 16px; }
.map-narrow { max-width: 720px; color: var(--text-soft, rgba(239, 233, 228, 0.8)); font-size: 17px; line-height: 1.65; }
.map-sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.map-source { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; background: rgba(13, 10, 22, 0.55); transition: border-color 0.5s ease, box-shadow 0.5s ease, background 0.5s ease; }
.map-source.lit { border-color: rgba(250, 5, 138, 0.45); background: rgba(24, 14, 34, 0.7); box-shadow: 0 0 34px -10px rgba(250, 5, 138, 0.45); }
.map-source h3 { font-family: var(--display); font-size: 24px; margin: 0 0 8px; }
.map-source p { margin: 0; color: var(--text-soft, rgba(239, 233, 228, 0.8)); font-size: 15px; line-height: 1.6; }

@media (max-width: 1180px) {
  .map-board { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); height: auto; min-height: 0; }
  .map-left { grid-column: 1 / -1; order: 3; overflow: visible; }
  .map-figure { order: 1; }
  .map-step { order: 2; max-height: calc(100vh - 110px); position: sticky; top: 84px; align-self: start; }
  #spiral-svg { max-height: calc(100vh - 160px); }
}
@media (max-width: 760px) {
  .map-main { padding: 0 18px 48px; }
  .map-intro { padding-top: 32px; text-align: left; }
  .map-board { grid-template-columns: 1fr; gap: 22px; }
  .map-figure { order: 1; } .map-left { order: 2; } .map-step { order: 3; position: static; max-height: none; overflow: visible; }
  .map-step { scroll-margin-top: 110px; }
  .map-sources { grid-template-columns: 1fr; }
  .map-section { padding-top: 64px; }
}
@media (max-width: 640px) {
  .map-page .topbar:has(.home-nav) { flex-wrap: wrap; padding-bottom: 0; background: rgba(7, 5, 13, 0.96); }
  .map-page .home-nav { order: 10; flex: 1 0 100%; gap: 0; margin: 2px -16px 0; padding: 0 10px; overflow-x: auto; scrollbar-width: none; }
  .map-page .home-nav a { white-space: nowrap; font-size: 13px; padding: 8px 8px 10px; }
  .map-name { display: none; }
  .map-node-n { font-size: 14px; }
  .map-where { grid-template-columns: 1fr; }
}
.map-source .map-credit { margin-top: 14px; font-size: 13px; color: var(--text-dim); }
@media (max-width: 760px) { .map-board { scroll-margin-top: 108px; } }

/* The spiral is the movement on this page; the clouds behind it stay still, to spare the computer. */
body.map-page::before { animation: none; }
