/* Site Tour Atlas additions.
   Loaded after style.css so the established Naturalist Journal design remains intact. */

[id] { scroll-margin-top: 6.5rem; }

.tour-atlas-page .paper-section,
.tour-map-section,
.walk-section {
  padding: 5rem;
}

.tour-hero figure img { object-position: center 52%; }

.tour-opening {
  background:
    radial-gradient(rgba(105, 78, 38, .028) .7px, transparent .8px),
    var(--paper-light);
  background-size: 8px 8px, auto;
}

.tour-atlas-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .55rem;
  max-width: 1120px;
  margin: 0 auto 2.2rem;
}

.tour-atlas-nav a {
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(248,241,223,.72);
  color: var(--forest-dark);
  font: 700 .7rem/1 var(--sans);
  letter-spacing: .035em;
  text-decoration: none;
}

.tour-atlas-nav a:hover {
  background: var(--forest);
  border-color: var(--forest);
  color: #fff;
}

.tour-facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  max-width: 1120px;
  margin: 0 auto;
  background: var(--forest);
  border: 1px solid var(--forest-dark);
  color: #fff;
}

.tour-facts div {
  padding: 1.35rem .7rem;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.13);
}

.tour-facts div:last-child { border-right: 0; }

.tour-facts strong {
  display: block;
  font: 600 1.62rem/1 var(--display);
}

.tour-facts span {
  display: block;
  margin-top: .42rem;
  color: #d7ddce;
  font: .61rem/1.25 var(--sans);
  letter-spacing: .065em;
  text-transform: uppercase;
}

.tour-opening .archive-note {
  max-width: 920px;
  margin: 1.6rem auto 0;
  padding: 1rem 1.25rem;
  background: rgba(248,241,223,.76);
  border-left: 4px solid var(--terracotta);
  color: var(--ink-soft);
}

.tour-opening .archive-note strong { color: var(--forest-dark); }
.tour-opening .archive-note a {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-top: .45rem;
  font: 700 .68rem/1.35 var(--sans);
  letter-spacing: .03em;
  text-transform: uppercase;
}

/* Map */
.tour-map-section {
  display: grid;
  grid-template-columns: minmax(250px,.68fr) minmax(0,1.32fr);
  gap: 3.5rem 4.2rem;
  align-items: start;
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.map-copy {
  position: sticky;
  top: 7.2rem;
}

.map-copy h2 { margin-bottom: 1.15rem; }
.map-copy p { color: var(--ink-soft); }

.map-download-link {
  display: inline-block;
  margin: .7rem 0 .85rem;
  padding: .64rem .9rem;
  border: 1px solid var(--forest);
  color: var(--forest-dark);
  font: 700 .7rem/1 var(--sans);
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
}

.map-download-link:hover { background: var(--forest); color: white; }

.source-link {
  display: inline-block;
  color: var(--terracotta);
  font: 700 .66rem/1.35 var(--sans);
  letter-spacing: .035em;
  text-decoration: none;
  text-transform: uppercase;
}
.source-link:hover { color: var(--forest-dark); }

.route-map {
  margin: 0;
  padding: 1rem 1rem 1.35rem;
  background: var(--paper-light);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  transform: rotate(.18deg);
}

.route-map a { display: block; }
.route-map img {
  width: 100%;
  background: white;
  border: 1px solid rgba(117,91,53,.42);
  cursor: zoom-in;
}
.route-map figcaption { text-align: center; }

.route-key {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  background: var(--line);
  border: 1px solid var(--line);
  list-style: none;
}
.route-key li { background: var(--paper-light); }
.route-key a {
  display: flex;
  gap: .65rem;
  align-items: baseline;
  height: 100%;
  padding: .92rem 1rem;
  color: var(--forest-dark);
  text-decoration: none;
  line-height: 1.35;
}
.route-key a:hover { background: rgba(152,161,125,.17); }
.route-key span {
  flex: 0 0 auto;
  color: var(--terracotta);
  font: 700 .63rem/1 var(--sans);
  letter-spacing: .08em;
}

/* Walking chapters */
.walk-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
  background:
    linear-gradient(90deg, transparent calc(50% - .5px), var(--line-soft) 50%, transparent calc(50% + .5px)),
    radial-gradient(rgba(105,78,38,.024) .7px, transparent .8px),
    var(--paper-light);
  background-size: 100% 100%, 8px 8px, auto;
}

.tour-chapter {
  display: grid;
  grid-template-columns: minmax(280px,.76fr) minmax(0,1.24fr);
  gap: 4rem;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 5rem 0;
  border-bottom: 1px solid var(--line);
}
.tour-chapter:last-child { border-bottom: 0; }
.tour-chapter.reverse { grid-template-columns: minmax(0,1.24fr) minmax(280px,.76fr); }
.tour-chapter.reverse .tour-copy { grid-column: 2; grid-row: 1; }
.tour-chapter.reverse > :not(.tour-copy) { grid-column: 1; grid-row: 1; }

