/* Shared additions for the older bike pages: /fleet, /trails, /legacy-trail, /banff-bike-rentals, /faq.
   Loaded after info-pages.css (and after brand-chrome.css). Round 1 of the 2026-11-13 site audit.

   Type scale (px): 13 / 16 / 20 / 25 / 31 / 39 / 49 / 61
   Spacing scale (px): 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64 / 96 / 128
   /trails does not load home-redesign.css, so every rule here uses literal values or a fallback. */

/* ---------- Footer links: 44px tap height at every width on the bike pages ---------- */
.rb-site-footer__links a,
.rb-site-footer__nap a {
  min-height: 44px;
}

.rb-site-footer__links li + li {
  margin-top: 0;
}

/* ---------- Split hero: copy on the left, a real photo or an answer card on the right ---------- */
.bp-hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.bp-hero-split > :first-child {
  min-width: 0;
}

.bp-hero-photo {
  justify-self: end;
  width: 100%;
  max-width: 680px; /* the renter photo is 680px wide: never shown larger than it is */
  margin: 0;
}

.bp-hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bp-hero-photo figcaption {
  margin-top: 8px;
  color: var(--muted, #4B5654);
  font-size: 13px;
  line-height: 1.55;
}

.bp-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink, #141414);
  font-size: 16px;
  line-height: 1.55;
}

.bp-hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bp-hero-facts li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink, #141414);
}

/* ---------- FAQ: quick answers card in the hero ---------- */
.bp-quick {
  padding: 32px;
  background: #FFFFFF;
  border: 1px solid var(--line, #D6DEDD);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bp-quick h2 {
  margin: 0;
  font-family: "Barlow Condensed", "Barlow Condensed Fallback", "Barlow Condensed Fallback 2", sans-serif;
  font-weight: 700;
  font-size: 25px;
  line-height: 1.15;
  text-transform: uppercase;
}

.bp-quick dl {
  margin: 16px 0 0;
}

.bp-quick dl > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line, #D6DEDD);
}

.bp-quick dl > div:last-child {
  padding-bottom: 0;
}

