/* SideQuest landing page: quests package styles. Loads after style.css. Prefixed classes only. */

/* =====================================================================
   Walkthrough (#app-preview)
   ===================================================================== */

.wt {
  max-width: 940px;
  margin: 0 auto;
}

.wt-tabs {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.js .wt-tabs {
  display: flex;
}

.wt-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--sage-200);
  border-radius: var(--radius-pill);
  background: white;
  color: var(--sage-700);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.wt-tab-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sage-100);
  color: var(--sage-700);
  font-size: 12px;
  font-weight: 700;
}

.wt-tab.is-active {
  background: var(--orange-600);
  border-color: var(--orange-600);
  color: white;
}

.wt-tab.is-active .wt-tab-num {
  background: var(--orange-300);
  color: var(--orange-900);
}

.wt-stage {
  display: block;
}

.wt-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.js .wt-stage {
  display: grid;
}

.js .wt-panel {
  grid-area: 1 / 1;
  margin-bottom: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.js .wt-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.wt-img {
  display: block;
  width: 260px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.wt-step {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange-700);
  margin-bottom: var(--space-sm);
}

.wt-title {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--deep-charcoal);
  margin-bottom: var(--space-sm);
}

.wt-line {
  font-size: 16px;
  line-height: 26px;
  color: var(--sage-700);
  max-width: 44ch;
}

@media (prefers-reduced-motion: no-preference) {
  .js .wt-panel {
    transition: opacity 300ms ease, visibility 0s linear 300ms;
  }

  .js .wt-panel.is-active {
    transition: opacity 300ms ease, visibility 0s linear 0s;
  }

  .wt-tab {
    transition: transform 0.2s ease;
  }

  .wt-tab:hover {
    transform: translateY(-1px);
  }
}

@media (max-width: 767px) {
  .js .wt-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
  }

  .wt-tab {
    justify-content: center;
    padding: var(--space-sm) 12px;
    font-size: 14px;
  }

  .wt-tab-text {
    white-space: nowrap;
  }

  .wt-panel {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: var(--space-md);
  }

  .wt-img {
    width: 220px;
  }

  .wt-title {
    font-size: 20px;
    line-height: 28px;
  }

  .wt-line {
    font-size: 15px;
    line-height: 24px;
  }
}

/* =====================================================================
   Quest system (#quests)
   ===================================================================== */

.qs-pill {
  min-height: 44px;
  border: 1px solid var(--sage-200);
  color: var(--sage-700);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.qs-pill.is-on {
  background: var(--orange-600);
  border-color: var(--orange-600);
  color: white;
}

.qs-pill.is-on .dot {
  box-shadow: 0 0 0 2px white;
}

.qs-filter-hint {
  font-size: 13px;
  line-height: 20px;
  color: var(--sage-600);
  margin-bottom: var(--space-md);
}

.qs-examples {
  min-width: 0;
}

.qs-card[hidden] {
  display: none;
}

.qs-empty {
  font-size: 14px;
  line-height: 22px;
  color: var(--sage-700);
  background: white;
  border: 1px dashed var(--sage-200);
  border-radius: var(--radius-badge);
  padding: var(--space-md);
  text-align: center;
}

.qs-dots {
  display: none;
}

.qs-dots[hidden] {
  display: none;
}

.qs-dot {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.qs-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--sage-300);
}

.qs-dot.is-on::before {
  width: 20px;
  background: var(--orange-500);
}

/* Difficulty XP bars */
.qs-diff-row {
  position: relative;
  overflow: hidden;
  padding-bottom: 20px;
}

.qs-xp-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--sage-100);
}

.qs-xp-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(var(--qs-fill, 1));
  transform-origin: left center;
  background: var(--sage-400);
}

.qs-diff-row.chill .qs-xp-fill { background: var(--quest-chill); }
.qs-diff-row.bold .qs-xp-fill { background: var(--quest-bold); }
.qs-diff-row.unhinged .qs-xp-fill { background: var(--quest-unhinged); }

.js .qs-xp-fill {
  transform: scaleX(0);
}

.js .qs-diff-row.visible .qs-xp-fill {
  transform: scaleX(var(--qs-fill, 1));
}

@media (prefers-reduced-motion: no-preference) {
  .js .qs-xp-fill {
    transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .qs-xp-fill {
    transform: scaleX(var(--qs-fill, 1));
    transition: none;
  }
}

/* Stylized map card */
.qs-map {
  margin: var(--space-xl) 0 0;
  padding: var(--space-lg);
  background: white;
  border-radius: var(--radius-card);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  color: var(--sage-500);
}

.qs-map-svg {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin: 0 auto;
}

.qs-map-caption {
  margin-top: var(--space-md);
  font-size: 13px;
  line-height: 20px;
  color: var(--sage-700);
  text-align: center;
}

/* Verification count-up */
.qs-count {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 767px) {
  .qs-dots {
    display: flex;
    justify-content: center;
    margin-top: var(--space-xs);
  }

  .qs-empty {
    margin-top: var(--space-md);
  }

  .qs-map {
    margin-top: var(--space-lg);
    padding: var(--space-md);
  }
}

/* =====================================================================
   FAQ (#faq)
   ===================================================================== */

.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: var(--space-sm);
}

.faq-item {
  background: white;
  border-radius: var(--radius-badge);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 44px;
  padding: 12px var(--space-lg);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  color: var(--deep-charcoal);
  cursor: pointer;
  list-style: none;
}

.faq-q::-webkit-details-marker {
  display: none;
}

.faq-q::after {
  content: '';
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 4px;
  border-right: 2px solid var(--sage-600);
  border-bottom: 2px solid var(--sage-600);
  transform: translateY(-3px) rotate(45deg);
}

.faq-item[open] .faq-q::after {
  transform: translateY(2px) rotate(-135deg);
}

.faq-a {
  padding: 0 var(--space-lg) var(--space-md);
}

.faq-a p {
  font-size: 15px;
  line-height: 24px;
  color: var(--sage-700);
}

@media (prefers-reduced-motion: no-preference) {
  .faq-q::after {
    transition: transform 200ms ease;
  }
}

@media (max-width: 767px) {
  .faq-q {
    padding: 12px var(--space-md);
    font-size: 15px;
  }

  .faq-a {
    padding: 0 var(--space-md) var(--space-md);
  }
}
