/* Homepage only (index.html). Loaded after site.css and reuses its tokens;
   the other pages never load this file. */

[hidden] { display: none !important; }

.home main { padding-bottom: 24px; }
.home main > section { border-top: 0; }

/* ───────── Hero ───────── */

/* No top nav on the homepage: the footer is the navigation. */
.home-hero {
  padding: calc(76px + env(safe-area-inset-top)) 0 18px;
  text-align: center;
}

/* Logo to the left of the title. On a phone the words wrap to two lines
   ("Questly:" / "Game Tracker") and the logo grows to sit beside both. */
.home-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  margin: 0 0 20px;
  font-size: clamp(2.1rem, 5.6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 850;
}

.home-title img {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}

.home-title > span { text-align: left; }

.home-title .grad {
  white-space: nowrap;
  background: linear-gradient(135deg, #fff 0%, #ffb3a5 55%, var(--brand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero .lead {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-dim);
  font-size: clamp(1.02rem, 1.6vw, 1.15rem);
}

.get-row {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

/* The web app badge gets a row of its own under the two store badges. */
.get-row + .get-row { margin-top: 14px; }

/* Drawn to match the official 120x40 badges at 52px tall: black fill,
   #A6A6A6 hairline, rx 5.5 scaled by 1.3. */
.soon-badge {
  height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 0 13px;
  background: #000;
  border: 1.3px solid #A6A6A6;
  border-radius: 7px;
  color: #fff;
  cursor: default;
  user-select: none;
}

.soon-badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.soon-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.soon-text small {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfd2d8;
}

.soon-text small::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(3, 218, 197, 0.55);
  animation: soon-pulse 2.4s ease-out infinite;
}

.soon-text strong {
  margin-top: 4px;
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

@keyframes soon-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(3, 218, 197, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(3, 218, 197, 0); }
  100% { box-shadow: 0 0 0 0 rgba(3, 218, 197, 0); }
}

@media (max-width: 520px) {
  .home-hero { padding-top: calc(48px + env(safe-area-inset-top)); }
  .home-title img { width: 1.9em; height: 1.9em; }
  /* Break the line ourselves. Left to wrap, the text box keeps the full
     available width with empty space after "Questly:", so the logo and
     words sat left of centre; a forced break sizes it to "Game Tracker". */
  .home-title .grad { display: block; }
  .get-row { gap: 12px; }
  .get-row + .get-row { margin-top: 12px; }
  .soon-badge { height: 46px; padding: 0 15px 0 11px; border-radius: 6px; }
  .soon-badge svg { width: 23px; height: 23px; }
  .soon-text strong { font-size: 1.08rem; }
}

/* ───────── Showcase ───────── */

.showcase { padding: 14px 0 0; }

/* .marquee takes the pointer, wheel and keys; .marquee-mask fades the
   edges (kept separate so the focus ring isn't faded with them). */
.marquee {
  position: relative;
  outline: none;
  touch-action: pan-y;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.marquee.is-dragging { cursor: grabbing; }
.marquee:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 12px; }

.marquee-mask {
  overflow: hidden;
  padding: 18px 0 34px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

/* The gap is small because each phone image carries its own transparent
   margin for the red glow (about 6% a side). */
.marquee-track {
  display: flex;
  gap: 8px;
  width: max-content;
  will-change: transform;
}

/* Transparent phone renders (assets/img/appPhones, cropped to the phone and
   its glow), so no tile: they float on the page. */
.shot {
  flex: none;
  width: clamp(160px, 15vw, 210px);
  aspect-ratio: 600 / 1156;
  margin: 0;
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Without JS (or before it runs) the row is a plain swipeable strip. */
.marquee:not(.is-live) .marquee-mask {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-inline: 22px;
  scrollbar-width: none;
}
.marquee:not(.is-live) .shot { scroll-snap-align: center; }

.showcase-foot {
  display: flex;
  justify-content: center;
  margin-top: -14px;
}

.motion-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-mute);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.motion-btn:hover { color: var(--text); border-color: var(--line-strong); }
.motion-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.motion-btn svg { width: 12px; height: 12px; }
.motion-btn .i-play { display: none; }
.motion-btn[aria-pressed="true"] .i-play { display: block; }
.motion-btn[aria-pressed="true"] .i-pause { display: none; }

@media (max-width: 600px) {
  .shot { width: 42vw; }
  .marquee-track { gap: 6px; }
}

/* ───────── Reviews ───────── */

.voices { padding: 52px 0 40px; }

.voices .section-title { text-align: center; margin-bottom: 18px; }

.scores {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.score {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-card);
  transition: border-color .15s var(--ease), transform .15s var(--ease);
}
.score:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.score:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.score-value {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.score-value svg { width: 17px; height: 17px; color: #F5B301; }

.score-label { display: flex; flex-direction: column; line-height: 1.15; }
.score-label b { font-size: 0.86rem; font-weight: 700; }
.score-label small { font-size: 0.74rem; color: var(--text-mute); }

.voices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 18px;
}

.voice-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 22px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-card);
}

.voice-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.voice-head p {
  margin: 2px 0 0;
  color: var(--text-mute);
  font-size: 0.85rem;
}

/* Every card sits in the same grid cell, so the box is as tall as the
   tallest card and nothing jumps when they rotate. */
.rotator {
  flex: 1;
  display: grid;
  touch-action: pan-y;
}

.rotator > .rv {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease), visibility 0s linear .5s;
}

