/* Homepage "tour": the sections below the story, laid out side by side.
   Default is a swipeable rail (phones, reduced motion, no JS).
   tour.js adds .is-pinned on larger screens: the stage pins and vertical
   scrolling moves the panels sideways. Loaded only on index.html. */

.tour { position: relative; background-color: var(--bg-2); border-block: 1px solid var(--line); padding: 56px 0 48px; }

.tour-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  width: min(var(--maxw), 100% - var(--gutter) * 2); margin: 0 auto 20px;
}
.tour-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
.tour-tabs::-webkit-scrollbar { display: none; }
.tour-tabs button {
  flex: 0 0 auto; font: 700 .9rem/1 var(--display); color: var(--muted); background: transparent;
  border: 0; border-radius: 999px; padding: 11px 16px; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.tour-tabs button:hover { color: var(--ink); }
.tour-tabs button[aria-current="true"] { background: var(--accent); color: var(--on-accent); }
.tour-arrows { display: none; gap: 8px; }
.tour-arrows button {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: var(--ink); font-size: 1.1rem; cursor: pointer; transition: border-color .3s, color .3s, opacity .3s;
}
.tour-arrows button:hover { border-color: var(--accent); color: var(--accent); }
.tour-arrows button:disabled { opacity: .3; cursor: default; }

.tour-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.tour-track::-webkit-scrollbar { display: none; }
.tour-panel {
  flex: 0 0 88vw; scroll-snap-align: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 20px;
}
.tour-panel > .wrap { width: 100%; }

/* Tighter versions of the shared blocks so each panel fits one screen */
.tour-panel h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
.tour-panel .lead { font-size: 1rem; }
.tour-panel .grid-3 { margin-top: 26px !important; gap: 14px; }
.tour-panel .card { padding: 22px; }
.tour-panel .card .icon { width: 44px; height: 44px; margin-bottom: 14px; }
.tour-panel .card h3 { font-size: 1.15rem; }
.tour-panel .card p { font-size: .93rem; }
.tour-panel .card .more { margin-top: 14px; }
.tour-panel .trades-tabs { margin-top: 20px; }
.tour-panel .trade-stage { margin-top: 26px; }
.tour-panel .trade-art { max-width: 300px; margin-inline: auto; }
.tour-panel .trade-copy h3 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.tour-panel .btn-row[style] { margin-top: 22px !important; }
.tour-duo { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: stretch; }
.tour-duo .panel, .tour-duo .cta-band { margin: 0 !important; max-width: none !important; height: 100%; }
.tour-duo .panel { text-align: left !important; padding: clamp(24px, 3vw, 40px); }
.tour-duo .panel .eyebrow { justify-content: flex-start !important; }
.tour-duo .panel h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem) !important; }
.tour-duo .panel .lead { margin-inline: 0 !important; }
.tour-duo .chips { justify-content: flex-start; }
.tour-duo .chip-note { text-align: left; }
.tour-duo .panel .btn-row { justify-content: flex-start !important; }
.tour-duo .cta-band { padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); }
.tour-duo .cta-band h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.tour-radio { margin-top: 22px; }

.tour-bar { display: none; }

/* ---------- Pinned mode (set by tour.js) ---------- */
.tour.is-pinned { padding: 0; }
.tour.is-pinned .tour-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.tour.is-pinned .tour-head { position: absolute; top: 96px; left: 0; right: 0; z-index: 3; margin-bottom: 0; }
.tour.is-pinned .tour-arrows { display: flex; }
.tour.is-pinned .tour-track {
  overflow: visible; scroll-snap-type: none; gap: 0; padding: 0; height: 100%;
  will-change: transform;
}
.tour.is-pinned .tour-panel {
  flex: 0 0 100vw; border: 0; border-radius: 0; background: transparent;
  padding: 168px 0 56px; display: grid; align-items: center;
}
.tour.is-pinned .tour-panel > .wrap {
  width: min(var(--maxw), 100% - var(--gutter) * 2);
  opacity: var(--focus, 1); transform: scale(calc(.94 + var(--focus, 1) * .06));
  transform-origin: center;
}

