/* ==========================================================================
   home.css — homepage-only styling (hero + featured strip)
   ========================================================================== */

.hero {
  position: relative;
  padding-block: var(--space-7) var(--space-6);
  overflow: hidden;
  border-bottom: var(--border-width) solid var(--color-border);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.02) 0px,
    rgba(255, 255, 255, 0.02) 1px,
    transparent 1px,
    transparent 3px
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 720px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-4);
}

.hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(255, 193, 69, 0.2);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-4);
}

.hero__title .is-accent {
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: var(--fs-md);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  max-width: 56ch;
}

.hero__search {
  max-width: 520px;
}

.hero__stats {
  display: flex;
  gap: var(--space-6);
  margin-top: var(--space-6);
  font-family: var(--font-mono);
}

.hero__stat-value {
  font-size: var(--fs-lg);
  color: var(--color-text);
  font-weight: var(--fw-bold);
}

.hero__stat-label {
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

@media (max-width: 768px) {
  .hero {
    padding-block: var(--space-7) var(--space-6);
  }

  .hero__title {
    font-size: var(--fs-2xl);
  }
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: var(--space-6);
}

/* ---------------------------------------------------------------------
   Hero animation — signature element.
   A chase of small "marquee bulbs" along the top edge, two slow-drifting
   gradient blobs behind the copy, and a staggered fade-up entrance for
   the hero content. All motion is disabled under prefers-reduced-motion
   (see base.css global rule).
   --------------------------------------------------------------------- */
.hero__lights {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-evenly;
  padding-top: 10px;
}

.hero__lights span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.25;
  animation: bulb-chase 2.4s ease-in-out infinite;
}

@keyframes bulb-chase {
  0%, 100% { opacity: 0.2; box-shadow: none; }
  50% { opacity: 1; box-shadow: 0 0 8px 2px rgba(255, 193, 69, 0.6); }
}

.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  animation: blob-drift 14s ease-in-out infinite;
}

.hero__blob--accent {
  width: 320px;
  height: 320px;
  top: -80px;
  right: 8%;
  background: var(--color-accent);
}

.hero__blob--secondary {
  width: 260px;
  height: 260px;
  bottom: -100px;
  right: 28%;
  background: var(--color-secondary);
  animation-delay: -6s;
}

@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 18px) scale(1.08); }
}

.hero__inner > * {
  opacity: 0;
  animation: hero-fade-up 0.7s ease forwards;
}

.hero__eyebrow { animation-delay: 0.05s; }
.hero__title { animation-delay: 0.15s; }
.hero__subtitle { animation-delay: 0.25s; }
.hero__search { animation-delay: 0.35s; }
.hero__stats { animation-delay: 0.45s; }

@keyframes hero-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__lights span,
  .hero__blob,
  .hero__inner > * {
    animation: none !important;
    opacity: 1;
  }
}

/* ---------------------------------------------------------------------
   Trending badge — small flame/ up-arrow style marker on trending cards
   --------------------------------------------------------------------- */
.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--color-secondary);
}

/* ---------------------------------------------------------------------
   Popular tags — frequency-weighted tag cloud
   --------------------------------------------------------------------- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tag-chip {
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------------
   Newsletter section
   --------------------------------------------------------------------- */
.newsletter {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: var(--space-7) var(--space-6);
  background: linear-gradient(135deg, var(--color-surface), var(--color-surface-alt));
  border: var(--border-width) solid var(--color-border);
  text-align: center;
}

.newsletter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 20% 0%, rgba(255, 193, 69, 0.12), transparent),
    radial-gradient(ellipse 60% 80% at 80% 100%, rgba(255, 93, 115, 0.1), transparent);
  pointer-events: none;
}

.newsletter__inner {
  position: relative;
  max-width: 480px;
  margin-inline: auto;
}

.newsletter__title {
  font-size: var(--fs-xl);
  margin-bottom: var(--space-2);
}

.newsletter__subtitle {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
}

.newsletter__form {
  display: flex;
  gap: var(--space-2);
}

.newsletter__form input[type="email"] {
  flex: 1 1 auto;
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
}

.newsletter__form input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--color-accent);
}

.newsletter__hint {
  margin-top: var(--space-3);
  font-size: var(--fs-xs);
  color: var(--color-text-faint);
}

.newsletter__success {
  color: var(--color-success);
  font-weight: var(--fw-medium);
}

@media (max-width: 560px) {
  .newsletter__form {
    flex-direction: column;
  }
}