.rotator > .rv.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .5s var(--ease), transform .5s var(--ease), visibility 0s;
}

.rv {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
}

.rv-cover {
  flex: none;
  width: 76px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}
.rv-cover img { width: 100%; aspect-ratio: 90 / 128; object-fit: cover; }

.rv-main { flex: 1; min-width: 0; }

.rv-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rv-game {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.rv-game:hover { text-decoration: underline; text-underline-offset: 3px; }

.flames, .stars {
  flex: none;
  display: inline-flex;
  gap: 2px;
}
.flames { color: var(--brand); }
.flames svg { width: 16px; height: 16px; }
.stars { color: #F5B301; }
.stars svg { width: 15px; height: 15px; }

.rv-src {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.rv-headline {
  margin: 10px 0 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.rv-text {
  margin: 8px 0 12px;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  overflow: hidden;
}

.rv-by {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-mute);
  font-size: 0.84rem;
}
.rv-by .rv-name { color: var(--text); font-weight: 600; }

.rv-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--bg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-dim);
}

.dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.dots button {
  padding: 8px 3px;
  border: 0;
  background: none;
  cursor: pointer;
}
.dots button::before {
  content: "";
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width .3s var(--ease), background .3s var(--ease);
}
.dots button[aria-current="true"]::before { width: 20px; background: var(--brand); }
.dots button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px; }

@media (max-width: 520px) {
  .voices { padding-top: 40px; }
  .voice-col { padding: 18px 16px 12px; }
  .rv { gap: 13px; }
  .rv-cover { width: 62px; }
}

/* ───────── Compact footer ───────── */

.footer-compact { padding: 22px 0 26px; }

.footer-compact .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.footer-compact .brand { font-size: 1rem; gap: 10px; color: var(--text); }
.footer-compact .brand-mark { width: 32px; height: 32px; }

.footer-id {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-legal {
  margin: 0;
  color: var(--text-mute);
  font-size: 0.8rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 20px;
}
.footer-links a { font-size: 0.9rem; }

/* Social icons: their own centred row between the reviews and the footer
   (owner, 2026-10-27), outside the reviews section so they still show if
   reviews.json fails to load. */
.social-row { padding: 4px 0 44px; }

.socials {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.socials a {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: color .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.socials a:hover { color: var(--text); border-color: var(--line-strong); background: var(--bg-2); }
.socials a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.socials svg { width: 21px; height: 21px; }

@media (max-width: 640px) {
  .footer-compact .wrap { flex-direction: column; text-align: center; }
  .footer-id,
  .footer-nav { align-items: center; }
  .footer-links { justify-content: center; }
}

/* ───────── Reduced motion ───────── */

@media (prefers-reduced-motion: reduce) {
  .soon-text small::before { animation: none; }
  .rotator > .rv,
  .rotator > .rv.is-active { transition: none; transform: none; }
}