.tour.is-pinned .tour-bar {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line);
}
.tour.is-pinned .tour-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- Rail mode on small screens: keep every panel about one screen tall ---------- */
@media (max-width: 899px) {
  .tour:not(.is-pinned) .tour-panel .card { padding: 16px 18px; }
  .tour:not(.is-pinned) .tour-panel .card .icon { display: none; }
  .tour:not(.is-pinned) .tour-panel .card .tag { margin-bottom: 8px; }
  .tour:not(.is-pinned) .tour-panel .card p { margin-bottom: 0; }
  .tour:not(.is-pinned) .tour-panel .card .more { margin-top: 10px; }
  .tour:not(.is-pinned) .tour-panel .grid-3 { margin-top: 18px !important; gap: 10px; }
  .tour:not(.is-pinned) .tour-panel .lead { margin-bottom: 0; }
  .tour:not(.is-pinned) .tour-panel .trade-art { max-width: 180px; }
}

/* Phones: panels stack top to bottom instead of sitting side by side, so every part shows. */
@media (max-width: 899px) {
  .tour:not(.is-pinned) .tour-track {
    flex-direction: column; overflow: visible; scroll-snap-type: none;
    gap: 16px; padding: 4px var(--gutter) 12px;
  }
  .tour:not(.is-pinned) .tour-panel { flex: none; width: 100%; }
  .tour:not(.is-pinned) .tour-tabs { flex-wrap: wrap; overflow: visible; border-radius: 22px; }
}

/* ---------- Photos in the tour ---------- */
.tour-panel .card-photo {
  display: block; width: calc(100% + 44px); max-width: none; margin: -22px -22px 16px;
  height: auto; aspect-ratio: 2 / 1; object-fit: cover;
}
.tour-panel .card:has(.card-photo) .icon { display: none; }
.tour-radio { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: stretch; }
.tour-radio-photo { width: 100%; height: 100%; max-height: 340px; object-fit: cover; border-radius: 24px; border: 1px solid var(--line); display: block; }
.tour.is-pinned .tour-radio { grid-template-columns: 1.1fr 1fr; }
.tour.is-pinned .tour-radio .radio-band { grid-template-columns: 1fr; align-content: center; justify-items: start; }
@media (max-width: 899px) {
  .tour:not(.is-pinned) .tour-panel .card:has(.card-photo) { display: grid; grid-template-columns: 84px 1fr; column-gap: 14px; align-items: center; }
  .tour:not(.is-pinned) .tour-panel .card-photo { grid-row: span 2; width: 84px; height: 84px; margin: 0; border-radius: 12px; }
  .tour:not(.is-pinned) .tour-panel .card:has(.card-photo) .tag { margin: 0; align-self: end; }
  .tour:not(.is-pinned) .tour-panel .card:has(.card-photo) h3 { margin: 4px 0 0; align-self: start; }
  .tour:not(.is-pinned) .tour-panel .card:has(.card-photo) p,
  .tour:not(.is-pinned) .tour-panel .card:has(.card-photo) .more { grid-column: 1 / -1; }
  .tour:not(.is-pinned) .tour-panel .card:has(.card-photo) p { margin-top: 12px; }
  .tour-radio-photo { max-height: 200px; }
}

/* ---------- Get involved: its own section under the tour ---------- */
.involve { padding: clamp(56px, 8vw, 100px) 0; }
.involve .tour-duo { margin-top: 36px; }
.involve .tour-duo .panel h2, .involve .tour-duo .cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.4rem) !important; }
@media (min-width: 900px) { .tour-duo { grid-template-columns: 1fr 1fr; } }

/* Blueprint backdrop continues behind the tour (same layers as body in styles.css) */
.tour {
  background-image:
    url("images/blueprint.svg"),
    linear-gradient(rgba(159, 180, 198, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159, 180, 198, 0.045) 1px, transparent 1px);
  background-size: 960px 960px, 32px 32px, 32px 32px;
  background-position: center top;
  background-attachment: fixed;
}
@media (max-width: 860px) { .tour { background-size: 640px 640px, 24px 24px, 24px 24px; background-attachment: scroll; } }

/* ---------- Program panels (programs.html) ---------- */
.tour-panel .split { gap: clamp(20px, 3vw, 48px); }
.tour-panel .side-photo { max-height: 30vh; width: auto; max-width: 100%; justify-self: center; }
.tour-panel .side-stack .panel { padding: 20px 24px; border-radius: 20px; }
.tour-panel .checklist { margin-top: 14px; gap: 9px; font-size: .95rem; }
.tour-panel .tag-cloud { margin-top: 12px; gap: 8px; }
.tour-panel .tag-cloud span { padding: 8px 12px; font-size: .85rem; }
.tour-panel .btn-row { margin-top: 18px; }
.tour-panel > .wrap.split { width: 100%; }
.tour.is-pinned .tour-panel > .wrap.split { width: min(var(--maxw), 100% - var(--gutter) * 2); }