.bp-quick dt {
  color: var(--muted, #4B5654);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 24px;
  text-transform: uppercase;
}

.bp-quick dd {
  margin: 0;
  color: var(--ink, #141414);
  font-size: 16px;
  line-height: 1.55;
}

.bp-quick dd a {
  color: var(--red, #016D66);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.bp-quick dd a:hover {
  color: var(--red-dark, #014F4A);
}

/* The FAQ hero copy is narrower beside the card, so it sits at the body size. */
.bp-faq-hero p {
  font-size: 20px;
}

/* ---------- Fleet: photo on top of each card, the whole bike visible ---------- */
.bp-fleet .fleet-item {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr;
}

.bp-fleet .fleet-item > img {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: 16px 24px;
  object-fit: contain;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line, #D6DEDD);
}

.bp-fleet .fleet-item-body {
  display: flex;
  flex-direction: column;
}

.bp-fleet .fleet-rates {
  margin-top: auto;
  padding-top: 16px;
}

.bp-fleet .fleet-specs {
  margin-bottom: 24px;
}

.bp-note {
  max-width: 65ch;
  margin: 32px 0 0;
  padding: 24px;
  background: var(--snow, #F2F5F5);
  border: 1px solid var(--line, #D6DEDD);
  border-radius: 8px;
}

.bp-note h3 {
  margin: 0;
  font-family: "Barlow Condensed", "Barlow Condensed Fallback", "Barlow Condensed Fallback 2", sans-serif;
  font-weight: 700;
  font-size: 25px;
  line-height: 1.15;
  text-transform: uppercase;
}

.bp-note p {
  margin: 12px 0 0;
  color: var(--muted, #4B5654);
  line-height: 1.55;
}

.bp-note strong {
  color: var(--ink, #141414);
}

/* ---------- Tables: price rows read as ink, and stack into cards on a phone ---------- */
.bp-prices td {
  color: var(--ink, #141414);
  font-weight: 600;
}

@media (max-width: 480px) {
  .bp-stack .info-table {
    min-width: 0;
  }

  .bp-stack .info-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .bp-stack .info-table,
  .bp-stack .info-table tbody {
    display: block;
  }

  .bp-stack .info-table tbody tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
    padding: 16px;
    border-bottom: 1px solid var(--line, #D6DEDD);
  }

  .bp-stack--2 .info-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bp-stack .info-table tbody tr:last-child {
    border-bottom: 0;
  }

  .bp-stack .info-table tbody th,
  .bp-stack .info-table td {
    width: auto;
    padding: 0;
    border: 0;
  }

  .bp-stack .info-table tbody th {
    grid-column: 1 / -1;
  }

  .bp-stack .info-table td {
    display: flex;
    flex-direction: column;
  }

  .bp-stack .info-table td::before {
    content: attr(data-label);
    color: var(--muted, #4B5654);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

/* ---------- Freshness line under a price table ---------- */
.bp-fresh {
  margin: 8px 0 0;
  color: var(--muted, #4B5654);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .bp-hero-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .bp-hero-photo {
    justify-self: start;
  }
}

@media (max-width: 640px) {
  .bp-quick {
    padding: 24px 16px;
  }

  .bp-quick dl > div {
    grid-template-columns: minmax(0, 1fr);
  }

  .bp-faq-hero p {
    font-size: 16px;
  }
}

/* ---------- Round 2 (2026-11-13) ---------- */

/* Legacy Trail hero: the portrait renter photo sits at most 416px wide, well under its 640px file. */
@media (min-width: 981px) {
  .bp-hero-split--portrait {
    grid-template-columns: minmax(0, 1fr) minmax(0, 416px);
  }
}

.bp-hero-photo--portrait {
  max-width: 416px;
}

.bp-hero-photo--portrait img {
  aspect-ratio: 4 / 5;
}

/* Review proof as plain text with a link, not a row of bare stars. */
.info-hero p.bp-proof {
  margin-top: 24px;
  font-size: 16px;
}

.bp-proof a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--red, #016D66);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.bp-proof a:hover {
  color: var(--red-dark, #014F4A);
}

/* Sub-heading inside a section (size tables). */
.bp-subhead {
  margin: 48px 0 0;
  font-family: "Barlow Condensed", "Barlow Condensed Fallback", "Barlow Condensed Fallback 2", sans-serif;
  font-weight: 700;
  font-size: 25px;
  line-height: 1.15;
  text-transform: uppercase;
}

/* Links inside notes read as links: teal and underlined. */
.info-note a {
  color: var(--red, #016D66);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.info-note a:hover {
  color: var(--red-dark, #014F4A);
}

/* Tables whose first column is a bike name: give it room so names do not wrap three times. */
.bp-prices .info-table tbody th,
.bp-prices .info-table thead th:first-child {
  width: 30%;
}

.bp-sizes tbody th,
.bp-sizes thead th:first-child {
  width: 22%;
}

.bp-sizes thead th:nth-child(2) {
  width: 18%;
}

.bp-sizes td:nth-child(2) {
  color: var(--ink, #141414);
  font-weight: 600;
  white-space: nowrap;
}

/* Fleet rate rows hold four prices: keep them on one line at desktop, two by two on a phone. */
.bp-fleet .fleet-rates {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Add-on list on /fleet. */
.bp-fleet #add-ons ul li + li {
  margin-top: 8px;
}

@media (max-width: 640px) {
  /* Route facts: a compact two-column grid on a phone instead of five tall cards. */
  .route-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .route-stats div {
    padding: 12px;
  }

  .route-stats div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .route-stats strong {
    font-size: 16px;
  }

  .bp-hero-photo--portrait {
    max-width: 320px;
  }

  .bp-fleet .fleet-rates {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  /* Bike-by-bike size table: one card per bike. */
  .bp-stack--1 .info-table tbody tr {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .bp-stack--1 .info-table td {
    display: block;
  }

  .bp-stack--1 .info-table td::before {
    display: block;
  }

  .bp-sizes td:nth-child(2) {
    white-space: normal;
  }

  .bp-prices .info-table tbody th,
  .bp-sizes tbody th {
    width: auto;
  }

  /* Four prices per bike: two by two. */
  .bp-stack--4 .info-table tbody tr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Round 3 (2026-11-13) ---------- */

/* Topic chips on a phone: one row that scrolls sideways instead of six wrapped rows.
   The right edge fades so the row reads as "more this way"; a 48px end spacer lets the
   last chip scroll clear of the fade. Every chip keeps its 44px tap height. */
@media (max-width: 640px) {
  .bp-jump-scroll {
    position: relative;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 48px), transparent 100%);
  }

  .bp-jump-scroll::-webkit-scrollbar {
    display: none;
  }

  .bp-jump-scroll::after {
    content: "";
    flex: 0 0 32px;
  }

  .bp-jump-scroll a {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
  }
}

/* Phone Call / Book bar: steps aside (js/bike-pages.js) while the page's own booking button is on screen. */
.mobile-sticky {
  transition: transform 200ms ease-out, opacity 200ms ease-out;
}

.mobile-sticky.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
}

@media (prefers-reduced-motion: reduce) {
  .mobile-sticky {
    transition: none;
  }
}

/* Height chart: short values, so it stays a real table on a phone instead of tall cards. */
.bp-chart__note {
  display: block;
  margin-top: 4px;
  color: var(--muted, #4B5654);
  font-family: "Barlow", "Barlow Fallback", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.bp-chart td {
  color: var(--ink, #141414);
}

.bp-chart tbody th,
.bp-chart thead th:first-child {
  width: 22%;
}

.bp-chart thead th:nth-child(2) {
  width: 39%;
}

@media (max-width: 480px) {
  .bp-chart {
    min-width: 0;
  }

  .bp-chart th,
  .bp-chart td {
    padding: 12px;
  }

  .bp-chart tbody th,
  .bp-chart thead th:first-child {
    width: 30%;
  }

  .bp-chart thead th:nth-child(2) {
    width: auto;
  }
}

/* A photo shown at its own size or smaller, never stretched or re-cropped. */
.route-figure--native img {
  max-width: 680px;
  aspect-ratio: auto;
  object-fit: contain;
}

/* Equal price columns beside the 30% bike column. */
@media (min-width: 481px) {
  .bp-prices .info-table {
    table-layout: fixed;
  }
}

/* ---------- Round 4 (2026-11-13) ---------- */

/* No shift when the web fonts arrive. Fallback faces are metric-matched to Barlow and
   Barlow Condensed (width, ascent and descent; overrides are divided by size-adjust because
   the browser scales them by it), the same faces /trails declares inline. Text measures use em
   instead of ch, because ch follows whichever font is showing and would re-wrap lines on swap:
   36.7em = 65ch of Barlow,"Barlow Fallback", 7.25em = 16ch and 9em = 20ch of Barlow Condensed. */
@font-face {
  font-family: "Barlow Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Roboto");
  size-adjust: 95.4%;
  ascent-override: 104.8%;
  descent-override: 21%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Barlow Fallback";
  font-weight: 500 600;
  src: local("Arial Bold"), local("Arial"), local("Helvetica Neue Bold"), local("Roboto Bold");
  size-adjust: 90.7%;
  ascent-override: 110.3%;
  descent-override: 22.1%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Barlow Condensed Fallback";
  font-weight: 600 700;
  src: local("Arial Bold"), local("Arial"), local("Helvetica Neue Bold"), local("Roboto Bold");
  size-adjust: 68%;
  ascent-override: 147.1%;
  descent-override: 29.4%;
  line-gap-override: 0%;
}

.page-shell.v2,
.page-shell.v2 :is(p, li, dd, dt, td, .btn, .eyebrow, .info-jump a, .rb-site-footer__title) {
  font-family: "Barlow", "Barlow Fallback", sans-serif;
}

.page-shell.v2 :is(h1, h2, h3):not(.rb-site-footer__title) {
  font-family: "Barlow Condensed", "Barlow Condensed Fallback", sans-serif;
}

.info-hero h1 {
  max-width: 7.25em;
}

.info-cta h2 {
  max-width: 9em;
}

.info-hero p,
.info-section > .info-lede,
.info-note,
.route-copy p,
.route-copy ul,
.info-cta p,
.bp-note {
  max-width: 36.7em;
}

/* /faq: only the first question on the page ships open in the server HTML (no script, no
   shift at load), so the page reads as a list of questions. At desktop an open first
   answer spans the row so its closed neighbours are not stretched to its height. */
@media (min-width: 761px) {
  .bp-faq-main .qa-list > .qa[open]:first-child {
    grid-column: 1 / -1;
  }
}

/* /faq on a phone: each topic is one card holding a list of question rows, so the page
   reads as a list of questions instead of a stack of separate cards. */
@media (max-width: 640px) {
  .bp-faq-main .qa-list {
    gap: 0;
    margin-top: 24px;
    background: #FFFFFF;
    border: 1px solid var(--line, #D6DEDD);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  }

  .bp-faq-main .qa {
    padding: 12px 16px;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .bp-faq-main .qa + .qa {
    border-top: 1px solid var(--line, #D6DEDD);
  }

  .bp-faq-main .qa > summary {
    align-items: center;
    min-height: 44px;
  }

  .bp-faq-main .qa h3 {
    font-size: 20px;
  }

  .bp-faq-main .qa > summary::after {
    margin-top: 0;
  }

  .bp-faq-main .qa[open] > summary::after {
    margin-top: 4px;
  }

  .bp-faq-main .qa p {
    margin-top: 8px;
  }

  .bp-faq-main .qa[open] {
    padding-bottom: 16px;
  }
}

/* /fleet hero (round 5, D4): on wide screens the e-bike cut-out fills the right half that
   was empty. Phones and tablets keep the text-only hero (the image is not even fetched). */
.bp-fleet .bp-hero-bike { display: none; }
@media (min-width: 1024px) {
  .bp-fleet .info-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
    column-gap: 64px;
  }
  .bp-fleet .info-hero > :not(.bp-hero-bike) { grid-column: 1; }
  .bp-fleet .bp-hero-bike {
    display: block;
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: center;
    width: 100%;
    height: auto;
  }
}
