/* =========================================
   rider.css - Rider view only (QUO-27 / OCW-16)

   Own sheet, matching the pattern QUO-24/25/26 established: this page shares no
   component with Home, so folding it into home.css would put unrelated rules
   behind one cache entry and grow the sheet the QUO-34 refactor keeps small.

   Zero literal hex values - every colour is an existing base.css token, so the
   warm-stone light theme needs no second palette. No orange.
   ========================================= */

.rider-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1;
}

/* #viewMount clips, so the page scrolls on its own surface rather than an
   ancestor with overflow:hidden. */
.rider-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(32px, 6vh, 72px) clamp(20px, 5vw, 64px) clamp(48px, 10vh, 96px);
  -webkit-overflow-scrolling: touch;
}

/* ---- header ---- */

.rider-header {
  max-width: 62ch;
  margin: 0 0 clamp(36px, 6vh, 60px);
}

.rider-eyebrow {
  margin: 0 0 14px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sidebar-text);
}

.rider-title {
  margin: 0 0 20px;
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--sidebar-active-text);
}

.rider-lede {
  margin: 0;
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  line-height: 1.65;
  color: var(--sidebar-text);
}

/* ---- shared block furniture ---- */

.rider-block {
  max-width: 78ch;
  margin: 0 0 clamp(36px, 6vh, 58px);
}

.rider-section-title {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--sidebar-active-text);
}

.rider-section-lede {
  margin: 0 0 clamp(22px, 3.5vh, 32px);
  max-width: 58ch;
  font-size: clamp(0.96rem, 1.5vw, 1.06rem);
  line-height: 1.65;
  color: var(--sidebar-text);
}

/* ---- partnership steps ---- */

.rider-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 70ch;
}

.rider-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: clamp(16px, 2.4vw, 26px);
  padding: 0 0 clamp(24px, 3.8vh, 36px);
}

.rider-step-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.rider-step:not(:last-child) .rider-step-rail::after {
  content: '';
  position: absolute;
  top: 62px;
  bottom: -4px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    var(--border-content-frame),
    var(--border-content-glow)
  );
}

.rider-step-num {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--sidebar-text);
  opacity: 0.72;
}

.rider-step-icon {
  width: 22px;
  height: 22px;
  color: var(--sidebar-active-text);
  flex: 0 0 auto;
}

.rider-step-title {
  margin: 0 0 9px;
  font-size: clamp(1.02rem, 1.8vw, 1.22rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--sidebar-active-text);
}

.rider-step-text {
  margin: 0;
  font-size: clamp(0.92rem, 1.35vw, 1rem);
  line-height: 1.66;
  color: var(--sidebar-text);
}

/* ---- dispatch cards ---- */

.rider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(14px, 2vw, 20px);
}

.rider-card {
  padding: clamp(20px, 2.6vw, 26px);
  border: 1px solid var(--border-content-frame);
  border-radius: 14px;
  background: var(--dark-section-bg);
}

.rider-card-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 14px;
  color: var(--sidebar-active-text);
}

.rider-card-title {
  margin: 0 0 9px;
  font-size: clamp(0.99rem, 1.5vw, 1.08rem);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.012em;
  color: var(--sidebar-active-text);
}

.rider-card-text {
  margin: 0;
  font-size: clamp(0.88rem, 1.3vw, 0.95rem);
  line-height: 1.62;
  color: var(--sidebar-text);
}

/* ---- EV section ---- */

.rider-ev-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rider-ev-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 12px;
  color: var(--sidebar-active-text);
  flex: 0 0 auto;
}

.rider-ev-text {
  margin: 0 0 14px;
  max-width: 68ch;
  font-size: clamp(0.94rem, 1.4vw, 1.02rem);
  line-height: 1.68;
  color: var(--sidebar-text);
}

/* The not-a-lender notice is boxed on purpose - this is the one claim on the page
   where being misread has real consequences, so it gets its own surface rather
   than sitting as another paragraph a reader can skim past. */
.rider-notice {
  margin-top: clamp(20px, 3vh, 28px);
  max-width: 70ch;
  padding: clamp(20px, 3vh, 28px) clamp(20px, 3vw, 30px);
  border: 1px solid var(--border-content-frame);
  border-radius: 14px;
  background: var(--dark-section-bg);
}

.rider-notice-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 14px;
  color: var(--sidebar-active-text);
}

.rider-notice-title {
  margin: 0 0 10px;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--sidebar-active-text);
}

.rider-notice-text {
  margin: 0;
  font-size: clamp(0.9rem, 1.35vw, 0.98rem);
  line-height: 1.66;
  color: var(--sidebar-text);
}

.rider-notice-text strong {
  font-weight: 600;
  color: var(--sidebar-active-text);
}

/* ---- closing ---- */

.rider-close {
  max-width: 70ch;
  padding: clamp(24px, 4vh, 36px) clamp(22px, 3.4vw, 34px);
  border: 1px solid var(--border-content-frame);
  border-radius: 16px;
  background: var(--dark-section-bg);
}

.rider-close-title {
  margin: 0 0 14px;
  font-size: clamp(1.12rem, 2.1vw, 1.44rem);
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.02em;
  color: var(--sidebar-active-text);
}

.rider-close-text {
  margin: 0;
  font-size: clamp(0.94rem, 1.4vw, 1.02rem);
  line-height: 1.68;
  color: var(--sidebar-text);
}

/* ---- motion: staggered entry in reading order, 50ms offsets, spring easing,
   off under reduced-motion. ---- */

@media (prefers-reduced-motion: no-preference) {
  .rider-view.is-entering .rider-step,
  .rider-view.is-entering .rider-card,
  .rider-view.is-entering .rider-notice,
  .rider-view.is-entering .rider-close {
    opacity: 0;
    transform: translateY(10px);
    animation: rider-rise 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  .rider-view.is-entering .rider-step:nth-child(1) { animation-delay: 0.04s; }
  .rider-view.is-entering .rider-step:nth-child(2) { animation-delay: 0.09s; }
  .rider-view.is-entering .rider-card:nth-child(1) { animation-delay: 0.14s; }
  .rider-view.is-entering .rider-card:nth-child(2) { animation-delay: 0.19s; }
  .rider-view.is-entering .rider-notice { animation-delay: 0.24s; }
  .rider-view.is-entering .rider-close { animation-delay: 0.29s; }
}

@keyframes rider-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- mobile ---- */

@media (max-width: 767px) {
  .rider-step {
    grid-template-columns: 32px 1fr;
    gap: 14px;
  }

  .rider-step:not(:last-child) .rider-step-rail::after {
    top: 56px;
  }

  .rider-step-icon {
    width: 19px;
    height: 19px;
  }

  .rider-cards {
    grid-template-columns: 1fr;
  }
}