/* ---------------------------------------------------------------------
   Homepage informational content (Why choose us, how to play, FAQ, etc.)
   Reuses existing design tokens throughout - same surface/border/radius
   language as game cards and other components elsewhere on the site.
   --------------------------------------------------------------------- */

/* Premium editorial treatment for the compact homepage information blocks. */
.home-info--featured {
  border-top: 1px solid var(--color-border);
}

.home-info--featured .home-info-card {
  position: relative;
  padding: var(--space-5) var(--space-5) var(--space-6);
  background: linear-gradient(145deg, var(--color-surface), var(--color-surface-alt));
}

.home-info--featured .home-info-card::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  margin-bottom: var(--space-4);
  border-radius: 999px;
  background: var(--color-accent);
}

.home-info--compact {
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

.home-info--compact .home-info-text {
  max-width: 78ch;
}

.home-info-text {
  max-width: 72ch;
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
}

.home-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

.home-info-card {
  padding: var(--space-5);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-lg);
}

.home-info-card h3 {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.home-info-card p {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

.home-steps {
  display: grid;
  gap: var(--space-3);
  max-width: 72ch;
  padding-left: 1.25em;
  color: var(--color-text-muted);
  line-height: var(--lh-relaxed);
}

.home-steps li::marker {
  color: var(--color-accent);
  font-weight: var(--fw-semibold);
}

.home-steps strong {
  color: var(--color-text);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: 72ch;
}

.faq-item {
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}

.faq-item__question {
  margin: 0;
}

.faq-item__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: none;
  border: 0;
  text-align: left;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  cursor: pointer;
}

.faq-item__trigger:hover {
  background: var(--color-surface-alt);
}

.faq-item__trigger:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.faq-item__icon {
  flex-shrink: 0;
  position: relative;
  width: 16px;
  height: 16px;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-text-muted);
  transform: translate(-50%, -50%);
  transition: transform var(--transition-fast);
}

.faq-item__icon::before {
  width: 12px;
  height: 2px;
}

.faq-item__icon::after {
  width: 2px;
  height: 12px;
}

.faq-item__trigger[aria-expanded="true"] .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg) scale(0);
}

.faq-item__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease;
}

.faq-item__answer > p {
  padding: 0 var(--space-4) var(--space-4);
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
  line-height: var(--lh-relaxed);
}

@media (max-width: 480px) {
  .home-info-card {
    padding: var(--space-4);
  }
}


/* ---------------------------------------------------------------------
   Trending: single-slide auto-advancing carousel. One large slide at a
   time (real game data, same play links as everywhere else), advancing
   automatically every 7s, pausing on hover/focus/tab-hidden. Fully
   responsive - always one full-width slide regardless of viewport.
   --------------------------------------------------------------------- */
.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: var(--border-width) solid var(--color-border);
}

.hero-slider__track {
  display: flex;
  transition: transform var(--transition-slow);
}

.hero-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 21 / 9;
  background: var(--color-surface-alt);
}

.hero-slide__media {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-slide__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-6);
  background: linear-gradient(0deg, rgba(6, 8, 15, 0.88) 0%, rgba(6, 8, 15, 0.45) 55%, transparent 100%);
  pointer-events: none;
}

.hero-slide__overlay > * {
  pointer-events: auto;
}

.hero-slide__category {
  align-self: flex-start;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
}

.hero-slide__title {
  font-size: var(--fs-xl);
  color: #fff;
  line-height: var(--lh-tight);
}

.hero-slide__description {
  max-width: 60ch;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-sm);
}

.hero-slide__play {
  align-self: flex-start;
  margin-top: var(--space-1);
}

.hero-slider__dots {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  display: flex;
  gap: var(--space-2);
  z-index: 1;
}

.hero-slider__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.4);
  padding: 0;
  cursor: pointer;
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.hero-slider__dot:hover {
  background: rgba(255, 255, 255, 0.7);
}

.hero-slider__dot[aria-current="true"] {
  background: var(--color-accent);
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .hero-slide {
    aspect-ratio: 4 / 3;
  }

  .hero-slide__overlay {
    padding: var(--space-4);
  }

  .hero-slide__title {
    font-size: var(--fs-lg);
  }

  .hero-slide__description {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider__track {
    transition: none;
  }
}

.slider-controls {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

.slider-controls__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  color: var(--color-text-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
}

.slider-controls__btn:hover:not(:disabled) {
  color: var(--color-text);
  border-color: var(--color-border-strong);
  background: var(--color-surface-alt);
}

.slider-controls__btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.slider-controls__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