.stop-number {
  width: max-content;
  margin: 0 0 .8rem;
  padding: .4rem .65rem;
  border: 1px solid var(--terracotta);
  color: var(--terracotta);
  font: 700 .65rem/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tour-copy h2 { margin-bottom: 1.2rem; }
.tour-copy > p:not(.kicker):not(.stop-number) { color: var(--ink-soft); }

.chapter-links {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem .95rem;
  align-items: center;
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px dotted var(--line);
}
.chapter-links > a:not(.source-link) {
  padding: .5rem .72rem;
  background: var(--forest);
  color: white;
  font: 700 .67rem/1.1 var(--sans);
  letter-spacing: .025em;
  text-decoration: none;
}
.chapter-links > a:not(.source-link):hover { background: var(--terracotta); }
.chapter-links .source-link { flex-basis: 100%; }

.tour-photo {
  margin: 0;
  padding: .72rem .72rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.tour-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid rgba(117,91,53,.42);
  cursor: zoom-in;
  filter: saturate(.88) contrast(.97) sepia(.012);
}
.tour-photo figcaption {
  margin: .7rem .2rem 0;
  line-height: 1.4;
}
.landscape { transform: rotate(.25deg); }
.landscape img { aspect-ratio: 16 / 10; }

.paired-photos {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}
.paired-photos .tour-photo:first-child { transform: rotate(-.3deg); }
.paired-photos .tour-photo:last-child { transform: rotate(.35deg); }
.paired-photos img { height: 100%; min-height: 370px; }
.homes-pair img { object-position: center; }
.hill-pair { align-items: stretch; }
.hill-pair .tour-photo { display: flex; flex-direction: column; }
.hill-pair .portrait-photo img {
  flex: 1;
  min-height: 500px;
  aspect-ratio: 3 / 4;
}

.tour-mosaic {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}
.tour-mosaic .wide-photo { grid-column: 1 / -1; }
.tour-mosaic .wide-photo img { aspect-ratio: 16 / 8.5; }
.tour-mosaic .tour-photo:nth-child(1) { transform: rotate(.18deg); }
.tour-mosaic .tour-photo:nth-child(2) { transform: rotate(-.25deg); }
.tour-mosaic .tour-photo:nth-child(3) { transform: rotate(.28deg); }

.garden-mosaic .wide-photo img { object-position: center 45%; }
.work-mosaic .wide-photo img { object-position: center 48%; }
.metabolism-mosaic .wide-photo img { object-position: center 43%; }
.creek-photo img { min-height: 590px; aspect-ratio: 3 / 4; object-position: center; }

/* Crossroads */
.systems-crossroads {
  padding: 5rem;
  background: var(--forest-dark);
  color: #f4eddc;
}
.light-heading h2 { color: #f7f0df; }
.light-heading > p:last-child { color: #cbd3bf; }

.crossroads-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1px;
  max-width: 1120px;
  margin: 2.4rem auto 0;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.16);
}
.crossroads-grid a {
  position: relative;
  min-height: 180px;
  padding: 1.65rem;
  background: rgba(255,255,255,.055);
  color: white;
  text-decoration: none;
}
.crossroads-grid a:hover { background: rgba(255,255,255,.12); }
.crossroads-grid span {
  display: block;
  margin-bottom: 1.1rem;
  color: #c59a6d;
  font: 700 .65rem/1 var(--sans);
  letter-spacing: .12em;
}
.crossroads-grid strong {
  display: block;
  font: 600 1.5rem/1.05 var(--display);
}
.crossroads-grid small {
  display: block;
  margin-top: .75rem;
  color: #cbd3bf;
  font: .86rem/1.45 var(--hand);
}

.tour-closing {
  position: relative;
  padding: 5.4rem 10%;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.055), transparent 48%),
    var(--paper-deep);
}
.tour-closing blockquote {
  max-width: 900px;
  margin: 0 auto 1rem;
  color: var(--forest-dark);
  font: italic 500 clamp(1.8rem,3.5vw,2.85rem)/1.34 var(--display);
}
.tour-closing p { margin: 0; color: var(--ink-soft); font-size: .9rem; }

@media (max-width: 1050px) {
  .tour-atlas-page .paper-section,
  .tour-map-section,
  .walk-section,
  .systems-crossroads { padding: 4rem 2.4rem; }
  .route-key { grid-template-columns: repeat(2,1fr); }
  .route-key li:last-child { grid-column: 1 / -1; }
  .tour-chapter,
  .tour-chapter.reverse { gap: 2.4rem; }
  .paired-photos img { min-height: 310px; }
}

@media (max-width: 820px) {
  .tour-map-section { grid-template-columns: 1fr; }
  .map-copy { position: static; }
  .route-map { grid-column: 1; }
  .tour-facts { grid-template-columns: repeat(2,1fr); }
  .tour-facts div { border-right: 1px solid rgba(255,255,255,.13); border-bottom: 1px solid rgba(255,255,255,.13); }
  .tour-facts div:nth-child(even) { border-right: 0; }
  .tour-facts div:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .walk-section { background: var(--paper-light); }
  .tour-chapter,
  .tour-chapter.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 4rem 0;
  }
  .tour-chapter.reverse .tour-copy,
  .tour-chapter.reverse > :not(.tour-copy) { grid-column: 1; grid-row: auto; }
  .tour-chapter.reverse .tour-copy { grid-row: 1; }
  .crossroads-grid { grid-template-columns: repeat(2,1fr); }
  .creek-photo img { min-height: 420px; aspect-ratio: 4 / 3; }
}

@media (max-width: 560px) {
  .tour-atlas-page .paper-section,
  .tour-map-section,
  .walk-section,
  .systems-crossroads { padding: 3rem 1.05rem; }
  .tour-atlas-nav { justify-content: flex-start; }
  .route-key { grid-template-columns: 1fr; }
  .route-key li:last-child { grid-column: 1; }
  .paired-photos,
  .tour-mosaic,
  .crossroads-grid { grid-template-columns: 1fr; }
  .tour-mosaic .wide-photo { grid-column: 1; }
  .paired-photos img,
  .hill-pair .portrait-photo img { min-height: 0; aspect-ratio: 4 / 3; }
  .tour-photo { padding: .55rem .55rem .85rem; }
  .tour-closing { padding: 4rem 1.4rem; }
}

/* Final polish: give Site Tour its own landscape identity. */
.tour-hero figure img {
  object-position: center 42%;
}
