/*
 * Homepage-only styling — design tokens/utilities come from tokens.css,
 * base.css and components.css (shared, not touched here). Every rule below
 * covers a homepage pattern from Pyxisride.dc.html that the shared component
 * set does not already provide. See docs/redesign/design-system.md for the
 * token vocabulary these rules build on.
 */

/* ------------------------------------------------------ section headings */
/* §3.15 "eyebrow + H2 (+ trailing meta)" — the shared <x-px::section>
   component only supports a stacked header, so sections that pair the
   heading with a hint link / search field / badge row build their own. */
.px-home-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-9);
}
.px-home-head__meta {
  font-size: var(--px-text-body-sm);
  color: var(--px-ink);
  opacity: .78;
}
.px-home-head__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--px-accent-ink);
}
.px-home-head--tight { margin-bottom: 0; }

/* --------------------------------------------------------- hero live city */
.px-home-live {
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--px-accent-ink);
}
.px-home-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--px-accent);
  animation: pxBeat 2.8s ease-in-out infinite;
}
@keyframes pxBeat { 0%, 100% { opacity: .45; transform: scale(1); } 50% { opacity: 1; transform: scale(1.35); } }
.px-home-live-city {
  display: inline-block;
  min-width: 104px;
}
.px-home-live-city span {
  display: inline-block;
}
.px-home-live-city span.is-swapping {
  animation: pxSwap .5s cubic-bezier(.22,.9,.25,1) both;
}
@keyframes pxSwap { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------ hero signup */
.px-home-signup-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4); }
.px-home-signup-row .px-segment { flex: none; }
.px-home-signup {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}
.px-home-signup { flex: 1 1 420px; }
.px-home-signup .px-input { flex: 1 1 260px; min-width: 0; }

/* --------------------------------------------------------------- reasons */
/* §3.17 accordion, built on <details> so it works without JS. */
.px-home-reason { text-align: left; width: 100%; }
.px-home-reason summary { list-style: none; cursor: pointer; }
.px-home-reason summary::-webkit-details-marker { display: none; }
.px-home-reason__numeral {
  font-family: var(--px-font-display);
  font-weight: 700;
  font-size: 26px;
  color: var(--px-accent-mid);
  margin-bottom: var(--space-3);
}
.px-home-reason__chevron { transition: transform var(--px-ease); margin-top: var(--space-3); color: var(--px-accent-mid); }
.px-home-reason[open] .px-home-reason__chevron { transform: rotate(180deg); }
.px-home-reason__body { margin-top: var(--space-3); }
.px-home-reason__more { margin-top: var(--space-3); font-weight: 600; font-size: 13.5px; color: var(--px-accent-ink); animation: pxIn .25s ease; }

/* -------------------------------------------------------------- reviews */
.px-home-review__stars { display: flex; gap: 2px; color: var(--px-accent); margin-bottom: var(--space-4); }
.px-home-review__stars [data-lucide] { width: 15px; height: 15px; fill: var(--px-accent); }
.px-home-review__quote { margin: 0 0 var(--space-6); font-size: var(--px-text-body-lg); line-height: 1.68; }
.px-home-review__meta { display: flex; align-items: center; gap: var(--space-3); }
.px-home-review__name { display: block; }
.px-home-review__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  background: var(--px-accent-soft); color: var(--px-accent-ink);
  font-family: var(--px-font-display); font-weight: 700; font-size: 16px;
}

/* ------------------------------------------------------------ drive perks */
.px-home-perk {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  background: rgba(255, 248, 238, .07);
  border: 1px solid var(--px-line-on-dark);
  border-radius: var(--radius-md);
  padding: var(--space-6) var(--space-7);
  transition: border-color var(--px-ease), transform var(--px-ease);
}
.px-home-perk:hover { border-color: var(--px-accent); transform: translateX(4px); }
.px-home-perk__numeral {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--px-accent);
  color: var(--px-ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
}
.px-home-perk__title { display: block; font-family: var(--px-font-display); font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.px-home-perk__body { font-size: 14px; line-height: 1.6; opacity: .8; }

/* -------------------------------------------------------------- safety */
.px-home-safety-panel {
  border-radius: var(--radius-xl);
  padding: clamp(32px, 4vw, 46px);
}
.px-home-safety-panel--soft { background: var(--px-accent-soft); }
.px-home-safety-panel--card { background: var(--px-surface); border: 1px solid var(--px-line-card); }
.px-home-safety-panel .px-btn { width: max-content; }
.px-home-h2-sm { font-size: var(--px-text-h2-sm); }
.px-home-btn-auto { width: max-content; }

.px-home-faq { text-align: left; width: 100%; border: 1px solid var(--px-line-card); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); background: var(--px-ground); }
.px-home-faq summary { list-style: none; cursor: pointer; }
.px-home-faq summary::-webkit-details-marker { display: none; }
.px-home-faq__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); font-weight: 600; font-size: 14.5px; }
.px-home-faq__label { display: flex; align-items: center; gap: 11px; }
.px-home-faq__label [data-lucide] { color: var(--px-accent-mid); }
.px-home-faq__chevron { flex: none; color: var(--px-accent-mid); transition: transform var(--px-ease); }
.px-home-faq[open] .px-home-faq__chevron { transform: rotate(180deg); }
.px-home-faq__answer { margin-top: var(--space-3); font-size: 13.5px; line-height: 1.7; opacity: .78; animation: pxIn .25s ease; }

