* { box-sizing: border-box; }

body {
  margin: 0;
  background: #14161A;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Top bar stays pinned while scrolling so the menu is always reachable. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  min-height: 57px;
  padding: 6px 12px 6px 20px;
  background: #14161A;
  border-bottom: 1px solid #2C3036;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #FF6A13;
}

/* Sections stop just below the pinned top bar when a menu link jumps to them. */
section[id] { scroll-margin-top: 72px; }

/* Three-line menu button (phone width only). 44px: easy to hit with a thumb. */
.menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid #3A3F47;
  border-radius: 8px;
  cursor: pointer;
}

.menu-btn[aria-expanded="true"] { border-color: #FF6A13; }

.menu-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.menu-bars { position: relative; }

.menu-bars::before,
.menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-bars::before { top: -7px; }
.menu-bars::after { top: 7px; }

.menu-btn[aria-expanded="true"] .menu-bars,
.menu-btn[aria-expanded="true"] .menu-bars::before,
.menu-btn[aria-expanded="true"] .menu-bars::after { background: #FF6A13; }

/* Phone width: the list is hidden until the button opens it. */
.site-nav {
  display: none;
  flex-basis: 100%;
}

.site-nav.open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

.site-nav li { margin: 0; }

.site-nav a {
  display: block;
  padding: 12px 0;
  border-top: 1px solid #2C3036;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current] { color: #FF6A13; }

.site-nav a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

.hero { padding: 40px 0 24px; text-align: center; }

h1 {
  margin: 0 0 12px;
  font-size: 2rem;
  line-height: 1.2;
  color: #fff;
}

.lead { margin: 0; font-size: 1.1rem; color: #fff; }

.photo-box {
  background: #555;
  color: #ddd;
  border-radius: 10px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  margin-bottom: 24px;
}

.bike-wrap {
  margin: 0 auto 24px;
  max-width: 680px;
}

.bike-photo {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid #FF6A13;
  border-radius: 10px;
}

.bike {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 6px #FF6A13);
  animation: bike-pulse 4s ease-in-out infinite;
}

.bike .hot {
  filter: drop-shadow(0 0 8px #FF6A13);
}

.bike .wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: wheel-spin 12s linear infinite;
}

@keyframes wheel-spin {
  to { transform: rotate(360deg); }
}

@keyframes bike-pulse {
  0%, 100% { filter: drop-shadow(0 0 4px #FF6A13); }
  50% { filter: drop-shadow(0 0 12px #FF6A13); }
}

@media (prefers-reduced-motion: reduce) {
  .bike, .bike .wheel { animation: none; }
}

.card {
  background: #1C1F24;
  border: 1px solid #FF6A13;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: #FF6A13;
}

.note { margin: 0 0 8px; color: #A8AEB8; font-size: 0.95rem; }

ul { margin: 0; padding-left: 20px; }
li { margin-bottom: 6px; }

.tab-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.engine-photo {
  background: #14161A;
  color: #A8AEB8;
  border: 1px dashed #3A3F47;
  border-radius: 8px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 10px;
}

/* Parts that fit: bike picker + one parts list */
.fit-picker { display: flex; gap: 8px; margin: 12px 0; }

.fit-picker label {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  border: 1px solid #3A3F47;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

#fit-rover:checked ~ .fit-picker label[for="fit-rover"],
#fit-at:checked ~ .fit-picker label[for="fit-at"] {
  color: #14161A;
  background: #FF6A13;
  border-color: #FF6A13;
}

#fit-rover:focus-visible ~ .fit-picker label[for="fit-rover"],
#fit-at:focus-visible ~ .fit-picker label[for="fit-at"] {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.fit-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.fit-part {
  padding: 12px 14px;
  border: 1px solid #3A3F47;
  border-radius: 8px;
}

.fit-name { font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 6px; }

.fit-tag {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid #3A3F47;
  border-radius: 999px;
  color: #A8AEB8;
  font-size: 0.85rem;
}

/* Real part photos: whole photo always shows (no stretching, no cropping) */
.part-photo { margin: 0 0 10px; }

.part-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #14161A;
  border: 1px solid #3A3F47;
  border-radius: 8px;
}

.part-photo figcaption {
  margin-top: 4px;
  color: #A8AEB8;
  font-size: 0.8rem;
}

.fit-sub { color: #A8AEB8; font-size: 0.9rem; margin: -4px 0 6px; }

#fit-rover:checked ~ .fit-list .fits-at,
#fit-at:checked ~ .fit-list .fits-rover { display: none; }

/* Pro Tips: one card per tip */
.tip { margin-top: 12px; }
.tip-why { font-weight: 700; font-size: 0.9rem; color: #fff; margin: 12px 0 4px; }
.tip-text { margin: 0; color: #fff; font-size: 0.95rem; }

.notify {
  background: #FF6A13;
  color: #14161A;
  border: 2px solid #FF6A13;
  border-radius: 8px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  max-width: 100%;
}

.notify:hover { background: #FF8540; border-color: #FF8540; }

/* Switched-off button: still orange, but dimmed and not clickable. */
.notify:disabled,
.notify:disabled:hover {
  background: #FF6A13;
  border-color: #FF6A13;
  opacity: 0.5;
  cursor: not-allowed;
}

/* Questions: question bold, answer plain */
.faq-item { margin-top: 12px; }
.faq-q { margin: 0 0 6px; font-size: 1rem; font-weight: 700; color: #fff; }
.faq-a { margin: 0; color: #fff; font-size: 0.95rem; }

/* Get the app box */
.app { text-align: center; }
.app p { margin: 0 0 16px; }

footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #2C3036;
  color: #A8AEB8;
}

footer p { margin: 0; }
footer .disclaimer { margin-top: 6px; font-size: 0.85rem; }

@media (min-width: 600px) {
  /* Computer width: no three-line button; the links sit in a row in the top bar. */
  .topbar { padding: 6px 20px; }
  .menu-btn { display: none; }
  .site-nav { display: block; flex-basis: auto; }
  .site-nav ul { display: flex; gap: 8px; margin: 0; }
  .site-nav a { border-top: 0; padding: 10px 12px; }

  h1 { font-size: 3rem; }
  .fit-list { grid-template-columns: 1fr 1fr; }
  .photo-box { min-height: 320px; }
}