/* -------------------------------------------------------- city marquee */
.px-home-ticker {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.px-home-ticker__track { display: flex; gap: var(--space-4); width: max-content; animation: pxMarquee 78s linear infinite; }
.px-home-ticker:hover .px-home-ticker__track { animation-play-state: paused; }
.px-home-ticker__chip {
  display: inline-flex; align-items: center; gap: var(--space-4);
  flex: 0 0 auto; width: 250px;
  background: var(--px-surface); border: 1px solid var(--px-line-hair);
  border-radius: var(--radius-md); padding: 16px 18px;
  /* Chips sit back in greyscale and come forward as the marquee is hovered. */
  filter: grayscale(.75);
  opacity: .72;
  transition: filter .45s ease, opacity .45s ease, transform .45s cubic-bezier(.22,.9,.25,1), border-color .4s ease;
}
.px-home-ticker__chip img { width: 48px; height: 32px; object-fit: cover; border-radius: 5px; border: 1px solid var(--px-line-input); flex: none; }
.px-home-ticker__chip b { display: block; font-family: var(--px-font-display); font-weight: 700; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.px-home-ticker__chip > span > span { font-size: 12px; opacity: .7; white-space: nowrap; }
.px-home-ticker__chip:hover { border-color: var(--px-accent); filter: none; opacity: 1; transform: translateY(-5px); }

/* --------------------------------------------------------------- cities */
.px-home-search { position: relative; display: inline-flex; align-items: center; }
.px-home-search [data-lucide] { position: absolute; left: 17px; opacity: .45; pointer-events: none; width: 17px; height: 17px; }
.px-home-search .px-input { padding-left: 44px; width: 260px; max-width: 100%; }

.px-home-city-grid { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.px-home-city-chip {
  display: inline-flex; align-items: center; gap: var(--space-3);
  background: var(--px-ground);
  border-radius: var(--radius-full);
  padding: 12px 20px;
  font-weight: 500;
  font-size: 14px;
  transition: transform var(--px-ease), background var(--px-ease), color var(--px-ease);
}
.px-home-city-chip:hover { background: var(--px-accent); color: var(--px-ink); transform: translateY(-3px); }
.px-home-city-chip img { width: 24px; height: 16px; object-fit: cover; border-radius: 2px; border: 1px solid var(--px-line-control); }
.px-home-city-chip[hidden] { display: none; }
.px-home-suggest-link { margin-top: var(--space-4); }

/* -------------------------------------------------------------- help CTA */
/* The only amber (not dark-ink) panel in the design system — §1.1 covers
   ink-panel inversion but not this one, so the accent-on-ink swap for the
   dark button lives here rather than in components.css. */
.px-home-amber-panel {
  background: var(--px-accent);
  color: var(--px-ink);
  border-radius: var(--radius-2xl);
  padding: clamp(32px, 4vw, 54px);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
  justify-content: space-between;
}
.px-home-amber-panel__copy { flex: 1 1 320px; min-width: 0; }
.px-home-amber-panel__copy p { opacity: .82; margin-top: var(--space-2); max-width: 46ch; }
.px-home-amber-panel__actions { flex: 0 0 auto; display: flex; gap: var(--space-3); flex-wrap: wrap; }
.px-home-amber-panel .px-btn--dark:hover { background: var(--px-ground); color: var(--px-ink); }
.px-home-amber-panel .px-btn--outline { border-color: var(--px-ink); }
.px-home-amber-panel .px-btn--outline:hover { background: var(--px-ink); color: var(--px-ground); }

/* ---------------------------------------------------------- back to top */
.px-home-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--px-ink);
  color: var(--px-ground);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity var(--px-ease), transform var(--px-ease), background var(--px-ease), color var(--px-ease);
}
.px-home-top.is-visible { opacity: 1; pointer-events: auto; transform: none; animation: pxPop .35s cubic-bezier(.22,.9,.25,1) both; }
.px-home-top:hover { background: var(--px-accent); color: var(--px-ink); transform: translateY(-4px); }
